Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I need help with button coding to go to the next scene

New Here ,
Feb 03, 2013 Feb 03, 2013

Hi! I have been using flash cs5 for a few years now and I've never been great with coding since i usually just do swf animations. However I am in the process of writing a story/book and I wanted to make a little guide for all of the dragons species in the story.

Example: I had it so there is a title screen and a start button, you click the start button and you are taken to the next scene; which is a picture of a mist dragon I drew and then audio plays; describing mist dragons. in the corner there is a "next" button and when you click it, it takes you to the next species and the audio plays just like with the mist dragon.

my major problem is my code is muffed up( I know it is totally incomplete, but this code is what I am comfortable working with, anybody know whaat the full code is?). I typed in what I could remember from class... could anybody help me?

here is the code i remembered:

Stop();

btn1.addEventListener(MouseEvent.CLICK…

function btn1Listener(e:MouseEvent):void {

gotoAndStop(1, "mist dragon");

TOPICS
ActionScript
285
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 03, 2013 Feb 03, 2013

use:

Stop();

btn1.addEventListener(MouseEvent.CLICK,btn1Listener);

function btn1Listener(e:MouseEvent):void {

gotoAndStop(1, "mist dragon"); //<- you may want gotoAndPlay(1,"mist dragon")

}

Translate
Community Expert ,
Feb 03, 2013 Feb 03, 2013
LATEST

use:

Stop();

btn1.addEventListener(MouseEvent.CLICK,btn1Listener);

function btn1Listener(e:MouseEvent):void {

gotoAndStop(1, "mist dragon"); //<- you may want gotoAndPlay(1,"mist dragon")

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines