web design template web design template web design template

Page : 1 2

Dear Friend,

Hello & welcome back to Firewire, your friendly guide to the exciting world of web-design & web-solutions!

This newsletter covers Systematic tutorial in Flash 5.0 along with the final source FLA file. At the end of the tutorial, you will be able to create a News Scroll where text will appear dynamically using action script.

Click here to download the source (.fla) file.

 

1. Create a new movie with dimensions of 180px X 250px and fps=18 with white as background color.



Design a News Panel image in Photoshop and export in .png 24 bit format with transperancy in the center of the news panel preserving only the borders.

2. Choose File > Import.

3. Select the news panel image and click 'open'

4. You will get the news panel image in Flash.

5. Select the image.

6. Choose Insert > Convert to Symbol

7. Convert the image into a movie clip and name it as 'newspanel'


8. Choose Insert > New Symbol

9. Create a movie clip and name it as 'news'

10. Select the text tool option from the tool bar.

11. Create a vertical long dynamic text field as shown in the figure below:

12. In the text options window select the Dynamic Text with Multiline option.

13. Also keep the HTML and Word wrap options 'on'

14. In the Variable field type the following variable name given below.

_root.news_text

15. Choose Insert > New Symbol

16. Create a movie clip and name it as 'news scroll'

17. Select Window > Library > news movie clip

18. Drag the 'news' movie clip from the library in the 'news scroll' movie clip.

19. Select the 'news' movie clip.

20. Choose Window > Panels > Instance

21. In the Instance window give an instance name to news movie clip as 'news'


22. Choose Insert > New Symbol

23. Create a movie clip and name it as 'blank'

24. Select the first frame in the 'blank' movie clip.

25. Choose Window > Actions.

26. In the Frame Actions window type the following action:

pos = 90;

 

//pos = 90;

  The 'pos' variable value determines the starting position of the 'news' movie clip.

27. Select the next frame i.e. frame 2

28. Choose Insert > Keyframe

29. Choose Window > Actions

30. In the Frame Actions window type the following action:

pos = pos-1;
setProperty (_parent.news, _y, pos);
if (getProperty ( _parent.news, _y )<= -420) {
     gotoAndPlay (1);
}


 

//pos = pos-1;

  The 'pos' variable collects the new value of 'pos' each time after reducing by 1.
 

//setProperty (_parent.news, _y, pos);

  This action determines the position of the 'news' movie clip in Y-axis direction with reference to the collected value from variable pos.
 

/*if (getProperty ( _parent.news, _y )<= -420) {
      gotoAndPlay (1);
}*/

  This action checks the Y-axis position of the 'news' movie clip,whether it is less than or equal to -420 and as soon as the the position of the 'news' movie clip is less than or equal to -420 , the action script will start once again from the frame 1 resulting in the news to scroll from start.

31. Select the next frame i.e. frame 3

32. Choose Insert > Keyframe

33. Choose Window > Actions

34. In the Frame Actions window type the following action:

gotoAndPlay (2);

 

// gotoAndPlay (2);

  At frame 3 action script will jump to frame 2.





© Image Online  2001-2003