/    Sign up×
Community /Pin to ProfileBookmark

Using JavaScript With Flash

Hi all,

I have the following JavaScript

[CODE]<script language=”JavaScript”>
<!–
//The function is quite simple, it takes one argument, “newBgColor”
//and passes it as the value of the “bgColor” property of the “document” object
function changeBgColor(newBgColor) {
if (window.document && window.document.bgColor) {
document.bgColor = newBgColor;
}
}
–>
</script>[/CODE]

I then have this in Flash, which controls the bg colour…

[CODE]on (press) {
getURL (“JavaScript:changeBgColor(‘#336600’)”);
}[/CODE]

I want to instead fade an image into the background not change the colour… Anyone seen a script like this?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@ricpApr 22.2007 — There are lots of examples on google on how to fade elements on the page, most using the IE blendTrans method or manually updating the CSS opacity property (supported as alpha filter on IE, -moz-opacity on older Moz).

http://www.google.co.uk/search?hl=en&q=javascript+fade&btnG=Google+Search&meta=

As for calling the method in JS, the getURL functionality will do it.
×

Success!

Help @tomyknoker spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...