Certain Pages To Be Loaded Depending On Random Generated Number
Mar 2, 2010
I'm working on a game that needs certain pages to be loaded depending on a random generated number.Here's what I've done to make each room load up.[code]I know I'm meant to put the relevant page inside removeChild"(this)" but the 'mapButton' applies to all pages and there is in total, 36 of them.
I am creating an app that flips through a series of 24 flashcards. I want my "Go To Random" button to navigate to a random frame number between 2 and 25, but with no repeats until it has already navigated once to each of the frames in between.
In other words the user doesn't get any repeats until he has already gone through all 24 cards - and then the shuffle repeats.
I am creating an app that flips through a series of 24 flashcards. I want my "Go To Random" button to navigate to a random frame number between 2 and 25, but with no repeats until it has already navigated to all the frames in between. In other words the user doesn't get any repeats until he has already gone through all 24 cards - and then the shuffle repeats.
I am trying to create a code such that everytime a button is pressed a random number is generated between 0-14. With each of the 15 numbers (0-14) only being hit 10 times. I know how to create buttons and all that, its the random number thing thats stopping me.I created it using arrays in another programing language and tried to translate it to flash but I was unsuccessful. this is generally what i got
ActionScript Code: var events:Array = new Array(); var order:Array = new Array(); var used:Array = new Array();
I have the following AS2 code which creates dynamic buttons based on an array:
Code: var labels_array:Array = new Array({label_txt:">> arquitectura industrial", gotoX:"partners"}, {label_txt:">> edificaci�n", gotoX:"team"}); var initX:Number = 0;
[Code]....
the variable nextX places a new button every given number of pixels, in this case 140px. What I'll like to do is to make this value dynamic so that a new button is placed taking into account the width of the preceding button, plus a certain number of pixels.
I've got an SWF that'll be viewed via a webpage, that loads a choice of 7 different web pages/SWFs depending on buttons clicked.The problem is these files are quite big and take a good few seconds to load each, so for each SWF, I created a progress bar on frame 1, that then loads frame 2 (where all the code and content is) once it's ready. The code I used is as follows:[code]The problem is as you can see from is that it takes ages to load the loader! So I end up with a blankurl... screen then the loading bar, then the content. Making the loading screen pretty useless!
Dear Guys I Want To Generate A Random Number Between 2 Number BUT Without Generating 2 Same Number I Mean If For Example Already Generated Number "2" Next Time Did Not Generate It , Is There Any Solution
I Want To Generate A Random Number Between 2 Number BUT Without Generating 2 Same Number I Mean If For Example Already Generated Number "2" Next Time Did Not Generate It,
I'm trying to create a shuffle button for my mp3 player. I don't want it to repeat any song in the xml playlist until all the songs are played. Is there to display a random number on the click of a button, without repeating any number in the array until all the numbers in the array are used?
Making a random number between lets say 0 and 99 is relatively straight forward using the Math.random class What is the best way to create 100 unique random numbers from between 0 and 99 where no random number is repeated?Would I make a random number, chuck it into an array then the next random number created is checked against the array, and if the number has been created before try for another number?
im working on a maths style jigsaw, and ive come across a problem of sorts, ive set random1_txt.text to 1 and random1_txt.text to 2 for testing, basically i want to randomise two textfields between 1 and 10, and also randomise the sign between either a - or a +
the answer can be computed by flash, now what i need it to do is stop on the frame number of the answer in answer_mc, these frames contain graphics of all numbers 1-20 in alpha format, this is so that the answer is in place, now the user can drag and drop movieclips into the answer box, and receive a correct or incorrect response
im at a loss on how to do this, i havent gotten around to randomising the sign as of yet i need to do more research but the general idea is as above
Code: var startX:Number; //start of draggable piece var startY:Number; random1_txt.text = "1"
ActionScript Code: var myTween:Tween = new Tween(star, "alpha", Strong.easeOut, 0, 0.9, 3, true);
And I also have some extra code that spawns stars all over the place.If you view my swf, http:[url]...., you can notice that the stars appear to 'flash' first before settling down.I'm simply wondering if this is some problem of the Tween class or if I set something wrong. Something I found odd was when I removed my code that generated a random colour for my star,
i'm using the an actionscript for random movement that i found here... [URL] but my problem is that i need the object to flip horizontally depending on the direction it is moving... the object that is moving around is a bug, and i need it to face left if it's moving left or face right if it's moving right.
I ve been searching for this but nothing. I need to use an event generated when the site is loaded for the very first time (to manage the resize of the stage). That's beacuse the event "resizestage" is generated only when i resize it, so the first time the site had been loaded, the size is not modified.
I want to change the code a little bit by creating an Input Text. A random number will be typed in that text instead of having a fixed, pre-set number.
i have a project and i need that when a specific variable equals a specific value a random number decreases on the current number, its easy to make it decrease but i need to decrease instead of 4 to decrease a maximun of 5 and minimun of 3.ere is the code :
I am trying to make a preloaded that stops on frames depending on how much is loaded, I want it to stay on frame 1 if 24% or less of the movies is loaded and for every 25% I want it to it to move forward a frame, So far I have done thus,
var bytes = _root.getBytesTotal(); var bytes_loaded = _root.getBytesLoaded(); if (bytes / bytes_loaded >= .25) { _root.gotoAndPlay(2); } else { _root.gottoAndStop(1); }
I am trying to load long pieces of text from xml into flash. Then somehow splitting the text into blocks of say 50 characters. So if the text I was loading had 175 characters in it, the textField would show the first 50 chars, with a counter "page 1/4". Using foward and back buttons would load next/previous set of 50 characters.
how do i get my pages to shake in browser when loaded.I can't remember where i saw it before but i did see it before i went to the site when the site loaded my entire screen shook like an earthquake it was pretty cool it made me feeel like my monitor was shakin.
I am trying to load long pieces of text from xml into flash. Then somehow splitting the text into blocks of say 50 characters. So if the text I was loading had 175 characters in it, the textField would show the first 50 chars, with a counter "page 1/4". Using foward and back buttons would load next/previous set of 50 characters.
for each load i create another URLLoader instance seems it's FlashPlayer flashplayer_10_sa_debug.exe caches once loaded page i check the page i reload with browser - it returns the updated version and after this check FlashPlayer still returns old i need to restart application to receive an updated version