Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > HTML and JavaScript

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 4.00 average. Display Modes
Old 10-13-2004, 04:21 PM   #1
pandy
Registered User
 
Join Date: Jun 2004
Posts: 9
Default Run Actionscript function from Javascript

Hi

I need to be able to run an actionscript function in a flash movie from a html page in an iframe. Firstly is it possible, or should I go back to the drawing board, secondly - if it is possible how do i do it?

Here is the script I have so far...

On the page in the iframe..
HTML Code:
<script language="javascript" type="text/javascript">
<!--
var movie = window.top.movie;

movie.SetVariable('/bar:target', '4');
movie.director();

//-->
</script>
The function to run in the flash movie...
Code:
function director() {
	if (/bar:target</bar:current) {
		/bar:direction = "b";
	} else if (/bar:target>/bar:current) {
		/bar:direction = "f";
	} else if (/bar:target == /bar:current) {
		/bar:direction = "null";
	}
	goto = (String(/bar:direction+/bar:current));
	trace(goto);
	bar.gotoAndPlay(goto);
}
I hope this is enough. You can see what I am trying to achieve at http://www.ianetservices.com/beacon/our_team

It all works fine, but if you click "back" the iframe changes but the slider does not scroll back to the correct person - I need to to change when the iframe page loads.
pandy 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 05:16 PM.


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.
You Rated this Thread: