dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Events to a Created Movie

Hybrid View

  1. #1
    Member
    Join Date
    Apr 2002
    Posts
    76

    Unhappy

    Hi flash world!!!

    I've written a sample movie that creates a movie dynamically and I'd like this movie to produce some onClipEvent() but I don't know how to do it....

    _root.createEmptyMovieClip ("square", 1);
    with (_root.square) {
    lineStyle (5, 0x333333, 100);
    beginFill(0x333333);
    moveTo (200, 200);
    lineTo (200, 300);
    lineTo (300, 300);
    lineTo (300, 200);
    lineTo (200,200);
    }

    Here is the sample.... someone could help me?

    Thank you very much!!!!

  2. #2
    Senior Member
    Join Date
    Dec 2000
    Posts
    126
    When you call _root.createEmptyMovieClip("square", 1) you are left with a movie clip called square on level 1.

    You can define, in an inline fashion, the onClipEvent handler for that instance:

    _root.square.onClipEvent(event) {
    // ... some processing
    }

    I hope this helps!

  3. #3
    Member
    Join Date
    Apr 2002
    Posts
    76
    Yes it helps... thank you very much!!!

  4. #4
    Senior Member
    Join Date
    Dec 2000
    Posts
    126
    You're very welcome, glad I could help

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