Easing the text using the buttons


show more Easing the text using the buttons provides you with in-depth training on Web. Taught by Todd Perkins as part of the Flash CS3 Professional Beyond the Basics show less
please wait ...

Easing the text using the buttons

Now we'll talk about using our buttons to create the easing animation that we created when we dragged the scrollbar. If you're following along, I'm working in 10_Button_Easing.fla in the Chapter 04 folder in the Exercise Files folder. Let's select the first keyframe in the actions layer and open the Actions panel by pressing Option+F9 on the Mac or F9 on the PC. Now, as for the easing code, we've actually already written the easing code before. Scroll up in your code and find the setScrollPercent function. Mine goes from line 39 to line 52.

Notice at the bottom of this function, we set the text field's y position. Remember we set it to the distance from the text field's current y position to the target scroll and we divided that value by our easing variable, and that's the gave us that smooth animation. What I'm going to do is select this line of code and copy it using Command+C on the Mac or Ctrl+C on the PC. Scroll down in your code to find the scroll...

Easing the text using the buttons
Video duration: 1m 37s 5h 21m Intermediate

Viewers:

Easing the text using the buttons provides you with in-depth training on Web. Taught by Todd Perkins as part of the Flash CS3 Professional Beyond the Basics

Subject:
Web
Software:
Flash Professional
Author:
please wait ...