Solved

flash ad rotation

Posted on 2002-05-13
3
234 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 50 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

763 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