-
Controlling loadMovie with Javascript
Hi Guys,
Is there a way that you can control a flash movie using HTML and/or Javascript on the same page?
This is the code I am currently using but I get a "_root is undefined" error.
<< <script language="JavaScript" type="text/JavaScript">
function flashLoad(){
//alert("test");
window.document.docContainer.loadMovie("Untitled-1.swf",_root.docFrame);
}
</script> >>
there is a flash movie on the same page with an ID and NAME of docContainer.
The fuction is actioned by an onClick event.
When I click I get the TEST alert box but then get the undefined error.
Does anyone know why?
Am I able to use the loadMovie via Javascript.
Thanks in advance
--Neil
-
Senior Member
try something like this,
Code:
<script language="JavaScript" type="text/JavaScript">
function flashLoad(){
window.document.docContainer.LoadMovie(1, "Untitled-1.swf");
}
</script>
http://www.macromedia.com/support/fl...hflash_03.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|