Jump to content
Search Community

How to stop it when moving from HOME to CONTACT page?

learner_7n test
Moderator Tag

Recommended Posts

Hi,

 

I have the following code on Home_mc which is working fine. But when I move from Home_mc to Contact_mc it should stop. How can I stop it? What is the code, please.

 

var mySwf2:SWFLoader = new SWFLoader("Clouds.swf", {width:1000, height:400, container:this, onComplete:completeHandler2});
mySwf2.content.mask = MaskCloud_mc
mySwf2.load();

function completeHandler2(event:LoaderEvent):void {
   TweenLite.to(event.target.content, 0,{alpha:0});
   TweenMax.fromTo(event.target.content, 3, {x:0, y:0, width:1000, height:400, alpha:1}, {x:0, y:0, width:1000, height:400, alpha:1, delay:0});
}

 

Regards.

Link to comment
Share on other sites

Hi,

 

The following code works when I put this code on Contact_mc. But when i go back to Home_mc from Contact_mc, the .SWF file animates and the mySwf2.content.mask = MaskCloud_mc the mask doesn't works.

 

Note: When I open it first time, the mask works fine, but when I click on Home_mc the second time, the mask doesn't work. Please help.

 

mySwf2.load();

 

Regards.

Link to comment
Share on other sites

honestly, I have absolutely no idea what you are asking.

 

the only thing I can vaguely suggest is try to make it so that when you click on home_mc the code:

 

mySwf2.content.mask = MaskCloud_mc

 

gets run again, maybe put it in a function that gets called when you go to home_mc.

 

----

 

also, please keep in mind that the point of the forums is to help people understand the functionality of the GreenSock Tweening Platform. We unfortunately do not have the resources to assist people with every trouble spot they encounter when building a project.

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