Share Posted January 26, 2014 Trying to tween a swf loader var queue:LoaderMax = new LoaderMax({name:"mainQueue",onProgress:progressHandler,oncomplete:completeHandler,onError:errorHandler,maxConnections:5}); queue.append( new SWFLoader("shoeHorn.swf", {name:"start", estimatedBytes:1363148.8, container:this, autoPlay:true,visible:false,onComplete:completeHandler}) ); queue.append( new SWFLoader("yourvids.swf", {name:"yv", estimatedBytes:1080, container:this, autoPlay:false,visible:false}) ); queue.append( new SWFLoader("book_Luanch.swf", {name:"bookl", estimatedBytes:10670, container:this, autoPlay:false,visible:false,x:0,y:0,width:1000,height:600}) ); LoaderMax.prioritize("shoeHorn.swf"); queue.load(); function progressHandler(event:LoaderEvent):void { trace("progress: " + event.target.progress); } function errorHandler(event:LoaderEvent):void { trace("error occured with " + event.target + ": " + event.text); } function completeHandler(event:LoaderEvent):void { TweenLite.from(event.target.content, 0, {x:0,y:0,autoAlpha:1}) setChildIndex(Object(root).spauseBtn,numChildren - 1); TweenLite.to(splayBtn, 1, {autoAlpha:1 }); TweenLite.to(Object(root).fullScreenBtn, 2, {autoAlpha:1}) trace("it worked!"); } function bookon():void { TweenLite.to(bookl.content, 1, {autoAlpha:1}); } Link to comment Share on other sites More sharing options...
Share Posted January 29, 2014 You named your SWFLoader "book1", but that has nothing to do with the DisplayObject's name, and it seems like that's what you're trying to reference. I'm a little fuzzy on what you're trying to do, but maybe it's something like this: TweenLite.to(LoaderMax.getContent("book1"), 1, {x:0,y:0,autoAlpha:1}); ? Link to comment Share on other sites More sharing options...
Author Share Posted January 29, 2014 Thanks Jack,So I'm trying to see if I could tween the Alpha of bookl so I could possiblytoggle it off and on. function bookon():void is called from inside shoeHorn.swf var parentMovie:MovieClip = this.parent.root as MovieClip;parentMovie.bookon(); I gave the code a tryTweenLite.to(LoaderMax.getContent("book1"), 1, {x:0,y:0,autoAlpha:1});doesn't seem to do the trick, bummer Link to comment Share on other sites More sharing options...
Share Posted January 29, 2014 I'm pretty confused about how you've structured things - feel free to post a super simple example set of files that can be published on our end. Please don't send us all the regular production files with everything (it's too time-consuming to pick through all the code and figure out which things matter) - just a simplified set of files is great. Are you asking how to fade the alpha of the content of a particular SWFLoader or are you asking how to call a particular method that's inside a subloaded swf? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now