Jump to content
Search Community

Harvid

Members
  • Posts

    16
  • Joined

  • Last visited

Harvid's Achievements

0

Reputation

  1. loading count twice first time loading. first time the site is loaded my preloader count twice if im closing the browser and trying again it's only count onetime ? see www.harvid.dk/beta
  2. Ok now its working just for the help of other beginners her is the code subloaded swf var video:VideoLoader = new VideoLoader("SWFS/videos/1.f4v", {name:"Contactvideo", repeat:-1, autoPlay:true, container:con1, width:1024, height:428, scaleMode:"proportionalInside", requireWithRoot:this.root}); video.load(); function destroy():void { video.dispose(true); } main .swf var con1:ContentDisplay = LoaderMax.getContent("menymainClip1"); con1.rawContent.destroy() and thank you for explaining it for me
  3. I think i understand. i have no idea how to duit, the button ther stop the loadet video is in the main swf and the video is in a subloaded swf. do you know wher i can find a example how to du it, Sorry i'm not good to coding, i am a designer and this is the last thing before i can uploade my side.
  4. My crestion is how do i clean up the loaders for videos, the videos is loaded in whit loadermax inbetted insight .swf i have tryed to .empty(true,true) and removeChild. so the dispose(true) was just another trat // CLEAN UP queuemeny2 FOR OLDE VIDEOS switcher = 1; queuemeny1.append( new SWFLoader("SWFS/MAIN/"+event.target.name+".swf", {name:"menymainClip1",onInit:initHandler, alpha:0, container:this, y:86, autoPlay:false})); queuemeny1.load(); trace("første") } else { // CLEAN UP queuemeny1 FOR OLDE VIDEOS switcher = 0; queuemeny2.append( new SWFLoader("SWFS/MAIN/"+event.target.name+".swf", {name:"menymainClip2",onInit:initHandler, alpha:0, container:this, y:86, autoPlay:false})); queuemeny2.load(); trace("anden")
  5. Hey it works in the start loader, when i add it to the loader sequins, it seems like it kill the loader max totaly. have repaired the test file so it shouldn't make any errors now when testing, and sorry for that :-S
  6. i cannot figure out how to stop the video insight the loadet .swf i have tryed to .empty(true) and removeChild. but the video seems to be running in the background,and dragging my olde test computer down in graphic performance. please help me. i almost can't take anymore code problems
  7. i trying to incorporate the code in my project a22.swf don't seems to be a part of the queue1 in loader.swf my traces:
  8. its dreving me crasy i found this post and its don't seems to work in my loader the code is import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; var loader:SWFLoader = new SWFLoader("a33.swf", {onInit:initHandler, onComplete:completeHandler}); addChild(loader.content) function initHandler(event:LoaderEvent):void { var childLoader:LoaderMax = LoaderMax.getLoader("childLoader") as LoaderMax; // trace("found " + childLoader); } function completeHandler(event:LoaderEvent):void { var childLoader:LoaderMax = LoaderMax.getLoader("childLoader") as LoaderMax; // trace("childLoader took " + childLoader.loadTime + " seconds to load " + childLoader.bytesTotal + " bytes."); trace("completeHandler complete"); } loader.load(); in my childe loader the code is import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; var childLoader:SWFLoader = new SWFLoader("a22.swf",{onComplete:completeHandler}); addChild(childLoader.content) function completeHandler(event:LoaderEvent):void { var image:ContentDisplay = LoaderMax.getContent("a22.swf"); TweenLite.to(image, 1, {alpha:1}); trace(event.target + " is complete!"); } childLoader.load(); if i trace the i get a error and if skipping errors traces its seems to load the child's afterwards ! please help me
  9. Hey have a loader then ends in a loader, so people will see 2 loader sequence in a road. not goot at all. I'm Looking For a solution for it wet loadermax. like the preloader.swf loads - startmeny.swf and its first childe About.swf i have seen the requireWithRoot. bot i don't understand it, and i cannot finde any (copy /paste) examples to figure it out cut you please show me a loader wits has it incorporated, or maby you hav a better idea how to do it ? agen sorry for my bad english
  10. its works now this.stage.addEventListener(Event.FULLSCREEN, fullScrHandler3); function fullScrHandler3(event:FullScreenEvent):void { if (stage.displayState == StageDisplayState.NORMAL) { this.stage.removeEventListener(Event.FULLSCREEN, fullScrHandler3); queuepp1.empty(true, true); queuepp2.empty(true, true); gotoAndStop(4); }} i detent understand the addEventListener wasn't remove what the .empty(true, true); Thank you so mutch
  11. hey why I believed empty detent works is firste time i using the "fullScrHandler3()" all works if loading a new .swf like (g1.swf) then its crash if I have empty the previous loaded shut is be like first time every time the code is the same in all loadet (g1 to g8) function k9CLICK(event:MouseEvent):void { imageNumber = 9; gotoAndStop(5); stage.displayState = StageDisplayState.FULL_SCREEN; } function k9Over(event:MouseEvent):void { TweenMax.to(k9, 0.7, {dropShadowFilter:{color:0xffffff, alpha:0.1, blurX:2, blurY:2, strength:100}}); TweenMax.to(k9, 0.7,{colorMatrixFilter:{saturation:1}}); } function k9Out(event:MouseEvent):void{ TweenMax.to(k9, 0.7, {dropShadowFilter:{color:0xffffff, alpha:0, blurX:0, blurY:0, strength:0}}); TweenMax.to(k9, 0.7,{colorMatrixFilter:{saturation:0.35}}); } this.stage.addEventListener(Event.FULLSCREEN, fullScrHandler3); function fullScrHandler3(event:FullScreenEvent):void { if (stage.displayState == StageDisplayState.NORMAL) { queue1.empty(true, true); queue2.empty(true, true); gotoAndStop(4); }} sorry for all my stupid christians but im really new in coding could you please show me what you mean because i don't understand what i must do
  12. Hey i dont think the queue1/queue2 is ben empty of its contents what am i doing wrong function completeHandler2OK():void { queue1.empty(true, true); var image2:ContentDisplay = LoaderMax.getContent("mainClip2"); TweenLite.to(image2, 1.5 , {alpha:1, onComplete:image2.rawContent.play}); switcher2 = 1; } g2 is loaded into queue1 all code import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; import flash.display.StageDisplayState; var ShowArray:Array = [g1, g2, g3, g4 ,g5, g6, g7, g8]; //////////////////////////////////////////////////////////// g1.addEventListener(MouseEvent.CLICK,Showclick) g2.addEventListener(MouseEvent.CLICK,Showclick) g3.addEventListener(MouseEvent.CLICK,Showclick) g4.addEventListener(MouseEvent.CLICK,Showclick) g5.addEventListener(MouseEvent.CLICK,Showclick) g6.addEventListener(MouseEvent.CLICK,Showclick) g7.addEventListener(MouseEvent.CLICK,Showclick) g8.addEventListener(MouseEvent.CLICK,Showclick) //////////////////////////////////////////////////////////// var switcher = 0; var switcher2 = 0; var queue1:LoaderMax = new LoaderMax({name:"mainQueue1", onProgress:progressHandler1, onComplete:completeHandler1/*, onError:errorHandler*/}); var queue2:LoaderMax = new LoaderMax({name:"mainQueue2", onProgress:progressHandler2, onComplete:completeHandler2/*, onError:errorHandler*/}); TweenLite.to(preloadText, 0 , {alpha:0}); function Showclick(event:MouseEvent):void{ trace(event.target.name + " load"); if (switcher == 0){ queue1.empty(true, true); queue1.append( new SWFLoader("SWFS/SHOWCASES/"+event.target.name+".swf", {name:"mainClip1", alpha:0, container:this, y:86, autoPlay:false})); queue1.load(); switcher = 1; trace("første") } else { queue2.empty(true, true); queue2.append( new SWFLoader("SWFS/SHOWCASES/"+event.target.name+".swf", {name:"mainClip2", alpha:0, container:this, y:86, autoPlay:false})); queue2.load(); switcher = 0; trace("anden") } } ////////////////loader queue 1////////////////////////////////////////// function progressHandler1(event:LoaderEvent):void { preloadText.text = ("Loading " + Math.round(event.target.progress*100).toString() + "%"); TweenLite.to(preloadText, 1.0 , {alpha:1}); if (switcher2 == 1){ //clip exists var image2:ContentDisplay = LoaderMax.getContent("mainClip2"); TweenLite.to(image2, 1.5 , {alpha:0}); } } /*--------------------------------------------------------------*/ function completeHandler1(event:LoaderEvent):void { TweenLite.to(preloadText, 1.5 , {alpha:0}); if (switcher2 == 1){ var image2:ContentDisplay = LoaderMax.getContent("mainClip2"); TweenLite.to(image2, 0.5 , {alpha:0, onComplete:completeHandler1OK}) } else { completeHandler1OK() }} /*--------------------------------------------------------------*/ function completeHandler1OK():void { queue2.empty(true, true); var image1:ContentDisplay = LoaderMax.getContent("mainClip1"); TweenLite.to(image1, 1.5 , {alpha:1, onComplete:image1.rawContent.play}); } /////////////////loader queue 2////////////////////////////////////////////// function progressHandler2(event:LoaderEvent):void { preloadText.text = ("Loading " + Math.round(event.target.progress*100).toString() + "%"); TweenLite.to(preloadText, 1.0 , {alpha:1}); var image1:ContentDisplay = LoaderMax.getContent("mainClip1"); TweenLite.to(image1, 1.5 , {alpha:0}); } /*--------------------------------------------------------------*/ function completeHandler2(event:LoaderEvent):void { TweenLite.to(preloadText, 1.5 , {alpha:0}); var image1:ContentDisplay = LoaderMax.getContent("mainClip1"); TweenLite.to(image1, 0.5 , {alpha:0, onComplete:completeHandler2OK}) } /*--------------------------------------------------------------*/ function completeHandler2OK():void { queue1.empty(true, true); var image2:ContentDisplay = LoaderMax.getContent("mainClip2"); TweenLite.to(image2, 1.5 , {alpha:1, onComplete:image2.rawContent.play}); switcher2 = 1; } ////////////////////////////////////////////////////////////
  13. have found a solution in the loadet .swf i moved the action key frame to frame 2 I do not understand it but it works Thank you for the help
  14. Hey I can not get it to work with LoaderMax. for some reason I can not get it to wait for the onComplete, it immediately start to play ? queue1.append( new SWFLoader("test/"+event.target.name+".swf", {name:"mainClip1", alpha:0, container:this, y:86, autoPlay:false})) TweenLite.to(image1, 1.5 , {alpha:1, onComplete:image1.rawContent.play}); import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; import flash.display.StageDisplayState; var ShowArray:Array = [g1, g2, g3, g4 ,g5, g6, g7, g8]; //////////////////////////////////////////////////////////// g1.addEventListener(MouseEvent.CLICK,Showclick) g2.addEventListener(MouseEvent.CLICK,Showclick) g3.addEventListener(MouseEvent.CLICK,Showclick) g4.addEventListener(MouseEvent.CLICK,Showclick) g5.addEventListener(MouseEvent.CLICK,Showclick) g6.addEventListener(MouseEvent.CLICK,Showclick) g7.addEventListener(MouseEvent.CLICK,Showclick) g8.addEventListener(MouseEvent.CLICK,Showclick) //////////////////////////////////////////////////////////// var switcher = 0; var switcher2 = 0; var queue1:LoaderMax = new LoaderMax({name:"mainQueue1", onProgress:progressHandler1, onComplete:completeHandler1/*, onError:errorHandler*/}); var queue2:LoaderMax = new LoaderMax({name:"mainQueue2", onProgress:progressHandler2, onComplete:completeHandler2/*, onError:errorHandler*/}); TweenLite.to(preloadText, 0 , {alpha:0}); function Showclick(event:MouseEvent):void{ trace(event.target.name + " load"); if (switcher == 0){ queue1.empty(true, true); queue1.append( new SWFLoader("test/"+event.target.name+".swf", {name:"mainClip1", alpha:0, container:this, y:86, autoPlay:false})); queue1.load(); switcher = 1; trace("første") } else { queue2.empty(true, true); queue2.append( new SWFLoader("test/"+event.target.name+".swf", {name:"mainClip2", alpha:0, container:this, y:86, autoPlay:false})); queue2.load(); switcher = 0; trace("anden") } } ////////////////loader queue 1////////////////////////////////////////// function progressHandler1(event:LoaderEvent):void { preloadText.text = ("Loading " + Math.round(event.target.progress*100).toString() + "%"); TweenLite.to(preloadText, 1.0 , {alpha:1}); if (switcher2 == 1){ //clip exists var image2:ContentDisplay = LoaderMax.getContent("mainClip2"); TweenLite.to(image2, 1.5 , {alpha:0}); } } /*--------------------------------------------------------------*/ function completeHandler1(event:LoaderEvent):void { TweenLite.to(preloadText, 1.5 , {alpha:0}); if (switcher2 == 1){ var image2:ContentDisplay = LoaderMax.getContent("mainClip2"); TweenLite.to(image2, 0.5 , {alpha:0, onComplete:completeHandler1OK}) } else { completeHandler1OK() }} /*--------------------------------------------------------------*/ function completeHandler1OK():void { var image1:ContentDisplay = LoaderMax.getContent("mainClip1"); TweenLite.to(image1, 1.5 , {alpha:1, onComplete:image1.rawContent.play()}); queue2.empty(true, true); } /////////////////loader queue 2////////////////////////////////////////////// function progressHandler2(event:LoaderEvent):void { preloadText.text = ("Loading " + Math.round(event.target.progress*100).toString() + "%"); TweenLite.to(preloadText, 1.0 , {alpha:1}); var image1:ContentDisplay = LoaderMax.getContent("mainClip1"); TweenLite.to(image1, 1.5 , {alpha:0}); } /*--------------------------------------------------------------*/ function completeHandler2(event:LoaderEvent):void { TweenLite.to(preloadText, 1.5 , {alpha:0}); var image1:ContentDisplay = LoaderMax.getContent("mainClip1"); TweenLite.to(image1, 0.5 , {alpha:0, onComplete:completeHandler2OK}) } /*--------------------------------------------------------------*/ function completeHandler2OK():void { var image2:ContentDisplay = LoaderMax.getContent("mainClip2"); TweenLite.to(image2, 1.5 , {alpha:1, onComplete:image2.rawContent.play}); switcher2 = 1; queue1.empty(true, true); } ////////////////////////////////////////////////////////////
  15. I do not understand why it does not work I get this error message what am I not doing right ?
×
×
  • Create New...