Join for FREE | Take the Tour Lost Password?
Shop deviantART for the
holidays and save BIG!
Click here! :holly:
[x]

deviantART

:flirty:
 

Anyone know how to add interactive elements to Flash?

[x]  
Shop deviantART for the holidays Click here! :holly:
:iconhammer-princess:
I'm a Flash noob, and am looking for help. I can get a stick person to dance in Flash, but how do you add interactive elements and a loading screen? I would be grateful for any help!

If it helps, I'm using Macromedia Flash MX.

--
I hear that everyone's entitled to their own opinion. So in my opinion, your opinion is wrong.
---
My avvy was made by *Pyro-Sith!

Devious Comments

love 0 0 joy 0 0 wow 0 0 mad 0 0 sad 0 0 fear 0 0 neutral 0 0
:icontheroguecat:
You can make interaction with Buttons and/or MovieClips. Take a look at the Help page file, that's all you need. Start with basic button testings using gotoAndPlay() and/or gotoAndStop() actions, and then move to another "lesson" when you feel ready for more. (Variables, input textbox, dynamic textbox, scrips for generating random numbers... etc.)

As for the loading screen, you have to use several MovieClip properties. Check the help for the getbytesloaded() property at the MovieClip object. It used to have some example about how to make one. Basically you get the ammount of loaded data, compare it to the total ammount of data of the movie, and when both are equal (AKA as movie fully finishes loading) then the movie begins. That's the basic idea, you can make funny animations or things scaling to make it a bit more "interesting". You can get ideas for the "loading movie screen" from other user's work (check my Cat Racing Gamblings or Catnipalot Mines games for examples.).

The rest is just fooling around making tests with buttons, MovieClips and scripts. Just keep consulting the help files. It has (mostly) all the answers.
:iconhammer-princess:
?? Can you explain that a bit more please?

--
I hear that everyone's entitled to their own opinion. So in my opinion, your opinion is wrong.
---
My avvy was made by *Pyro-Sith!
:icontheroguecat:
It would be useful knowing what Flash level you have, if you have ever used Actionscript code or just making simple animations and drawings. But you can keep the rhytm you consider the best for you. First, for buttons. This for a quick test with the gotoAndStop() command:

-Making a new button. Draw a rectangle (or any other shape: circle, etc.) and select it. Once selected, go to the menu bar and choose create symbol (or hotkey F8).
-It will ask you what kind of symbol do you want to create. Select "button" and give it a name if you want to. That name is not important, just a name for you to know it.
-If you make right-click on it and select "Actions", you can choose what the button will do when it is clicked (or others, like a keyboard key). You can choose something like displaying a text with the trace command for a test. (That command only works while using the Flash program, once you publish your movie it will not work.) If Flash MX is like my old version 5, you can open the list of commands and select it without typing it. I guess it was in the "Actions" category.

So, the button should have a script or code more or less like this:

On(Release){
trace ("This thing worked!");
}

What does it all do?

-On(Release) will trigger the action you chose (in this case it is trace) when you click and release the mouse. That is, pressing and releasing the button. If you wanted it to do that as soon as you press the mouse button, then choose "Press" instead of "Release". Easy.

-The trace command will open the output window and print the quote "This thing worked!" whenever you click and release the button. You can choose to make it as an expression or not, in this case it is a string, so keep the "expression" checkbox unchecked.

You can test your movie (if you can call this a movie =p) by pressing CTRL+ENTER on the keyboard. That is the quick way, you can also choose the option from the menu bar. (Test movie) Once the movie is running, you should see your button. Click it, and if the code worked properly, a window will popup displaying the quote you typed. Basically this is the base for an interactive program: you do something and the programs makes another thing.

That's all for first lesson. :D I didn't explain about editing a button, but I guess you can discover it just by exploring the right click menu. The pre-loader (I call it that way) is a bit more complex and requires understanding scripting a bit more deeply. For now, check these things and I'll send you a simple pre-loader project for you to study and understand it later.
:iconhammer-princess:
Thank you! That really helped. I'll go away and try that now.

If it helps, my level at Flash is that I can create simple animations, but I'm a noob at actionscript.

--
I hear that everyone's entitled to their own opinion. So in my opinion, your opinion is wrong.
---
My avvy was made by *Pyro-Sith!

Site Map