I have created this by following this code from the FAQ page:
First create a movie, e.g. BannerLoader.swf
Then create the banners. They must have the same dimensions as BannerLoader.swf (400x80 is a good size), but they can be of any duration or filesize and interactive or not.
Name the banner files bannerX.swf, where X is a number. The numbers of the banners start at 0 and must be increment: banner0.swf, banner1.swf, banner2.swf, etc...
Insert two keyframes in BannerLoader.swf.
Label the first one, e.g. "LoopStart" and add the following code:
Set Variable: "Delay" = 10
Set Variable: "NumBanners" = 75+1
Set Variable: "TmpTimer" = Int(GetTimer/1000)
If ((TmpTimer-(Delay*(Int(TmpTimer/Delay))))=1)
Loop While (CurMovie eq NewMovie)
Set Variable: "NewMovie" = "Banner" & Random (NumBanners) & ".swf"
End Loop
Set Variable: "CurMovie" = NewMovie
Unload Movie (1)
Load Movie (CurMovie, 1)
End If
And this code to the second:
Go to and Play ("LoopStart")
However, I get this error message:
(**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 1: Syntax error.
Set Variable: "Delay" = 10
**Error** Scene=Scene 1, layer=Layer 2, frame=2:Line 1: Syntax error.
Go to and Play ("LoopStart")
Total ActionScript Errors: 2 Reported Errors: 2)
when playing it -- does anyone have any suggestions on what I am doing wrong or have another actionscript that would work better? I would ideally like to have different banners load randomly.
thanks!
First create a movie, e.g. BannerLoader.swf
Then create the banners. They must have the same dimensions as BannerLoader.swf (400x80 is a good size), but they can be of any duration or filesize and interactive or not.
Name the banner files bannerX.swf, where X is a number. The numbers of the banners start at 0 and must be increment: banner0.swf, banner1.swf, banner2.swf, etc...
Insert two keyframes in BannerLoader.swf.
Label the first one, e.g. "LoopStart" and add the following code:
Set Variable: "Delay" = 10
Set Variable: "NumBanners" = 75+1
Set Variable: "TmpTimer" = Int(GetTimer/1000)
If ((TmpTimer-(Delay*(Int(TmpTimer/Delay))))=1)
Loop While (CurMovie eq NewMovie)
Set Variable: "NewMovie" = "Banner" & Random (NumBanners) & ".swf"
End Loop
Set Variable: "CurMovie" = NewMovie
Unload Movie (1)
Load Movie (CurMovie, 1)
End If
And this code to the second:
Go to and Play ("LoopStart")
However, I get this error message:
(**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 1: Syntax error.
Set Variable: "Delay" = 10
**Error** Scene=Scene 1, layer=Layer 2, frame=2:Line 1: Syntax error.
Go to and Play ("LoopStart")
Total ActionScript Errors: 2 Reported Errors: 2)
when playing it -- does anyone have any suggestions on what I am doing wrong or have another actionscript that would work better? I would ideally like to have different banners load randomly.
thanks!