View Full Version : Button to pull Movie
02-18-2005, 07:02 PM
Total newbie to scripting. I am creating a Jeopardy game for a presentation. When I click on one of the dollar amounts, or buttons, I want it to pull a movie clip of a question moving out to covering aprx. 80% of the screen. Once the question is read and I don't need it anymore I want the movie to go away and the button to change so there is no dollar amount on the screen. I tried just putting the movie clip on the over state and it will show up but then when I roll off it I don't know how to make the dollar amount go away. Is there a way I could code it to say something like " on release go to and play "whatever movie clip I want it to" and then have it change the button to look like the hit state that I have on the button with no dollar amount?
Thanks in advance for any help, I'm really struggling with this.
02-18-2005, 07:30 PM
Or, instead of using buttons, could I just use a movie clip and say something like "On release play"?
Not sure what is the best way, any recomendations are appreciated.
Your second method would work. Have each dollar amount movieclip a two frame movieclip. Dollar amount on first frame, no dollar amount on second frame. Then code it to go to the second frame on press or release. You could have another movieclip reveal with the question on the same button release in a number of ways........ toggle visiblility, movieclip position, have the movieclip tween into place and just tell it to play. Lots of options there. Here is a basic demo...
// or maybe
Another method might be to just use textfields for the dollar amounts and set the textfield to blank when a certain movieclip is pressed or released. Lots of ways to accomplish the same task in flash. Maybe post a demo of what you have so far.
Hope it helps
02-18-2005, 08:34 PM
Probably sound like a dummy, but how can I post a demo? I see no way to attach my file.
I'll try to work with what you said, but kind of confused. Is there any way for me to send you the .fla file?
I assumed you have a website. You can post an .fla file there for download. Give me a few minutes and I'll work up a quick demo of what I mean.
02-18-2005, 10:08 PM
Thanks, sorry I don't have a website though.
Really appreciate this.
There are lots of ways a jeopardy type game could be accomplished. This is merely a small demonstration of one possible way to proceed, by no means the only way.....
Just change the .swf extension to .fla to download and examine the file.
Hope it helps
02-18-2005, 10:57 PM
Thanks a lot, I'll play with this for a while. Should be able to get it now, I'll let you know if I have any other questions.
02-19-2005, 12:22 AM
Ok, I do have one question...for now. How did you label the questionsMC "dropdown." I will need to do something similiar to call mine, but don't know how to get that there to call it to play.
Thanks so much!
"dropdown" is just a frame label inside the holder movieclip. Double click the holder MC to get inside. Look at the first two frames of that clip. The first frame is labeled "close", the second frame is labeled "dropdown". Targeting frame labels is a good habit to get into. It helps organize paths and makes it easy to figure out where to send the playhead.
02-19-2005, 07:18 PM
Do you work for hire? I'd be willing to have tyou take a look at what I have and make it do what I want. I see now that what I am doing is very redundant and you are easily just changing the text boxes, etc. Please let me know if you would be interested.
Thanks a lot!
I am available for freelance work but I also don't mind helping through forums and email. A project like this would be good to learn from. It would expand your actionscript knowledge quickly. You would need to learn to deal with multiple timelines, variables,possibly timed events,frame labels, and a few other methods. You can keep it basic to learn and add advanced techniques as you progress. For example, the demo I created is basic in nature in respect that the code is for each button. As you learn to use variables, arrays will come into play. An array is just a collection of data held in a container, so to speak. You could code all your questions and answers into arrays and optimize the code a bit. For that matter, you could use a single movieclip and duplicate it for all of the board amount buttons. You could create a textfield dynamically with each duplicated clip. There are many ways to do things in flash. One of the ways to learn is to jump in. Try the different methods flash provides. The help icon that is located in the actionscript panel is very useful. It will give you definitions and example uses of each method. If your looking for a more complete demo, have a look at this file......
If this file doesn't help and you are still interested in my services, contact me at my email address.
Powered by vBulletin™ Version 4.1.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.