# Flash animation as 'onclick' button



## HenrysKid3 (Aug 7, 2007)

I'm very new to web design and need help creating a button out of a Flash animation. But, I don't want the animation to start until the user clicks on it, then it should take them to the hyperlinked page. Any help would be appreciated!


----------



## Duckman69 (Jun 26, 2007)

umm you want a flash animated button that a doesnt activate until the user clicks on it ? in the world of high speed that inst to practical activate on hovor would be more sutiable these days otherwise they will almost not even see the flash buttons actions... i forget the code for this ive seen it before but ill take a look and see if any of my flash animated buttons have it on them, post back and let me know if you still need this as i noticed the post is somewhat old and you still only have 1 post


----------



## Duckman69 (Jun 26, 2007)

sorry the date on my pc is off alot my bad post back leme know which you would rater i think i have the code for flash on hover over somewhere but not for on click


----------



## HenrysKid3 (Aug 7, 2007)

Duckman69 said:


> sorry the date on my pc is off alot my bad post back leme know which you would rater i think i have the code for flash on hover over somewhere but not for on click


Thanks for a reply, Duckman69. Yes, I still need it. It could also be an animated .gif as the button. I think the 'on hover' might work just as well. I'd love the code for that to try, if you do still have it. Thanks


----------



## Duckman69 (Jun 26, 2007)

ok im gonna find that file for you still but i dono how much it will help you depending on what your doing with the button do you want a bunch of buttons like this do you want it to be anything specific like 1 picture then flash to another then another and loop or are you open to what its flash animation will be ? ill post back a little later today


----------



## HenrysKid3 (Aug 7, 2007)

I'm going to need 3 buttons like this. Each will be a simple graphic of a door opening 'on click' that will take the user to another page/pages in the site. Any help is appreciated!


----------



## face1 (Sep 17, 2005)

Do you have Flash program?
if so, do you have the animation already created...

if animation is working on timeline, then simple action script will accomplish all...
I used same kind of "opening door" button technique on a site once

actionscript basics are like this
"stop" on first frame with "on click" declaration to "go to an play" frame where animation starts
on final frame of animation use "get URL"


----------



## Duckman69 (Jun 26, 2007)

alright yeah if your next step is to do that you might want to stick to an animated gif espically if you have the pictures already set up all you would have to do is upload the pictures to your site and write a script for mouse over in the object... im actually working out an issue with this for my banner on my site i created a animated gif and im having issues with my mouse over i think i might have it worked out tomrrow if i get it ill post back and let you know what has to be done... 

also if this is not hte route you wanted to take let me know, good luck with the site...


----------



## Duckman69 (Jun 26, 2007)

i got a code thats working on internet explorer but not with fire fox  i figured i'd post it for ya anyway maby you can help me play with it on your end and whoever finishes first wins lol i dono its driving me nuts though... turned out the 3 codes i had used all worked all just didnt work in fire fox now im gonna have a friend run a test on opera browsers and w/e that other browser is that slipped my mind ... anyway heres the code maby you see something i dont or can post back something if you figure it out... ima keep playing with it hopfully i can figure it out if you give that code a shto rember IE only..


----------



## Duckman69 (Jun 26, 2007)

im not so sure its the code anymore please tell me if that worked im noticing i have alot of image loading issues on my end with firefox i cant quite figure it out but im sure i will by the days end... hope that works for you in firefox then @ least i know its an issue on my end


----------



## HenrysKid3 (Aug 7, 2007)

Thank you Duckman69 and face1 for the replies. I will try what you said, face1, and post back after. Duckman69, I'm in IE so I can't help with FireFox. Sorry. I may try the other code, also. I will let you both know.


----------



## Duckman69 (Jun 26, 2007)

alright if you get something to work even in IE please post back the code your using im goign nuts over here, thanks...


----------



## Duckman69 (Jun 26, 2007)

Here is a perfectly working mouse over code wo to the oooot .... thank god i got this finally... hope it helps you just replace the image locations :-D 
~later


----------



## Duckman69 (Jun 26, 2007)

apperently i never posted that code for you the other day lol sorry man here it is ....

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


----------



## face1 (Sep 17, 2005)

HenrysKid3 said:


> I'm very new to web design and need help creating a button out of a Flash animation. But, I don't want the animation to start until the user clicks on it, then it should take them to the hyperlinked page. Any help would be appreciated!


I guess my bad...?

Is this for flash, or animated gif or swap image/mouse over script???


----------



## HenrysKid3 (Aug 7, 2007)

Thanks for the code, Duckman69. I will try it out and let you know ASAP. Face1, I thought the graphic was a flash, but it is an animated .gif. Sorry. I am using NAMO web editor and their FreeMotion flash editor. I can import the animated .gif into FreeMotion, but there is no onClick command. I tried creating one but got a syntax error. I am a novice to coding, so I am using the editors for coding, unfortunately. (Sorry I'm not super quick in replies. I am doing this stuff between other jobs and have to go back and forth.) So, the more coding info the better. Thank you all!


----------



## HenrysKid3 (Aug 7, 2007)

Oh, yeah, I forgot. My preference is for an onClick event, rather than a mouseover event. But I will try the mouseover, too, to see if it may work for what I want.


----------

