onLoad pass variable to flash
hi all,
this kinda javascript & html problem,
i sending variable flash html,
i sending mousemovie method. it's working ok
look @ html , java script
-------------------------------------------------------------------------
<html>
<head>
<script language="javascript">
var moviename = "flash";
function thismovie(moviename) {
// ie , netscape refer movie object differently.
// function returns appropriate syntax depending on browser.
if (navigator.appname.indexof ("microsoft") !=-1) {
return window[moviename]
} else {
return document[moviename]
}
}
// checks if movie loaded.
// returns true if yes, false if no.
function movieisloaded (themovie) {
if (typeof(themovie) != "undefined") {
return themovie.percentloaded() == 100;
} else {
return false;
}
}
b=document.all;
function setflash(dx)
{
thismovie(moviename).setvariable ("_root.seconds"," " + dx);
//alert("ok");
}
</script>
<script>
function newpos(){
setflash(10);
}
document.onmousemove=newpos;
</script>
</head>
<body>
<object
classid="clsid
27cdb6e-ae6d-11cf-96b8-444553540000"
width="254"
height="35"
codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"
id=flash>
<param name="movie" value="flash/count.swf">
<param name="quality" value="high">
<param name="scale" value="showall">
<embed
name="flash"
src="flash/count.swf"
width="254"
height="35"
quality="high"
scale="showall"
swliveconnect="true"
pluginspage=" http://www.macromedia.com/go/flashplayer/"> </embed>
</object>
</body>
</html>
-----------------------------------------------------------------------------------------
this working fine both ie & firefox,
but when need onload method (pass varieable without moving mouse) work ie, not firefox.
i add
<body onload="newpos()"> @ body tag.
why not working @ firefox?
thanx
nalinda
this kinda javascript & html problem,
i sending variable flash html,
i sending mousemovie method. it's working ok
look @ html , java script
-------------------------------------------------------------------------
<html>
<head>
<script language="javascript">
var moviename = "flash";
function thismovie(moviename) {
// ie , netscape refer movie object differently.
// function returns appropriate syntax depending on browser.
if (navigator.appname.indexof ("microsoft") !=-1) {
return window[moviename]
} else {
return document[moviename]
}
}
// checks if movie loaded.
// returns true if yes, false if no.
function movieisloaded (themovie) {
if (typeof(themovie) != "undefined") {
return themovie.percentloaded() == 100;
} else {
return false;
}
}
b=document.all;
function setflash(dx)
{
thismovie(moviename).setvariable ("_root.seconds"," " + dx);
//alert("ok");
}
</script>
<script>
function newpos(){
setflash(10);
}
document.onmousemove=newpos;
</script>
</head>
<body>
<object
classid="clsid
width="254"
height="35"
codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"
id=flash>
<param name="movie" value="flash/count.swf">
<param name="quality" value="high">
<param name="scale" value="showall">
<embed
name="flash"
src="flash/count.swf"
width="254"
height="35"
quality="high"
scale="showall"
swliveconnect="true"
pluginspage=" http://www.macromedia.com/go/flashplayer/"> </embed>
</object>
</body>
</html>
-----------------------------------------------------------------------------------------
this working fine both ie & firefox,
but when need onload method (pass varieable without moving mouse) work ie, not firefox.
i add
<body onload="newpos()"> @ body tag.
why not working @ firefox?
thanx
nalinda
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment