Solved

Javascript & Flash

Posted on 2001-06-20
3
243 Views
Last Modified: 2013-11-19
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
Comment
Question by:sucram
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
shekarkr earned 200 total points
Comment Utility
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
 
LVL 7

Expert Comment

by:ssdesign
Comment Utility
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
 
LVL 3

Expert Comment

by:shekarkr
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now