Is there a way to maintain var states within a clip without doing the project.var???
Example below… Is there a way to store the speed within this clip? I know that this is not Flash, but for example in Flash I could add properties to the clip dynamically by doing this.speed … like some kind of inheritance/extension of a Clip…
I think you can use this.speed instead of project.speed to keep it inside that clip. However, you can still access it by using clipName.speed, where clipName is the name of the clip.
1 Like
Thank you for your response. : )
So if I defined at the default tab:
this.initialY = this.y;
Then at the Update tab I could read it:???
console.log(this.initialY); ???
I think that I tried that in the past and It didn’t work… Let me try again…
It worked. I don’t know why it didn’t work when I tried before. Thank you so much… this simplifies my life!
3 Likes