PDA

View Full Version : Simple Functions - Please Explain


xtremeness316
02-25-2002, 08:59 AM
Ok I was messing about with Flash the other day and I noticed that there is an option where it just has symbols such as ./ and that. Now from the other board I know that is somt like _root or somt like that, I aren't too familiar with it.

I know its a big favour to ask but could someone please post on here what the functions are that these symbols do..

Thanx alot,

Mark

P.S. I use Flash 5.0

Ricod
02-25-2002, 09:49 AM
_root is the topmost timeline of your _level (default timeline is _level0). The ./ is Flash 4 syntax, where . is now _parent (_parent is one timeline higher than the one from where u are scripting)

for instance : _level2.myMc.itsChild;

_root means _level2's main timeline
_root.myMc called from anywhere in _level2 is the path to "myMc"
_root.myMc.itsChild called from anywhere in _level2 is the path to "itsChild" (an mc inside "myMc")
_parent called from "itsChild" is the path to "myMc"
_parent called from "myMc" is _level2

Billy T
02-25-2002, 09:51 AM
be careful with your wording - functions and symbols have different meanings in flash to the way you have used and can lead to confusion

anyway I believe what you are referring to is flash 4 syntax

eg

tellTarget ("/mc1") {
gotoAndStop(5);
}


is the same as

_root.mc1.gotoAndStop(5);

not to sure about the . on front of the /

cheers

red penguin
02-25-2002, 10:41 AM
You mentioned that as something? Could you be referring to this ??

this : is a keyword in Flash, and other langs as well, which is a reference to itself ... in this case, a reference to the clip where this code is on the clip...

onClipEvent(load){
this._alpha = 50;
}

Just in case you were wondering...

Billy T
02-25-2002, 11:02 AM
yo Red

I presume you have seen this site - http://www.mulletsgalore.com/

??

:p

red penguin
02-25-2002, 12:29 PM
Damn straight, botha!

That was the impetus for the avatar! Man, they are great! Been to www.atomfilms.com lately? There's a whole series on them!

pinkaboo
02-25-2002, 01:42 PM
actually Pengie, I hate to break it to you but that avatar, it's actually more double chin than mullet isn't it?!

heh heh

Pinkaboo ducks and runs for cover. (quack quack.)