Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

flash ad rotation

Posted on 2002-05-13
3
Medium Priority
?
237 Views
Last Modified: 2011-10-03
is it possible to do banner flash ads that rotate or change everytime someone hits refresh or comes to the page again? I do not want to use animated gif image since in this case it would be too large a file size. the flash is about 17K and that is nice and small for the simple presentation.
0
Comment
Question by:MasterMitch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 7007364
I assume these banners are embedded in an HTML page?
You would need a Javascript function that randomly
choses one of your banners when the page loads.

go to..

http://javascriptkit.com/script/script2/randomcontent.shtml

and see if this suits your purpose.
Z
0
 

Accepted Solution

by:
cobblerkid earned 150 total points
ID: 7040788
before you design your banner ad, just make sure your movie is set to 468 X 60 ( or what ever size you want) and develope the simple animation using tweens or ActionScript.

You don't have to use any javascript if you want random ads to appear each time the page is reloaded... you can just use a script in Flash that gives a random number and displays the the corresponding ad...

something like: adNumber = Math.round(Math.random()*10);

where 10 is the number of total ads that you have in the movie.  In the first frame of your swf use the above script, and then use an if statement or function that displays the appropriate movie on the stage(I would use the _x and _y properties to do that)

To keep the file size down just use a template swf that loads the appropriate movie into the template file from your server...

There are quite a few ways to do this, so some feed back might help...

ck
0
 
LVL 6

Expert Comment

by:rootdir
ID: 7043203
Create different small movies and call into ad banner movie or base movie like this

Create array of movie names

Movies= new Array("movie1.swf", "Movie2.swf", "Movie3.swf", "another.swf",.....);

Then use random function to select

Rand_Movie = Math.floor(Math.random()*4);

Load action trigger on banner movie

loadMovieNum (Movies[Rand_Movie], 1);
Movies.splice(Rand_Movie, 1);

That's it You will get what you are looking for

Cheers
RootDir
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question