473,626 Members | 3,304 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.onRollO ver = function ()
{
home_mc.gotoAnd Play("_over");
products_mc.got oAndStop("_on") ;
}

products_mc.onR ollOver = function () {
products_mc.got oAndPlay("_over ");
home_mc.gotoAnd Stop("_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 2795
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.onRollO ver = function ()
{
home_mc.gotoAnd Play("_over");
products_mc.got oAndStop("_on") ;
}

products_mc.onR ollOver = function () {
products_mc.got oAndPlay("_over ");
home_mc.gotoAnd Stop("_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
9880
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" size="22" value="Play"> <INPUT type = "button"
9
15762
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 that in IE the length, from where the text on the botton starts/ends (horisontally) to the border of the button, depends on the length of the text on the
1
3214
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"> </FRAMESET>
5
4131
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 why? If you have any other ideas on how the javascript can be improved, please let me know.
10
2401
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) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
2
2403
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. <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width="460" height="320"
3
3231
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 I click pause, it stop but it work play again when i click at play button. Please help. <?php function printInstructions() { ?>
0
2561
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 the button... I get silly errors like: 1119: Access of possibly undefined property _x through a reference with static type Class. this is my code which is in the first frame of the timeline. I have a button LeftKnee and the caption...
1
3792
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) when rolled over / out, to also target/animate/control that other button to animate on the stage as it does as if it was pressed itself... The rollover button (ag_desc) has a simple movie clip inside on the rollover state to let ppl know to...
0
8203
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8711
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7203
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2630
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 we have to send another system

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.