Jump to content
Search Community

Using LoaderMax instances with TimelineMax

Chris test
Moderator Tag

Recommended Posts

Hi there. I'm using the wonderful LoaderMax classes to load a series of swfs, and am trying to sequence them in TimeLineMax. Getting these two to work together has been rather difficult. The problem I'm finding is that I can't play the raw content in LoaderMax loaded swfs as simply as myTimeline.play(); Instead, the loaded swf files go visible=true and fade up, but don't play if set to autoPlay:false.

 

To give you an idea of my issue here is the code, beginning with the onComplete function for LoaderMax:

 

var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler});
var myTimeline:TimelineMax = new TimelineMax();

. . . 

function completeHandler(event:LoaderEvent):void {
       var mc1CD:ContentDisplay = LoaderMax.getContent("My First MC");
var mc2CD:ContentDisplay = LoaderMax.getContent("My Second MC");
function playMovie():void {
	myTimeline.insert( new TweenLite(crispWhiteCD, 1, {autoAlpha:1}));  //works
	myTimeline.append( new TweenLite(ripeRougeCD, 1, {autoAlpha:1})); //works
	myTimeline.addLabel("mc1LB", 1);
	myTimeline.addLabel("mc2LB", 50);
	myTimeline.play(); //broken
}
TweenLite.delayedCall(1.5, playMovie); 
}

queue.append( new SWFLoader("_animation1.swf", {name:"My First MC", estimatedBytes:373760, container:holder, autoPlay:false, visible:false, alpha:0}) );
queue.append( new SWFLoader("_animation2.swf", {name:"My Second MC", estimatedBytes:320512, container:holder, autoPlay:false, visible:false, alpha:0}) );

 

Any idea what syntax must be used to get a LoaderMax swf to play as part of a TimeLineMax timeline? Thanks in advance to anyone who can help!

Link to comment
Share on other sites

Hi Chris,

 

Sorry, I'm not here to help I'm afraid. I just have a very similar problem with playing sequential swfs. I really like your idea of using the wonderful 'TimeLineMax' which is my current favourite thing on the planet!

I had no idea it could possibly work with SWFLoader.

 

If you do get this to work, please, please post your solution here as it will be really useful to know, and not just for me I'm sure.

 

Good Luck!

Roger

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...