Learn: PHP Flash Hit Counter

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Tutorial - Hit Counter using PHP & Flash

 

Free Flash PHP Tutorial


Step 2    <<   Previous      Intro   1   2   3   4   5     Next   >>       >>   Webwasp Mates

 

Step Two: Creating the Flash Movie

  1. Open a new: Flash Movie
  2. Go to: Modify > Document
  3. Set the size to: 350 x 50 pixels
  4. If you wish select a: Background Colour
  5. Click: OK
  6. Select the Text tool:
  7. On Stage drag out a: Text Box
  8. Return to the Selection tool:
  9. If the Property Inspector is closed, open it: Window > Properties (Ctrl F3)
  10. In the Property Inspector set the Text Box to: Dynamic Text


    Selecting Dynamic Text.

  11. Give the Text Box a Variable Name (Var): myCount


    Properties for the Text Box.
  12. Note: In the Property Inspector above the text alignment is set to right. This is normal for numbers, but not essential.


  13. Create a new Text Box and add other text that you may want. I added: This Flash Movie has been viewed:        times
  14. Note: The space in the sentence above is to give room for the count number to appear.

  15. As your first text box was set to Dynamic Text the next Text Box will take on this attribute. Reset the new Text Box to: Static Text


    Two Text Boxes sitting one on top of the other.

  16. Select Frame 1 in the timeline and add the following ActionScript (you may leave out the gray comments):

  17. // loadVariablesNum loads an external file into Flash as a variable
    // PHPCounter.php is the name of the external file
    //Zero is the level number


    loadVariablesNum ("PHPCounter.php", 0);


    Cross Ref: A variable is a way of getting a computer to remember something. The level number is like a layer. An in-depth understanding of these is not important for this tutorial but if you want to learn more look at one of these tutorials: Levels or Variables

  18. The Flash Movie is now finished so make sure you go to: File > Save (Ctrl S)
  19. Name your file: PHPCounter
  20. Then go to: File > Publish > Publish Settings
  21. Under formats select: Flash and HTML


    File Formats.

  22. Click: Publish
  23. Click: OK

    Note: Publishing creates an SWF file (Shockwave file or Flash Movie) and an HTML file (web page). The web page will automatically have the Flash Movie visible on the page.

         

Step 2    <<   Previous      Intro   1   2   3   4   5     Next   >>       >>   Webwasp Mates


Webwasp Community: Webwasp Mates & Dates

Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates

60602 visitors to this page since Nov 04 •

 Top of Page Home Food Mates Members Tutorials Forum Buy Templates Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.