Click to See Complete Forum and Search --> : [RESOLVED] Director MX/Shockwave Problem - Opening a new browser window


Joe Cool
10-14-2008, 01:48 PM
Hi,

I'm new to the forum and I hope you can help me with this problem.

I'm currently designing a website and within one of the .htm pages (test.htm) is a shockwave movie I created in Director MX. (version 9.0)

When I click on an image within the Director movie I want it to open a new webpage (image.htm) in a new browser window in a specific size.

At first I tried to get the basic process correct so I attached a behavior to the image with the following code:

on mouseUp
goToNetPage "image.htm", "_blank"
end

This code opens a new (full) browser window.

However, it's an artist's website and the new page will display an image. So I want the new browser window to be a fixed size.

I tried the following code:

on mouseUp
goToNetPage "javascript:window.open('image.htm', '_blank', 'height=575, width=720')"
end

This code opens image.htm in a browser window with the spec I stipulated. (height 575 pixels, width 720 pixels) However, the problem is that the original webpage (test.htm) disappears and is replaced with a white blank page with only the following text on it: "[object]"

The following code appears in the address bar:

javascript:window.open('image.htm',%20'_new',%20'height=575,%20width=720')

The results are similar in Firefox.

Has anyone encountered these problems before?

Do you know how to open a browser window in a specific size?

Any help would be greatly appreciated.

Thanks,

Joe.

Eye for Video
10-14-2008, 09:13 PM
Here's a snippet of code that I use to open a small, separate window. Code is almost like yours but uses an href:
<a onclick="Javascript:window.open('http://www.citradingcards.com/olymarine/video_library/53_Boat_Prelim.html','_blank','height=455, width=475,resizable=no');return false;" href="http://www.citradingcards.com/olymarine/video_library/53_Boat_Prelim.html">CLICK HERE TO WATCH</a>
You might want to give that a try.
Good luck,
EfV

Joe Cool
10-20-2008, 09:00 AM
Thanks for your reply.

The code you posted is similar to the code I use when I want to open a new fixed sized window from an html page.

In Director some of the terminology is different. For example, 'mouse up' is the Lingo equivalent of 'on click' and you have to use the 'gotoNetPage' command to open a browser window.

After some trial and error, and looking at other sites I managed to fix the problem by slightly tweaking my code.