Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Animated symbol inside a button?

Status
Not open for further replies.

endoflux

Technical User
Aug 6, 2001
227
US
So I'm trying to get this button to animate (it's supposed to rotate 90 degrees when clicked on) when clicked on inside a flash movie...I've done up the animation inside a symbol, and nested the symbol inside a button, placing it in the "hit" state. However, when i publish it, the button only rotates when I'm holding the mouse button down on it; it will begin rotating until I let go, at which point it snaps back up into place. How can I get it to follow through it's entire animation and stop at the end of it just by clicking once??
 
Can you post a link to what you've got? And maybe even to a .fla?
mywink.gif
ldnewbie
 
I seem to be more or less locked down in my FTP capabilities from work (paranoid corporate IS staff...), so I can't upload it to my page...do you have an email address I can ship it all to?

It's not much; I've cut the movie down to just this button to eliminate all other variables until i get it working
 
Ok! Clearer!
But other questions for you!
What will happen with this button, once I've clicked on it once and it has done it's rotation? Will it still be active? In other words, what happens if I click it again? Nothing? I can't click it again?
Wouldn't you want to script this so that the rotation occurs on rollover and something else happens when you click it.
There are a lot of possible ways out for you here, just give us a little more of your script! Then again, that might generate more questions.
Hope you understand what I'm saying here: I just don't want to propose something that would intefere with your next step!

oldnewbie@hotmail.com
mywink.gif
ldnewbie
 
Well, here'a the bigger picture:

This button is one of three buttons like it that form a bar at the top of a section of my page. Ideally, I want each one to rotate, or "drop" down like a trap door when clicked, putting into action a cascading effect with a couple small thumbnailed screenshots I've made of websites I've created; this is ultimately going to be my portfolio page for my own website. I thought about the mouseover thing, and am still open to that idea...whatever is a more solid method of doing it, I guess! Either way, once it's dropped, I need it to stay dropped until another button is pressed...at which point I need it to swing back up and anoter one to swing down. Lots of swinging, I know :)
 
Ahh, seems like simple replacement to me, usually what I do...(the quick and easy way at least, yet probably not the best)...is make a button that has the up, over, and down states that a normal button can handle, then copy the button and make an animation in a seperate MC...once I press the button, it sets itself to invisible, and replaces itself with the MC...the MC is set to stop at the end, and also, will be disabled...

Once another button is clicked, you can perhaps have the rest of the other clip MC play, which would be a rollup sequence...and also, using this method, the animations, etc would all be reusable.

Hope this helps... Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
Come again Luke?
...once I press the button, it sets itself to invisible, and replaces itself with the MC...the MC is set to stop at the end, and also, will be disabled...

How do you have your button set itself to invisible?
Is it not in a mc actually set to be invisible?
mywink.gif
ldnewbie
 
Actually, I think he's onto something...I can set the visibility of the button to 0%, place the animated symbol over it, and get the effect I want...and since the button is actually still there (and you can see my "clickable area" is set to include the full swing of the button)I would still be able to click it, however useless that is... :)

It's a lot more work than I was anticipating, but I guess it wouldn't be any fun if it were quick and simple!
 
Oops, typos galore...guess I was thinking faster than my hands were typing...

I usually put like an MC thats exactly like the button underneith, and once the button is pressed it does things in this order

Sets itself to invisible
Sets the MC duplicate of the button to visible
Plays MC so the animation plays...

It would be easy to do I'm sure...
You have to use the With command to do any of this, because the telltarget command will not address visible properties and stuff of MC's, and etc...get what I'm saying Old? Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
couldn't I just make the button an invisible clickable area, leaving the symbol (which contains inside itself the animation on pause) visible and in the hit state of that button have an action to play the...hmmm. I'm losing myself. How does the command to play the symbol animation (MC, for movie clip, right?) work?
 
You place it, give it an instance name, and use with, or telltarget to give it commands...like

with ("MC1")
{
Play()
} Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
I'm a little stuck on this myself, but I'm working on it...old probably knows a good way...better than me, and he's probably gonna yell at me soon. Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
hehehe...well you're being an immense help, stuck on yourself or not. Everyone has different ways of doing things, and I guess none of them are right or wrong as long as they work!

I'm having issues with the action coding...never done much with it before. Did you download the fla from a couple posts ago? could I talk you into coding it up and posting it so I can see whow you did it?
 
*flapping arms on chest like a retard*...I CAN'T believe I was so stupid!

I know how!

Make a movie clip and put the button IN the movie clip...the button can have the simple actionscript PLAY
and MC's placed on your movie will have names to call from, so you can have them play a reverse sequence!

Talk about a brain fart! Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
Believe it or not, that's what I started with...I'm surprised at myself that I had the write method to begin with :)

Trouble is, the animation only occurs while I have the mouse button held over the symbol...the moment I let up, it jumps back up into start position
 
Guys,
Have a look at this:
Only one door here...
Offset button, inside a mc, so you can see it! It should really be invisible in the final movie.
I've set it up so that the button is active when the door is opened, but it should only happen when another button is clicked, be it a "close all doors" button.
mywink.gif
ldnewbie
 
how'd you get it tto play out the full animation?? Mine stops when I let go of the mouse button...

is there a way I could see your .fla?
 
yeah, i wuld like to see too.. Franãois, culd u send me one? :) regards, vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top