Skip to main content
Participant
December 9, 2007
Question

passing parameters

  • December 9, 2007
  • 2 replies
  • 210 views
Hi all, I'm brand new here.

I'm working on something where I need to define a function on the main timeline and call it through a "enter" button on a remote that changes a channel on a tv. The first 3 number keys on the remote define variables to pass as parameters through the enter key to the function, but I can't get it to work right. My experimental attempts are only on the "3" and "enter" buttons on the remote and on the function in the main timeline. Any help would be greatly appreciated.

This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
December 10, 2007
you have numerous problems but most can be corrected by understanding paths in flash:

all your buttons are movieclip buttons. and because you're attaching code directly to your buttons, your variables are relative to those movieclip button timelines.

so, for example, when you click your one button, you define _root.remote.num1.process = one.

so, in this example, your first problem is process is undefined when you press your enter button. your second problem is one is undefined.
kglad
Community Expert
Community Expert
December 9, 2007
are you using a non-standard input device? or is this a virtual remove etc.
QuePasa87Author
Participant
December 9, 2007
I'm not sure what you mean by that but here is the .fla:

Here