有没有办法让价值观形成swiffy动画没有办法、价值观、动画、swiffy

2023-09-08 13:03:33 作者:短发淑女

让我们假设我是检测鼠标点击闪光次数

let's assume that i'm detecting the number of mouse clicks in flash

为香港专业教育学院使用的code

for that ive used the code

import flash.events.MouseEvent;
plus.addEventListener(MouseEvent.CLICK,aaa)
var i:int=0;
function aaa(e:MouseEvent)
{    
    i++;
    var a:Number= Number(input1.text)+Number(input2.text);
    answer.text=String(i);  
}

和我在答案文本框中显示出来,我用这个转换为HTML5 swiffy ,我想获得答案文本框的值在JavaScript POPOP之后我点击加号按钮?我试图将其转换成swiffy和检测铬的文本框,并没有检测到文本框中检测到整个画布作为一个 SVG

and i'm displaying it in answer text box, i converted this to HTML5 using swiffy and i want to get the value of the answer text box in a javascript popop right after i click the plus button ? i tried converting it into swiffy and inspecting the textbox with chrome and it doesn't detect the text box it detects the whole canvas as an SVG.

随时纠正我,如果我错了的AS3(只是一个初学者)。

feel free to correct me if i'm wrong in AS3 (just a beginner).

推荐答案

关键是要吐出来的JavaScript函数的值,如下所示。

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 */
}

然后,在转换后的HTML文件的顶部创建JS功能。

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

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