[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Javascript & Flash

Hi to all flashers out there!

My Q:

I would like to interact with a flashmovie by using javascript. My
Problem: I have serveral movies-clips in a flash-file which are
invisible. by clicking on a normal button in a normal html page in a
frame, a movie-clip in the flash, which is not in the same frame as the
button, should become visible.

Is there anyone who has a idea how to manage this?

thank you very much

sucram
0
sucram
Asked:
sucram
  • 2
1 Solution
 
shekarkrCommented:
Hi.

You'll find a tut on doing this at this link:
http://www.actionscripts.org/tutorials/intermediate/FS_Command_JavaScript_Library/index.shtml

Hope this helps...

B/R,
Shekar.
0
 
ssdesignCommented:
Suppose you have a page with left and right frame. Left has buttons and right has Flash movie.

1. in the page on the left, you need to add followinf code to the buttons that are to control the movie on the right. the actions are:

<a href="javascript:controlFlash(20)">

and

<a href="javascript:controlFlash(40)">

This is supposing that on clik of these two buttons you want to move to frame 20 and frame 40 of your flash movie respectively. Change this code to your requirement.

save the page.
Call it "left.html"

2. in the HTML page for left.html, add this code right after the </title> tag:

<script language="JavaScript">
<!--
function controlFlash(theFrame){
parent.frames.right.right.GoToFrame(theFrame);
}

</script>

4. in the HTML for right.html (the one with flash movie), add this to the EMBED tag, right after this part "<EMBED src="right.swf"" -

name=right

5. save all the documents and
test in browser.

this should work on most browsers, with the exception of macintosh internet explorer 4.5 and below, which has limited implementation of javascript.

let me know if this works for you.

Sajid
0
 
shekarkrCommented:
This is one of the many implementations that is covered in the tutorial. Check it out and lemme know...

Best Rgds,
Shekar.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now