[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

make flash object clickable

Posted on 2006-06-08
9
Medium Priority
?
800 Views
Last Modified: 2008-02-01
Hi,

I want to do something like this:

<a href="blah.html">
  <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="600" HEIGHT="116" id="giftAnim" ALIGN="">
    <PARAM NAME=movie VALUE="./headerAnim.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#FFFFFF>
    <EMBED src="./headerAnim.swf" quality=high bgcolor=#FFFFFF  WIDTH="600" HEIGHT="116" NAME="giftAnim" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
  </OBJECT></a>

but that doesn't work. Someone said I'd have to either encode it in the flash itself (can't do that), or do a floating div. I don't know how to do it as a floating div though...

-Justin
0
Comment
Question by:MaritimeSource
9 Comments
 
LVL 3

Expert Comment

by:siva350
ID: 16865947
YOu can add a javascript function onmouseup or onclick I think. Then you can add a js function to redirect the page.
0
 

Author Comment

by:MaritimeSource
ID: 16865953
I will award the points to the person who has a working, tested solution.

Thanks
0
 
LVL 8

Expert Comment

by:radnor
ID: 16873650
Make a button the size of the stage and when clicked, go to the url??

Actually, you would not put a button per say, but  use the "hit area" the size of the stage...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 8

Expert Comment

by:radnor
ID: 16873675
"... Someone said I'd have to either encode it in the flash itself (can't do that), ..."  --- Do you have the FLA?  
0
 

Author Comment

by:MaritimeSource
ID: 16905974
Sorry for the delay.

I'm looking for a solution that doesn't involve flash. Can I do it from the html side?

Thanks
0
 
LVL 8

Expert Comment

by:radnor
ID: 16906264
Don't think so.  Do you have the FLA?
0
 

Author Comment

by:MaritimeSource
ID: 16908039
Well, yes but I'm not a flash programmer... the original guy isn't available
0
 
LVL 8

Expert Comment

by:radnor
ID: 16908311
I've found a way for IE only.  But, that will NOT work for 100% of your visitors...

I've worked with flash a bit....  If you don't mind me asking, what is the nature of your biz?  Are you a NP group?

If all you want is 1 button that covers the entire stage that when clicked goes to some URL (hopefully within your site, if not no issue), find a way to contact me (it's not too hard).

Will be on the road for the next 10-14 days starting Saturday.
 
0
 
LVL 1

Accepted Solution

by:
stevetellis earned 2000 total points
ID: 17255108
Here is a solution for you. This works, I have tested it. In fact, you can test it right now: go to http://www.stellis.org/ee and click loader.html

Here is how it works: you embed the loader.swf file into your page, but at the end of it you tack on a little variable. The value must be URL encoded. If you don't know how to URL encode, go to http://www.albionresearch.com/misc/urlencode.php

This variable is called "linkURL" and it will tell the Flash file where to go when you click on headerAnim. Here is the source, so you can see for yourself what I mean:

<html>
  <body>

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="600" height="116" id="loader" align="middle">
      <param name="allowScriptAccess" value="sameDomain" />
      <param name="movie" value="loader.swf?linkURL=http%3A%2F%2Fwww.google.com" />
      <param name="quality" value="high" />
      <param name="bgcolor" value="#ffffff" />
      <embed src="loader.swf?linkURL=http%3A%2F%2Fwww.google.com" quality="high" bgcolor="#ffffff" width="600" height="116" name="loader" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

    </object>
  </body>
</html>

Now the important part is where it says loader.swf?linkURL=blahblahblah

You want linkURL to equal your URL encoded link. In this case, I just used http://www.google.com which looks like http%3A%2F%2Fwww.google.com when it has been encoded.

Put loader.swf into the same directory as headerAnim.swf. It is programmed to load ONLY something called headerAnim.swf and it MUST be in the same directory on your Web server. If you have any questions or comments, just reply to this post.

Also, don't forget the points =)

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question