Online Success Secrets for Webmasters

Freebies Small Business & Marketing Blog Weekly Newsletter Advertising for all Budgets


 
Mom Tycoons Index > Tutorials > Flash Tutorials

Building Easy Text or Images Scrolling with Flash MX 2004 - Part 1

16. Create the fifth blank keyframe in the "Down" frame. Add the action script code:
y = getProperty("_root.text.content", _y);
if (y<-1600) {
gotoAndPlay(4);
} else {
setProperty("_root.text.content", _y, y-6);
}
Screenshot

17. Create 6th blank keyframe in the "Down" layer. Add the action script code:
gotoAndPlay(5);
Screenshot

18. Click the "Scene 1" label to return to the root scene of your movie. Select the blank keyframe in the "Control" layer and drag the "control" movie to the working area from the "Library" panel. Set the "control" movie instance name to "control"(pic.2)
Screenshot

Pic.2
Screenshot

19. Convert the up arrow in the "Buttons" layer to the button symbol. Do not forget the set up the "Hit" area! Add the following action script code to the new button in the "Action" panel:
on (rollOver) {
tellTarget ("control") {
gotoAndPlay(2);
}
}
on (rollOut, dragOut) {
tellTarget ("control") {
gotoAndStop(1);
}
}
Screenshot

20. Convert the down arrow to the button symbol and add the action script code:
on (rollOver) {
tellTarget ("control") {
gotoAndPlay(5);
}
}
on (rollOut, dragOut) {
tellTarget ("control") {
gotoAndStop(4);
}
}
Screenshot

21. Double click "text" movie in the "Mask and Content" layer to enter it. Rename the default layer with shape to the "Mask" layer.
Screenshot

22. Create the new blank layer, call it "Text". Place it under the "Mask" layer. Add some text to the "Text" layer. The text must be located so that text layer began right from the starting of the "Mask" layer. As you can see the text is not visible behind the "Mask" layer but we fix that in our next step.
Screenshot

23. Convert the "Text" layer to the movie clip and change the instance name to "content"
Screenshot

24. Select the "Mask" layer, make a right mouse click and select "Mask" option form the menu. After the option was applied the layers will look like pic.2
Screenshot

Pic.2
Screenshot

That’s it! We are done with this lo-o-o-o-ong tutorial! Press “Ctrl+Enter” As you may see the arrows functional but you need to adjust numbers mentioned in the step 13 and 16(100 and 1600) to achieve smooth scrolling.
On the example you can see adjusted scrolling.

Click here to download source fla file.

Back to Page 1

About the Author: Oleg Lazarenko
Production manager of
Metamorphosis Website Design Studio -
Custom design, Website Templates,
Web design Articles and Tutorials.

 

 


About Us | Contact Us | Advertise With Us | Links

All Rights Reserved © Mom Tycoons Policies | Disclaimer