|
The example on the loadjpg page can be extended to load and place any number of photos (as specified in the picnames array) into a code-generated slider at the bottom of the movie. The photos are loaded with MovieClipLoader as before, but this time, a double number of thumbnail holders is created so that a slider can be made which will scroll continuously. A slider is created to be double the width of all the thumbnails plus a specified margin between each. Photos are loaded into thumbnails on the left half of the slider, and again into duplicate thumbnails on the right half.
|
|
|
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. |
We create and assign values to a variable twice, the classic and condensed way. |
|
|
Then we make an if statement, that says if the guess text field is equal to the random number variable then the result text field will say "You are right, you win" or else it will say _root.Result_num.text = "No sorry it was " followed by the correct number.
|
7. Now your tween is actulley done, you can right click at frame 20 and 30 and then make some more shapes and do some more tweening, as I did.
|
|
|
|
|
|
The first object comes has an index of 0. An object at 1 would be further forward than the first object (it would be "on top"), and an object at 2 would be further forawrd than that. Okay? Good. These indices (the plural of index) have to whole numbers (integers) and there can't be any gaps. Two objects cannot share the same index. |
Now lets make a border by dragging the rectangle tool onto the stage given the app a white area with a grey boarder.
|
|
When a random number is defined, it is usually not a nice, round number. The answer will have numerous digits following a decimal point such as 5.1403533. In order to round the number into a nice, solid integer, Math.floor() is used. |
|
We will now have to transform our bar into a movieclip that we can later manipulate using ActionScript. We are going to separate it from its outline so that the outline remains unaltered. Use the Selection Tool to select ONLY THE OUTLINE of our bar.
|
|
The number of frames per second is controlled by the default setup. You cannot have one part of a movie playing at 12 frames pre second and another playing at 8 frames per second. To change the default setup: |
|
First off, open a new actionscript 2 file. Rename layer 1 to 'stuff' and create a new layer called 'actions' and lock it. On the 'stuff' layer, select the text tool and draw a text box on the stage. Open your properties panel (usually situated at the bottom of your screen) and set the text box property to 'Dynamic Text'. |