Copy link to clipboard
Copied
Hi,
I'm a complete flash novice and I'm having a few issues. Some friendly advice would be really appreciated!
When I've used actionscript to, for instance, link to another scene or to input a personalised welcome message for the user it seems to ignore the green text in quotation marks (in the first instance, which scene it is to go to, and not displaying the word welcome before the input data.
I don't know if I've described the problem adequately but does anybody have any idea what I've done wrong?
Thanks.
Copy link to clipboard
Copied
If you show the code that doesn't work it will be easier to say whether it's the code or not.
Copy link to clipboard
Copied
on (release) {
gotoAndPlay("Scene 2", 1);
}
Copy link to clipboard
Copied
The code looks okay, except I will recommend two things...
1) Don't place code 'on()' objects. Use the timeline and instance names instead.
ex: yourBtn.onRelease = function(){
gotoAndPlay("Scene 2", 1);
}
2) avoid using scenes unless some instructor is demanding their use. Use movieclips and/or sections of the scene 1 timeline.
As far as troubleshooting your issue, if the code is suposed to stop at that frame then use gotoAndStop() instead of gotoAndPlay()
If it is supposed to play starting at frame 1 of scene 2, then put a trace in the first frame to see if it goes there... ex: trace("in scene 2"); ... it is possible it is going there but leaves so fast you never see what is there.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now