Mobile apps in pure AS3

    Hi there,
I'm wondering what components (such as list control, buttons, date picker and so on) others are using  when they develop pure AS3 mobile apps for IOS.  Is there a book that you can suggest for me to help understand how components are built in AS3?
Thanks

If you want performance you'll need to use Stage3D to utilize the GPU. The flash/flex display list will never match the speed of Stage3D. The mx and spark components will never feel as 'native' as coding in objective-c until they literally transcode from AS3(4?) to Obj-c and compile to arm. Spark is more optimized than mx so it does make MXML (Flex) a viable alternative. It certainly does not feel native however.
You should really consider how 'native' you need it to feel. People, I find, are quite tolerant. You may be trying to overachieve in an area that less important than the actual functionality your app provides. Users will use an interface that's not buttery smooth if you actually provide a service they desire.
Pure code is just if you really want to do everything yourself.  There's really little out there to help you. The essence of going the "pure AS3" is that you are going to code it all yourself. All my projects aside 2 are pure AS3 and I rely on Starling/FeathersUI heavily to provide the closest to "native like" feel. For the only truely "native like" feel, you'll need to code entirely on the GPU.
There's nothing built-in like Flex shares data view to view. If you go pure as3 and write your app all on your own terms then simply keep that desire in mind from the start and code yout hand made view system to either pass references to the data or make a singleton registry to share data. Overall, in pure as3, be prepared to do it all manually. You have little to none of the automation of Flex.

