Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / July 2008



Tip: Looking for answers? Try searching our database.

Making the whole flash video a link

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Maakies - 10 Jul 2008 01:40 GMT
Hello, It's been awhile since I've worked with flash and I can't remember how
to make an animation a link.  Not just adding a button that links to a site,
but the whole animation itself is actually a link so that when you hover over
any part at any time you can click and it just takes you to a new site.

Can anyone hook me up with some advice?  ( I hate buttons >_< )

_Taylor C.
Shan-Dysigns - 10 Jul 2008 02:57 GMT
You hate buttons but want something to link? How odd... Anyway, you can always
create a movie clip with a 0% filled shape, then place that clip on the top
layer with an instance name and then add action script.

mcName.onPress=function() {
do whatever
}
Maakies - 10 Jul 2008 23:37 GMT
So I drew a box around the whole area I'm working on, made it into a movie clip
symbol, and reduced it to 0% opacity.  Then when I clicked into the movie clip
I named the instance "link_button".  Then I went into the actions for this
movie clip and put this...

link_button.onPress=function() {
getURL("http://www.adobe.com", "_blank");
}

----
when I test the movie it gives me this error:
----
Statement must appear within on/onClipEvent handler

Any suggestions?
_Taylor C.
SuperJAG - 10 Jul 2008 23:42 GMT
That's a more advanced way to do it. At any rate, what you want is just:

on(release) {
         getURL("http://mysite.com/foo.htm");
}
Maakies - 10 Jul 2008 23:51 GMT
Oh snap, thanks John and Shan, that made it work... You both receive 13 gold coins!
sneedbreedley - 18 Jul 2008 23:19 GMT
I tried the same thing, but Flash does not allow me to add any actions to this
movie clip. It says "current selection cannot have actions applied to it". In
fact it says that on all my buttons too. How can I apply actions ot cut and
paste actions to these movie clips and buttons. I just want to add a link to my
buttons. Why is this common effect so incredibly difficult?
Shan-Dysigns - 19 Jul 2008 01:53 GMT
If you are applying action script to an actual movie clip (not button), then
you have to encapsulate your action with an event handler.

onClipEvent(load) {
mcName.onPress=function() {
do whatever
}
}

if you place actio script on a button, it's just

on(release) {
do whatever
}

if you place action script in a frame, it's just

instanceName.onPress=function() {
do whatever
}
sneedbreedley - 19 Jul 2008 14:30 GMT
Flash will not allow ANY actions applied to the buttons or movie clips.
Shan-Dysigns - 19 Jul 2008 18:07 GMT
Upload your flash file.
sneedbreedley - 19 Jul 2008 19:04 GMT
www.dittydaddys.com/buy-flash.fla
Shan-Dysigns - 19 Jul 2008 20:00 GMT
For one, I didn't see any action script anywhere, and two, you are using action
script 3, so the code changes. There is no need to jump right into action
script 3 for a simple button like this. You had a button within a button -
maybe it's time to backtrack a little and review flash fundamentals. Here is
your changed flash file http://www.shan-dysigns.com/flash/starburstRollOver.fla.
sneedbreedley - 19 Jul 2008 20:52 GMT
There is no action script because when I select the button and go to
Window-Actions, it says "current selection cannot have actions applied to it",
so I have not been able to add any actions!. I tried Actionscript 2, but I had
the same problem as your version, namely a flashing button. Upon mouseover, it
should turn red and stay red, but in Actionscript 2 it keeps flashing.
Shan-Dysigns - 19 Jul 2008 22:09 GMT
Initially, you didn't specify you are using action script 3. That's why my
previous suggestions were not going to work. There is no problem with the
example I gave you. You said you wanted to make an animation a link, so on
mouse over, I created a little flashing effect with the 2 images you had in
your library. Upon your initial comment about animation, that's what I thought
you wanted. Simply having the red image on a mouse over is not an "animation".
If you had issues before when trying to use action script 2, it was because you
didn't create the button properly. You had another button within a button
(placed on an "over" state. If you re-download the flash file using the same
link I gave you before, you will see the change I made.
sneedbreedley - 20 Jul 2008 01:24 GMT
OK, you made the flash file do exactly what I wanted it to do and I truly
appreciate your time and effort. . But I have to do the same thing with at
least 3 other buttons. Is there any way you can go thru the procedure so I can
do it myself? In Actionscript 3 I can get the button to change color and play
the sound, but I can't add the hyperlink. In actionscipt 2 I can add the
hyperlink, but using my 3 layers, the botton keeps flashing and playing the
sound on mouseover. What am I doing wrong?
Shan-Dysigns - 20 Jul 2008 03:12 GMT
Commenting on your last post (before you edited it)

"OK, you made the flash file do exactly what I wanted it to do and I truly
appreciate your time and effort. . But I have to do the same thing with at
least 3 other buttons. Is there any way you can go thru the procedure so I can
do it myself? In Actionscript 3 I can get the button to change color and play
the sound, but I can't add the hyperlink. In actionscipt 2 I can add the
hyperlink, but using my 3 layers, the botton keeps flashing and playing the
sound on mouseover. What am I doing wrong?"

I think you need to stop focusing on action script 3. If you have trouble
understanding how to construct a button, you surely don't need to be messing
with action script 3 - that just doesn't make any sense to me. Just stick with
AS2 and you should be able to duplicate what I did for other buttons.
sneedbreedley - 20 Jul 2008 05:22 GMT
No need to reply to my reply that I deleted and changed. I used your flash file
to achieve my desired results using actionscript2. Your help was invaluable.
You can see the finished (albeit silly) results here. www.dittydaddys.com.
Shan-Dysigns - 20 Jul 2008 07:34 GMT
I'm glad we got it settled. That's cute when you mouse over the men that one  jumps up... silly but cute...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.