jquery and flash implementation of the flop Draw effect sample source code

Source: Internet
Author: User

Do not know how to engage in flash ah, I do PHP, as the estimate is a bit messy, are on one side of Baidu write, I hope the master pointing.

With Flash source, sample JS code, sample PHP code package download.

Effect picture

Partial code

The code is as follows Copy Code

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title>jquery+flash Flop Draw effect sample source code </title>
<style type= "Text/css" >
body {margin:0; padding:0; font-family: "Microsoft Ya Hei";}
a {text-decoration:none; color: #0f3f94;}
a:hover {color: #F30; text-decoration:underline;}
H1 {background: #ccc; margin:0; padding:20px;}
h2 {margin:0; padding:20px 0;}
. intro{padding:20px; line-height:24px;}
iframe {border:0; margin:0 20px; Display:block; width:520px; height:525px; }
. P50 {padding-left:50px}
Pre {line-height:22px;}
Pre span {color: #999;}
. demo {padding:20px Border-bottom: #ccc solid 1px;}
#footer {margin:15px auto; line-height:24px text-align:center;color: #999; font-size:12px;padding:12px;}
</style>
<script type= "Text/javascript" src= "Jquery.js" ></script>
<script type= "Text/javascript" >
function getswf (moviename) {
if (Window.document[moviename]) {
return Window.document[moviename];
}else if (navigator.appName.indexOf ("Microsoft") = = 1) {
if (document.embeds && document.embeds[moviename])
return Document.embeds[moviename];
}else{
return document.getElementById (Moviename);
}
}

award_id = 0; Prize ID
Award_name = ';//Winning name
function Start_lottery () {
$.ajax ({
URL: ' lottery.php ',
Type: "Post",
Data:null,
DataType: "JSON",
timeout:20000,
Cache:false,
Beforesend:function () {//before submission
},
Error:function () {//Error
getswf (' lottery '). Reset_lottery ()//Cancel "in the Lottery" sign, you can draw again
Alert (' Server-side Error! ');
},
Success:function (res) {//success
if (typeof (res.award_id)!= ' undefined ') {
award_id = res.award_id;//Get prize ID
Award_name = res.award_name;//Get the prize name
getswf (' lottery '). Load_award (award_id+ '. png ');
}else{
getswf (' lottery '). Reset_lottery ()//Cancel "in the Lottery" sign, you can draw again
Alert (' Lottery is wrong! ');
}
}
});
}
function to call after end
function Lottery_result () {
if (award_id==0) {
Alert (' Why every time the jackpot is so close and so far away! ');
}else{
Alert (' Thank God, thank Fairy Sister for winning my prize! ' + Award_name + '! ');
}
}
</script>

<body>
<div class= "Intro" >
Do not know how to engage in flash ah, I do PHP, as the estimate is a bit messy, are on one side of Baidu write, I hope the master pointing. <br/>
With Flash source, sample JS code, sample PHP code package download.
</div>
<div class= "Demo" >
<table border= "0" cellspacing= "0" cellpadding= "0" >
<tr>
<td>
<object width= "height=" "align=" Middle "classid=" clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 "codebase=" http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 "id=" lottery ">
<param value= "Always" name= "allowscriptaccess" >
<param value= "card.swf?v=2" name= "movie" >
<param value= "High" name= "quality" >
<param value= "Transparent" name= "wmode" >
<param value= "false" name= "Menu" >
<embed width= "height=" "align=" Middle "pluginspage=" http://www.macromedia.com/go/getflashplayer "type=" Application/x-shockwave-flash "allowscriptaccess=" always "wmode=" Transparent "name=" lottery "menu=" false "quality=" High "src=" card.swf?v=2 ">
</object>
</td>
&LT;TD class= "P50" >
<strong> Lottery Rules: </strong><br/><br/>
Click Card to flop, turn to what you get!!
</td>
</tr>
</table>
</div>

</body>

SOURCE Download Address: Http://file.111cn.net/upload/2013/11/Jquery+Flash Flop draw effect sample source code. zip

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.