IOS and Android Native Scroll in Adobe AIR

I think it would be a great idea to implement the smooth scroll present in native iOS and Android applications for use in Adobe AIR projects.
Currently, the only way to obtain smooth scrolling lists with images is using StageWebView to show the image list in HTML format, and then awkwardly implement some JavaScript / AS3 communication functionality so the list in the StageWebView is interactive and can communicate with the main program. This is excessively complicated and very error prone (I've found some inexplicable JavaScript errors that only happen in the iPad, not in Android, and not in the PC!).
It would be way better to be able to skip all the StageWebView process altogether and being able to use a simple AS3 API to put any sprite/movieclip into a scrollable canvas which can be moved using the iOS native scroll.
Using Flash animation to simulate the scroll in a list with images is too slow in the iPad and gives a bad user experience. iPad users expect the native iPad scroll, not some poor jerky simulation. A native scroll is the only way to go.
And even though I talk about the iPad, this should be applicable to the native Android scroll, too.
Scrolling is a VERY BASIC action in a tablet, so this should be implemented as soon as possible.
Actually, I'm amazed we're already at AIR 3.0 beta, and still after all this time nobody thought of this. All sorts of fancy stuff is being added to AIR (hardware accelerated video, webcam and microphone access, etc...) but still something as basic and important as a smooth scroll, which every tablet user expects, is still not possible in Adobe AIR. We either have to implement some slow Flash animated scroll, or use the extremely complicated StageWebView with JavaScript/AS3 communication approach (I'm using a third party library called StageWebViewBridge for the JS/AS3 interoperations, which is great, but still, it's a far from ideal solution, since it's pretty fiddly and the JavaScript code doesn't always work properly in iOS).

Hi again jackson@mja.
I've given your scroll component a try just for some static texts, and I've found quite a few important bugs:
1. If the referenced sprite/movieclip is shorter than the scrolling area, it starts bouncing infinitely in a quite funny way,
    which renders the component unusable. Sometimes it even happens when the content is not shorter.
2. If your component is used inside another sprite/movieclip which is added dynamically from code ("addChild(mySprite);"),
    it doesn't work and stops with an error, because the EventListener for mouseDownHandler is being added to this.stage
    in the constructor, but a dynamic movieclip doesn't have access to the stage while in the constructor step (unless it is
    already in the stage added in the Flash IDE, such as in your FLA example). To fix this, I've added the following code
    to the ScrollArea() constructor:
this.addEventListener(Event.ADDED_TO_STAGE, init);
this.addEventListener(Event.REMOVED_FROM_STAGE, close);
    And then I've added the following listener functions:
private function init(event:Event):void {
this.removeEventListener(Event.ADDED_TO_STAGE, init);
this.stage.addEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler);
private function close(event:Event):void {
this.stage.removeEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler);
3. Also, the scrollbar is only correctly rendered if the scroll area is located at the up and left corner of the stage. To put text somewhere else, the component must be put inside a movieclip.
4. This is not really important, but I've found the following variables are never user and so I've removed these lines:
var xy:Point = this.localToGlobal(new Point(this.x, this.y));
var wh:Point = this.localToGlobal(new Point(this.width, this.height));
var sign:int = sign(obj[i]);
I hope this can help you improve your classes.
Best regards,
OMA2k

