Hi all,
I’m trying to change my background color through Flash so I created a code in my HTML and another on my FLA file.
my problem when I use
this.addEventListener… my frame rate goes crazy… (its supposed to be 24FPS and it turns to twice as fast)
here is my html (head) code:
<script language="JavaScript">
function changeBgColor(newBgColor)
{
if (window.document && window.document.bgColor)
{
document.bgColor = newBgColor;
}
}
</script>
here is my flash code:
var jsCall:String;
this.addEventListener(Event.ENTER_FRAME, bgChange);
function bgChange(e:Event):void{
if ((meuCaminho.parameters.disc) == "bio"){
jsCall = String(ExternalInterface.call("changeBgColor", "#B5A7C3"));
}
if ((meuCaminho.parameters.disc) == "fil"){
jsCall = String(ExternalInterface.call("changeBgColor", "#CCE7D3"));
}
}
anyone any ideias?
my animation is on another swf that is loaded inside my main one!!
PLS hELP!!!