Skip to main content
Inspiring
July 25, 2011
Answered

Pass the variable from timeline to one of my classes !?

  • July 25, 2011
  • 1 reply
  • 313 views

Hello !
The title says it all.

I need to pass a boolean variable initially set to false to one of my classes called "EasyGame".

It is than changed to true when one of the function in this class is runned.

I tried some different ways but had no luck.

Anyone have an idea ?

This topic has been closed for replies.
Correct answer

If you instantiate the class in the timeline, you can just call a method in the class - passing the variable as a parameter.

easyGame.setTimelineVar(myVar);

And have another method that lets you retrieve the value:

myVar = easyGame.getTimelineVar();

1 reply

Correct answer
July 25, 2011

If you instantiate the class in the timeline, you can just call a method in the class - passing the variable as a parameter.

easyGame.setTimelineVar(myVar);

And have another method that lets you retrieve the value:

myVar = easyGame.getTimelineVar();