Solved

How to open specific size browser window from Flash XML link

Posted on 2008-10-14
5
939 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
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:blue-genie
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
no no no. you do specify a width but your code says \"width=500"+wdth+",
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now