A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Calling a function in a seperate .as file.

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    25
    Just declare an object of the class tracePrac in the documentClass and then call its fxn

    package
    {
    import flash.display.MovieClip;
    public class documentClass extends MovieClip
    {
    public var obj:tracePrac ;
    public function documentClass()
    {
    obj= new tracePrac ();
    obj.fxn();//any function of the class tracePrac that u want to call from the document class
    }
    }
    }


    package
    {
    import flash.display.MovieClip;
    public class tracePrac extends MovieClip

    {
    public var traceNumber:Number=3245;
    public function tracePrac()
    {
    trace(traceNumber);
    }
    }
    }
    Last edited by er_gagan_deep; 11-23-2009 at 07:13 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center