Rollover and gotoAndPlay not working after stop action

  • Thread starter Thread starter fredlexus
  • Start date Start date
AI Thread Summary
The discussion centers on a Flash website featuring rollover buttons that trigger movie playback. The first three buttons function correctly, transitioning to specific frames as intended. However, the remaining four buttons fail to perform the same actions despite having similar code structures. The user has attempted to troubleshoot by modifying the 'gotoAndPlay' commands to include 'this.' before the frame names, but this has not resolved the issue. There are no syntax errors reported, and each movie has a stop action on its first frame. The main challenge is ensuring that the additional buttons replicate the successful behavior of the first three, allowing users to navigate to the correct frames upon selection. Further investigation into the button instance names and frame references may be necessary to identify the underlying problem.
fredlexus
Messages
3
Reaction score
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.

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:
Technology news on Phys.org
Adding additional info to post:

- There is a stop action on the first frame of each movie
- In the code for last 4 buttons I replaced 'gotoAndPlay("home..")' with 'this. gotoAndPlay("home..")'; replaced 'gotoAndPlay("news..")' with 'this. gotoAndPlay("news..")'; replaced 'gotoAndPlay("gallery..")' with ' this.gotoAndPlay("gallery..")'; replaced 'gotoAndPlay("gallery..")' with ' this.gotoAndPlay("gallery..")'; and replaced 'gotoAndPlay("contact..")' with ''this.gotoAndPlay("contact..")'.
Checking the syntax did not produce any errors but, when the buttons are selected the movies do not play and the user is not sent to any frame.
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top