Similar Messages

  • Scrolling Mobile List in Pure AS3?

    I'd like to use a scrolling list in one of my AS3 mobile projects. I like the one built for Flex, but I do not wish to use flex as that would be overkill and I already have the project written in AS3.
    Does anyone know of any pure AS3 scrolling list components for mobile?
    thanks,
    Jack

    That's the flex component I wish to immitate. But since I am not using Flex, I cannot use the spark component. (I wish I could use spark components, but Adobe built them in such a way that is nearly impossibnle to use in a non-flex project.)
    I am hoping there is a pre-built nonFlex, pure AS3 equilevent. 

  • How to remove Button from Flex Mobile app actionbar with AS3?

    How exactly would i remove a Button from the actionBar "actionContent" in a flex mobile app?
    I tried these:
        this.stage.removeChild(menu_btn);
        this.removeChild(menu_btn);
        stage.removeChild(menu_btn);
        this.stage.removeElement(menu_btn);
        this.removeElement(menu_btn);
        stage.removeElement(menu_btn);
    I'm not having any luck with those. Im guessing where it is located in the actioncontent isn't considered the stage. Any ideas?
        <s:actionContent>
                            <s:CalloutButton id="menu_btn" icon="@Embed('assets/images/menu/menu_btn.png')" visible="false">
                                      <s:VGroup>
                                      <s:Button id="btn_one" label="Button" />
                                      </s:VGroup>
                            </s:CalloutButton>
                  </s:actionContent>
    The actionContent is setup like that, I know like with most mxml stuff I could give it an ID to reference it but im not sure how how to give the action content an id number `<s:actionContent id="testID">` does not work. So how can i access this to remove it? making it invisible isn't cutting it i need to actually remove it.

    Does this do what you are looking for?
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
        <s:actionContent>
            <s:Button id="excess" label="excess" />
            <s:Button label="remove" click="this.navigator.actionBar.actionGroup.removeElement(excess);" />
        </s:actionContent>
    </s:View>

  • AIR 3.9 - mobile app starling, pure as project and interstitial ads forces close

    Hi there,
    we have a pure as project in which we updatet the air version to 3.9.
    The app uses starling and the admob extension - > http://www.adobe.com/devnet/air/articles/admob-ane-android.html
    If an admob interstitial is shown the app crashes and starts again.
    With AIR 3.8 there is no problem with this.
    Perhaps it has also something to do with this bug:
    https://bugbase.adobe.com/index.cfm?event=bug&id=3364803
    The debugger shows nothing, the app only shows a black screen after closing the interstitial ad and restarts.
    We also have interstitial ads in a project that is not pure as and we use AIR 3.9 in this app. No problem here.
    We don't use starling in this non pure as project so perhaps the issue has something to do with starling. The strange thing is that it worked nicely with AIR 3.8.
    Some ideas?

    Hi, are you sure the issue has been resolved?
    I am using the Admob from the Alchemy. The thing is, i come across the crash report more and more often from the users, as stated in the thread.
    Do you mind sharing some codes how to display admob ads?
    Can i just use the code at the beginning of the app, as below?(do i need to stop starling or sth?) Thanks in advance.
    var adMobManager:AdMobManager = AdMobManager.manager;
    if(adMobManager.isSupported)
              adMobManager.bannersAdMobId = "ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx";
              adMobManager.createBanner(AdMobSize.SMART_BANNER,    AdMobPosition.BOTTOM_CENTER,"BottomBanner",null,true);
              adMobManager.showAllBanner();

  • Flex mobile app attach complex AS3 movieclip SWC

    I have a Flex mobile project and I want to place a complex movieclip on the stage that has its own classes and exported from Flash CS5.5 as a SWC.
    OK no worries there but as soon as I have addChild called in the Flash movieclip/SWC.. Flex errors and cannot access null object reference.
    I also went down the Flex Component Kit though then I can't seem to access the classes??
    Any thoughts or suggestions appreciated.

    Did you ever find a solution?

  • Brain Fart on pure AS3 Project

    I Generally hang out in Flex Land, but by no means would be considered a new guy to the world of AS3.  I am currently creating a pure AS3 app and I can't get the darn thing to get a BG color. I  have the following:
    package
    import flash.display.Sprite;
    [SWF(width='800',height='600',backgroundColor='0xff0000',frameRate='24')]
    public class Surprise extends Sprite{
    public function Surprise(){
    this.graphics.beginFill( 0xff00ff, .5 );
    this.graphics.drawCircle( 0, 0, 10 );
    And all I see is that little purple circle, no Red BG. I hope I am missing something foolish, for i feel quite foolish posting such a stupid question on line. 
    Thanks.
    -Andrew

    Turns out the code was fine, I looked at the HTML that was being generated to render the AS3 file, and that was crap.  Deleted the bin-debug folder and it created new html for me and works great.    

  • Cleaning Up Vector (array like) in pure AS3 project

    I have been learning a game type animation from a tutorial at this site: http://www.emanueleferonato.com/2011/11/08/as3-version-of-nodes-engine-full-playable-game- with-infinite-solvable-levels/. Source code there online and also available for download.
    Want to try to set up additional levels of difficulty, involving adding more draggables and targets. In order to change this level during a game, (with a set of radio buttons and change handler noting the change in radio button selection) using a pure AS3 and single frame necessitates removing (cleaning up) the draggables and targets already placed on stage in 2 Vector type arrays.
    Have tried various versions of removeChild, removeChildAt with no success.
    Here is the relevant AS3. Maybe someone could suggest a way to clean up/remove all Vector members before the new ones are instantiated on stage. If not removed, they end up at 0,0, one atop the other, while the new ones are randomly placed onto the stage.
    Thank you for your help.
    public class Main extends Sprite {
            private const DRAGGABLES:Number=4;
            private const TARGETS:Number=5;
            private var draggableNode:DraggableNode;
            private var target:Target;
            private var laserCanvas:Sprite=new Sprite();
            private var draggableVector:Vector.<DraggableNode>=new Vector.<DraggableNode>();
            private var targetVector:Vector.<Target>=new Vector.<Target>();
            private var isDragging:Boolean=false;
            public function Main() {
                addChild(laserCanvas);
                placeDraggables(false);
                placeTargets(false);
                shuffleDraggables();
                drawLaser();
                stage.addEventListener(MouseEvent.MOUSE_MOVE,moving);
    private function placeDraggables(justMove:Boolean):void {
                for (var i:Number=0; i<DRAGGABLES; i++) {
                    if (! justMove) {
                        draggableNode=new DraggableNode();
                        addChild(draggableNode);
                        draggableVector.push(draggableNode);
                        draggableNode.addEventListener(MouseEvent.MOUSE_DOWN,drag);
                        draggableNode.addEventListener(MouseEvent.MOUSE_UP,dontDrag);
                    do {
                        var wellPlaced:Boolean=true;
                        draggableVector[i].x=Math.floor(Math.random()*600)+20;
                        draggableVector[i].y=Math.floor(Math.random()*440)+20;
                        for (var j:Number=i-1; j>=0; j--) {
                            if (getDistance(draggableVector[j],draggableVector[i])<150) {
                                wellPlaced=false;
                    } while (!wellPlaced);
            private function placeTargets(justMove:Boolean):void {
                for (var i:Number=0; i<TARGETS; i++) {
                    if (! justMove) {
                        target=new Target();
                        addChildAt(target,0);
                        targetVector.push(target);
                        target.alpha=0.5;
                    do {
                        var wellPlaced:Boolean=true;
                        var segment=Math.floor(Math.random()*DRAGGABLES);
                        var p1:Sprite=draggableVector[segment];
                        var p2:Sprite=draggableVector[(segment+1)%DRAGGABLES];
                        var angle:Number=Math.atan2((p2.y-p1.y),(p2.x-p1.x))
                        var targetDistance:Number=Math.random()*getDistance(p1,p2);
                        targetVector[i].x=p1.x+targetDistance*Math.cos(angle);
                        targetVector[i].y=p1.y+targetDistance*Math.sin(angle);
                        for (var j:Number=i-1; j>=0; j--) {
                            if (getDistance(targetVector[j],targetVector[i])<50) {
                                wellPlaced=false;
                        for (j=0; j<DRAGGABLES; j++) {
                            if (getDistance(draggableVector[j],targetVector[i])<50) {
                                wellPlaced=false;
                    } while (!wellPlaced);

    about coding, this is an excerpt from a book i wrote (Flash Game Development: In a Social, Mobile and 3D World),
    it's taken from a chapter that shows how coding typically evolves for a novice with a main idea and then progresses as more and more features are added:
    Everything works the way it should but there is a major problem. Actually, there is more than one major problem and there are some minor problems but I will address the biggest problem, first: my Main class is quickly becoming a mess.
    I have all this code for controlling player in Main and I will need more code which will make Main an even bigger mess. In addition, I will need to add an introduction view (by view, I mean what is presented on-stage) to give some information about the game and I should probably allow users to customize the keys they use for movement. Not everyone likes using the arrow keys. (Heck, I do not like using the arrow keys.) In addition, I will need a game-over view, eventually.
    I am heading for a major mess in Main. So, while I can continue to put all my coding in Main, that is just like putting all your code in frame 1 of the main timeline and that bypasses one of the biggest advantages of OOP, encapsulation.
    By encapsulation, I mean each class should contain only the information it needs to do its job. I want my Main class to control which views are presented on-stage. When the game starts, Main will add an intro view. When the user is finished with the intro view, Main will remove the intro view and add the game view (where the player and enemy tanks will fight) and when the game is over, Main will remove the game view and add the game over view.
    I will use an IntroView class to control what happens in the introduction view and I'll use a GameView class to monitor what happens when player and enemy fight and an EndView to control what is displayed when combat is over - maybe the user's score or a taunting message.
    I do not think I want the GameView class to control the fighting. I want all the code that controls player to be in the PlayerTank class and all the code that controls enemy to be in the EnemyTank class. That will simplify Main so it is easier to work with, will provide better encapsulation and will make it easier and faster to find the code I need to edit when changes and additions are needed.
    While I am simplifying my code, I am going to create a keyboard controls class (KBcontrols) to store the key codes for moving left, right, up and down. I'm going to use static methods so I can assign those key codes in IntroView and use them in PlayerTank.
    I do not want to be forced to pass those key codes back-and-forth because I am going to have one PlayerTank instance in IntroView (so users can test the keyboard controls) and a different PlayerTank instance in GameView. In addition, I may later want to allow users to re-define the keyboard controls while in GameView or elsewhere. I could make KBcontrols a singleton class but I feel like making it a class with static properties for no special reason.
    (Actually, I already used a singleton class in Chapter 4 for a shape-based hit test that I showed in the BitmapData section. So, showing the other way to make data easily available among several classes is reasonable.)
    There are quite a few things I am thinking about adding (like scoring and a timer and enemy intelligence etc) and I do not know exactly what classes I'm going to have at the end of this project and I sure do not know all the code that will be in each class that I anticipate will be needed. That may be a little unsettling but it is how applications and games evolve (at least, when I am the developer).

  • Kind Chef mobile app, used Starling and Adobe AIR

    Hi everyone,
    Recently we were busily working on an idea called "KindChef" which is a system that helps restaurants and we as customers.
    We have started a campaign for it on Indiegogo site, which is a crowdfunding site backed by Google as some of you may have heard about it, so that we can find the ones who are interested in the idea and can back us and contribute to it to help us make it happen...
    here is the campaign link: http://igg.me/at/kindchef/x/5769968
    We have developed a MVP (Minimum viable product) mobile app for it, using Starling and Adobe AIR. But it's not the end product and is not so optimized yet. It's just a sample app to show how the system works, but yet so many other features will be added to it's release version as we have discussed on the campaign page.
    We're also going to develop a control panel for restaurants too to manage their restaurant better. we're also going to develop a desktop app for them using Adobe AIR.
    Honestly, there are two reasons why I am talking about it here:
    1) the  Web developer’s perks, which provides AS3 programmers with many useful designs and OOP code snippets that we have used while developing the project and can help you a lot on your projects.
    Also we are giving away all of the Adobe AIR Native Extensions that have been used inside of the project.
    2) the second reason is to spread the word. Because sharing a campaign is a really important thing as Indiegogo counts this as a positive point for the campaigns, so if you just share it you have helped us a lot in our way,  or you may also contribute to it
    Please visit the link above and find more information about it for yourself.
    The most important way that you can help us, is by sharing the campaign link with your friends.
    Please feel free to ask any questions about the whole idea and system or the app.
    Best,
    MyFlashlab team.

    http://www.google.com/tv/spotlight-gallery.html

  • How to use ScaleNine themes to skin an Adobe Air Mobile App

    Hi,
    I'm rather new to Adobe Air development But I really like it! Now that I've created my app I would like to skin it. I've found ScaleNine (http://www.scalenine.com/gallery/gallery-1.php) which has ready made cool skins for Flex and Air. I downloaded the samples and they compile and work beautifully. HOWEVER: I can't seem to be able to use them to skin my Air mobile app.
    Can anyone post an example ViewNavigatorApplication themed with one of the themes there? this one (http://www.scalenine.com/themes/blend/Blend.html) looks as though someone tailored it to my app :-)
    Thanks a lot!
    Avi

    I don't know how your application is structured, but if you can split sections off into separate SWFs(plain AS3 document) then you could host those section SWFs online and require the user to download them on first run.
    You could use the FileReference object to download the SWFs, save them to the File.applicationStorageDirectory, and then display/load them up with the Loader object when needed from the app storage directory. You would possibly need to check to see if the files are present at every boot of the app though as a user could "Clear Data" or "Clear Cache" of the app in the Settings of their device and one or both of those could/would delete the downloaded files.
    FileReference - Adobe ActionScript® 3 (AS3 ) API Reference

  • Burrito Mobile Apps Extremely Slow

    I just deployed a simple little app, built with Adobe Burrito. it has a list view for locations and a map view for Google maps. You touch a location in the list and it displays your location (obtained via GPS) and the selected location. Simple. Yet, it deploys as a 650K app and runs like tortoise in quicksand. And, I'm on a HTC Evo, which has a snapdragon processor.
    First, seems like the deployed apk is way to big, and second, it's an embarrasment in terms of performance when compared with other apps. The painting of the map is like watching a 300 baud modem display an old telnet session.
    I hope Adobe plans to make big improvements or this is going nowhere in the arena of mobile app development.
    Ron Grimes

    Certainly. I would be glad to share the specifics. I have the following classes:
         StationLocator (MXML class):         1,627 bytes
         Views
         StationLocatorHome (MXML class):     2,597 bytes
         MapView (MXML class):                4,789 bytes
         Supporting Classes
         Location (AS3 class):                4,132 bytes   
         GeographyEvent (AS3 class):            349 bytes
         GeographyWSAO (AS3 class):           5,641 bytes
         3rd Party Components
              map_flex_1_20.swc                   90,278 bytes
    Of course, when you generate a new Mobile App project, it creates the StationLocator and StationLocatorHome MXML classes, based on your project name. So, I have those two MXML classes, plus a MapView class for Google maps. The rest are AS3 classes, along with the Google mapping component.
    I've tried deploying it both with the Framework linkage set to "Merged into code" and "Runtime shared library(RSL)". Both perform basically the same. Lousy!
    I'm going to re-do this project in Eclipse Java environment with the Android plug-in and SDK, and see how that performs.
    Ron

  • Creating web page now, want mobile app later.  Best practices?

    I've been writing actionscript on and off for a long time now, but have always used the Flash IDE.  I'm hoping to build my next project using Flex Builder because I'm more of a code jockey than a designer.  I've got Flex Builder 3.
    I'm involved with a modest mobile game project.  We're hoping to build a simple game and it seemed logical to do a quick-and-dirty version of the game in actionscript so the project members and a select audience might be able to evaluate the game dynamics in a browser before we spend a gazillion dollars building the game for iPhone and Android platforms.
    It is my sincerest hope that I might develop my code in Actionscript and MXML and use this code to build mobile apps for iPhone, iPad, and Android without having to rewrite everything in Objective C or Java or whatever other language might be in play at the time we get it finished.
    Q1: Is this possible?
    Q2: Can anyone sketch out for me an overview of the process whereby one exports a Flex project to a mobile app platform?
    Q3: Can any seasoned developers tell me the big "gotchas" to watch out for?  For instance, I'd hate to incorporate a component that would not export to one of the mobile platforms.
    Any help would be greatly appreciated.

    Thanks for your helpful post.  That's encouraging to know that I might be able to get the Flex 4.5 SDK without upgrading my IDE.  I'm a big fan of Eclipse and am considering trying to just use Eclipse with a Flex plugin. I certainly hope I might be able to download the latest eclipse and install a 4.5SDK plugin.  Might as well shoot straight for the latest SDK, right?  It would be great to avoid the $300 investment.
    From your post, it sounds as though the Flex 4.5 sdk will be required for one to access the mobile phone features (gps, camera, accelerometer, etc.) which makes sense.  The ability to go actionscript->mobile was only recently announced.  Personally I think this capability is brilliant on Adobe's part.
    I'm still wondering about the "best practices" aspect. Obviously the idea of a mouseover does not apply in the context of a touchscreen.  As I recall, the events exposed by Cocoa Touch (or other touch screen APIs/libraries) don't have the same Mouse/Pointer events as the AS3 that I know.  The point of this post (which is working well so far thanks for the input) is to try and make sure that I avoid building an app which uses features unavailable in a mobile context.  I'm starting to wonder if skipping the web page advice is being given because they mobile and web page paradigms are so different.
    I still assert that the web page stage would be much easier to bring in testers -- meaning non-technical people who wouldn't know the first thing about installing an app on their phone. I'm talking about an audience of dozens or possibly hundreds and just can't provide them all guidance about getting the app installed.

  • Mobile App - CS4

    Hi, I am trying to make a mobile phone application with CS4. I have a couple questions:
    1. Do I need to install a new framework to get touch events and accelerometer properties working?
    2. Do I need to include some sort of flash player 10.1 plug in with my files to make it work properly on mobile phones?
    3. Can I simply make a normal as3 project, with a .fla made in Flash CS4, and have mouse events work as finger presses for a touch screen phone?
    Thanks

    I'm not quite sure it can be done so "simply" as all that-- Adobe had to engineer a special 'app packager' utility for the iPhone in Flash CS5, and I believe (thanks largely to Steve Jobs and his infamous iOS 4 terms of service clause 3.3.1) that they are working on an analogous utility for packaging Android apps now.  Since I don't know exactly how these utilities work I can't comment on whether they are absolutely necessary for mobile app creation or merely a convenience, but it seems likely that given the complex and highly disparate architecture of mobile devices these special utilities probably are necessary for creating apps out of AS3 projects (and therefore you'll probably need Flash CS5).  It would be quite interesting if my conjecture is wrong and there is a way to package apps for mobile devices without any special utility; I'll definitely be keeping an eye on this thread for Adobe official replies!   
    <edit>
    I just saw this thread: http://forums.adobe.com/thread/696642?tstart=0
    It seems from the tutorial vid linked in the last post that you can create apps for Android via Adobe AIR, so perhaps (for Android devices at least) CS4 would suffice... I can't listen to the sound now so for all I know the first words could be 'you need CS5 for this to work' but from the visuals it looks promising.  Take a look!

  • SAP Mobile app Stock photo not work for network location

    Hi Experts
    I found if we use network location path (e.g.
    servername\pic folder\) in SAP Business One General Settings -> Path, Picture Folder, then if we logon SAP B1 Mobile app from iPad/iPhone, and try to open stock photo, we will get error:
    Processing Failed
    Internal server error: contact your system administrator
    It looks like it only work for local path, e.g C:\pic
    Even we put path as :
    local pc name\pic folder, it is also not work.
    Any idea about this?
    Thanks
    Tim

    The first link is a temporary fix for a machine that only one or two people will use. This will not fix the Library Machines that some 3000 users can use at anytime. I can not pre-add all these users every time we image a machine. We also loan out laptops and I need these machine to wirelessly login dynamically to the domain. But I also need these machine to allow access if these machine are removed from our campus and the wireless access is not available.
    Thank again for the help and I hope someone at Apple can fix this soon. I going to have a hard time telling the client that thay can not use the OS that came with they're machine.

  • Integrating a PHP Web App with an Existing Azure Mobile Services and Mobile App

    I've got an existing mobile app that is integrated with Azure's mobile services. The mobile services are currently connected to Azure Active Directory with MFA enabled. I'd like to build a separate PHP-based web application (Azure VM) that uses this existing
    mobile service and authentication.
    I reviewed the Azure PHP SDK, but didn't see any tie-ins to the Mobile Service. Additionally, Azure has some great tutorials, but for mobile services they all seem to focus on iOS, Android, and Windows phone. Any insight into how to tie a PHP-app into this
    backend would be much appreciated!

    Although there isn't any client library for PHP, you can still access Mobile Service using the
    Azure Mobile Service REST API.
    Abdulwahab Suleiman

  • FIOS Mobile App - Wireless Does Not Work

    Hello all,
    I am trying to use the new FIOS Mobile app on my Android tablet. This should allow me to watch some live TV, however when I try to connect to a channel it tells me I need to be connected to my broadband router.
    In my setup at home my FiOS broadband router does not handle wireless connections, only wired. I have a separate wireless AP that does this. Why should it matter where I get my wireless connection from, as long as I am connected?
    Help.
    Thanks,
    Steve

    billosaur wrote:
    Someone may have thought this was a great idea, but it's very frustrating to download an app, know that you meet all the criteria for using it, then be unable to use it because the app is unable to differentiate successfully that you are, in fact, on you home network. There's one router in my home, it's a Verizon router, and the app should be smart enough to know this. It's obvious that this app was rushed out without a throrough enough suite of tests, because something this simple should not happen. Is there a ticket in place for this? Is the application support group actively trying to rectify this problem? I'll give Verizon a while to sort it out, but this doesn't please me.
    Send the developers an email at [email protected]  I'm fairly confident they don't monitor this site.  If they don't hear from enough people like you with this issue, they won't fix it.  So please notify them of your issue.  Many are complaining on the Google Play app user reviews about the same problem you have.  You can see then on the Google Play site by accessing the site via a PC.

Maybe you are looking for