Go Back   kirupaForum > Flash > ActionScript 1.0/2.0

Reply
 
Thread Tools Display Modes
Old 11-11-2009, 06:28 PM   #1
turmoil
Registered User
passing variables from swf to javascript popup

hi everyone.
i`m trying to send variables from this .swf on level2 of the main movie to another swf that loads onto a javascript popup. i`ve tried using the GET and POST methods with no success.

the popup script, first layer:

_root.btn.onRelease = function() {
address = "E01_p.swf";
target_winName = "test_pop";
width = 600;
height = 518;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 0;
resizable = 0;
//sends data back to the function
openWinCentre(address,target_winName,width,height, toolbar,location,directories,status,menubar,scroll bars,resizable);
};

second layer:

_root.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL("javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open('"+url+"','"+winName+"','"+"width="+w+ ",height="+h+",toolbar="+toolbar+",location="+loca tion+",directories="+directories+",status="+status +",menubar="+menubar+",scrollbars="+scrollbars+",r esizable="+resizable+",top='+((screen.height/2)-("+h/2+"))+',left='+((screen.width/2)-("+w/2+"))+'"+"')}else{myWin.focus();};void(0);");
};

thank you.
turmoil is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Old 11-11-2009, 06:59 PM   #2
Krilnon
≈ ≠ =
 
Krilnon's Avatar
Location Rochester, NY

Posts 7,183
I would use LocalConnection. I actually wrote a tutorial on basically the same thing about 3 years ago, here it is: http://www.kirupa.com/developer/acti...Connection.htm

In retrospect, I think that there are more reliable (but complicated) ways to establish a connection with an asynchronously opening SWF, but you should try that out first; it should be reliable enough anyway.
Krilnon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:46 PM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com