How to use classes in Actions tab


hello guys!

 

i'm beginner i'm sorry stupid question.i'm developing game in movie clips in our case people have own schedule.i have multiple screens , want able set locations , make them invisible on other screens(rooms)they're not at.the trouble can't use variables actions in class,neither can use classes in actions.can tell me how export classes actions code?

here code:

 

 

var currentlocation; var currentscreen; if (person.currentlocation!==currentscreen){ person.visible=false; } 

btn.addeventlistener(mouseevent.click, fl_mouseclickhandler);

 

 

function fl_mouseclickhandler(event:mouseevent):void

{

          currentscreen = "classroom";

          classroom.visible = true;

          playroom.visible = false;

 

}

btn_2.addeventlistener(mouseevent.click, fl_mouseclickhandler_2);

 

 

function fl_mouseclickhandler_2(event:mouseevent):void

{

          currentroom = "playroom";

          classroom.visible = false;

          playroom.visible = true;

}

 

 

your problem/question not clear me.  if getting errors should include error messages in posting.

 

could problem arise using variable not defined?

 

currentroom = "playroom";

 

i not see currentroom defined variable anywhere.  there currentscene variable though.



More discussions in Adobe Animate CC - General


adobe

Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support