A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: inter-frame scope for AS created clips.

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    289

    inter-frame scope for AS created clips.

    I have a seven frame movie.

    First five frames perform fine-ish.

    By pressing a button a user action can send the movie to frame 6.

    Frame 7 loops back to frame 6, called "doAction", set up using Sounds and Actions box in KM, and selection of goto frame doAction and play as action for frame 7.

    I use mc.duplicateMovieClip(mcN,lev) to set up a number of items for the first frames, including one cluster of 20 items.

    I thought that for a created MC to appear in a frame, it needed the original in the frame. However the 20 items appear in frame 7, even when there is no shape at all in that frame. I could hide them with _visible or by moving them offstage ..

    .. however I am curious now as to what determines the scope inter-frame of an AS created (or any?) movie clip?

    Thanks.

    [This question soon to be released in paperback by RoyalCorgi press]

  2. #2
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    don't forget about " mcN.removeMovieClip(); "
    p.s.
    some people try to clone everything ...

  3. #3
    Senior Member
    Join Date
    Jun 2001
    Posts
    289

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    I believe that all variables are scoped globally unless var is used.

  5. #5
    Senior Member
    Join Date
    Jun 2001
    Posts
    289
    ok.

    Not sure how to do the equivalent of var with a movieclip, however.

    This is what confuses me - hypothetical:

    [1]
    I create a movieclip using the shapes option on the menu, on, say, frame 2. In frame 2 I this duplicate using AS.

    [2]
    The movie loops between 3 and 4. The clips do not show.

    [3]
    If I copy the original clip to frame 3, duplicated clips show whenever frame 3 shows, disappear when frame 4 is displayed, rendered, whatever.

    [4]
    If I copy the original clip to frame 4, all clips show all the time.

    .. Sometimes .. However, sometimes when the original is only in frame 3 they show all the time.

  6. #6
    Senior Member
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    379
    Strange...
    When you duplicate the movie clip on frame two, it should be present on that time line even though the "seed" clip is not on future frames, until you issue removeMovieClip...

    Post the movie if this is not the case...

    I think OwenAus is having a case of sun stroke at the moment - it's 41 Deg C here in Sydney at the moment...

    Hilary

    --
    Last edited by bridelh; 11-25-2002 at 12:30 AM.

  7. #7
    Senior Member
    Join Date
    Jun 2001
    Posts
    289
    lol.

    Sunstroke, or just pushing my two brain cells to their limit (along with everyone else's patience).

  8. #8
    undead creature necromanthus's Avatar
    Join Date
    Feb 2002
    Location
    ROM
    Posts
    1,890
    Sunstroke or BrainOverloaded ...whatever
    To solve your "abnormal" situation try in this way:
    1)Place the "original" child movie (called,let's say "menu") in keyframes no. 2,3,4 out of screen.
    2)For keyframe 2 add this script:

    _root.menu.duplicateMovieClip("clone",3);
    _root.clone._x = xval;
    _root.clone._y = yval;

    Set "xval" & "yval" as you wish (inside the screen).
    If you make a jump from the loop with frames 2&3 you must add in the target frame this line:

    _root.clone.removeMovieClip();

    I hope you can have sweet dreams from now on !


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