The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
i am currently learning flash and want to create a file where its a pseudo paint by numbers. i have a bunch of rectangles which are numbered and i modified them all to be buttons so that in the down state the alpha level for color goes to 100% essentially filling them in. My question is I cant seem to figure out how to have it hold that change once i click.
I would like to be able to click on each individual rectangle and for the color to stay and then have to have it so i have to click it again for it to lose its color. I know this has to be possible right? im new to flash so yeah this is probably so easy its laughable. thanks in advance.
i am currently learning flash and want to create a file where its a pseudo paint by numbers. i have a bunch of rectangles which are numbered and i modified them all to be buttons so that in the hit state the alpha level for color goes to 100% essentially filling them in. My question is I cant seem to figure out how to have it hold that change once i click.
I would like to be able to click on each individual rectangle and for the color to stay and then have to have it so i have to click it again for it to lose its color. I know this has to be possible right? im new to flash so yeah this is probably so easy its laughable. thanks in advance.
my actionscript is really rusty, but you could make a duplicate of each shape symbol's uncolored form and fill it in with whatever color you want
then when an uncolored shape button is clicked you have it swap with the colored version, would also work fine if you want them to be able to click a colored in shape to take the color out
edit: another way to do it that would use less actionscript or at least be easier, would be to make each shape a movie clip with 2 frames. one the uncolored shape and the other one colored in.
then when the shape is clicked you have it advance to the second frame.
my scripting is still too rusty to remember exactly what you would enter to do this, but you'd want to have a pause on both frames, then just add the (onmousedown) <whatever the command is to advance the clip>
basically... I know it's vague but hopefully it'll help
You could set variables. When the button is clicked have it equal 1. then set a function that if the rectangle equals 0, the fill is #000000, but if it's 1, the color is #CCCCCC. It's not terribly easy but not too hard either.
I remember doing a project like this, but can't remember exactly how I did it though this seems like the way to go.
thanks for the help so far however i wont lie i am completely lost. i am not advanced at all in flash so yeah... im going to try but please keep the helpful hints coming
First of all, "button" symbols are a sin against man. Buttons are just crunched down Movie clips but more restrictive.
The "Down" frame is reverting because its only active while "Down"
Create your button in a movie clip and add an onRelease command that changes the color to what you want. That way when its clicked it stays that way.
If you want it to be able to revert back to the original color, then I think you can create a conditional that if its already the pressed color, then it goes to an onRelease that puts it back, and so forth.
I think one of the above suggestions would also work. There's more than one way to skin a cat. Your first mishap was using the button symbol, IMO
Posts
my actionscript is really rusty, but you could make a duplicate of each shape symbol's uncolored form and fill it in with whatever color you want
then when an uncolored shape button is clicked you have it swap with the colored version, would also work fine if you want them to be able to click a colored in shape to take the color out
edit: another way to do it that would use less actionscript or at least be easier, would be to make each shape a movie clip with 2 frames. one the uncolored shape and the other one colored in.
then when the shape is clicked you have it advance to the second frame.
my scripting is still too rusty to remember exactly what you would enter to do this, but you'd want to have a pause on both frames, then just add the (onmousedown) <whatever the command is to advance the clip>
basically... I know it's vague but hopefully it'll help
I remember doing a project like this, but can't remember exactly how I did it though this seems like the way to go.
EDIT: this might help
http://www.kirupa.com/developer/actionscript/color.htm
I love kirupa.com
The "Down" frame is reverting because its only active while "Down"
Create your button in a movie clip and add an onRelease command that changes the color to what you want. That way when its clicked it stays that way.
If you want it to be able to revert back to the original color, then I think you can create a conditional that if its already the pressed color, then it goes to an onRelease that puts it back, and so forth.
I think one of the above suggestions would also work. There's more than one way to skin a cat. Your first mishap was using the button symbol, IMO
we also talk about other random shit and clown upon each other