Jump to content
Search Community

rotation works in Flash Dev but not browser

kirks61 test
Moderator Tag

Recommended Posts

I'm using TweenLite AS2 v.11 to do a simple -90 degree rotation along with other tweens. All of the tweens work in the Flash development tool just fine. However in the browser, the rotation doesn't work at all.

 

Any ideas what I might be doing wrong?

 

mcSlider2.mcHomeScreen.mcIconVideo.onRelease=function(){
TweenLite.to(_root.mcPhone, 1, {_x:200, _y:450, _rotation:-90 });
TweenMax.allTo([mcArrowLeft,mcArrowRight,mcTopBar,mcScreenTitleBar,mcSlider2,mcInnerGlare,_root.mcPhone.mcGlare], 1, {_alpha:0});
TweenLite.to(mcAnnivVideoScreen, 1, {_alpha:100});
TweenLite.delayedCall(1.1, hidemcAnnivVideoScreen);
function hidemcAnnivVideoScreen(){
	mcArrowRight._visible = false;
	mcTopBar._visible = false;
	mcScreenTitleBar._visible = false;
	mcSlider2._visible = false;
}
}

mcAnnivVideoScreen.mcBtnDone.onRelease=function(){
TweenLite.to(_root.mcPhone, 1, {_x:626, _y:16, _rotation:0 });
TweenMax.allTo([mcArrowLeft,mcArrowRight,mcTopBar,mcScreenTitleBar,mcSlider2,mcInnerGlare,_root.mcPhone.mcGlare], 1, {_alpha:100});
TweenLite.to(mcAnnivVideoScreen, 1, {_alpha:0});
	mcArrowRight._visible = true;
	mcTopBar._visible = true;
	mcScreenTitleBar._visible = true;
	mcSlider2._visible = true;
}

Link to comment
Share on other sites

There must be something else going on either in your file or maybe your browser is using a very old/stale version of the Flash Player or it's corrupt. I'm pretty confident it's not a problem with TweenLite/Max because you're the first person to mention something like this and v11 has been used by many thousands of people for over a year now. Of course there's always a chance that you indeed discovered a bug, so I'd love to see an example of this in action - can you show me? Please post a simple FLA that can be compiled on my end and then tell me what browser to use (and what platform) to see the issue.

 

Oh, and I noticed you're using a nested function - I'd strongly recommend against that. It's considered a poor practice in ActionScript (it can cause gc issues or just plain won't work in certain circumstances).

Link to comment
Share on other sites

Sorry for taking so long to reply, just really overwhelmed with work. Anyway, here's a link to a work on progress: http://www.oromamedia.com/msecenter.com/

 

When you click on the 10 Years Anniversary Video (lower-left corner of phone display), the phone should rotate to -90

When you click on the blue Done button, it should rotate back to original position.

 

I fixed the nested function error but I'm still getting the same results.

 

I've tested in FireFox 3.6.13 and Internet Explorer 8.0.6, Windows XP service pack 3, Flash player 10.1.102.64

 

I'll work on another fla as soon as I can.

Link to comment
Share on other sites

it seems your problem is not being explained accurately.

 

the swf that contains the phone does infact work fine in a browser:

http://www.oromamedia.com/msecenter.com ... header.swf

 

the problem is that your swf is not working when loaded into another swf

 

when you are using AS2 with externally loaded assets _root refers to the parent swf that is doing the loading. once header.swf gets loaded into preloader.swf... _root mentioned in header refers to the root of your preloader.

 

to prevent this add

 

this._lockroot = true;

 

to the first frame of your msecenter-header.swf

 

OR in header.swf use relative paths from the buttons to the phone

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