- #1
fredlexus
- 3
- 0
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.
- The code for the remaining 6 buttons is similar except for the instance and frame names. I've attached 2 action script files (pdf format).
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.
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 (pdf format).
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.
Attachments
Last edited by a moderator: