Hey lost!.. =)

Lost i remember you saying that a MC can have the "On(press) and on(rollOver) button events… is that correct? if so, whats the exact code, and if its not correct, then… uhh… my friend wanted to know (that way i dont look dumb hehehehe oh wait… ) hehe =)

Lemme know man thanks =)

Well there are 2 ways.

  1. Instead of onClipEvent handlers you can use on handlers
on (release){
//do this
}

Just like on a button.

2)On a frame (or inside an onClipEvent handler) you can do this…

_root.yourClip.onRelease = function(){
//do this
}

You can´t mix different handlers in the same script.

=)

Cool!! Thanks alot =)

ok another question,

Is there a way to get the top level of a loaded movie?

Ex:

We all know _root is the root of everything…

now when i load a movie into say,

_root.loadThis

and the movie i loaded has an MC called insideMc, then the path becomes

_root.loadThis.insideMc

Is there a way to get the top level of the Movie that is loaded, i mean the loaded movie’s root?

I tried _parent, but it gets that object…

and im dealing with dynamic stuff that i cant really manually tell how deep an mc can get… =) any ideas?

oh raydred! I saw your post count!

Posts: 784392011.983

I was like whatttaaa?
lol

lol i decided to get kinda clever and see how many people noticed lol =)

“Anyone? Anyone?..”

*Originally posted by Raydred *
ok another question…

WhaaaT??? Can you explain it better?

=)

not really but i can try =)

what i want to get is the root of the loaded Movie, not the root of the entire thing…

I have movie1… and im loading in Movie2…

Movie 2 has an MC and its absolute path is…

_root.McinsideofMovie2.

when i load in movie 2, the absolute path becomes

_root.LoadedMc.McinsideofMovie2.

But this thing im building is dynamic…

I want to get the _root of Movie2 so i can build code thats relative.

I used _parent, but its not working the way i want it to…

thats the best that i can explain it.

Did you try just _root.loadedMovie ??

raydred what happened to the little treasure chest? fish ball kept me amused for hours.

It is still there. It is an “easter egg” in his footer, you just have to find it :evil:

lol i cant believe people like fish ball! lol

I didnt put any effort in coding it =) perhaps i should =)

But actually I have a game coming on soon =)


Back to my problem,

I could to a _root.loadedMovie, but im trying to control MC’s within MC’s and sometimes i neeed the path…

I suppose i could get the path and parse it etc…

its more work than its worth so… i’ll figure out another way lol =)

isn’t there a command that will return the entire path of an object?

not sure if that could be used to solve the problem or not… but I certainly remember something about that.

though I’m not sure if I understand the question either.

Im just looking for an objects path, relative to the movie itself, and not the movie in which its loading.

_parerent.mc will work, but what if its like 6 levels?

_parent._parent._parent._parent._parent._parent.mc

i want to do something like this…

_ThisMovieRoot.whatever.whatever.mc

instead of _root.Loadedmc.loadedMovie.whatever.whatever.mc;

never mind, i cant explain this any further lol , thanks for all your help =)

Now I understand you, sorry for the delay…

Use _level !

example: When you press a button on the main movie, you want to play the movieclip ball in the movie loaded in the level 2, the code for the button shoud look like this:

on (press) {
_level2.ball.play();
}

Got it?

=)

would that work from the loaded movie all by itself (like if i want to test it before i load it in…)

?

Also, does _levels have control on where they are at (the x y values) ?

Levels seems like it’ll work, but if the mc’s give me better control i’ll stick with em =)

the nice thing is that they are absolute.

=)

Hmm…

smile

HMMMMMM…

So… hmm…

Alright, im understanding that…

but how do you position it?

_level32._x = 5;

?? like dat?