Call Class Function from FLA


this maybe simple have 2 files , want call function inside class , not sure how this. ex want call function main() after import packages.  can help?

 

package code:

package code

{

          import flash.display.sprite;

          import flash.display.movieclip;

 

 

          public class allactivities extends flash.display.sprite

          {

                    public static var testglobal:string = "testvalue";

 

                    private function main():void

                    {

                              trace("initilize global variables");

                    }

 

 

          }

}

package code

{

          public class activityone

          {

                    private function maintwo():void

                    {

                              trace("testglobal " + allactivities.testglobal);

                    }

          }

 

 

}

 

fla code

import code.*;

1.  main needs public

2.  there needs allactivities instance reference in fla's main timeline if that's mean calling fla



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

After Effect warning: A problem occurred when processing OpenGL commands

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