Similar Messages

  • Porting existing Android native app to Adobe AIR

    I indent to port a existing Android native app to Adobe AIR for android. Reasons: To use my existing AS3 skills, "cost" for native is too high and soon port it to iOS.
    Difficulties I face here:
    Existing app package, say "com.mygame.myapp" has to be retained. By using FB with AIR SDK, we get a "air." prefix to the package name. It becomes "air.com.mygame.myapp".
    Will this solution still solve the problem in AIR SDK removing "air." prefix from package name has any working solution!?.
    The help link http://helpx.adobe.com/air/kb/opt-out-air-application-analytics.html is dead now. iOS specific is found here Opt-out | Adobe AIR app analytics | iOS
    Please suggest me a Mac suitable solution.
    In Android, using a ".keystore" file, we need to export as the ".APK" file. In AIR, if we publish using a new ".p12" signature file would it be compatible with Google Play, and it rules.
    App's existing users should find difficulty in upgrading the app.
    Another unanswered thread Possible to remove "air." appended on package and target a .keystore rather than .p12?
    Thanks a lot.

    I was able to figure it out with the help of Jeff Ward Ooh, I just discovered how to easily remove the 'air.' prefix when packaging…
    Tested and works fine with AIR SDK 15, Mac OSX 10.10 Yosemite. actionscript 3 - Android App ID prefix problem - Stack Overflow
    java -jar /FULL_PATH_TO_AIR_SDK/lib/adt.jar -package -target apk-captive-runtime -storetype jks -keystore <DEVELOPER>.keystore -storepass <PASSWORD> Main.apk Main-app.xml Main.swf -extdir /PATH_TO_ANE_DIRECTORY

  • Duplicate session error using Flash Remoting from Air 3.4 Mobile Apps ( IOS and Android ) with CF10

    We're getting the "duplicate session" error using Flash Remoting from Air 3.4 Mobile Apps ( IOS and Android ) with Coldfusion 10 Standard.
    faultCode:Server.Processing.DuplicateSessionDetected faultString:'Detected duplicate HTTP-based FlexSessions,
    generally due to the remote host disabling session cookies.
    Session cookies must be enabled to manage the client connection correctly.' faultDetail:'null'
    Have read most of the docs about this error -all to do with LCDS
    Notes:
    Not using LCDS,
    No Remote Calls from loaded Sub-Apps,
    No Errors from the Flex Web App which is pretty  much identical and calls the same cfcs.
    The error does not happen all the time and is hard to reproduce - say 5% of app sessions at a guess.
    Could it be a two first time remote calls hitting the server together before a session is set up?
    Our remoteObjects are in two places 1) Main Application.mxml and within a class compiled into the main app - can't see how this would be an issue.
    I enabled session management for the CFCs in Application.cfc but still occurs. Is this neccessary - it's not in any docs?
    Could this be something to do with the app not being shut down - as is typical with mobile users? When they resume use after a day or two surely a new session will be created?
    Please advise thank you.

    For our profect I think this issue was caused as follows:
    Believing that remoting was full asynchronous we fired a 2 or 3 remote calls to the server at the same time ( within the same function ) - usually when the users goes to a new section of the app.
    This seemed to trigger the duplicate http session error since according to http://blogs.adobe.com/lin/2011/05/duplication-session-error.html  two remote calls arriving before a session is created will cause 2 sessions to be created.
    Our current solution ( too early to say it works ) is to daisy chain the multiple calls together .
    Also there seemed to be an issue where mobile apps that never quit ( thanks Apple! )  caused the error when activated after a few hours.
    I guess the session expires on the server and the error above occurs on activation.
    So the mobile apps now ping the server with a remote call when activated after sleeping for more than one hour.
    All duplicate http errors are silently caught and reported.
    Fingers crossed we won't get any more!

  • Detected duplicate HTTP-based FlexSessions in CF10 with Air Mobile (3.4) IOS and Android apps

    We're getting the "duplicate session" error using Flash Remoting from Air 3.4 Mobile Apps ( IOS and Android ) with Coldfusion 10 Standard.
    faultCode:Server.Processing.DuplicateSessionDetected faultString:'Detected duplicate HTTP-based FlexSessions,
    generally due to the remote host disabling session cookies.
    Session cookies must be enabled to manage the client connection correctly.' faultDetail:'null'
    Have read most of the docs about this error -all to do with LCDS
    Notes:
    Not using LCDS,
    No Remote Calls from loaded Sub-Apps, 
    No Errors from the Flex Web App which is pretty  much identical and calls the same cfcs.
    The error does not happen all the time and is hard to reproduce - say 5% of app sessions at a guess.
    Could it be a two first time remote calls hitting the server together before a session is set up?
    Our remoteObjects are in two places 1) Main Application.mxml and within a class compiled into the main app - can't see how this would be an issue.
    I enabled session management for the CFCs in Application.cfc but still occurs. Is this neccessary - it's not in any docs?
    Could this be something to do with the app not being shut down - as is typical with mobile users? When they resume use after a day or two surely a new session will be created?
    Please advise thank you.

    For our profect I think this issue was caused as follows:
    Believing that remoting was full asynchronous we fired a 2 or 3 remote calls to the server at the same time ( within the same function ) - usually when the users goes to a new section of the app.
    This seemed to trigger the duplicate http session error since according to http://blogs.adobe.com/lin/2011/05/duplication-session-error.html  two remote calls arriving before a session is created will cause 2 sessions to be created.
    Our current solution ( too early to say it works ) is to daisy chain the multiple calls together .
    Also there seemed to be an issue where mobile apps that never quit ( thanks Apple! )  caused the error when activated after a few hours.
    I guess the session expires on the server and the error above occurs on activation.
    So the mobile apps now ping the server with a remote call when activated after sleeping for more than one hour.
    All duplicate http errors are silently caught and reported.
    Fingers crossed we won't get any more!

  • Any native extensions for iBeacon on iOS and Android?

    Any native extensions in AIR 13 for iBeacon on iOS and Android?

    Sure is, complete cross-platform, Android/iOS, iBeacon interface. You can find it here:
    http://distriqt.com/product/air-native-extensions/beacon
    >> Moved to here: distriqt // air native extensions

  • Any native extension for checking memory and cpu/gpu usage of ios and android?

    I need to be able to see how much memory/cpu/gpu an app uses while running for ios and android.

    Hmm, maybe it can be done with code already included in flash and adobe air, it seems... donno.. found stuff like:
    freeMemory
    property
    freeMemory:Number  [read-only]
    Language Version:
    ActionScript 3.0
    Runtime Versions:
    Flash Player 10.1, AIR 2
    The amount of memory (in bytes) that is allocated to Adobe® Flash® Player or Adobe® AIR® and that is not in use. This unused portion of allocated memory (System.totalMemory) fluctuates as garbage collection takes place. Use this property to monitor garbage collection. 
    Implementation
        public static function get freeMemory():Number
    Related API Elements
    privateMemory
    totalMemory
    totalMemoryNumber 
    donno how to use it...

  • Native Mobclix Extension for iOS and Android

    I'd like to announce to everyone that my Mobclix ANE for both iOS and Android is now available.
    You can view the API, supported events, and download a full functioning demo from http://www.airextensions.com or directly by clicking http://bit.ly/mobclixANE
    Support iOS 4.3 and greater,  support for iPad ad sizes, receive event callback on all Mobclix events in actionscript, AdMob and iAd support for iOS, same API for both iOS and Android, support device rotation and more.
    Hope you like it. 
    Mark Andrade
    Sputnik Games

    Well nothing prevent you from mixing flascc with native extension.
    Also, I think that you can also use domain memory in AS3 with the Bytearray class (not sure about that).
    Flascc vs normal as3 is mostly a question of language (portability) Do you want to write as3 or c++?
    Native extension give you speed and native platform access(platform specific feature).
    So, you should think about it this way:
    AS3, run in flash and air. Is sandboxed. Can use domain memory, but it's a bit harder to leverage than flascc.
    Flascc, run in flash and air. Is sandboxed, Can use domain memory. Give you the potential of leveraging the hundreds of opensources lib already out there.
    Native extension, run ONLY in air. Is not sandboxed. Native memory management. Also let you leverage the c++ lib. 
    The best (in my opinion) is to write native code for mobile and desktop (no air or flascc involve) and use flascc for the flash/web platform. It's harder, because you have write portable native code (lots of abstraction), but you mostly have the same problem with native extension.

  • Adobe Reader for iOS and Android & Rights Management

    This week's release of Reader for iOS and Android devices incorporates support for accessing files secured by Adobe LiveCycle Rights Management.
    As you are probably familiar, LiveCycle Rights Management protects sensitive documents by encrypting them with industry-standard AES encryption and enabling central management of their access permissions. Protections persist even when documents are accidentally distributed via email, the cloud, or saved on a lost mobile device.
    Many of the core capabilities that you are used to on the desktop versions of Acrobat and Reader are now supported when you are on the go on your tablet or mobile phone. We intend to incorporate additional functionality in future releases of these mobile devices and look forward to your feedback.
    We've had several questions thus far about how this works. More information about the product, as well as a link to an FAQ can be found at:http://blogs.adobe.com/security/2011/10/just-released-adobe-reader-10- 1-for-ios-and-android.html
    Jonathan

    Hello Jonathan,
    is there an way to trigger iOS download to immediately open using "Adobe Reader"
    instead of using the default Previewer (showing an plain empty white window) and then re-open it using "Open with" ?
    Is there an MIME-Type to indicate IRM-protected PDF-files?
    Thanks,

  • Does Adobe Reader for iOS and Android Support Encryption with PKI Solution?

    Hello there,
    I have been searching for an answer whether or not Adobe Reader for iOS and Android can read encrypted PDF files by public key infrastructure solution (encrypted by a public key, to be decrypted by its private key pair), but to date I have not found the answer.  From the Adobe web site, I understand that Adobe Reader for Android supports to read encrypted document by AES256 but it does not mention about PKI.  I had to guess that it does not support encryption with PKI but I would just like to get a formal answer, and would like to know whether Adobe Reader Mobile will support it. 
    Thanks!
    Masaya

    Hi there,
    Now we have Acrobat DC Mobile but I am still wondering if encryption/description using PKI solution (digital certificates) is supported.  Could anyone let me know?  Thank you.
    Masaya

  • Adobe Flash Player for mobile (iOS and Android) devices

    I have both Apple iOS and Android devices, and can't install Adobe Flash Player on either.  It appears that Adobe no longer provides Flash Player for any mobile devices.  The company I work for uses a a company called Paychex for payroll and time & labor, and that program requires Adobe Flash Player to function.  I am sometimes in areas where I cannot use my computer and must rely on a mobile device to clock in and out, but I can't do that because you have stopped providing the program.  What do I do now?????

    iOS has never been compatible with Flash, and per Apple, never will be. It's a lost cause hoping for an iPad Flash Player.
    Additionally, Android dropped ALL support for Flash last year. Adobe stopped development of Flash for Android shortly afterward.
    See: "Why can't I install Flash Player on my Tablet?" (Kindle or Samsung Galaxy)
    The reason both Android and Apple gave for their Flash support decisions is that Flash content is very processor consumptive and it eats battery life in mobile devices.

  • How can you enable back the Android native Menu button in AIR 2.7?

    I've noticed in AIR 2.7 for Android, that now the bottom icons in Android 3.0 Honeycomb are hidden (replaced by small dots) in AIR 2.7, whereas in AIR 2.6 they were always visible. That's cool. Since the bottom bar can never be hidden in Android 3, at least now those icons are less visible (unless you intentionally touch the bottom bar, then the icons show up for a few seconds).
    BUT I also noticed in AIR 2.7 compiled apps, the native "Menu" icon is not visible anymore, even after touching the bottom bar. In AIR 2.6 you could see and press that button (which can be captured from AIR so you can show a custom settings menu or whatever).
    So, quoting the subject --> How can you enable back the Android native Menu button in AIR 2.7?

    There is a work around and a reason for the menu issue.  Honeycomb doesn't natively support a menu softkey, it is only to support old apps comiled in phone API levels.  If you compile a Honeycomb app in 2.7 or 3.0, it is expected you manage the settings within the larger tablet UI framework.  See below link for more info and work around. 
    http://forums.adobe.com/message/3964792#3964792

  • What I need to create and publish a magazine for iOS and Android?

    Hi!
    I would like to know what I need to design, create and publish a magazine for iOS and Android. I would also like to know what products I need, what price would you pay and what process I have to follow to carry out this work.
    Thanks in advance!

    It is NOT possible to create a Single Edition app for Android. Single Edition apps work only on the iPad.
    You can create Single Edition apps using any account—CC, Pro, or Enterprise—and if you cancel your DPS subscription, these Single Edition (or single-folio) apps are still available in the App Store as long as you maintain your iOS account with Apple.
    For multi-folio apps, the app container is downloaded from an app store, but the folios are downloaded from the Adobe Distribution Service. If you cancel your DPS subscription, the Adobe Distribution Service basically shuts down for that app. New users can still download your apps from an app store, but the library will be empty. Existing users can still view the folios they've downloaded, but they can't get any updates or new folios.

  • A universal video format for iOS and Android?

    Hello
    I have open the Folio that I have originally made for the iPad on a Samsung Galaxy Tab and I see a lot of differences in the way videos are played.
    It seems that for the iPad I need to always use the H264 codec, but on a Samsung galaxy tablet this is not the good way to do it. After various tests I see that I must use the F4V format (which uses the H264 codec) in Adobe Media Encoder CS5.5
    The problem is that F4V with the H264 codec can't be read on the iPad.
    Thus...
    - Or there is only one method to create video files that can be read on iOS and Android and it would be great if somebody can tell me which app and which presets to use...
    - Or we must always create two different video exports, one for iOS and the other one for Android.
    In DPS' s user manual, this issue is not covered.
    Thank you.

    Branislav Milic wrote:
    Re Up again.
    What do I need to do to have an answer to a basic question and a necessary issue ? To buy and Adobe DPS Pro licence ? ;-)
    Well, you should also know that in addition to getting your questions answered more promptly, Adobe has top secret 'DPS Pro/Enterprise Lounges' in several major cities.  These are not unlike 1st Class Lounges that can be found in airlines.  You get free beer, pretzels, and free wifi.
    Okay, now getting serious:
    1. HAVE YOU TRIED HANDBRAKE TO ENCODE THE VIDEO?  If not, stop whatever you're doing and give it a try.  Conversion software is not all the same.  Adobe's H.264 is better than it's ever been, but it's a pretty well-known fact that Handbrake is the BEST encoder out there for mp4/H.264.  Relying on Adobe to always give you satisfactory results for video conversion is FOLLY. 
    2. I've read in several places the Galaxy has trouble with mp4 files.  There's not a million threads with this news; actually only a handful.  Nonetheless, the news is out there.  I created mp4 files for viewing on a Motorola Xoom and they played FLAWLESSLY.  That's the trouble with the Android platform - every manufacturer is free to mess with the code and put their own wrapper over the OS.  Things get messed up, and consistency of platform becomes a problem.

  • Android - This application requires adobe air

    I have made an android app and installed on the device.
    i have searched the android market for the Adobe Air runtime and cannot find it.
    when i debug the app it says
    "This application requires adobe air. Install Adobe Air now?"
    but when i click the install button the response back is
    ! Not Found
    The requested item could not be found.
    any ideas please.

    i think it is something to do with installing the runtime from the cmd prompt
    -e install -r <runtime.apk>

  • Use of compiler argument -swf-version=18 for AIR3.5 IOS and Android with Flex4.6 ?

    I've just downloaded the latest Air 3.5 SDK and merged it with Flex 4.6 inside Flashbuilder.
    This leaves the merged SDK with 2 playerGlobal.swc files. 11.1 and 11.5 ( swf version 18 )
    For IOS and Android projects do I need to add the compiler argument -swf-version = 18 so that the compiler uses the latest version of the playerGlobal.swc ?
    Is this done automatically ?
    Is it essential  /  undesirable ?
    Any clarification is greatly appreciated

    I've just downloaded the latest Air 3.5 SDK and merged it with Flex 4.6 inside Flashbuilder.
    This leaves the merged SDK with 2 playerGlobal.swc files. 11.1 and 11.5 ( swf version 18 )
    For IOS and Android projects do I need to add the compiler argument -swf-version = 18 so that the compiler uses the latest version of the playerGlobal.swc ?
    Is this done automatically ?
    Is it essential  /  undesirable ?
    Any clarification is greatly appreciated

Maybe you are looking for