473,499 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Causing a button to play backwards onRollOut

59 New Member
I currently have a movie clip buttons that have two Frame Labels: _on to be used when there is no mouseover, and _over in the case of a mouseover.

Currently, my Actionscript looks like:

home_mc.onRollOver = function ()
{
home_mc.gotoAndPlay("_over");
products_mc.gotoAndStop("_on");
}

products_mc.onRollOver = function () {
products_mc.gotoAndPlay("_over");
home_mc.gotoAndStop("_on");
}

I'd like to have it where instead of jumping directly to the 'no mouseover' state that it would play the 'mouseover' backwards so it can be smoother. Is this possible, and if so how can it be?
Aug 31 '07 #1
2 2781
xNephilimx
213 Recognized Expert New Member
hi, metaphysics.
Don't complicate yourself, just add a transition from the _over state to the _on state in your button, and then in the last frame of the button just put a gotoAndStop(1), so when it finished playing you ensure the button is back on it's first frame again.
If you want to make it play back, which I consider totally unnecesary because the way I explained before, you can do it this way:

Expand|Select|Wrap|Line Numbers
  1. home_mc.onRollOver = function() {
  2.     delete this.onEnterFrame;
  3.     this.gotoAndPlay("_over"); //replaced home_mc with this
  4.     products_mc.gotoAndStop("_on");
  5. }
  6.  
  7. products_mc.onRollOut = function() {
  8.     home_mc.onEnterFrame = function() {
  9.         if(this._currentframe != 1) { //assuming frame 1 is _on
  10.             this.prevFrame(); //this will make it go backwards till it reaches frame 1 (or the corresponding one)
  11.         }
  12.     }
  13. }
  14.  
Anyway, I do not reccomend this last way. Is just unnessesaelry complicating things. You should add an animation to the normal state of the button and make it play that.

Kind regards,
The_Nephilim

I currently have a movie clip buttons that have two Frame Labels: _on to be used when there is no mouseover, and _over in the case of a mouseover.

Currently, my Actionscript looks like:

home_mc.onRollOver = function ()
{
home_mc.gotoAndPlay("_over");
products_mc.gotoAndStop("_on");
}

products_mc.onRollOver = function () {
products_mc.gotoAndPlay("_over");
home_mc.gotoAndStop("_on");
}

I'd like to have it where instead of jumping directly to the 'no mouseover' state that it would play the 'mouseover' backwards so it can be smoother. Is this possible, and if so how can it be?
Sep 3 '07 #2
metaphysics
59 New Member
Hmm, okay thanks. I'll give it a shot.
Sep 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
9870
by: craig | last post by:
i want to make a button that will start an embedded windows media player playing AND in full screen. i can do it with TWO buttons: <input onclick="MediaPlayer.controls.play();" type="button"...
9
15744
by: Per Steffensen | last post by:
Hi I have the following in my html: <input type="button" value="Short"/> <input type="button" value="Very long text on this button"/> It gives two buttons on the html form. My problem is...
1
3190
by: Justin | last post by:
Hi, I have a simple frameset defined: ---------------- index.html ---------------- <FRAMESET COLS = "225,*"> <FRAME NAME = "a" SRC = "one.html"> <FRAME NAME = "b" SRC = "one.html">...
5
4107
by: Brian.Steele | last post by:
Greetings everyone. See http://www.spiceisle.com/cgi-bin/slideshow/slideshow.cgi?dir=brian/personal/2005/uk_trip/images&type=jpg The "Pause" button works in IE, but not in Firefox. Any ideas...
10
2377
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
2
2392
by: nma | last post by:
Hi Hoe to show the controller button like play, pause, etc? this is my code. I;m using vlc player. It can play the video but no control button appear. I'm using ifame to display the player. ...
3
3209
by: nma | last post by:
Hi This code goes well with play, stop and fullscreen button, the only thing is the pause button is not there. How to make pause button? I try to make pause button but when it streams video, when...
0
2556
karlectomy
by: karlectomy | last post by:
Hey all, I Just installed Flash CS3 and was rearing to get animating when I caught a snag... Actionscript 3.0 is NOT Actionscript 2.0... I want to make a popup caption when I do a rollover of...
1
3782
elamberdor
by: elamberdor | last post by:
Hi All! Have a complex roll in / roll out button (ag_mc) that unwraps, then re-wraps a chocolate upon roll in - roll out. However - to complicate things, I would also like another button ( ag_desc)...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.