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 07-22-2004, 11:47 PM   #1
bkrenzer
Registered User
 
Join Date: Jul 2004
Posts: 2
Default Changing HTML page properties

I want to change the bgColor of my HTML page from inside my flash movie but don't know JavaSript well enough to figure it out.

I am a designer very versed in ActionScript but am at loss when it comes to JavaScript.

Any ideas on how to do this?

Even if you just give me the JavaScript I should be able to figure out how to apply it to my flash movie. Obviously, I am looking for the widest possible browser support.

thanks
bkrenzer is offline   Reply With Quote
Old 07-23-2004, 02:27 AM   #2
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,026
Default

This should help, javascript code:
PHP Code:
backColor[0] = '#FF0000';
backColor[1] = '#00FF00';
backColor[2] = '#0000FF';
backColor[3] = '#FFFFFF';


function 
changeBG(whichColor){
document.bgColor backColor[whichColor];

and to run the function from flash:
ActionScript Code:
getURL("javascript:changeBG(2)");
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota 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 08:06 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.