473,394 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Rollover and gotoAndPlay not working after stop action

Subject: Flash (cs4, as3)
Background:
I have a website with 7 rollover buttons that play a movie. The first 3 buttons display from frames 17-29 (timeline animation plays on frames 1-16). Frame 29 has a stop action as well as blank keyframes. This gives the user the opportunity to select one of the 3 buttons. The same code is repeated on frame 30 for the additional 4 buttons (the instance and frame names are different.
- The objective is to have a movie play and the user sent to a different frame each time a button is selected.
Code:
import caurina.transitions.*;
import caurina.transitions.properties.*;
DisplayShortcuts.init();
conbut.addEventListener(MouseEvent.ROLL_OVER, conbut_ROLLOVER);
function conbut_ROLLOVER(e:MouseEvent):void
{
Tweener.addTween(contact_1, {_frame:10, time:0.2, transition:"linear"});
var over:Over = new Over();
over.play();
}
conbut.addEventListener(MouseEvent.ROLL_OUT, conbut_ROLLOUT);
function conbut_ROLLOUT(e:MouseEvent):void
{
Tweener.addTween(contact_1, {_frame:0, time:0.5, transition:"linear"});
}

conbut.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_29);
function fl_ClickToGoToAndPlayFromFrame_29(event:MouseEvent ):void
{
gotoAndPlay("contact..");
}
- The code for the remaining 6 buttons is similar except for the instance and frame names. I've attached 2 action script files.
The code above works as expected for the first 3 buttons. The issue is with the other 4 buttons. Although the first 3 buttons play their movies and the user is sent to the correct frames which play when the button is selected, this behavior is expected to repeat with the other 4 buttons, but is not. How can this be fixed? I am not getting any errors.
Attached Files
File Type: zip Code for first 3 buttons.zip (577 Bytes, 78 views)
File Type: zip Code for last 4 buttons.zip (608 Bytes, 60 views)
Sep 8 '11 #1
0 1847

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

Similar topics

3
by: Alex | last post by:
I created a page ( http://www.ayida.net/benaglia/chi.html ) based on the example B of the fixed-width layout i found here: http://builder.com.com/5100-6371-5314471-2.html the layout needs this...
5
by: Matt L. | last post by:
Does anyone know why the onmouseout isn't working in the following? I've just started the script (tho I'm sure I've spent over 40hrs on this problem alone) and am trying to get just 2 buttons...
5
by: jedbob | last post by:
I used Adobe Imageready to build a simple rollover navigation bar, where the text will change color on a mouse over. The working example can be found at:...
6
by: AJBopp | last post by:
I'm wrestling with CSS variations between Firefox and IE. I'm trying to create rollover buttons in a menu frame. It is working perfectly in Firefox but in IE only the first button is properly...
0
by: DDesigns | last post by:
Ive been trying to figure this out for hours and it is driving me crazy. I need to add a different gotoAndPlay action to each instance of 'a'. I can figure out how to add the same gotoAndPlay action...
2
by: mrahmed | last post by:
hi i'm new here and also om new in actionscript i'm trying to make a menu with submenu and i want when the mouse over the menu or the submenu make an effect it works when the mouse is over the...
1
by: Joaquin | last post by:
Hi, I'm a newbie on this, I've been hours with this and I can't find where is my problem. The 1st scene in my movie has this script on the last frame: gotoAndPlay("Scene2",1);
12
by: Flan | last post by:
I am running on a Mac, with FlashCS3, using Actionscript 3.0. First I'm going to say that I am really new to Actionscript. (As in, only been using for a few days new.) So please excuse me if I...
1
by: opticrambler | last post by:
hi this proberly quite an easy proberlm but cant find any help so ill try this forum. i have a simple button wihch fades in and out of colour with rollOver and rollOut. im trying to make button...
4
by: somnamblst | last post by:
I am asking this in javascript and not actionscript because I think the js portion more crucial. I have a viewable area in a SWFcalled box_mc on frame1 that is 300x100 until a rollOver event when it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.