I have a problem with an app AS 3.0


hi, name bryan, , got new actionscript 3

yesterday learned little bit more it, straight point, making ios app using flash cs6

and seems right,

 

i have codes correctly, , , next buttons stop working after go previous scene

ok, lets explain better, app starts introduction, bla bla bla, after there's menu options,

i hit first "chapter in case" , goes new frame, hit next next next etc. no problem,

but when "chapter" menu  , hit first chapter again next button stop working need help

 

here btns codes:

 

 

 

import flash.events.mouseevent;

 

 

stop();

// eventlisteners

 

 

back_btn.addeventlistener(mouseevent.click, backfunc);

menu_btn.addeventlistener(mouseevent.click, menufunc);

next_btn.addeventlistener(mouseevent.click, nextfunc);

 

 

// functions

 

 

function backfunc(evt:mouseevent) :void {

                    prevframe();

}

function nextfunc(e:mouseevent){

          nextframe();

}

function menufunc(a:mouseevent) :void {

          gotoandstop(3);

}

 

hope can

if code on frame 1 , allow "prev" button return frame re-assign buttons again , again. should init app on frame 1 disallow app return frame 1. push content on frame 2+ , never return frame 1.

 

otherwise can set flag know if need assign button handlers. if it's first time run app can check existence of variable. if doesn't exist set , init buttons.

 

e.g. frame 1:

 

if (!applicationalreadystarted)

{

     // add event listeners

 

     var applicationalreadystarted:boolean = true;

}

then next time hits frame variable exist , won't accidently re-assign buttons. add other init code in there should fire off once when app started. might what's causing trouble.



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

PProHeadless.exe has stopped working error when opening projects in Adobe Media Encoder CS6

Preconditions Failed. - Joomla! Forum - community, help and support