;

PDA

Click to See Complete Forum and Search --> : inter-frame scope for AS created clips.


OwenAus
11-24-2002, 08:05 PM
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]

necromanthus
11-24-2002, 08:34 PM
don't forget about " mcN.removeMovieClip(); " ;)
p.s.
some people try to clone everything ... :p

OwenAus
11-24-2002, 08:42 PM
:)

Bob Hartzell
11-24-2002, 08:47 PM
I believe that all variables are scoped globally unless var is used.

OwenAus
11-24-2002, 09:05 PM
ok.

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

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.

bridelh
11-25-2002, 12:21 AM
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

--

OwenAus
11-25-2002, 09:30 AM
lol.

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

necromanthus
11-25-2002, 10:49 AM
Sunstroke or BrainOverloaded ...whatever :p
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 !

:mrpimp: