Raydred
November 25, 2002, 6:05pm
1
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 =)
system
November 25, 2002, 6:10pm
2
Well there are 2 ways.
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
}
system
November 25, 2002, 6:22pm
3
You can´t mix different handlers in the same script.
=)
system
November 25, 2002, 6:31pm
5
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?
system
November 25, 2002, 6:33pm
6
oh raydred! I saw your post count!
Posts: 784392011.983
I was like whatttaaa?
lol
system
November 25, 2002, 6:37pm
7
lol i decided to get kinda clever and see how many people noticed lol =)
system
November 25, 2002, 7:01pm
9
*Originally posted by Raydred *
ok another question…
WhaaaT??? Can you explain it better?
=)
system
November 25, 2002, 7:11pm
10
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.
system
November 25, 2002, 7:41pm
11
Did you try just _root.loadedMovie ??
system
November 26, 2002, 12:11am
12
raydred what happened to the little treasure chest? fish ball kept me amused for hours.
system
November 26, 2002, 12:15am
13
It is still there. It is an “easter egg” in his footer, you just have to find it :evil:
system
November 26, 2002, 5:37pm
14
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 =)
system
November 27, 2002, 5:41am
15
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.
system
November 27, 2002, 4:57pm
16
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 =)
system
November 27, 2002, 5:32pm
17
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?
=)
system
November 27, 2002, 6:40pm
18
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 =)
system
November 27, 2002, 6:56pm
19
the nice thing is that they are absolute.
=)
system
November 27, 2002, 7:08pm
20
Hmm…
smile
HMMMMMM…
So… hmm…
Alright, im understanding that…
but how do you position it?
_level32._x = 5;
?? like dat?