A Flash Developer Resource Site

Results 1 to 20 of 24

Thread: KM7 differences AS3

Threaded View

  1. #1
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Atlanta GA

    Exclamation KM7 differences AS3

    As I start looking at tutorials and examples on other sites I'll try to post what I learn regarding the differences between Flash and KM7 AS3

    The first thing you learn in Flash/Flex is that everything must be in a package, this is not the case in KM7 When putting code in the timeline. KM creates the package for you so leave that out..Also you will often see that there must be a MAIN function that is the same name as the function, since we don't create the package we don't create this function either. So here is a simple example of drawing a circle where I've commented out the parts from another tutorial that you don't want.

    PHP Code:
    // package  {

    import flash.display.Sprite;

    //public class FilledCircle extends Sprite {

    //       function FilledCircle():void {

    var circle:Sprite = new Sprite();

    //     }
    However if you want to resuse the filledcircle as a CLASS you remove the comments above and put this into a seperate file named FilledCircle.as either in the same directory as you fun file or in the bin/AS3/classes folder then you can create instances of the class

    var t = new FilledCircle();


    in the timeline.

    This example is from http://edutechwiki.unige.ch/en/AS3_e...awing_graphics

    Please feel free to add to this thread
    Last edited by blanius; 01-01-2009 at 12:45 PM.

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