Jump to content
Search Community

Unable to TweenLite loaded content using SWFLoader

neuralism test
Moderator Tag

Recommended Posts

Was wondering if I could get some help.

 

I don't know what I'm doing wrong.

 

I'm getting a VerifyError: Error #1053: Illegal override of addChild in com.greensock.TimelineLite when trying to "TweenLite.to" loaded content from LoaderMax.

 

Any thoughts?

 

package
{
import flash.display.MovieClip;

import com.greensock.TweenLite;
import com.greensock.loading.SWFLoader;
import com.greensock.loading.data.SWFLoaderVars;
import com.greensock.events.LoaderEvent;

public class myClass extends MovieClip
{
	var loader:LoaderMax();

	public function myClass()
	{
		loader = new LoaderMax(onComplete: completeHandler);
		loader.append(new SWFLoader("my.swf", new SWFLoaderVars().name("my_swf").container(this)));
		loader.load();
	}

	public function completeHandler(event:LoaderEvent):void
	{
		var my_swf:ContentDisplay = loader.getContent("my_swf");

		TweenLite.to(my_swf, 0.5, { x: 100 }); // ERROR WHEN TRYING TO TWEEN LOADED OBJECT
	}
}

}

Link to comment
Share on other sites

Thanks greensock, manage to resolved the issue. It wasn't due to old versions of TweenLite published on the swfs. I had tweening code on the main timeline of my child swfs. Chucked them into MovieClips and its all working fine now! Thanks again!

Link to comment
Share on other sites

  • 3 months later...

They should have the most recent versions. I re-exported everything once I started researching the issue.

 

I'll look into using the LoaderContext. It seems like segregating the subloaded swfs would solve the problem.

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...