Captain Caveman
01-09-2009, 10:34 AM
Hi,
Can anyone tell me how to send an argument to a function (actionscript 3) and then use the argument within a path?
For example, if I was trying to tell flash to play a curtain closing animation and needed to send a variable telling it which movieclip to play - this is how I'm trying to do it:
function closeCurtains(curtain) {
this.curtain.play();
}
closeCurtains(living_room);
This is the error I get:
TypeError: Error #1010: A term is undefined and has no properties.
at Untitled_fla::MainTimeline/closeCurtains()
at Untitled_fla::MainTimeline/frame1()
Can anyone see where I'm going wrong?
Can anyone tell me how to send an argument to a function (actionscript 3) and then use the argument within a path?
For example, if I was trying to tell flash to play a curtain closing animation and needed to send a variable telling it which movieclip to play - this is how I'm trying to do it:
function closeCurtains(curtain) {
this.curtain.play();
}
closeCurtains(living_room);
This is the error I get:
TypeError: Error #1010: A term is undefined and has no properties.
at Untitled_fla::MainTimeline/closeCurtains()
at Untitled_fla::MainTimeline/frame1()
Can anyone see where I'm going wrong?