Home  |  Free Templates (NEW)  |  Premium Website Templates  |  Tutorials  |  Privacy Policy  |  Link Exchange  |  Contact Us
Tutorials
Photoshop Tutorials
Flash Tutorials
3D Graphics Tutorials
Partners
Free Website Templates
Flash Templates Today
Web Sites
Free Shape
Photoshop Tutorials
Flash Tutorials
Illustrator Tutorials
HTML Tutorials
Flash Templates
Free Web Templates
Free Flash Templates
Web Templates Forum
Recommended Hosting:
Host Unlimited Domains on 1 Account
1500GB storage and 15000GB bandwidth for $6.95/mo!
Recommended Hosting:
Host Unlimited Domains on 1 Account
1500GB storage and 15000GB bandwidth for $6.95/mo!
Free Website Templates: 123456789101112131415
Preview & Download Preview & Download Preview & Download

Welcome To NewFreeTemplates.com Flash Tutorials Area - Create scroll buttons: automatic scroller

The text will scroll when you move the mouse over the arrows.

Follow the steps below:

  1. Launch Flash Designer and create a blank document.
  2. Set the frame delay to "Stop" ("Frame" > "Frame Delay").
  3. Size the frame at about 300x200 ("Frame" > "Frame Size").
  4. Create a new dynamic text paragraph and enter a very long text with many line breaks.

  5. Choose "Item" > "Placement Properties" and make sure the item name is "HTMLText1". Rename it if necessary. Click OK.

  6. Choose "Frame" > "Insert from Gallery", select "Down" and click OK to insert down button. Repeat the same an insert "Up" button.

  7. Position both triangles at the right

Next define ActionScript code:

  1. Choose Frame > ActionScript and enter:

    function scrl()
    {
    	HTMLText1.scroll=HTMLText1.scroll+scrolldelta;
    }
    
    setinterval(scrl,100);
    
    //setinterval runs the "scrl" function every 100 milliseconds
    //scrl function adjusts txt.scroll by the value of "scrolldelta"
    //the variable "scrolldelta" will be 1,-1, or 0 
    
    
  2. Select up arrow, choose "Item" > "Actions" > "OnOver" and enter the following ActionScript code:

    scrolldelta=-1;

  3. Choose "Item" > "Actions" > "OnOut" and enter the following ActionScript code:

    scrolldelta=0;

  4. Select down arrow, choose "Item" > "Actions" > "OnOver" and enter the following ActionScript code:

    scrolldelta=1;

  5. Choose "Item" > "Actions" > "OnOut" and enter the following ActionScript code:

    scrolldelta=0;

Hit F9 to play the file.

OnOver and OnOut actions are executed on mouse events. scrl function executes every 50 miliseconds. To speed up scrolling decrease the delay to 30 or less miliseconds.

Download source project t1037.zip

Advertisements
 
Home  |  Free Templates  |  Premium Website Templates  |  Tutorials  |  Privacy Policy  |  Contact Us
All Rights Reserved 2007-2008 by NewFreeTemplates.com