all groups > flash actionscript > december 2004 >
You're in the

flash actionscript

group:

Addressing Symbols Help


Addressing Symbols Help HenryPr
12/16/2004 11:56:31 PM
flash actionscript:
Is there any way one Clip/Button instance can ask another Clip/Button instance
what symbol it contains, and then load a different symbol into that instance
ONLY if it contains a certain symbol? So: MovieClip 'Dog' asks asks another
MovieClip (X) whether it contains a 'Cat' or a 'Mouse'. If instance X returns
'Cat' then 'Dog' is turned into a 'Mouse', but, if X returns 'Mouse' then
nothing happens.
Re: Addressing Symbols Help kglad
12/17/2004 2:38:57 AM
yes:

dog.onPress=function(){
for(obj in _root.X){
if(_root.X[obj]==Cat){
// do something to dog
} else if (_root.X[obj]==Mouse1){ //Mouse is reserved
// do something else to dog
}
}
Re: Addressing Symbols Help kglad
12/17/2004 2:39:57 AM
dog.onPress=function(){
for(obj in _root.X){
if(_root.X[obj]._name==Cat){
// do something to dog
} else if (_root.X[obj]._name==Mouse1){ //Mouse is reserved
// do something else to dog
}
}
Re: Addressing Symbols Help HenryPr
12/17/2004 10:40:09 AM
Thank a lot that's great.
Re: Addressing Symbols Help kglad
12/17/2004 3:19:20 PM
AddThis Social Bookmark Button