Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > HTML and JavaScript

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-17-2004, 08:00 AM   #1
miquael
New Member
 
miquael's Avatar
 
Join Date: Apr 2004
Posts: 24
Question JS/AS - pop-up window with variable page value

i've implemented a simple JavaScript call to spawn a new window from within Flash (on a button).

i've used Collin Mooks sample here: http://www.moock.org/webdesign/flash...avascript.html

on my button:

on(release) {
getURL("javascript:launchwin(''test.html', 'newwindow', 'height=315,width=320')");
}

this works perfect.

the problem is, i need to make a dynamic reference to call the name of the the html page based on a changing variable within the ActionScript. i want to do something to this effect, where the variable is included in the JavaScript call, but this does not work (in fact, no new window is generated):

webcastLink = "location.html";

on(release) {
getURL("javascript:launchwin('http://www.earthdance.org/webcast/'+webcastLink, 'webcastwindow', 'height=315,width=320')");
}

any insights on how i can pull this off?


thanks,


~ Miquael Gaio


T R A N S C E N D I G I T A L

Wisdom Technology ©
http://www.transcendigital.org
http://www.transcendigital.org/bio
miquael is offline   Reply With Quote
Old 09-17-2004, 05:36 PM   #2
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
Default

Code:
//simpler:
webcastLink = "location.html";

on(release) {
getURL("javascript: window.open('http://www.earthdance.org/webcast/"+webcastLink+"', 'webcastwindow', 'height=315,width=320')");
}
using window.open instead of a javascipt function name thats in the html, saves 1 step (the call to the javascript function).
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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. The time now is 05:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.