Devam Ediyor

Flash 6+ Scratch Card

We've made a flash movie but need some help with a specific piece of the code:

The scratch card game is made up of a 4 frame movie. It uses 1 scratch panel movie clip, duplicated so that one scratch panel is a winning card and one is a losing card. There a 3 instances of the losing scratch panel and 1 of the winning panel spanning frames 1,2,3,4 of the movie.

What we need to do in the first frame of the timeline of the movie when it first loads is jump to a random frame from 1-4 giving the user a 1 in 4 chance of getting the winning scratch panel. We used the below script to handle the random bit...

gotoAndStop(random(3)+1);

When previewing the file in flash it works fine however through a browser (ie6 and Firefox tested so far), the script we have to scratch the card stops working occasionally. The script for the reveal (scratch) is...

onClipEvent(load)

{

[url removed, login to view]('square',0);

function drawSquare()

{

//attach coin cursor

startDrag([url removed, login to view], true);

x = _root._xmouse;

y = _root._ymouse;

with([url removed, login to view])

{

moveTo(x-0,y-0);

beginFill(0x000088)

lineTo(x+15,y-15);

lineTo(x+15,y+15);

lineTo(x-15,y+15);

endFill();

}

}

[url removed, login to view] ([url removed, login to view])

}

onClipEvent(mouseMove)

{

drawSquare();

updateAfterEvent();

}

The above script is in all 4 frames attached to the scratch panel movie clip.

SWF can be downloaded from: [url removed, login to view]

HTML can be viewed at: [url removed, login to view]

FLA on request

Beceriler: Adobe Flash

Daha fazlasını görün: scratch card script, flash scratchcard tutorial, flash scratch card tutorial, scratch card fla, scratch card flash tutorial, scratch card game fla, scratch card swf, scratchcard flash, flash scratchcard, scratch cardswf, scratch card flash, flash scratch card script, first 1 coin, scratch card flash fla, flash fla scratch card, flash scratchcard tutorial as2, flash scratch card, script scratch card, scratchcard flash tutorial, scratch card fla flash, scratch cards script, flash fla scratch, scratch cards script free, flash film scratches, scratchcards flash

İşveren Hakkında:
( 41 değerlendirme ) London, United Kingdom

Proje NO: #91176