jeudi 29 décembre 2016

How to pass variables from .fla file to .as file in as3

I have a .fla fine names test.fla and I have this variable in it:

var my_var;

stage.addEventListener(MouseEvent.CLICK, onLoaded);

function onLoaded(e:Event):void
  my_var = "myVariable";

I have a .as file called

I want to pass my_var from test.fla to the

I will really appreciate, if you can help me in this matter!

It is noticeable that I have used the method mentioned in "Actionscript 3 : pass a variable from the main fla to external as file", but it does not work for me!!!

I wrote in my

 public class Main extends Sprite 
  public function Main() 

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire