MORAD الكابتن المتألق
| موضوع: كود لعمل العاب نارية في صفحتك ( معدل ) الخميس يناير 21, 2010 4:29 pm | |
| الكود : <</SPAN> layer name</SPAN> =</SPAN> "a0" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#ffffff" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a1" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#fff000" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a2" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#ffa000" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a3" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#ff00ff" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a4" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#00ff00" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a5" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#ff00ff" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a6" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#ff0000" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a7" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#ffffff" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a8" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#fff000" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a9" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#ffa000" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a10" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#ff00ff" </SPAN> clip</SPAN> =</SPAN> "0,0,1,1"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a11" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#00ff00" </SPAN> clip</SPAN> =</SPAN> "0,0,2,2"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a12" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#0000ff" </SPAN> clip</SPAN> =</SPAN> "0,0,2,2"</SPAN> ></</SPAN> layer</SPAN> > <</SPAN> layer name</SPAN> =</SPAN> "a13" </SPAN> left</SPAN> =</SPAN> 10 top</SPAN> =</SPAN> 10 visibility</SPAN> =</SPAN> show bgcolor</SPAN> =</SPAN> "#ff0000" </SPAN> clip</SPAN> =</SPAN> "0,0,2,2"</SPAN> ></</SPAN> layer</SPAN> >
<****** </SPAN> language</SPAN> =</SPAN> "Java******"</SPAN> >
</SPAN>/* ******** firework ****** (By Kurt Gregg, kurt.grigg@virgin.net) Modified granted to Dynamic Drive to feature ****** in archive For full source and 100's more DHTML ******s, visit http://dynamicdrive.com */
</SPAN>if (********.</SPAN> all</SPAN> ) </SPAN>with</SPAN> (********){ </SPAN>write</SPAN> (</SPAN> '<div id="starsDiv" style="position:relative ;top:0px;left:0px">'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:2px;height:2px;background:#ffffff;font-size:2px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#fff000;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#ffa000;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#ff00ff;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#00ff00;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#0000ff;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#FF0000;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#ffffff;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#fff000;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#ffa000;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#ff00ff;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:2px;height:2px;background:#ff00ff;font-size:2px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#0000ff;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '<div style="position:relative;width:1px;height:1px;background:#FF0000;font-size:1px"></div>'</SPAN> ) </SPAN>write</SPAN> (</SPAN> '</div>'</SPAN> ) }
var </SPAN> Clrs</SPAN> =new Array(</SPAN> 9</SPAN> ) </SPAN>Clrs</SPAN> [</SPAN> 0</SPAN> ]=</SPAN> 'ff0000'</SPAN> ; </SPAN>Clrs</SPAN> [</SPAN> 1</SPAN> ]=</SPAN> '00ff00'</SPAN> ; </SPAN>Clrs</SPAN> [</SPAN> 2</SPAN> ]=</SPAN> '000aff'</SPAN> ; </SPAN>Clrs</SPAN> [</SPAN> 3</SPAN> ]=</SPAN> 'ff00ff'</SPAN> ; </SPAN>Clrs</SPAN> [</SPAN> 4</SPAN> ]=</SPAN> 'ffa500'</SPAN> ; </SPAN>Clrs</SPAN> [</SPAN> 5</SPAN> ]=</SPAN> 'ffff00'</SPAN> ; </SPAN>Clrs</SPAN> [</SPAN> 6</SPAN> ]=</SPAN> '00ff00'</SPAN> ; </SPAN>Clrs</SPAN> [</SPAN> 7</SPAN> ]=</SPAN> 'ffffff'</SPAN> ; </SPAN>Clrs</SPAN> [</SPAN> 8</SPAN> ]=</SPAN> 'fffff0'</SPAN> ; var </SPAN> sClrs</SPAN> =new Array(</SPAN> 5</SPAN> ) </SPAN>sClrs</SPAN> [</SPAN> 0</SPAN> ]=</SPAN> 'ffa500'</SPAN> ; </SPAN>sClrs</SPAN> [</SPAN> 1</SPAN> ]=</SPAN> '55ff66'</SPAN> ; </SPAN>sClrs</SPAN> [</SPAN> 2</SPAN> ]=</SPAN> 'AC9DFC'</SPAN> ; </SPAN>sClrs</SPAN> [</SPAN> 3</SPAN> ]=</SPAN> 'fff000'</SPAN> ; </SPAN>sClrs</SPAN> [</SPAN> 4</SPAN> ]=</SPAN> 'fffff0'</SPAN> ; var </SPAN> yBase</SPAN> ; var </SPAN> xBase</SPAN> ; var </SPAN> step</SPAN> ; var </SPAN> currStep </SPAN> = </SPAN> 0</SPAN> ; var </SPAN> Xpos </SPAN> = </SPAN> 1</SPAN> ; var </SPAN> Ypos </SPAN> = </SPAN> 1</SPAN> ; var </SPAN> initialStarColor</SPAN> =</SPAN> 'ffa000'</SPAN> ; var </SPAN> Mtop</SPAN> =</SPAN> 250</SPAN> ; var </SPAN> Mleft</SPAN> =</SPAN> 250</SPAN> ;
function </SPAN> Fireworks</SPAN> () { if (********.</SPAN> all</SPAN> ) { </SPAN>yBase </SPAN> = </SPAN> window</SPAN> .********.</SPAN> body</SPAN> .</SPAN> offsetHeight</SPAN> /</SPAN> 3</SPAN> ; </SPAN>xBase </SPAN> = </SPAN> window</SPAN> .********.</SPAN> body</SPAN> .</SPAN> offsetWidth</SPAN> /</SPAN> 8</SPAN> ; } else if (********.</SPAN> layers</SPAN> ) { </SPAN>yBase </SPAN> = </SPAN> window</SPAN> .</SPAN> innerHeight</SPAN> /</SPAN> 3</SPAN> ; </SPAN>xBase </SPAN> = </SPAN> window</SPAN> .</SPAN> innerWidth</SPAN> /</SPAN> 8</SPAN> ; } if (********.</SPAN> all</SPAN> ) { </SPAN>step</SPAN> =</SPAN> 5</SPAN> ; for ( </SPAN> i </SPAN> = </SPAN> 0 </SPAN> ; </SPAN> i </SPAN> < </SPAN> starsDiv</SPAN> .</SPAN> all</SPAN> .</SPAN> length </SPAN> ; </SPAN> i</SPAN> ++ ) { for (</SPAN> ai</SPAN> =</SPAN> 0</SPAN> ; </SPAN> ai </SPAN> < </SPAN> Clrs</SPAN> .</SPAN> length</SPAN> ; </SPAN> ai</SPAN> ++) { var </SPAN> c</SPAN> =</SPAN> Math</SPAN> .</SPAN> round</SPAN> (</SPAN> Math</SPAN> .</SPAN> random</SPAN> ()*[</SPAN> ai</SPAN> ]); } if (</SPAN> currStep </SPAN> < </SPAN> 90</SPAN> ) </SPAN>starsDiv</SPAN> .</SPAN> all</SPAN> [</SPAN> i</SPAN> ].</SPAN> style</SPAN> .</SPAN> background</SPAN> =</SPAN> initialStarColor</SPAN> ; if (</SPAN> currStep </SPAN> > </SPAN> 90</SPAN> ) </SPAN>starsDiv</SPAN> .</SPAN> all</SPAN> [</SPAN> i</SPAN> ].</SPAN> style</SPAN> .</SPAN> background</SPAN> =</SPAN> Clrs</SPAN> [</SPAN> c</SPAN> ]; </SPAN>starsDiv</SPAN> .</SPAN> all</SPAN> [</SPAN> i</SPAN> ].</SPAN> style</SPAN> .</SPAN> top </SPAN> = </SPAN> Mtop </SPAN> + </SPAN> yBase</SPAN> *</SPAN> Math</SPAN> .</SPAN> sin</SPAN> ((</SPAN> currStep</SPAN> +</SPAN> i</SPAN> *</SPAN> 5</SPAN> )/</SPAN> 3</SPAN> )*</SPAN> Math</SPAN> .</SPAN> sin</SPAN> (</SPAN> 550</SPAN> +</SPAN> currStep</SPAN> /</SPAN> 100</SPAN> ) </SPAN>starsDiv</SPAN> .</SPAN> all</SPAN> [</SPAN> i</SPAN> ].</SPAN> style</SPAN> .</SPAN> left </SPAN> = </SPAN> Mleft </SPAN> + </SPAN> yBase</SPAN> *</SPAN> Math</SPAN> .</SPAN> cos</SPAN> ((</SPAN> currStep</SPAN> +</SPAN> i</SPAN> *</SPAN> 5</SPAN> )/</SPAN> 3</SPAN> )*</SPAN> Math</SPAN> .</SPAN> sin</SPAN> (</SPAN> 550</SPAN> +</SPAN> currStep</SPAN> /</SPAN> 100</SPAN> ) } } else if (********.</SPAN> layers</SPAN> ) { </SPAN>step </SPAN> = </SPAN> 5</SPAN> ; for ( </SPAN> j </SPAN> = </SPAN> 0 </SPAN> ; </SPAN> j </SPAN> < </SPAN> 14 </SPAN> ; </SPAN> j</SPAN> ++ ) </SPAN> //number of NS layers! </SPAN>{ var </SPAN> templayer</SPAN> =</SPAN> "a"</SPAN> +</SPAN> j </SPAN>for (</SPAN> ai</SPAN> =</SPAN> 0</SPAN> ; </SPAN> ai </SPAN> < </SPAN> Clrs</SPAN> .</SPAN> length</SPAN> ; </SPAN> ai</SPAN> ++) { var </SPAN> c</SPAN> =</SPAN> Math</SPAN> .</SPAN> round</SPAN> (</SPAN> Math</SPAN> .</SPAN> random</SPAN> ()*[</SPAN> ai</SPAN> ]); } if (</SPAN> currStep </SPAN> < </SPAN> 90</SPAN> ) ********.</SPAN> layers</SPAN> [</SPAN> templayer</SPAN> ].</SPAN> bgColor</SPAN> =</SPAN> initialStarColor</SPAN> ; if (</SPAN> currStep </SPAN> > </SPAN> 90</SPAN> ) ********.</SPAN> layers</SPAN> [</SPAN> templayer</SPAN> ].</SPAN> bgColor</SPAN> =</SPAN> Clrs</SPAN> [</SPAN> c</SPAN> ]; ********.</SPAN> layers</SPAN> [</SPAN> templayer</SPAN> ].</SPAN> top </SPAN> = </SPAN> Mtop </SPAN> + </SPAN> yBase</SPAN> *</SPAN> Math</SPAN> .</SPAN> sin</SPAN> ((</SPAN> currStep</SPAN> +</SPAN> j</SPAN> *</SPAN> 5</SPAN> )/</SPAN> 3</SPAN> )*</SPAN> Math</SPAN> .</SPAN> sin</SPAN> (</SPAN> 550</SPAN> +</SPAN> currStep</SPAN> /</SPAN> 100</SPAN> ) ********.</SPAN> layers</SPAN> [</SPAN> templayer</SPAN> ].</SPAN> left </SPAN> = </SPAN> Mleft </SPAN> + </SPAN> yBase</SPAN> *</SPAN> Math</SPAN> .</SPAN> cos</SPAN> ((</SPAN> currStep</SPAN> +</SPAN> j</SPAN> *</SPAN> 5</SPAN> )/</SPAN> 3</SPAN> )*</SPAN> Math</SPAN> .</SPAN> sin</SPAN> (</SPAN> 550</SPAN> +</SPAN> currStep</SPAN> /</SPAN> 100</SPAN> ) } } </SPAN>currStep</SPAN> += </SPAN> step</SPAN> ; </SPAN>//window.status=currStep; </SPAN>T</SPAN> =</SPAN> setTimeout</SPAN> (</SPAN> "Fireworks()"</SPAN> ,</SPAN> 5</SPAN> ); if (</SPAN> currStep</SPAN> ==</SPAN> 220</SPAN> ) { </SPAN>currStep</SPAN> =-</SPAN> 10</SPAN> ; for (</SPAN> n</SPAN> =</SPAN> 0</SPAN> ; </SPAN> n </SPAN> < </SPAN> sClrs</SPAN> .</SPAN> length</SPAN> ; </SPAN> n</SPAN> ++) { var </SPAN> k</SPAN> =</SPAN> Math</SPAN> .</SPAN> round</SPAN> (</SPAN> Math</SPAN> .</SPAN> random</SPAN> ()*</SPAN> n</SPAN> ); } </SPAN>initialStarColor</SPAN> =</SPAN> sClrs</SPAN> [</SPAN> k</SPAN> ]; if (********.</SPAN> all</SPAN> ) { </SPAN>Dtop</SPAN> =</SPAN> window</SPAN> .********.</SPAN> body</SPAN> .</SPAN> clientHeight</SPAN> -</SPAN> 250</SPAN> ; </SPAN>Dleft</SPAN> =</SPAN> xBase</SPAN> *</SPAN> 3.5</SPAN> ; </SPAN>Mtop</SPAN> =</SPAN> Math</SPAN> .</SPAN> round</SPAN> (</SPAN> Math</SPAN> .</SPAN> random</SPAN> ()*</SPAN> Dtop</SPAN> ); </SPAN>Mleft</SPAN> =</SPAN> Math</SPAN> .</SPAN> round</SPAN> (</SPAN> Math</SPAN> .</SPAN> random</SPAN> ()*</SPAN> Dleft</SPAN> ); ********.</SPAN> all</SPAN> .</SPAN> starsDiv</SPAN> .</SPAN> style</SPAN> .</SPAN> top</SPAN> =</SPAN> Mtop</SPAN> +********.</SPAN> body</SPAN> .</SPAN> scrollTop</SPAN> ; ********.</SPAN> all</SPAN> .</SPAN> starsDiv</SPAN> .</SPAN> style</SPAN> .</SPAN> left</SPAN> =</SPAN> Mleft</SPAN> +********.</SPAN> body</SPAN> .</SPAN> scrollLeft</SPAN> ; } else if (********.</SPAN> layers</SPAN> ) { </SPAN>Dleft</SPAN> =</SPAN> window</SPAN> .</SPAN> innerWidth</SPAN> -</SPAN> 100</SPAN> ; </SPAN>Dtop</SPAN> =</SPAN> window</SPAN> .</SPAN> innerHeight</SPAN> -</SPAN> 100</SPAN> ; </SPAN>Mtop</SPAN> =</SPAN> Math</SPAN> .</SPAN> round</SPAN> (</SPAN> Math</SPAN> .</SPAN> random</SPAN> ()*</SPAN> Dtop</SPAN> +</SPAN> window</SPAN> .</SPAN> pageYOffset</SPAN> ); </SPAN>Mleft</SPAN> =</SPAN> Math</SPAN> .</SPAN> round</SPAN> (</SPAN> Math</SPAN> .</SPAN> random</SPAN> ()*</SPAN> Dleft</SPAN> +</SPAN> window</SPAN> .</SPAN> pageXOffset</SPAN> ); ********.</SPAN> layers</SPAN> [</SPAN> templayer</SPAN> ].</SPAN> top</SPAN> =</SPAN> Mtop</SPAN> ; ********.</SPAN> layers</SPAN> [</SPAN> templayer</SPAN> ].</SPAN> left</SPAN> =</SPAN> Mleft</SPAN> ; } if ((</SPAN> Mtop </SPAN> < </SPAN> 20</SPAN> ) || (</SPAN> Mleft </SPAN> < </SPAN> 20</SPAN> )) { </SPAN>Mtop</SPAN> +=</SPAN> 90</SPAN> ; </SPAN>Mleft</SPAN> +=</SPAN> 90</SPAN> ; } } } if (********.</SPAN> all</SPAN> ||********.</SPAN> layers</SPAN> ) </SPAN>Fireworks</SPAN> ();
<</SPAN> /******> | |
|
Waseem نائب المدير
| موضوع: رد: كود لعمل العاب نارية في صفحتك ( معدل ) الثلاثاء يناير 26, 2010 3:04 am | |
| شـكــ وبارك الله فيك ـــراً لك | |
|