Copy link to clipboard
Copied
Here is details http://flashdaily.net/post/92720303047/ane-for-displaying-loading-status
Sources is not available to anyone, but ANE is free to use.
Copy link to clipboard
Copied
Cool! Plans to extend for Android? Also, does this show up before, after or instead of a splash screen?
Copy link to clipboard
Copied
Quick video demonstrating this ANE:
This is not preloader for Adobe Air app You can use it anytime you want to indicate that your app is not stuck
import flash.events.MouseEvent;
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.display.StageScaleMode;
import flash.display.StageAlign;
import gamespoweredby.ui.UIActivityIndicatorViewStyle;
import gamespoweredby.ui.UIActivityIndicatorView;
import flash.events.Event;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
var img : Bitmap = new Bitmap();
addChildAt(img,0);
test.addEventListener(MouseEvent.CLICK, onTest);
function onTest(e:MouseEvent):void{
UIActivityIndicatorView.show(UIActivityIndicatorViewStyle.UIActivityIndicatorViewStyleWhiteLarge, 0xaa000000,0xffffffff, loadCPU);
}
function loadCPU(){
var bitmap : BitmapData = new BitmapData(2048, 2048, false);
bitmap.noise(7);
img.bitmapData = bitmap;
UIActivityIndicatorView.hide();
}
This code:
var bitmap : BitmapData = new BitmapData(2048, 2048, false);
bitmap.noise(7);
will load iOS device CPU and Adobe Air stay unresponsive while BitmapData is generating. Looking on that BitmapData - it's really big and time to wait depends from device CPU power and some users may think "App is crashing or stuck".
But if you need to show similar "Activity" indicator - just use my ANE and user will see that app is not stuck and doing something and moreover - it's default spinner
When you need remove this activity indicator - just call UIActivityIndicatorView.hide()
There is one thing you may to know. If you start big and advanced computations in Adobe Air - iOS may not show this activity indicator by calling UIActivityIndicatorView.show(). So you must use to callback for it (loadCPU in sample above) and it will fire only after activity indicator appeared.
When you want to remove it - just call UIActivityIndicatorView.hide();
I'm not Android guy so if I can do this myself - this may be not tomorrow. May be some weekend, don't know actually. I don't have any clue about Android native code
Copy link to clipboard
Copied
Hi, thanks for the amazing work!
I've been using your ANE so far in my apps and it's working great,
but with the new 64bit SDK i now get the following error when packaging :
Packaging failed!
Packaging error message:
Error: libActivityIndicator.a is required to have universal iOS libraries.
Please contact the ANE developer(s) to get the same.
is it possible for you to re-compile and include the universal iOS libraries? Thanks in advance!
Copy link to clipboard
Copied
Hi flashmafia!
I will recompile but looks like there is not only ANE issue. May be some linker failure. Anyway will check and post here update. Will try to do my best )
Copy link to clipboard
Copied
Amazing! I'll wait for your update, thanks!
Copy link to clipboard
Copied
Sorry for long waiting. I was on Christmas holidays. My extension was updated. Links the same as on first message
Copy link to clipboard
Copied
You're the best! I'm gonna use it right away in my project!
Copy link to clipboard
Copied
Hi Anton, i noticed the indicator is not well centered when changing from portrait to landscape ( my app supports both )
it appears it stays at the coordinates of the first orientation : is there a workaround, or would it be possible to specify the x y coordinates manually from the API?
Thanks again for this great ANE!
Copy link to clipboard
Copied
Hi and thanks for the report. I will check what I can do and post here when it will be ready (soon)