Skip to main content
Arioman
Inspiring
May 28, 2013
Question

how move main class to script in timeline

  • May 28, 2013
  • 1 reply
  • 856 views

hi , in some component they use main class to load various as files

and when i see properties of my document i see the name of this class right down the Script : Action Script 3

whe i click on the pen ( edit ) of this class i see various codes about doing importing some AS files and ...

for example :

package {

   

    import flash.display.MovieClip;

    import flash.display.Sprite;

    import flash.events.Event;

    import flash.net.URLRequest;

    import flash.net.URLLoader;

    import flash.events.*;

    import com.Align;

    public class DocumentClass extends MovieClip {

       

        private var ***;

        public var ***;

        public var ***;

        public function DocumentClass() {

***

        }

       

        private function config():void {

***

        }

    }   

}

sometimes i want to use 2 or more component that use this technics and i can only choose and type the name one of them !! 

how can i put them all together or it will be better if possible to put class in script in timeline ...

This topic has been closed for replies.

1 reply

Inspiring
May 28, 2013

import flash.display.MovieClip;

    import flash.display.Sprite;

    import flash.events.Event;

    import flash.net.URLRequest;

    import flash.net.URLLoader;

    import flash.events.*;

    import com.Align;

       

        var ***;

        var ***;

        var ***;

        function config():void {

***

        }

copy all the imports, get rid of the scope descriptions(private, public, protected etc.)

and delete the constructor.

Arioman
AriomanAuthor
Inspiring
May 28, 2013

thanks for reply ...

do you mean i must copy all the imports AS file ?  so copy them to where ? and how can i link these files to my project ?

is there any setting in publish setting to put these AS in swf ( Internal ) or link them or i must use some script to do this ?

Ned Murphy
Legend
May 28, 2013

Most import statements for built-in Flash classes are not necessary when you code in the timeline.  There are exceptions, such as possibly the Events, but most of the ones you show are not necessary since Flash can find them without the need to identify where.