Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 980
  • Last Modified:

How to open specific size browser window from Flash XML link

I am trying to get XML links inside flash SWF to open in specifically sized browser windows.  Code is working to open the links in a separate browser window, but is not sizing the window to 500 x 500 - help would be most appreciated!

"link" is the XML code to open URL
this.image_border_mc.createEmptyMovieClip("pic_display_inside", 1);
loadMovie(image, "image_border_mc.pic_display_inside");
details_mc.onPress = function () {
	getURL (link, "javascript:window.open(\""+url+"\",\""+windowNewName+"\",\"width=500"+wdth+",height=500"+hdth+",top=\"+((screen.availHeight/2)-("+hdth/2+"))+\",left=\"+((screen.availWidth/2)-("+wdth/2+"))); void(0);");
};
launchNewWin("link", windowWidth, windowHeight,"newWindowName");
 
up_btn.onPress = function () {
	description_txt.scroll -= 1;
};
down_btn.onPress = function () {
	description_txt.scroll += 1;
};
stop();

Open in new window

0
producer88
Asked:
producer88
  • 3
  • 2
2 Solutions
 
blue-genieCommented:
i'm confused.
why do you have a lunchNewwin method and a js window.open?

you say it works in terms of opening a window its just the wrong size, so which one is being used?
width=500"+wdth - where is wdth being defined?
0
 
producer88Author Commented:
Thanks much for commenting, but I have abandoned this approach for the current FLA project, as a solution was needed quickly.  

Perhaps for future use, you could advise on the best way to make a link from XML data open a specifically sized browser window?
0
 
blue-genieCommented:
i'm always used the javascript option. though i usually put the js in the html and call the function from the flash.
but the way you did it should work. except for that wdth parameter, it might have caused a undefined.
can't say for sure without seeing the thing in action.
0
 
producer88Author Commented:
If no width parameter is given, where do you specify the size in the code?  Can you give me a sample code that you use?
0
 
blue-genieCommented:
no no no. you do specify a width but your code says \"width=500"+wdth+",
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now