Flash Action Script -
var _str:String = "클릭 하였어요~"
var _spr:Sprite = new Sprite();
_spr.graphics.beginFill(0xff0000, 1);
_spr.graphics.drawCircle(0, 0, 10);
this.addChild(_spr);
_spr.buttonMode = true;
_spr.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler (e:MouseEvent):void{
ExternalInterface.call(jsFunc, _str)
}
HTML -
<script>
function jsFunc(str){
alert(str)
}
</script>
'information' 카테고리의 다른 글
정보 (0) | 2010.03.12 |
---|---|
AC_RunActiveContent.js 없이 html에서 Flash 로드하기. (0) | 2010.03.12 |
ExternalInterface.call() - IE에서 작동 안하는 이유? (0) | 2010.03.12 |
ExternalInterface.call() 로컬에서 확인하기. (0) | 2010.03.12 |
FlashDevelop (1) | 2010.02.10 |