Click to See Complete Forum and Search --> : Need Hep Understanding How To Make SWF A URL Link
hypno
11-02-2008, 08:38 PM
I apologize for being such a newbie here, but I have studied online tutorials for hours, read blogs and forums and can't seem to get results. I create an invisible button over top of my swf file and then try applying various action scripts...nothing is working. Anyone here know how to explain this?
Thanks
Feel like a dope for misspelling Help in the Thread Title Doh!
Eye for Video
11-03-2008, 08:53 AM
So are you saying that you have published a .swf and have placed that file on an HTML page and want to create a linkable hot spot over the top of that .swf? Not sure if you can use a hot spot over a .swf or not but this is what you would do for an image. Using HTML coding you would be creating a “map”. You will need to set the exact coordinates for yours but here’s an example:
<img src="images/footer.jpg" alt="footer" width="995" height="25" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="606,6,993,35" href="http://www.cidigitalmedia.com" target="_blank" alt="Custom Web design & Flash development, CI Digital Media" />
</map>In Dreamweaver you can draw the hot spot directly over the image using the mapping tool in the image properties panel.
However, if your goal is to include a link in the .swf itself, before you publish the .swf you create your invisible button, give it an instance name (super important and most often forgotten), and use ActionScript something like this, the getURL
cidm_btn.onRelease = function() {
getURL("http://www.cidigitalmedia.com/video.html", "_blank");
}
Note that getURL will work with AS2 but not AS3, it’s a much more involved process. Google getURL ActionScript 3 for more details
Good luck,
Eye for Video
www.cidigitalmedia
hypno
11-03-2008, 09:14 AM
THANK YOU! I have been attempting to embed the link in the swf. Last night(hours after posting this thread) I finally achieved success, BUT I did not know about the mapping and that is VERY interesting. I like that option from the SEO point of view.
I sincerely appreciate your response.
Thanks again
Eye for Video
11-03-2008, 10:24 AM
As far as SEO goes, don't forget that placing the .swf on the HTML page with swfobject.js allows you to create alternate content, including linkable images and text describing what is included in the .swf. Create this alternate content as though the .swf did not exist, test and preview the page just as normal. Once you have that all done, write the script for the swfobject, which will replace that alternate content with the swf. However, all that HTML content can be seen and indexed by spiders and robots.
To turn the .swf into an image I just pick a good spot in the timeline that best represents the final .swf and export an image of that. I use that image as the base for the alternate content, linking it to a Flash update or using it as the actual link if the .swf happens to be a nav bar or something. View source of nav buttons to see example of linking
http://www.lostmountainsurfcompany.com/
Here's an example of using alt content to describe the content of Flash videos
http://www.cidigitalmedia.com/video.html
View source and scroll down to the
<!-- Alternate content -->
Lots of stuff about the videos that would never show up otherwise.
For more info on swfobject
http://www.adobe.com/devnet/flashplayer/articles/swfobject_02.html
Best wishes,
EfV