![]() Overall I found this tutorial an easy and a fun way to use a random word generator.Active only for enterprise users and all users in China, discontinued everywhere else, i.e. I decided to use plenty of photos in this tutorial to ensure the reader could follow the steps accurately and with very few problems. I resolved this problem by changing the font to the default font: “_sans”. I also had a small error where the words in the array were missing letters when printed to the screen. After spending time checking everything I realised it was just a small spelling mistake in my code. My output was saying “Error #2007: Parameter text must be non-null”. I had a minor problem when trying to run my programme the first time. Using an array meant the words could be easily modified to my needs. I had to change the code from a two-word generator to a one-word generator but I found this adjustment easy. In my tutorial I had to adapt the code to my needs. I thought a Magic 8 Ball idea would be a fun way to use this skill. ![]() The online tutorial creates a word game which randomize words in an array and prints them onto the screen in a dynamic text field.Īfter watching and completing this tutorial I learnt the necessary code for a random word generator. spf files for download: įor this tutorial I used the online tutorial (below) and adapted it to my needs. The Magic 8 Ball tutorial in now complete. Using the text tool create another textfield (font size 16pt) and write “ANSWER: CLICK TRIANGLE” Underneath the previous static text field repeat the steps above. Create a text field under the Magic 8 Ball and write “ASK ME ANYTHING”.Click enter to insert.Ĥ. This time we will select static text in the properties panel. Select frame 1 again to add the text.Ģ.Like before select the text tool. The word will not generate now until the triangle is clicked.ġ.Copy frame 1 in the Magic 8 Ball layer to frame 10. To ensure the frame is paused until the triangle is clicked insert “stop() ” after the previous code.Ħ. This code will bring us to frame 10 (where the word generator is located) when clicked.ĥ. In the properties panel change the instance_name to ‘click’ and select button.Ĥ. Right click on the triangle and convert it to a symbol.ģ. Select frame 1 of the Magic 8 Ball Layer copy the triangle shape and place it over the orignal triangle. When clicked, this button will generate the Magic 8 Ball.Ģ. The words should now appear on the Magic 8 Ball.ġ. The randomized words will be printed to the screen using “magic_txt.text = magic1 ”ħ. Now create a function to randomize the words.Ħ. ![]() Create an array called “magic list” which contains the Magic 8 Ball answers. To open the actions panel select Window>Actions.ģ. Click onto frame 10 and open the actions panel. Add a new layer to the layers panel and change the name to “actions”Ģ. Select Dynamic Text and change the instance_name to “magic_txt”.ģ. This text field is where the randomized words will appear.Ģ. Select the text tool in the tools panel to create a text field in the blue triangle. Copy this frame (frame 1) to frame 85 to extend the timeline.ġ. ![]() Width: 92.95 approx, Height: 95 approx, Colour: #00CCFF.Ħ. Draw three lines and join them together in the centre of the ball using the pen tool to create the blue triangle. Select the pen tool in the tools panel to draw a triangle in the middle on the ball.ĥ. Select the oval tool in the tools panel to begin drawing the ball.ģ. Draw a black circle in the centre of the stage. In the layers panel double-click on the layer “Layer_1″ change the name of “Layer_1” to “Magic 8 Ball”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |