Skip to content Skip to sidebar Skip to footer

Is There A Way To Get Values Form A Swiffy Animation

let's assume that i'm detecting the number of mouse clicks in flash for that ive used the code import flash.events.MouseEvent; plus.addEventListener(MouseEvent.CLICK,aaa) var i:in

Solution 1:

The trick is to spit your value out to a javascript function as follows.

function aaa(e:MouseEvent)
{    
    i++;
    var a:Number= Number(5)+Number(4);
    answer.text=String(i);
    //getURL("javascript:swiffyClicked(" + answer.text + ")"); /* AS2 way */
    navigateToURL(new URLRequest("javascript:swiffyClicked(" + answer.text + ");"), "_self"); /* AS3 way */
}

Then create the JS function at the top of your converted html file.

<script type="text/javascript">
      function swiffyClicked(answer){
        alert(answer);
      }
</script>

Post a Comment for "Is There A Way To Get Values Form A Swiffy Animation"