| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
New Member
Join Date: Apr 2004
Posts: 24
|
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 |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Aug 2004
Location: Chicago, IL
Posts: 22
|
I think your problem is javascript did not know the value of your variable.
This works. Code:
this.myButton.onRelease = function() {
webcastLink = "location.html";
webcastLink ="javascript:window.open('http://www.earthdance.org/webcast/" + webcastLink + "','webcastwindow','height=315,width=320')"
getURL(webcastLink);
}
}
Last edited by programmer_neo; 09-17-2004 at 05:27 PM.. |
|
|
|
|
|
|
|
|
#3 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
hmmm... 2 post in the same forum.
__________________
tg --- what the hell was i thinking? |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|