-
Controlling the opening of a browser window w/Actionscript
Is there way to insert code that will control the opening of a browser window within Flash using Actionscript?
In Javascript, it would look something like this:
window.open theURL,winName,"width=480,height=480,status=no,scr ollbars=no,res
izable=no,menubar=no");
Thanks in advance for your help!
-
Use getURL to call your javascript code, and return void to keep from opening a new window:
code:
getURL('javascript:myJSFunction(); void(0)');
Edit: Why does the PHP put a space in between java and script????
-
Isn't there a way to do this right in the getURL code?
-
Put the code in where my example has a function call. Of course, this won't work in test mode, only in a JS browser.
-
So, something like this?
getURL('java script:window.open theURL,winName,"width=480,height=480,status=no,scr ollbars=no,res
izable=no,menubar=no")');
-
Approximately like that. You seem to have more right parentheses than left ones, and keeping the various levels of quotes stright is always a pain. But that general approach will work., as this simple working example illustrates:
code:
myButton.onRelease = function() {
getURL('javascript:window.alert("Sent from Flash"); void(0);', "_self");
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|