Jump to content
Search Community

DarkBrainComics

Members
  • Posts

    10
  • Joined

  • Last visited

DarkBrainComics's Achievements

0

Reputation

  1. Thank you - worked great! I had been using .append(new SWFLoader()) type of lingo but I could not get it to be on the bottom, but pulling out the loader and then placing via addChildAt it did the trick! var loader:SWFLoader = new SWFLoader(mySWFFile, {name:"myName", x:0, y:1200, autoPlay:false}); this.addChildAt(loader.content, 0); SceneQueue.append(loader); SceneQueue.load();
  2. My root stage has several layers, one I want to be on top of swf clips I load using LoaderMax. Although I can easily manage x and y, I don't see a z index to control where the movie is placed, nor does using "this" as the container (with the action script on the bottom layer) do anything. The SWF always loads on top of everything else. Is there an easy way to manage the z index and put loaded SWFs exactly where I want them?
  3. I think I finally figured out my core problem. I did not understand that I could access LoaderMax objects directly and did not need to futz with containers and whatnot. This looks like it will work for me: I set a name in the load code like: SceneQueue.append( new SWFLoader(ComicSceneSWFURL[myIndex], {name:"SceneLoader_" + SceneCacheToProcess, container:this, x:0, y:1200, z:0, autoPlay:false}) ); SceneQueue.load(); Then after it is loaded, I can access it and play it via: LoaderMax.getContent("SceneLoader_" + SceneCacheNum).y=0; LoaderMax.getContent("SceneLoader_" + SceneCacheNum).rawContent.play(); So, uh, looks like I was just fundamentally not understanding LoaderMax... I'm hopeful this new trick will now let me load up multiple loaders, move them around, play them, then unload them, etc.
  4. Yeah, was thinking that. How can I later remove that specific child and free the memory? (I was hoping addChild would let me give it a name).
  5. Thanks for the tip on cache, I have more fundamental question. I have 4 MovieClips defined on my stage that I want to move around and manage - but load them with SWF content that I use LoaderMax to get. I have it working for one, but I think I missed an important tidbit - instead of loading the Movieclip, it seems to have replaced or ignored it - so later I can't move the SWF around using the name. function SceneQueueCompleteHandler(event:LoaderEvent):void { var ComicDisplay:ContentDisplay = LoaderMax.getContent("comicClip"); var ComicScene_mc:MovieClip; ComicScene_mc = getChildByName("SceneCache0_mc') as MovieClip; ComicScene_mc = ComicDisplay.rawContent; ComicScene_mc.x = 0; ComicScene_mc.y = 0; ComicScene_mc.play(); } The above works, I see the loaded SWF playback, but then I can't do this: SceneCache0_mc.y=800; And I think I'm missing something important - what is the best way to load this SWF into that existing movieclip - and how can I later unload that SWF and load a different one into that same movieclip?
  6. I am starting a project and I would like to use LoaderMax to pre-load entire SWF movies that I then playback, and then load the next one and play it. I want to "pre-load" the next one, of course, but my question is this: What is a reasonable way to approach loading 30 SWF files in a row, each being 1 to 3 MB large. If I just queue them all, will they blow up the viewer's browser? Is there a way to manage the memory allocation? Would love code samples. Sorry if this is a newb question. (Each of my SWF vidoes is 1920x1080 high-def and runs from 30 seconds to 5 minutes, depending). Sorta hoping a project similar to this has been done and documented.
  7. Thank you Carl, I was able to get it to work! I am going to move to loading FLVs instead of SWFs anyway, so I can simplify and go this route - appreciate the excellent help. function completeHandlerVID(event:LoaderEvent):void { var ComicVideo:VideoLoader = LoaderMax.getLoader("comicVideo"); addChildAt(ComicVideo.content,0); ComicVideo.playVideo(); }
  8. I have some code that works great for external SWF files, but I'm struggling to find good samples and what I have to tweak to load FLV or MP4 files... Basically my problem is in completeHandler where I simply want to play the video - I can't get it to go, and get this error - and I've tried .playVideo(); and no go either... I know I'm missing something basic - so basic it isn't even IN the samples I've been reviewing... Although I poke around in as3, I am not good enough to dig into the API documentation and make heads or tails out of it - and I just can't find *complete* samples of how to do this that don't make assumptions which I guess I don't have setup right. TypeError: Error #1034: Type Coercion failed: cannot convert flash.media::Video@2be513f9 to flash.display.MovieClip. var Comic_mc:MovieClip; import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.display.*; function PreviewLoad(ComicSWF:String) { // for testing, hardcode //ComicSWF = "SWFTest.swf"; //ComicSWF = "MP4Test.mp4"; ComicSWF = "FLVTest.flv"; var queue:LoaderMax = new LoaderMax({name:"comicQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); if (ComicSWF.indexOf(".mp4") > 0) { queue.append( new VideoLoader(ComicSWF, {name:"comicClip", container:this, width:640, height:360, z:1000000, autoPlay:false}) ); } if (ComicSWF.indexOf(".flv") > 0) { queue.append( new VideoLoader(ComicSWF, {name:"comicClip", container:this, width:640, height:360, z:1000000, autoPlay:false}) ); } if (ComicSWF.indexOf(".swf") > 0) { queue.append( new SWFLoader(ComicSWF, {name:"comicClip", container:this, width:640, height:360, z:1000000, autoPlay:false}) ); } queue.load(); } function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); } function completeHandler(event:LoaderEvent):void { var ComicDisplay:ContentDisplay = LoaderMax.getContent("comicClip"); trace(event.target + " is complete!"); Comic_mc = ComicDisplay.rawContent; Comic_mc.x = 10; Comic_mc.y = 10; addChildAt(Comic_mc,0); LoadingPreview_mc.y=2000; Comic_mc.s Comic_mc.play(); } function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); }
  9. Oh thanks! It was simply that I was using 100 not 1! (Apparently it transitioned fast enough from 0 to 100 to LOOK like it was working on the way up. (I was AS3 in Flash CS5, by the way - I always import the library every time as I've read it doesn't matter to Adobe as they will import it only once). So, when I used 2 (instead of 250) and 1 or 0 = IT WORKS! Thanks so much X10! My awesome romantic *** scene is now truly romantic and not choppy!
  10. I have a movieclip I want to fade in and then fade out. What is really strange is that I can get it to fade IN with TweenLite but not fade out! Seems like the same code, but the second one does not work at all. I'm using Adobe Flash CS5 and just re-downloaded the Tween package so I'm on the latest (VERSION: 1.65 DATE: 2011-01-18) The clip "P1_mc" is setup as Style:Alpha with 0 to start with. The trace shows up for both - so I know the code is being executed. I do have a subscription - although I think this should work with TweenLite (right?) FRAME 1: import com.greensock.*; trace("fade in!"); TweenLite.to(P1_mc, 250, {alpha:100}); FRAME 125: import com.greensock.*; trace("fade out!"); TweenLite.to(P1_mc, 250, {alpha:0});
×
×
  • Create New...