Copy link to clipboard
Copied
Hi Guys
I think this should be a very simple question to answer, but try as I might I can't seem to get it to work.
I'm working in HTML5 canvas mode, and I'm pretty new to it so what is simple for you guys is taking me ages to get my head around!
I'm creating an interactive map of a building. At the bottom will be four buttons, ground floor, first floor, second floor and third floor, stacked on top of each other just like buttons on an elevator panel in real life.
The graphic of the building will be a movie clip with all the floors as separate movie clip symbols. I'd like to be able to press a button and animate the 'y' position of each floor up and down, depending which floor the user wants to see, so it will move all the other floors up or down out of the way and reveal the selected one. So I need to be able to 'call' the right floor from the elevator control panel, no matter what other floor is currently open by the user.
I've tried using:
this.firstfloor.y+=-100;
this.secondfloor.y+=-200;
and so on. but of course this just moves the floor(s) up and down in increments, with no tweens or easing of the floor animation. How would I add a tween and easing into that code?
David
Copy link to clipboard
Copied
You just use the built-in tween library.
Copy link to clipboard
Copied
Thanks Clay
Just trying to get my head around all these scripts, thanks for pointing me in the right direction..
D
Find more inspiration, events, and resources on the new Adobe Community
Explore Now