Skip to main content
Participant
March 11, 2009
Question

Control New Window Properties

  • March 11, 2009
  • 2 replies
  • 466 views
Hello all, I am relatively new to Flash and am having a problem.

I have a flash piece that is published to Flash 7 using CS3 Professional. This piece is placed in a eLearning module that was created with Lectora and is run from a Saba 5.2 LMS.

Right now I am using the following code to get a button to open a new window:

on (release) {
getURL ("javascript:NewWindow=window.open(' http://www.adobe.com','newWin','width=850,height=705,left=0,top=0,toolbar=No,location=No,scrollbars=Yes,resizable=Yes,status=No,fullscreen=No'); NewWindow.focus(); ");
}

The problem is that the user must open a browser window to access Saba. When Saba launches the course it must do so in a new browser window. So when the course is running, there are two browser windows open. When the user clicks on the button in the Flash piece, it puts the focus on the window that Saba is running in and redirects to the link that is in the JavaScript. This cuts the connection between the course and Saba and loses all information for the user.

If I use the code :

on (release){
getURL(" http://www.adobe.com", "_blank");
}

Is there any way of controlling the same things that the JavaScript code above does? Example... Window width, Window height, X,Y placement, etc..

Any help would be incredibly helpful!!!

Thank you,
Rob
This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
March 12, 2009
you can't because you're not using javascript.

use your first example and add "_blank" to your 2nd getURL() parameter.
kglad
Community Expert
Community Expert
March 11, 2009
i don't understand your issue, but you can't control window characteristics without using javascript.
Participant
March 12, 2009
In order to get to the eLearning Module that has these Flash pieces in them the user must:

1. Open an IE6 window that connected to Saba (our Learning Management System that houses all of our Modules)

2. Launch the elearning Module. This opens in a new IE6 window.

3. Click on the button (with the code displayed below – Example 1) in the Flash piece.

4. The button does not open a new window. It instead uses the first IE6 window, the one that is currently connected to Saba (see Step 1), and redirects that window to the new URL.

5. The first window (see Step 1) must stay connected to Saba in order for the progress in the elearning Module to be tracked.

6. I can open a brand new window if I replace the code below (Example 1) with the second code below (Example 2), but I can not control the placement, size, toolbar, etc like I can with the first code (Example 1).

My question is, how can I modify the second code (Example 2) to control as many of the window characteristics as possible (as in the code Example 1). I understand that the first code uses JavaScript, but it is not opening a new window, it is using a window that is currently open. The second code (Example 2) uses “_blank” and opens a new window.



EXAMPLE 1

on (release) {
getURL ("javascript:NewWindow=window.open(' http://www.adobe.com','newWin','width=850,height=705,left=0,top=0,toolbar=No,location=No,scrollbars=Yes,resizable=Yes,status=No,fullscreen=No'); NewWindow.focus(); ");
}


EXAMPLE

on (release){
getURL(" http://www.adobe.com", "_blank");
}