Pop Up Windows

Pop Ups in Flash

Page 1 of 1

3 Replies - 15849 Views - Last Post: 23 August 2006 - 06:16 AM

#1 Shadow OSX  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 67
  • Joined: 28-March 06

Pop Up Windows

Posted 06 July 2006 - 09:36 AM

Hello everyone. I have an issue that I am having troubles figuring out. I for some reason cannot get a pop up window to function from a flash button.

I have my index page which is a .swf inside a dreamweaver html page. my other pages are .swf as well. I have chosen to load and unload the swf's inside the same html page that the index page sits in.

On one of my pages I have a magnifying glass which will show a larger picture of the jpeg in a pop window. I have placed the jpeg image inside of a html page.

The script attached to the flash button inside the swf is:
on (release) {
		getURL ("java script:spawnWindow('http://www.chemistryadvertising.com/BigCWS-Program.htm','College World Series Ad','toolbar=yes,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=425,height=550')");
}


I then put this script between the HEAD tags in the html file that holds the image I want to pop up:

<script language="Javascript">
<!--
function spawnWindow(URL,Name,features) {
		window.open(URL,Name,features);
}
//-->
</script>


Now I do not want to publish an html file in Flash and put coding inside of it. I simply want to put the action on the button and put the action in the html file that holds the image.

Thanks so much for reading. Hopefully, someone will actually be able to give me an answer.

Cheers, Jason

Is This A Good Question/Topic? 0
  • +

Replies To: Pop Up Windows

#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1858
  • View blog
  • Posts: 20,275
  • Joined: 17-March 01

Re: Pop Up Windows

Posted 06 July 2006 - 11:33 AM

We do something like this at work with the javascript function in the HTML and the call to the function in flash.

You must put this on your HTML page with the rest of the <param name=....>

<param name="allowScriptAccess" value="sameDomain" />

That will allow flash to call the Javascript on the page.
Was This Post Helpful? 0
  • +
  • -

#3 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: Pop Up Windows

Posted 07 July 2006 - 12:10 AM

And make sure you don't have a space in "javascript"... from what you've pasted, I can see you have "java script"
Was This Post Helpful? 0
  • +
  • -

#4 Reklov  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 3
  • Joined: 21-August 06

Re: Pop Up Windows

Posted 23 August 2006 - 06:16 AM

On the html page where the swf lives, add SwLiveConnect = true inside the embed tag. (see example)

<embed src="SWF/DBGtool2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="780" height="430" SwLiveConnect = true>


Also on the html page, add the following java script:

 <script language="Javascript1.2">
<!--
function openWindow()
{
	Tip=window.open("tip.htm","tip","menubar=0,resizable=1,width=550,height=350");
}
//End-->
</SCRIPT>  


On the button in Flash add the following ActionScript:
on (release) {
	getURL("java script:openWindow()");
}



I figured this out yesterday, with a lot of help from folks here.

Note that if there are any spaces between java and script, it is because the space was added when I pasted the code. there are NO spaces between java and script in the code on the button.

This post has been edited by Reklov: 23 August 2006 - 06:23 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1