Thanks for the answer. What my problem was that the object i was passing was not a movieclip - it was a button, and there is not a _name property for a button, only a movieclip. I changed all of my buttons to movieclips and the problem was solved.
- Matt Small
----- Original Message -----
From: cantrl. a
To: CF-Community
Sent: Monday, November 17, 2003 4:50 PM
Subject: Re:Anybody up for a flash question?
I think if you replace 'set' with 'var', you should be in good shape.
Set is used like a function: set("variableName", _expression_);
Much like the setVariable function in coldfusionMX.
You can always press shift-F1 to go to the actionscript reference from the flash IDE. You can also highlight an actionscript function and press shift-F1 and if it recognizes it, will go to that part of the docs. (would be awesome if homesite did that for cf tags/functions - does anyone know if it does?)
FYI, this worked for me.
function traceMovieName(myObj) {
var myObjectName = myObj._name;
trace(myObjectName);
}
traceMovieName(testMovie);
Adam.
>How can I get the name of an object that is passed by reference to a
>function?
>
>I want the object name of obj1 in this function. (Excuse me if this
>is incorrect, I'm working on it.)
>
>
>function fnct(obj1){
>set objectname = obj1._name;
>}
>
>I can't seem to get this.
>
>- Thanks, Matt Small
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- RE: WHAT???!!! (RE: LURKER or NEWBIE) Heald, Tim
- Anybody up for a flash question? Matthew Small
- Re:Anybody up for a flash question? cantrl . a
- Matthew Small