PHP MySQL ebook
February 12, 2011 – 4:57 pm | No Comment

Hey everyone!!
With this section I hope to share with you resources which I have tried and valued
So you’re new to PHP and want to learn from scratch. Well I was in your position not too …

Read the full story »
SEO Tutorials

Need help with Search Engine Optimisation? This is the place to look for the latest tips and hints with the advice we offer. Keep an eye out here for the latest posts.

PHP Tutorials

Learn how to code with PHP to achieve your goal. In here I aim to show and teach you about little tips and tricks that should enhance your coding abilities

Flash Tutorials

Learn how to use Adobe Flash for your own purposes. Little tips and hints to help you along

Website Development

In here I aim to help you with developing your website from scratch. Come here for various tips and pieces of advice to help you build and improve your website.

Home » Featured, Flash Tutorials

Random Banner for each visit

Submitted by on July 29, 2007 – 3:20 pm3 Comments

Flash has never been so interactive. In this tutorial i will be showing you how to load up a random swf each visit. So lets start!

1- rename all your desired movies into banner(number).swf eg banner1.swf,banner1.swf they have to consiguative numbers starting at 1
2- Load up flash
3- go to windows>actions

Enter the following:

Actionscript:
  1. itemtotal = 2; //total banners that are going to be viewed randomly
  2. fscommand("flashpath");
  3. temptotal = itemtotal;
  4. movieprefix = "banner";//as for the file name set previosly
  5. aItemTemp = new Array(); //set a new arrey
  6. aMovie = new Array(); //set another new arrey
  7. newvar = math.round((math.random()*1)+1); // the alotherigom to work out the number which is going to be viewed.
  8. loadMovieNum(movieprefix+(newvar)+".swf", 1); //loads the movie

test the movie by clicking control+ enter again and again(that will refresh it)
Tell me,how easy was that!
If you encounter any problems please do not hesitat to contact me. :)

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Popularity: 29% [?]

3 Comments »

  • Gayan says:

    Nice Tut !

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
  • Khaiman says:

    the whole thing did not work..
    all the lines had errors mainly saying :1120:Access to undefined property

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
  • Abdul says:

    can I see your code?

    VN:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.17_1161]
    Rating: 0 (from 0 votes)

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.