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?

Similar Messages

  • 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>

  • Flex Mobile App eats memory on device

    Hi,
    I have my flex mobile app that manages a lot of bitmapdata objects. Every bitmapdata is disposed after use. It's a multi-layer drawing app, and I have many SpriteVisualElements displayed on the screen. Every SpriteVisualElement contains 4 SpriteVisualElement that I use to paint different images. The problem is that on device (iPad2) the app eats a lot of RAM. It's not a memory leak problem (the memory is properly released when I return to the first view). I don't know what to do... please help me!
    ps: on Flex profiler the app seems to consume 6 times less RAM

    oooooh nooooo
    you have to pay Apple first
    and then request a certificate and provisioning file
    and then try and figure out how to convert the certificate to a .p12 file
    and cross your fingers and hope they will allow it in their store
    and you have to own a mac, although there are some convoluted ways to get a certificate using a pc you still cant get onto the store without a mac

  • Flex mobile app - which data grid control to use?

    Hi,
    Trying to build my first Flex mobile app in FlashBuilder 4.6 and I need a grid control to display a 2 dimmensional array of 6 columns x 50 rows.
    The user doesn't don't need to have any interraction with the grid except for scrolling the rows.
    I was looking at using dataGrid component but adobe doesn't recommend it for mobile apps.
    Is there a grid component that is recommended for mobile apps?
    Thanks

    Here it is.
    // Show empty grid to start
    private function initGrid():void
        const dataArray:Array = new Array(1);
        var values:Array = new Array(1);
        values[0] = "";
        dataArray[0] = values;
        grid.dataProvider = new ArrayCollection(dataArray);
    // Build array and feed it to the grid - 50 rows x 9 columns dataGrid (grid)
    protected function FillGrid():void
    var rows:int = 50;
    var columns:int = 9;
    // rows array
    const dataArray:Array = new Array(rows);
    // Get rows
    for(var row:int=0; row<rows; row++)
      const arrLine:Array = [columns+1];
      arrLine[0] = row+1;
      for(var col:int=1; col<columns+1; col++)
       // columns array
       arrLine[col] = Math.floor(Math.random()*10);
      dataArray[row] = arrLine;
    // At this point the multi dimensional array is assembled, now we connect it to the dataGrid
    grid.dataProvider = new ArrayCollection(dataArray);
    <!-- The DataGrid's dataProvider and typicalItem are set at initialize time by the initializeDataProvider method. -->
    <s:Panel id="tablePanel" x="519" top="91" width="470" height="400" color="#827259" fontSize="18" title=".">
    <s:DataGrid id="grid" left="5" right="5" top="5" bottom="5" selectionMode="singleRow" initialize="initGrid()" fontSize="17" >
      <!-- The default item renderer is used by the first 6 columns to display
      the dataProvider item's array element value at col. -->
      <s:itemRenderer>
       <fx:Component>
        <s:DefaultGridItemRenderer>
         <fx:Script>
          <![CDATA[
           override public function prepare(hasBeenRecycled:Boolean):void
            label = data[columnIndex];
          ]]>
         </fx:Script>
        </s:DefaultGridItemRenderer>
       </fx:Component>
      </s:itemRenderer>
      <s:columns>
       <s:ArrayList>
        <!-- Columns inherit the DataGrid's itemRenderer. -->
        <s:GridColumn id="zero"    headerText="N0" width="65" resizable="false"/>
        <s:GridColumn id="one"     headerText="N1" width="45" resizable="false"/>
        <s:GridColumn id="two"     headerText="N2" width="45" resizable="false"/>   
        <s:GridColumn id="three"   headerText="N3" width="45" resizable="false"/>   
        <s:GridColumn id="four"    headerText="N4" width="45" resizable="false"/>
        <s:GridColumn id="five"    headerText="N5" width="45" resizable="false"/>
        <s:GridColumn id="six"     headerText="N6" width="45" resizable="false"/>
        <s:GridColumn id="seven"   headerText="N7" width="45" resizable="false"/>
        <s:GridColumn id="eight"   headerText="N8" width="65" resizable="false"/>
       </s:ArrayList>
      </s:columns>
    </s:DataGrid>
    </s:Panel>       
    Tomexxus

  • Datagrid for flex mobile apps

    Hello,
    Since in-built Datagrid component is not optimized to be used in flex mobile apps, what is the best alternative we can go ahead with?
    I have seen some of the posts which says that we can use List. But I'm still unable to find how List can be used. As we would need multiple columns, should we be using multiple Lists for each column?
    Kindly let me know if any of have have got this working and how.
    Appreciate your help..
    -Deepak

    Anyone please?:) Flex HarUI ??

  • Converting Burrito Flex Mobile App to Desktop

    Hi Guys!  Have just developed an app for Android using Burrito.  It works nicely on a phone but it is also great as a little 'widget like' desktop app.
    Is there any way to package it so that it may be distributed as an Air app that runs exactly like it does when run in emulation mode (adl) from Flash Builder?  If not, what is the simplest path to convert the <mobileApplication> to a <windowedApplication>?
    Thanks,
    Richard
    Update:  Surprised no one has answered this.  I am new to Flash Builder and I figured you guys would know.  Have been looking at viewstacks in standard Air apps and trying to figure how to use this to achieve the same effect as a mobile app.  Looks like quite a lot of work to rewrite the app to Air on the Desktop ... is there an easier route .... anyone?

    Hi Richard,
    I was able to complile and deploy my Android app using command line air/android packaging and adding required air swc's to my project. I used the following packageApplication.bat(downloaded from livedocs) to package my MobileApplication as both an air app and android:
    :: AIR application packaging
    :: More information:
    :: http://livedocs.adobe.com/flex/3/html/h ... ml#1035959
    :: Path to Flex SDK and ANDROID binaries
    set PATH=%PATH%;C:\Program Files (x86)\Adobe\Adobe Flash Builder Burrito\sdks\4.5.0\bin;C:\Program Files (x86)\Adobe\Adobe Flash Builder Burrito\jre\bin
    :: commented   set PATH=%PATH%;C:\PATH_TO_YOUR_ANDROID_SDK\android-sdk-windows\tools
    echo PATH Set to %PATH%
    :: Signature (see 'CreateCertificate.bat')
    set CERTIFICATE=testCert.p12
    set SIGNING_OPTIONS=-storetype pkcs12 -keystore %CERTIFICATE%
    if not exist %CERTIFICATE% goto certificate
    echo CERTIFICATE_FILE: %CERTIFICATE%
    :: Output AIR
    if not exist air md air
    set AIR_FILE=air/FlashClientMobile.air
    echo AIR_FILE: %AIR_FILE%
    :: Output APK
    if not exist apk md apk
    set APK_FILE=apk/FlashClientMobile.apk
    echo APK_FILE: %APK_FILE%
    :: Input
    set APP_XML=FlashClientMobile-app.xml
    set FILE_OR_DIR=FlashClientMobile.swf assets
    echo APP_XML: %APP_XML%
    echo FILE_OR_DIR: %FILE_OR_DIR%
    :: MEecho Signing AIR setup using certificate %CERTIFICATE%.
    echo AIR COMMAND adt -package %SIGNING_OPTIONS% %AIR_FILE% %APP_XML% %FILE_OR_DIR% 
    call adt -package %SIGNING_OPTIONS% %AIR_FILE% %APP_XML% %FILE_OR_DIR%
    if errorlevel 1 goto failed
    :: echo.
    :: echo AIR setup created: %AIR_FILE%
    :: echo.
    echo Signing APK setup using certificate %CERTIFICATE%.
    call adt -package -target apk %SIGNING_OPTIONS% %APK_FILE% %APP_XML% %FILE_OR_DIR%
    if errorlevel 1 goto failed2
    echo.
    echo APK setup created: %APK_FILE%
    echo.
    :: APK INSTALL
    echo Installing package... %APK_FILE%
    call adb install %APK_FILE%
    if errorlevel 1 goto failed2
    echo.
    echo Android setup installed: %APK_FILE%
    echo.
    goto end
    :certificate
    echo Certificate not found: %CERTIFICATE%
    echo.
    echo Troubleshotting:
    echo A certificate is required, generate one using 'CreateCertificate.bat'
    echo.
    goto end
    :failed
    echo AIR setup creation FAILED.
    echo.
    echo Troubleshotting:
    echo did you configure the Flex SDK path in this Batch file?
    echo.
    :failed2
    echo Android install FAILED.
    echo.
    :end
    pause
    //END BATCH FILE
    I then did a diff between a Flex Buritto Moblie/AIR project library swc's included and identified swc included in AIR and missing in mobile. I updated the project libraries by adding the following swc's:
    sparkskins.swc
    utilities.swc
    aircore.swc
    airframework.swc
    airspark.swc
    applicationupdater.swc
    applicationupdater_ui.swc
    Then performed a clean build and ran packageApplication from my bin-debug dir and was successfully able to install and run the mobile application on the desktop :-).
    Being new to supporting mobile phones, tablets, TV screens along with our web and desktop clients I am not yet sure how we will structure our projects and get maximum code reuse and UI consistancy across these form factors. I have already created a common library project containing all remote stubs, value objects and common utilities and am still trying to figure out how much mileage I can get out of my mobile views. I like the View Navigator and ActionBar navigation on all screens we support and am thinking to extend the ViewNavigator and add additional states along with the 'portrait' and 'landscape' currently offered, like 'portraitPhone', 'portraitTablet', 'portraitTV', 'portraitPC' and leverage my existing mobile views to use these states to adjust the UI layout to accomodate the new realestate... but still learning...
    Hope that helps!
    Cheers,
    Greg

  • 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.

  • Open PDF file into flex mobile app

    Hy,
    I use this method to open a web page into my flex mobile application and I want to now if is possible to make the same for an PDF file.
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="Test">   <fx:Script> <![CDATA[ import flash.net.URLRequest; import flash.net.navigateToURL; import flash.display.MovieClip; import flash.media.StageWebView; import flash.geom.Rectangle; import flash.events.KeyboardEvent; import flash.ui.Keyboard; import flash.desktop.NativeApplication; import mx.events.FlexEvent; private var browser:StageWebView;
    protected function onButtonClicked(event:MouseEvent):void { browser = new StageWebView(); browser.viewPort = new Rectangle(0, 0, 100, 200); browser.stage = this.stage; browser.loadURL("http://adobe.com"); }  ]]> </fx:Script> <s:Button x="209" y="67" label="test" click="onButtonClicked(event)" /></s:View>

    Rangrajan,
    If you have the complete URL to the file; for example http://forums.adobe.com/filename.pdf
    or C:\users\yourname\filename.pdf
    Although I have not used it, you can pass the URL to Drumbeat Insight iFrame
    You can try their product, get prices for source code or library here: http://drumbeatinsight.com/products
    They offer email support for their products.
    You can make your own iFrame, with several sources.  Here is some background.
    http://www.ozzu.com/flash-forum/targeting-iframe-from-flash-t30013.html
    Let me know if this solves your file issue.
    I need to write a server-side app to listen to my web service, upload the PDF, then write a temporary file.pdf to the server,
    before my web app can load the PDF into a web hosted iFrame.
    Adobe needs to make this easy (and I even know some developers in the San Jose Adobe headquarters).
    Bruce

  • How can I have html5 audio continue to play in background in iOS7 from my flex mobile app

    I have mobile app I've developed in flash builder 4.6 (flex 4.12 sdk) and I have a stagewebview component which contains HTML5 audio (mp3 retrieved from my web server and streamed / played via the app)... I want to have the ios version of the app CONTINUE to play the mp3 / html5 audio when the user presses the home button on their iphone or opens another app... so that when multitasking, my audio continues to play (where theres no other NEW audio started, for instance).
    I have added the following to my manifest but it still doesnt do what Im after. I used this in another mobile app where I just play audio from the url directly in flash builder (i.e. NOT via webview component) -- but here it seems the webview suspends (Im guessing)...
    <iPhone>
        <InfoAdditions><![CDATA[
            <key>UIDeviceFamily</key>
            <array>
                <string>1</string>
            </array>
            <key>UIBackgroundModes</key>
            <array>
                <string>audio</string>
            </array>
        ]]></InfoAdditions>
        <requestedDisplayResolution>high</requestedDisplayResolution>
    </iPhone>
    Is there a way around this so my audio continues to play? My test device is an iphone 4 running the latest version of ios7

    You can import audio files into Logic (as easy as drag and drop).  You can download these loops from the Internet from a variety of sources both free and paid.  Just do a Google search for those.
    Once you've imported the file into Logic Pro, right click on the audio region and scroll down to the "Convert" option about halfway down the menu.  The top option will be "Add to Apple Loops library" - click this, and it'll add the file into your Apple loops.
    It won't affect the other loops in the library.

  • Two styles for a native look (Flex Mobile App)?

    Hello,
    is it possible to use two styles/looks for the same App, that this one will look native on iOS AND on Android?
    Or will I have to build the same App twice to get this?
    - BB

    Check out Jason San Jose's blog posting here: http://blogs.adobe.com/jasonsj/2011/06/ios-theme-for-flex-mobile-projects-proof-of-concept .html

  • Flex mobile app for Kindle Fire?  is it possible?

    Hi, I read this in the kindle amazon developer faq, is it possible to develop Flex 4.6 mobile apps for Kindle fire?  even thought it doesn't show up in the
    list of devices?
    any Gotcha's I need to look out for?
    Is Adobe AIR pre-installed on Kindle Fire?
    Yes, developers can publish Adobe AIR 3 applications for the Kindle Fire by packaging them as ‘captive runtime’ applications. However, these captive runtime applications will not support on-device debugging.
    thanks,

    More info here: http://blogs.adobe.com/flashplatform/2011/11/amazon%E2%80%99s-kindle-fire-lights-up-app-cr eativity.html

  • Can I call flex to show a context menu from Javascript in a Flex mobile app?

    I have started with actionscript and flex just 4 days ago. I need to create a mobile app that displays an external swf (do not have the source code) in an html page. When a user clicks on a point on the swf, a javascript function can be called. I want to use the Javascript function to call  actionscript code to display a context menu showing - send SMS, send email etc.. Is this possible at all?
    Please suggest any alternatives also. 

    Thanks. I using StageWebView to display a local HTML file(file://). But while I tried adding ExternalInterface addCallBack code and tested in the emulator - got the following error
    Main Thread (Suspended: Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.)
    Does it mean ExternalInterface cannot be used in a Mobile project using StageWebView?

  • Why my flex mobile apps kill by android system ?

    Hello ,
    I had developed a android mobile apps that retrieve GPS lcoation via flash geolocation object.
    After i press home button and i try to open others apps such as facebook, somehow my apps has been killed by android and i have to reopen again my mobile apps.
    Any idea how to prevent my apps be killed by android if it is running behind ?
    Appreciate if you can share some information with me
    Regards,
    Chua

    Adobe's attitude is not only incredibly insulting and ignorant, it is also short-sighted, particularly considering the top android handsets would actually allow their apps to be more flexible and powerful as they have more RAM at their disposal and the very popular Galaxy Note series would be a perfect device with its integral stylus. This is not acceptable and makes me reconsider staying with my CC subscription. I guess it is time to start looking for adobe alternatives or at the very least demand a discount in our subscription as we are unable to use a large chunk of the subscription portfolio.

  • Can we integrate whatsapp in a flex mobile app????

    I am working on a text generator in flex mobile. I wanna share that text via whatsapp. How can i implement this?? Please help me.
    Thanks in advance.

    Thanks. I using StageWebView to display a local HTML file(file://). But while I tried adding ExternalInterface addCallBack code and tested in the emulator - got the following error
    Main Thread (Suspended: Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.)
    Does it mean ExternalInterface cannot be used in a Mobile project using StageWebView?

  • Flex Mobile App Share File On Email

    Hello,
    How can I enable a user to share a file from inside a Flex app on Email so that it is placed there as an attachment already?
    Thank you.

    Help!

Maybe you are looking for

  • Search bar  value from Interactive Report

    Could someone help me to acces the value entered in the search bar and pass it to another page? Basically our apex interactive reports has a link which allows to edit single records. However customer is looking to edit multiple records at the same ti

  • Adding Images in the Interactive Form

    Dear All,     How to add a image in the standard SAP Deliver interactive forms for the PCR. Can i able to change the logo which is available in the system to the custom logo. So that will it get reflected in the all the standard screen using the logo

  • Bank Reconciliation Statements

    Hi, I want to know how to get the previous month and current month Bank Reconciliation Statements? Business One Implementation Version is 2005. Please give me suggetions. Thanks Satya

  • Import  invoice

    Dear  Friends, I  have created import PO  with   import conditions  like, Basic customs duty,  cess   , CVD   & Additional  customs duty  Etc,  while doing   Invoice verification  for  custom vendor   the  PO Conditions are picking up   but the  PO 

  • CS3 and AS2: Embedding an external swf file

    Hey everyone, I have built a few flash sites before and am trying to make one that is slightly more complicated and allows for dynamic, database stored images and text. I have built a dynamic gallery based on an XML feed in AS2 which works fine. I am