View Full Version : Hey lost!.. =)
Raydred
November 25th, 2002, 01:05 PM
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 =)
lostinbeta
November 25th, 2002, 01:10 PM
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
}
Guig0
November 25th, 2002, 01:22 PM
You canīt mix different handlers in the same script.
=)
Raydred
November 25th, 2002, 01:26 PM
Cool!! Thanks alot =)
Raydred
November 25th, 2002, 01:31 PM
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?
andr.in
November 25th, 2002, 01:33 PM
oh raydred! I saw your post count!
Posts: 784392011.983
I was like whatttaaa?
lol
Raydred
November 25th, 2002, 01:37 PM
lol i decided to get kinda clever and see how many people noticed lol =)
Raydred
November 25th, 2002, 01:56 PM
"Anyone? Anyone?.."
Guig0
November 25th, 2002, 02:01 PM
Originally posted by Raydred
ok another question...
WhaaaT??? Can you explain it better?
=)
Raydred
November 25th, 2002, 02:11 PM
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.
lostinbeta
November 25th, 2002, 02:41 PM
Did you try just _root.loadedMovie ??
fez
November 25th, 2002, 07:11 PM
raydred what happened to the little treasure chest? fish ball kept me amused for hours.
lostinbeta
November 25th, 2002, 07:15 PM
It is still there. It is an "easter egg" in his footer, you just have to find it :evil:
Raydred
November 26th, 2002, 12:37 PM
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 =)
upuaut
November 27th, 2002, 12:41 AM
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.
Raydred
November 27th, 2002, 11:57 AM
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 =)
Guig0
November 27th, 2002, 12:32 PM
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?
=)
Raydred
November 27th, 2002, 01:40 PM
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 =)
Guig0
November 27th, 2002, 01:56 PM
the nice thing is that they are absolute.
=)
Raydred
November 27th, 2002, 02:08 PM
Hmm.....
*smile*
HMMMMMM...
So.... hmm...
Alright, im understanding that..
but how do you position it?
_level32._x = 5;
?? like dat?
Guig0
November 27th, 2002, 02:14 PM
never use that, but I think it works too.
Let me see...
=)
Guig0
November 27th, 2002, 02:16 PM
It works!!!
=)
Raydred
November 27th, 2002, 02:19 PM
CooL!! You da Man! =)
Lemme know if you want my IM name =)
hehe thanks! =)
Guig0
November 27th, 2002, 02:49 PM
I want, the problem is that I use icq:*(
I might begin ti use IM too, seems that everybody here use IM. :)
Glad to help you!
PS: this site of yours is REAL funny, the ladies add... ahahahahahahah cracks me up everytime!
=)
Raydred
November 27th, 2002, 03:35 PM
ICQ is an IM =)
I have trillian, it puts all IM's into one cool application =)
my Icq number is 10220085
Ive had that number forever! lol I cant believe i remembered that lol
anywya, message me =) i might be "away" but might be there lol =)
Lol im glad you like my site =)
I tried to be serious and make a site like kirupa's (but i couldnt..) then i tried making it this other thing.. and that didnt work, and so i decided, hell, let me be me! =) so i try to be as humorous as i can lol =)
But wait,, that ladies thing is real!! WHY WONT PEOPLE BELIEVE ME! lol jk=)
Guig0
November 28th, 2002, 06:51 AM
=)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.