AIRアプリが、インストール後に自分がインストールされているフォルダ内にファイルやフォルダ等を追加すると、アンインストール時にそれらのファイルやフォルダが残ってしまう。

そのため、アンインストール後に再インストールしようとするとエラーになってしまう場合がある。残っているファイルおよびフォルダをインストールフォルダごと削除すると再インストール可能となる。

  • Share/Bookmark

Tags: , ,

hideito on 4月 8th, 2011
なるほどなるほど勉強になるな~
stageのマウスアップイベントをウォッチするのがみそなのね。
Actionscript:
  1. button.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress);
  2. button.addEventListener(MouseEvent.MOUSE_UP, buttonRelease);
  3. button.addEventListener(MouseEvent.MOUSE_OVER, buttonOver);
  4. button.addEventListener(MouseEvent.MOUSE_OUT, buttonOut);
  5. function buttonPress(e:MouseEvent):void {
  6. //the button is pressed, set a MOUSE_UP event on the button's parent stage
  7. //to caputre the onReleaseOutside event.
  8. button.parent.stage.addEventListener(MouseEvent.MOUSE_UP, buttonRelease);
  9. }
  10. function buttonRelease(e:MouseEvent):void {
  11.     //remove the parent stage event listener
  12.     button.parent.stage.removeEventListener(MouseEvent.MOUSE_UP, buttonRelease);
  13.     //if the events currentTarget doesn't equal the button we
  14.     //know the mouse was released outside.
  15.     if (e.currentTarget != button) {
  16.     trace('onReleasedOutside');
  17.     } else {
  18.     //the events currentTarget property equals the button instance therefore
  19.     //the mouse was released over the button.
  20.     trace('onRelease');
  21.     }
  22. }
  23. function buttonOver(e:MouseEvent):void {
  24.     if (e.buttonDown) {
  25.     //if the mouse button is selected when the cursor is
  26.     //over our button trigger the onDragOver functionality
  27.     trace('onDragOver');
  28.     } else {
  29.     //if the mouse button isn't selected trigger the standard
  30.     //onRollOver functionality
  31.     trace('onRollOver');
  32.     }
  33. }
  34. function buttonOut(e:MouseEvent):void {
  35.     if (e.buttonDown) {
  36.     //if the mouse button is selected when the cursor is
  37.     //moves off of our button trigger the onDragOut functionality
  38.     trace('onDragOut');
  39.     } else {
  40.     //if the mouse button isn't selected trigger the standard
  41.     //onRollOut functionality
  42.     trace('onRollOut');
  43.     }
  44. }

  • Share/Bookmark

Tags:

hideito on 3月 22nd, 2011

FlexSDK3.2以前では大きな画像をImageコンポーネントに表示すると縮小時にスムージングが行われず、輪郭や文字等がジャギジャギに劣化する。

スムージングができないか調べていたらFlexSDK3.4以降??か定かではないんですが、smoothBitmapContentプロパティなるものが増えていて、このプロパティ値をtrueに設定するとスムージングするらしい。実際やってみましたが、autoLoadプロパティtrueで何度もurlプロパティ設定すると、スムージングが効かなくなる。。。

以下のページを参考に、Imageクラスを継承したSmoothImageクラスを作成して利用したところ、無事スムージングするようになりました。


追記:以下のような書き方でもOKみたい。

Actionscript:
  1. private function image3LoadCompleteHandler(e:Event):void
  2. {
  3.   var bmp:Bitmap = image3.content as Bitmap;
  4.   if (bmp) {
  5.     bmp.smoothing = true;
  6.   }
  7. }
  8.  
  9.  
  10. <mx:Image id="image3" source="./images/Sample2.jpg" x="840" y="80" smoothBitmapContent="true" width="255" height="360" complete="image3LoadCompleteHandler(event);"/>

  • Share/Bookmark

Tags: ,

http://loftimg.jp/blog/actionscript/js-flash-focus.php

  • Share/Bookmark

Tags: ,

hideito on 2月 6th, 2011

吉岡さんの以下のPDFはとても参考になります。
http://ciruelo.jp/doc/yoshioka_report0124.pdf

ヒムカンパニーの永井さんの以下のブログはAIR for Androidの情報満載です。
http://himco.jp/air-for-android/

  • Share/Bookmark

Tags: , ,

hideito on 2月 6th, 2011

以下の設定で自動スケールを止めて、stage.stageWidthとstage.stageHeightで表示可能サイズを取得できるようです。

Actionscript:
  1. stage.scaleMode = StageScaleMode.NO_SCALE;
  2. stage.align = StageAlign.TOP_LEFT;
  3. trace("表示サイズ 幅:" + stage.stageWidth + "/高さ:" + stage.stageHeight);

この表示サイズの数値を使って、AS内で表示サイズの処理を自分で実装すれば、どの解像度の端末でもリキッドレイアウトできれいに表示するアプリが開発できるはず。。。

  • Share/Bookmark

Tags: , , ,

hideito on 2月 2nd, 2011

この情報はかなり貴重!!

http://blog.droidget.com/2010/07/androidhtml5.html

  • Share/Bookmark

FlashコンテンツとJSコンテンツでエンコード文字列を共有する場合、

<Flash(AS2)>

エンコード:escapeメソッド

デコード:unescapeメソッド

<Javascript>

エンコード:encodeURIComponentメソッド

デコード:decodeURIComponentメソッド

  • Share/Bookmark

Tags: ,

http://nicomelmo.blog118.fc2.com/blog-entry-807.html

  • Share/Bookmark

Tags:

同僚から教えてもらったTips

■リンクやテキストボックスをタップしたときにまわりがオレンジ色になる。
alpha を 0 にすることで消すことはできた

#hoge1 {
-webkit-tap-highlight-color:rgba(0,0,0,0);
}

  • Share/Bookmark

Tags: