First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing! | Flash Jobs
Search tutorials
Author: Nintendorc | Website: http://turkeyfiles.tk
Requirements: Flash MX 2004 Things you need to know: -Variables -the "random()" function. if you don't know enough on variables, you should search for a tutorial about it first, which should be relatively easy to find and understand, and then come back here. if you don't what the "random()" function is, don't fret, it's simple. basically it returns an absolute number value which is equal to the number inserted in the function or less from numbers 0-x where x is the number inserted in the function. e.g.: "random(7)" would give a random number from 0 to 7 excluding decimals, being one of the numbers in the parentheses(0,1,2,3,4,5,6,7). now let's begin. first, with the property inspector open(Ctrl+F3), select the Text Tool(T) and choose "Dynamic Text" from the property inspector. now, with the text tool, make an empty text at wanted size as long as it's big enough to display around 5 characters. now with the Select Tool (V), select the text box you just created. with the text box selected and the property inspector opened, enter "randomnumber_txt" in the "instance name" area, and enter "randomnumber" in the area with the word "Var:" written to it's left. now close the property inspector(Ctrl+F3), open the actions panel(F9), and select the first frame of your movie in the timeline. In the Actions box, insert the following code: //this declares the variables and the "engine" variables random function. var engine = random(99); var randomnumber; //This tells us that you have a 15% chance of getting the number 18 if (engine>=0 && engine<=14) { randomnumber = 18; } else if (engine>=15 && engine<=69) { //This tells us we have a 55% chance of having the number 12 randomnumber = 12; } else { //this is the remainding percentage which is accorded to "9". randomnumber = 9; } now you can test it(Ctrl+Enter). if all is rolling smoothly, you're done. if not, try checking the code or check if you have the right version of flash.
» Level Basic

Added: 2005-05-01
Rating: 5 Votes: 11
(10 being the highest)
» Author
Good engine i built since i couldn't find a tutorial for it.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.