Jump to content
Search Community

Can we add fromTo properties to external SWF Files?

learner_7n test
Moderator Tag

Recommended Posts

Hi,

 

I am using the following code which is quite fine. I just want to add TweenMax fromTo properties (for x & y positions) to have some walking along effect. Now it is walking on one place.

 

The following is the code I am using:

 

queue.append(new SWFLoader("WalkingMan.swf", {WalingMan:"swf", x:-10, y:530, width:75, height:75, delay:5, repeat:-1, yoyo:true, container:this}) );

 

Thanks in advance for any help.

 

Regards.

Link to comment
Share on other sites

It looks like your code is mixing two completely different things - LoaderMax and TweenMax. You certainly can use them together, but you'd do it kinda like this:

queue.append(new SWFLoader("WalkingMan.swf", {width:75, height:75, container:this, onComplete:completeHandler}) );

function completeHandler(event:LoaderEvent):void {
   TweenMax.to(event.target.content, 1, {x:-10, y:530, repeat:-1, yoyo:true});
}

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