-
Var not working
--
So, I’ve got this ---> _name+VarBob
It’s supposed to return the MC name and whatever “VarBob” is. In my case, “VarBob” is a dot extension that I would like to define at a different time and place.
Ideal outcome ---> MCname.swf or MCname.jpg
when I define VarBob locally it works…
Like this ---> VarBob=”.swf”
But I want to define VarBob somewhere else
Like this ---> _root.menu.whatever.VarBob=”.swf”
I get this ---> MCname not this MCname.swf
Any ideas?
--
-
The Flashman
Like you said, it's works locally but not after adding a path... maybe your targetting is off.
i eat actionscripts for breakfast
-
no thats not it. i am successfuly targeting other vars in the same spot from different places.
-
If I understand your problem correctly, you just need to use:
_name + _root.menu.whatever.VarBob=”.swf”
-
--
i want to define "VarBob" on the main time line...
_root.menu.whatever.VarBob=”.swf”
inside my MC "whatever" i have this
_name+VarBob
which should return this
whatever.swf
but i get
whatever (without the .swf)
--
-
So basically you want to define a variable that is local to the movie clip from someplace outside the movie clip? Do you not know the movie clip's name? How was the movie clip created? Manually? Dynamically?
-
--
so my "whatever" MC is named dinamicly... (im a bone head)
so here is my solution
i am defining it localy baced on the _parent._name using an if else...
stop();
if (_parent._name == "MC1") {
extns=".jpg";
} else if (_parent._name == "MC2") {
extns=".swf";
}
this.x = getProperty(this, _name);
this.but.onRelease = function() {
loadMovie("bob/"+_name+extns, "_root.loadin");
_parent.gotoAndStop(1);
};
--
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|