A Flash Developer Resource Site

Page 3 of 3 FirstFirst 123
Results 41 to 43 of 43

Thread: Betting randomizer trotting

  1. #41
    Senior Member
    Join Date
    Dec 2006
    Posts
    274
    I took a little bit time and played with checkbox buttons and did not get them work in exported flash (stays on/true after first click) ... even changing them to "real" checkboxes did not help.. and still 3dfa button checkbox sample works ok when exported to flash.

  2. #42
    Senior Member SirN's Avatar
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    142
    ... reporting from the development ...

    I had a fully functioning (apart from the check buttons staying on after beeing turned on) but I was not really happy about a situation and I wish to tell you about it now:
    As you might know allready, I was creating an amount of spots for 1-15 horses in a horse race, and I pushed horse number 1 into an array then horse number 2 into the array a.s.o. thus creating an array consisting of an certain amount of 1's followed by 2's then 3's a.s.o. . And even though an random pick from that array would favor the horse with more numbers in the array, I wanted to scramble the contents of that array (instead of having E.g. 1,1,1,2,2,2,3,3,3 have E.g. 1,2,2,1,3,3,1,3,2 ) and I've managed to get the contents of the array scrambled into an new array - and >I pick the winner a.s.o. from the new array, the script to scramble looks like this:
    Code:
    scrambleklump = new Array ();
    
    // pick 1 at a time by random over from slumpklump to scrambleklump
    strike = slumpklump.length;
    trace (strike); 
    for(j=0;j< strike;j++)
    	{
    	slumpklump.NUMERIC.sort;
    	scramble = Math.floor(Math.random()*strike);
    	picked = slumpklump[scramble];
    	scrambleklump.push(picked);
    	slumpklump.removeAt [scramble];
    		}
    The source .movie is asw usual at http://web.comhem.se/~u53935741/kjellBoy4968v10b.zip (it plays ok internally/as flash 8 and as executable here http://web.comhem.se/~u53935741/kjellboy4968v10b.html)

    Now I will investigate the checkbutton-problem, I thank you finjogi for helping me a bit on that matter - I will study the tutorial/sample!

  3. #43
    Senior Member SirN's Avatar
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    142
    I have set my mind to make an version2 and instead of making an english language version of the fully functional v1 (as promised) I have included english explanation in the starting script (not much work to get it to english but not done by me 1. Change 'Häst' to 'Horse' 2. Move the editboxes to fit after 'Horse' 3. Change 'Vildhet' to 'WildFactor' 4. Change infotext at the bottom to say 'E and K 1-99 ( 1 = low win prediction 99 = high win prediction) ( E = external or expert rank K = your rank) Wildfactor 35% = somewhat predictable start with somewhat predictable continued run and somewhat predictable homestretch fight ( 1% = very predictable 99% = impossible to predict) P = placefinish tick for horses you predict to finish top 3.

    Working exported movie here http://web.comhem.se/~u53935741/kjellboy4968v10.html and source here http://web.comhem.se/~u53935741/kjellBoy4968v10.zip

    I will work in the latest 3DFA version and improve/redesign v1 to v2 but I will stick to flash8 or not come to think of it, I don't know now! Enjoy!

    PS! Oh, thanks again finjogi this is all an creation made possible thanks to you! And 3DFA just makes my creativity possible to realize, amazing, because I'm a complete nobody with just ideas and 3DFA puts me up in the saddle were everything is achievable!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center