Solved

Wrap swfobject in a Link for Popup Window.

Posted on 2009-05-07
3
1,024 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

615 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