Solved

Wrap swfobject in a Link for Popup Window.

Posted on 2009-05-07
3
995 Views
Last Modified: 2012-05-06
I would like to wrap my flash swfobject so that I can open it with a popup window.   I can't seem to get the flash inside of the link.

I want to wrap the myContent div inside of the link that I have around the text (click here for more images).

Possibly I could change the javascript to allow this?.. maybe in teh swfobject.embedSWF...??

I don't know.. hopefully someone can lead me in the right direction.
<script type="text/javascript">

swfobject.embedSWF("http://www.versatables.com/media/flash/swf/CTL72-DEMO-09.swf", "myContent", "300", "300", "7.0.0", "expressInstall.swf");

</script>
 
 

<div id="myContent">

			<img src="<?=$images_path; ?>/school/aj30-main-new.jpg" border="0" alt="" />

			<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></p>

</div><a href="<?= $root_path; ?>/media/flash/CTL-Series-Product-Gallery-60-72.php" class="popupwindow" 

                rel="height:620,width:715,toolbar:0,scrollbars:0,status:0,resizable:1,center:1,createnew:1"><center><h2>Click Here For More Images</h2></a></center>

                

                </a></div>

Open in new window

0
Comment
Question by:cstormer
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
Onthrax earned 500 total points
ID: 24330598
You can't. This is not possible according to w3c specs
http://www.w3.org/TR/html401/struct/objects.html#h-13.5

However, you can do the following:

You can use flashvars. In a nutshell, they become global variables in the flash runtime, so if your flashvar is named "link" your button can call:

somebutton.onRelease = function()
{
    getURL( link );
}

and in the HTML:
<object classid=
      "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=
      "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
      width="100%" height="119" id="ticker">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="movie" value="ticker.swf" />
        <param name="quality" value="high" />
        <param name="salign" value="TL" />
        <param name="flashvars" value="manifestFile=film.xml&" />
        <embed src="ticker.swf" quality="high" width="100%" height=
        "119" name="ticker" salign="TL" allowscriptaccess=
        "sameDomain" type="application/x-shockwave-flash"
        pluginspage="http://www.macromedia.com/go/getflashplayer"
        flashvars="manifestFile=film.xml&" />
      </object>


Hope this helps...
0
 

Author Comment

by:cstormer
ID: 24336150
That looks like it will solve the problem.. how does it work with swfobject?
0
 
LVL 13

Expert Comment

by:Onthrax
ID: 24336296
Above example is for a swfobject. Although you will need the original fla to add the onrelease code to it. Once you have done so you can add any url through the flashvars property in the embedded code.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

760 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now