Solved

How to open specific size browser window from Flash XML link

Posted on 2008-10-14
5
960 Views
Last Modified: 2013-11-11
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
Comment
Question by:producer88
[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
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 22718158
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
 

Author Comment

by:producer88
ID: 22718841
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
 
LVL 39

Assisted Solution

by:blue-genie
blue-genie earned 125 total points
ID: 22719046
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
 

Author Comment

by:producer88
ID: 22719163
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
 
LVL 39

Accepted Solution

by:
blue-genie earned 125 total points
ID: 22719283
no no no. you do specify a width but your code says \"width=500"+wdth+",
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I convert a CS4 FLA file to CS6? 1 889
flash cs6 4 354
blocked plugin flash 5 127
What is needed to center a flash image to the center of the page? 4 112
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

734 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