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...
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...
[url removed, login to view]('square',0);
//attach coin cursor
startDrag([url removed, login to view], true);
x = _root._xmouse;
y = _root._ymouse;
with([url removed, login to view])
[url removed, login to view] ([url removed, login to view])
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