Search code examples
actionscript-3classflash-cs4

How can I add a class to my flash cs4?


I am about to create a simple demo in flash where I have 3 layers, 3 keyframes. Currently I am just use some simple gotoAndStop() to move to the next keyframe.

But now I need a custom event to do that but I can't create a class inside the action of a keyframe so I am not able to create a custom event.

I just have AS3 developing experience in flex so far.

Thanks in advance.


Solution

  • you can import any class to your flash ide application:

    import com.warren.events.CustomEvent;
    

    after this you just have to do the regular usage you would do in flex. Don't forget to have you Custom Event class in the source path folder as your fla, or to configure your fla to have the correct source path of your classes. (Publish settings/Actionscript-settings...source path)