Copy link to clipboard
Copied
So, I have a file where I have the action script all ready and working, and all the buttons working. The whole file works perfectly.
But, when I make a new file and copy and paste the action script and buttons, it doesn't work! I have the EXACT same script, and the file setting are the same as well.
Is it because I copied and pasted the actual buttons? Or is it because of the script? I've created new buttons, and modified the script to use their instance names, but that doesn't work either.
The weird thing is that 1 of the buttons I copied and pasted work! I have 4 buttons total, and 3 of them change the FPS of the stage using this code -
button1.addEventListener(MouseEvent.CLICK, goNormal);
function goNormal(event:MouseEvent):void {
stage.frameRate = 24
The button that does work uses this code -
button4.addEventListener(MouseEvent.CLICK, goEnd);
function goEnd(event:MouseEvent):void {
gotoAndStop(1,"Scene 2");
}
I've even changed the functions around. I've spent the last 4 hours trying to fix it, but apparently I can't.
Thanks!
Copy link to clipboard
Copied
Check List
1. Check all instance names is match with script?
2. Check all assets is copied
3. Insert break point(ctrl+b) to code and run Debug(ctrl+shift+enter)
-which line has bug? check that.
4. Is there any undefined assets?
5. Got error massage? search why that error is occurs
Copy link to clipboard
Copied
I've checked all of that, and it all comes up okay, unfortunately.
Copy link to clipboard
Copied
Would you please share that file to me?
let's figure this out.
Copy link to clipboard
Copied
Ah, check this too
is Actionscript version is matched
Copy link to clipboard
Copied
Yup, the original is 3.0, and the new is 3.0
Find more inspiration, events, and resources on the new Adobe Community
Explore Now