/    Sign up×
Community /Pin to ProfileBookmark

Using HTML Javascript from a Flash Movie

Hi all.

What I have is a JavaScript msgWindow=window.open….. command that is in the .html document. Also there is a flash movie that loads (it’s a button pannel).

What I want to happen is when one of the buttons is clicked in the Flash movie, I need the msgWindow function in the .html file to called.

Do I need to send a “message” from Flash to the .html or can I incorporate the JavaScript into my flash document and take it out of the .html.

Thanks everyone.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@JonaOct 21.2003 — [font=monospace]

on (release) {

  getURL("javascript:function_name();");

}

[/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@TrevorauthorOct 21.2003 — Thanks alot.

It works perfectly.
Copy linkTweet thisAlerts:
@JonaOct 21.2003 — [font=arial][color=green]You are welcome.[/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@TrevorauthorOct 21.2003 — On kindof the same topic.

I tried taking the code I have in the .html function:

msgWindow=window.open("request.html","request",'toolbar=no,width=302,height=450,directories=no,status=no,scrollbars=yes,resizable=no,border=0,menubar=no');


when I put it into the Flash document like this:

getURL("javascript:msgWindow=window.open('request.html','request','toolbar=no,width=302,height=450,directories=no,status=no,scrollbars=yes,resizable=no,border=0,menubar=no');");

it works, I get the window to open.

The only problem is that the Flash document resides in the upper frame of the 2 frame .html document. When this function is called, the seperate windows is opened and the upper frame displays a blank page with "[object]" writen at the top. Not sure why.
×

Success!

Help @Trevor 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.19,
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,
)...