The Banner diagram switching result Code implemented by the website based on flash, flashbanner
The example in this article describes the Banner diagram switching result Code implemented by the website based on flash. The main switching function of this instance is completed by flash. Share it with you for your reference.
The specific implementation code is as follows:
Copy codeThe Code is as follows: <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> Website Banner chart switching effect (flash) </title>
</Head>
<Body>
<Script type = "text/javascript" src = "js/swfppt. js"> </script>
<Script type = "text/javascript">
// <! CDATA [[
Loadswfppt ({width: 400, height: 450, text_height: 0,
Pic :[
{Img: 'images/banner1.jpg ', text: '01', link: 'img3.html '},
{Img: 'images/banner2.jpg ', text: '02', link: 'img4.html '},
{Img: 'images/banner3.jpg ', text: '03', link: 'img5.html '}
]});
//]>
</Script>
</Body>
</Html>
Shows the running effect:
Click here to download the complete instance code.
I hope this article will help you with web programming.
How does banner image JS switch transition effect?
<Html> <! -- Script code -->
<Head>
<Script language = "JavaScript" type = "text/javascript">
<! --
Var bannerAD = new Array ();
Var adNum = 0;
Bannerad1_0w.{banner1.jpg ';
Bannerad1_1##banner2.jpg ';
Bannerad%2}%banner3.jpg ';
Var preloadedimages = new Array ();
For (I = 1; I <bannerAD. length; I ++ ){
Preloadedimages [I] = new Image ();
Preloadedimages [I]. src = bannerAD [I];
}
Function setTransition (){
If (document. all ){
BannerADrotator. filters. revealTrans. Transition = Math. floor (Math. random () * 23 );
BannerADrotator. filters. revealTrans. apply ();
}
}
Function playTransition (){
If (document. all ){
BannerADrotator. filters. revealTrans. play ();
}
}
Function nextAd (){
If (adNum <bannerAD. length-1 ){
AdNum ++;
} Else {
AdNum = 0;
}
SetTransition ();
Document. images. bannerADrotator. src = bannerAD [adNum];
PlayTransition ();
TheTimer = setTimeout ("nextAd ()", 5000 );
}
// -->
</Script>
<! -- Script code ended -->
</Head>
<Body>
<! -- Call start -->
<Table>
& Lt; td width = "159" valign = "middle" & gt;
<Script language = "JavaScript" type = "text/javascript">
NextAd ()
</Script> </td>
<! -- Call ended -->
</Table>
</Body>
<&... The remaining full text>
Dynamic Effect on navigation bar and banner image Switching Effect
Try switching this image
Switch with 12345 numbers
If you click a number, it will change to another image. If you do not click it, it will change automatically.
The tutorials and source code are provided.
Reference: www.blueidea.com/..20.10895