flash - ActionScript and Scenes -



flash - ActionScript and Scenes -

in usual flash movie, document has many scenes. can add together , create scenes need (say have startingscene, middlescene, , endingscene).

then, can assign document class movie. document class (say declare main.as class , link it), since inherits movieclip, has scene attribute.

what's actual relationship between main instance document, , current scenes?

is main class owner of scenes? main instance created each scene? who's owner of scene list?

the document class presenting have in stage if have scene defined in timeline can phone call

this.gotoandplay(0, "scene 2");

where main class this

package { import flash.display.movieclip; public class main extends movieclip { // instance variables go here public function main() { this.gotoandplay(0, "scene 2"); } // other functions can go here } }

so main class owning timeline , stage have defined in adobe flash professional illustration if have button called mybutton in stage part of main class can

mybutton.addeventlistener(mouseevent.click, clickhandler); function clickhandler( event:mouseevent ):void { //button clicked }

actionscript-3 flash

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -