Results 1 to 4 of 4

Thread: import flash class question

  1. #1
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default import flash class question

    I am reviewing examples of .as files with document classes as I learn to code outside the timeline.

    Step by step I am finding examples seeing which each class does what.

    I am not sure what "Event" does in plain english.


    Event(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
    Creates an Event object to pass as a parameter to event listeners.
    can anyone translate?

    I think that when I want to create an evennListener like this:
    stage.removeEventListener(Event.ENTER_FRAME, onFrameLoop);
    I need "Event" is that right?
    Last edited by evan; 12-09-2008 at 08:46 PM.

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Check out this article on Event Handling. It's pretty informative.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. The Following User Says Thank You to BLiZZaRD For This Useful Post:

    evan (12-09-2008)

  4. #3
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    As I learn more AS3 and use the document class or create a custom class
    that needs to be imported into the .fla using OOP

    I have to do this inside my package:

    import flash.display.MovieClip;
    import flash.events.Event;
    So, in order to set set up a listener to "hear" an event as an -as poosed to mouse event or keyboard event I have to use EVENT

    A keyboard event I import keyboardEvents like this:
    import.flash.events.KeyboardEvent
    When I code into the timneline I don't have to import these things

    But when i code externally I need to import all flash classes that apply to what I'm doing. The trick is knowing what these things are and what they all do.

  5. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Correct.

    Unless there was a question in there somewhere?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. The Following User Says Thank You to BLiZZaRD For This Useful Post:

    evan (12-09-2008)

Bookmarks

Posting Permissions

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