dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Flash Bug?

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    27
    Does anyone else have this problem...

    You go and "duplicateMovieClip()" and try to call functions contained in your duplicated clip but the functions are not immediately accessable.

    For instance:

    function dupe_me(){
    //duplicate an existing clip
    clip.duplicateMovieClip("clip"+1,100);
    //call a "method" of the new clip
    clip1.turn_blue();//wont call function
    //but properties exist
    trace(clip1._name+clip1._x)
    }

    Later... clip1.turn_blue() works! It seems to me that this needs to be fixed! In ANY programming language, if I create a new instance of an object, I should immediately be able to access object methods!

    Is there something I'm missing or should Macromedia fix this?

  2. #2
    Senior Member
    Join Date
    Oct 2000
    Posts
    181
    try using the level....

    function dupe_me(){
    //duplicate an existing clip
    clip.duplicateMovieClip("clip"+1,100);
    //call a "method" of the new clip
    _level100.clip1.turn_blue();//wont call function
    //but properties exist
    trace(clip1._name+clip1._x)
    }


  3. #3
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    it seems that a mc is fully functional only in the next frame. Although this is awkward, since the mc already exists as a scripting object after it is created, you could attach some kind of to-do list to the object and place code in the first frame that goes through the list

    Musicman

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