PDA

View Full Version : MC logistics misunderstanding??


Bernie X
02-20-2002, 04:44 PM
On the main timeline I have an instance to a MC, named scene007. At the end of that particular MC symbol there is an action to target another MC instance on the main timeline. However, this has yet to work. It seems as if the MC symbol ignores the ActionScript, which targets and plays another MC instance on level0. The result is a constant looping of the MC instance. I am familiar with OO design so, my with statements seem to be correct (see below). What I’m unsure are the actual logistics of the MC hierarchy in Flash. My bottom line question is: can a MC instance’s timeline target other instances on timelines of other levels?

Here’s my with statement at the end of the MC symbol:

//with statement:

with (_root.scene007) {
play();
}

PLEASE ADVISE...

:p

tg
02-20-2002, 04:56 PM
try

with("_root.scene007"){
play();
}

Bernie X
02-20-2002, 05:20 PM
Thanks for the suggestion. I haven't tried it yet, but in all of the ActionScript dot syntax examples that I've seen, I don't recall parameters being passed in quotes with the 'with' statement -- is there any reasoning as to why using quotes will work??

:p

Bernie X
02-20-2002, 05:23 PM
with ("_root.scene007") {
play();
}

//adding the quotes didn't chg anything

tg
02-20-2002, 06:16 PM
post your fla, your original question is a bit confusing once i reread it.

and yer right about the quotes... sorry about the detour...

Bernie X
02-20-2002, 07:36 PM
I thought I posted my fla, but I got not...how do you do that?

tg
02-20-2002, 09:36 PM
zip your fla,
down below where you enter your message you will see a bar that says attach file: with an input box and a browse button
click browse and select your zip file then hit select.


one more question for you before you upload.

have you tried just doing this without the with action:
_root.scene007.play();
?

Bernie X
02-20-2002, 10:04 PM
Thx for the tip. As you will see the MC symbol doesn't respond to anything but stop().

tg
02-20-2002, 10:31 PM
looked over your code, not too sure what it is supposed to do, but i did notice that
1. your with code in the button

on (release) {
with (scene0) {
play ();
yo = 6;
}
}

is playing that movieclip.
2. your code inside your movieclip scene_mai:

_root.scene_msc.play();

is referencing an un-instanciated movieclip. in otherwords, i could not find a movieclip with an instance name scene_msc on the root timeline.

hope this helps.
without a clear idea of what the fla is doing, i don't know how to help you.

Bernie X
02-20-2002, 10:40 PM
Thx for the tip. I will have to clarify some of the code for you to give you a better idea of what's happening. I got frustrated and start writing some code just to see what happens knowing that it would make sense. I'll post some of my insight to you later today.

Thanks,

Bernie X:p

tg
02-20-2002, 10:46 PM
i'm about done for the day (got to go run some flash player tests for our IT dept this afternoon), but i may check in this evening... the weather here is beautiful, so i may take advantage of it. otherwise i'll be makin my usually rounds tomorrow am.

see ya.

Bernie X
02-21-2002, 09:52 PM
I figured it out -- if anyone cares to know. It was basically a misunderstanding in how the whole MC hierarchy works. I have an instance of a MC on the main timeline, 5 frames later there is another instance of a different MC instance. Well, what I thought I could do was target a MC instance that was placed on frame five of the main timeline (_level0) from a MC symbol. So I thought the following code would do it.

_root.scene007.play()

I thought this would look for the instance, named scene007, which is located on frame 5 of the main timeline and then play that instances timeline. The code that actually does this is:

_root.gotoAndPlay(5)

I realized that MC instances placed on the MC timeline are not children to the main timeline, but that MC instances on the timelines to other MC symbols are children to the main timeline.

If my insight on MC hierarchy still isn’t right then please let me know.

Bernie

:p