Hope someone can help me. I am fairly new to flash. My experience thus far has been editing template FLA files. I am now int he process of creating a text based adventure game from scratch. I am following examples in the Beginning Flash Game Programming book by Andy Harris.
I have a keyframe in Layer 1 Frame 1. There is text and a button that I have named "btnStart". 10 frames later I have another keyframe, that one is labeled "start".
I am using Adobe Flash CS. I have set the publish settings to use ActionScript 2.0.
In my Actions panel under Actions-Frame I have selected Layer 1 Frame 1 and entered the following code.
I publish or use Ctrl+Enter to test. My button changes color as it should when I hover or click on it, but I am not directed to the "start" frame as expected when I click and release. There are no "compile errors" listed in the IDE. Can anyone see anything wrong with what I am doing? Any help is greatly appreciated.
I have a keyframe in Layer 1 Frame 1. There is text and a button that I have named "btnStart". 10 frames later I have another keyframe, that one is labeled "start".
I am using Adobe Flash CS. I have set the publish settings to use ActionScript 2.0.
In my Actions panel under Actions-Frame I have selected Layer 1 Frame 1 and entered the following code.
Code:
stop();
btnStart.onRelease = function(){
_root.gotoAndStop("start");
} // end onRelease
I publish or use Ctrl+Enter to test. My button changes color as it should when I hover or click on it, but I am not directed to the "start" frame as expected when I click and release. There are no "compile errors" listed in the IDE. Can anyone see anything wrong with what I am doing? Any help is greatly appreciated.