Building for iOS: how to load other SWFs?

I have an AS3 app that loads two different kinds of SWFs: linear animations (basically stories consisting of a streaming narration track and still images with pans and dissolves), and SWF games of various types.   I know that CS5.5 can compile to iOS apps. What's not clear to me is how this works in terms of dependent files. Do they also have to be compiled as iOS apps? How does it work when one app requests another Flash sequence? Is this possible?

Each of the stories is an average of 1mb. Are you saying people won't mind loading 150mb for an app? Although I guess people are used to loading movies, which are considerably larger. Am I just in a "minimal download" mode from the 90's?
"so size doesn't matter..."

Similar Messages

  • Can I load a swf into my Flex app that loads other swf's?

    The code below loads an AS2 swf into my Flex mobile for IOS app and it works.  If that AS2 swf has like a circle in it that runs across the stage, it loads and displays properly when run in FlashBuilder.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     initialize="init()">
              <fx:Script>
                        <![CDATA[
                                  import mx.core.UIComponent;
                                  private var request:URLRequest = new URLRequest("http://PATH_TO_AS2_SWF");
                                  private var loader:Loader = new Loader();
                                  private var myComponent:UIComponent = new UIComponent; 
                                  private function init():void{
                                            myComponent.percentHeight = 100;
                                            myComponent.percentWidth = 100;
                                            loader.load(request);
                                            myComponent.addChild(loader);
                                            player.addElement(myComponent);
                        ]]>
              </fx:Script>
              <s:Group id="player"
                                   height="100%" width="100%"/>
    </s:Application>
    But if that AS2 swf loads other swf's, they don't load or display.  My FlashBuilder debugger reports no errors or security sand box violations.   I'm using the most elemental code in my AS2 swf so as to not cause problems.  This is it in its entirety:
    this.onLoad = function(){
              _root.loadMovie("http://[PATH_TO_REMOTE_SWF]");
    The paths to the remote content are fine because swf's load and display fine from AS2 swf when run on it's own - not embedded in Flex app.  They also load and run fine if I cut out the AS2 swf and access directly from my Flex code.  So I know there isn't a path issue.  More likely not accessing the right layer in the AS2 swf from Flex or something.  Or maybe security sandbox violation but I don't see anything reported in the FlashBuilder debug console.  When run console just reports:
    [SWF] SwfMobile.swf - 2,639,761 bytes after decompression
    [SWF] assets/swf/AS2.swf - 1,470 bytes after decompression
    Is there something inherently wrong with loading swf's that load other things?  Even if I have the AS2 swf load jpgs they don't load so the format of the target content at the end of the chain doesn't seem to be the issue.  Just the act of embedding a swf that loads other things seems to be the problem.

    Ah, yes. Using an AVM1 SWF could prove difficult...
    I'm going on about 3 hours of sleep at the moment, but let me toss out a few thoughts I have and hopefully something will stick...
    Ok, so my first thought what to try and cast the loaded content as a MovieClip and call methods on that, but the fact they are AVM1 throws that out the window.
    That leaves LocalConnection, as you mentioned. But this would require you to have code on the receiving end to handle the connection... no good either.
    But what if you created a "bridge" in AS2 that holds all the code for the receiving end of LocalConnection (or has the control logic itself, perhaps even eliminating the need for LocalConnection all together!). I think maybe this is what you were trying to do already by loading a SWF into a SWF? Well instead of loading your bridge at runtime, what if you statically linked it into your project as a class?
    *a few moments later*
    Well it looks like you can in fact link in a a symbol created for AVM1, but it will only come in as a SpriteAsset, and will not include any custom code (which makes sense, since they use entirely different class constructs).
    To do the test, I created a symbol exported for actionscript (AS2/Flash8), then linked it in with a CSS style embed. I then instantiated the class and called describeType on it.
    So in summery, it looks like calling custom code on the bridge is out (I did not test this extensively, that was just my first impression with this simple test). However, if you may be able to perform the actions you need by attempting to cast the loaded content into something AVM2 can recognize. Apparently it does this automatically when linked in statically, so maybe there is something there worth looking into... mainly, can you do what you need using only the base class and no custom code?
    Keep me posted!

  • Flex 4.5 build for ios

    HI,
    Right at the beginning of my flex journey and so I'm using examples to see how stuff is done.
    I have done the recent adobe flash builder update and can make simple flex builds for ios, google android and blackberry. Cool.
    I have sourced a demo flex 4.5 project that was done for android (I think before the update) but when I go to do a build for ios
    the option on the drop down is not there (just has google, no ios or blackberry) So I guess the project thinks its in pre-update mode
    So the question is, what is causing the drop down to only have google, is there some library/framework/script I need to add or something
    so this demo flex project that was writen for android can be tested on ios.
    hope this makes sense!
    thanks
    mike

    OK
    I found it project>properties add a device
    KBn

  • How to load other obejects in flash file after intro using ActionScript 3.0

    How to load other obejects in flash file after intro using ActionScript 3.0 or any other method all in same fla file. see blow intro screen shot ,this one playing repeatedly without loading other fla pages .only way to load other pages is click on Skip intro .see second screeshot below .i need that site to load after intro .
    see codes already in
    stop();
    skipintro_b.addEventListener(MouseEvent.CLICK, skipintro_b_clicked);
    function skipintro_b_clicked(e:MouseEvent):void{
    gotoAndStop("whoweare");
    There is another script there
    /* Simple Timer
    Displays a countdown timer in the Output panel until 30 seconds elapse.
    This code is a good place to start for creating timers for your own purposes.
    Instructions:
    1. To change the number of seconds in the timer, change the value 30 in the first line below to the number of seconds you want.
    var fl_TimerInstance:Timer = new Timer(1000, 30);
    fl_TimerInstance.addEventListener(TimerEvent.TIMER, fl_TimerHandler);
    fl_TimerInstance.start();
    var fl_SecondsElapsed:Number = 1;
    function fl_TimerHandler(event:TimerEvent):void
              trace("Seconds elapsed: " + fl_SecondsElapsed);
              fl_SecondsElapsed++;
    i have no knowledge about these thing ,any help really appreciated .

    Ned Murphy Thank you very Much .It is working .Great advice

  • Uploading AIR for IOS thru Application Loader I get the following error - The package does not contain an Info.plist.

    I'm publishing an .fla in AIR for IOS.
    I'm in CC 2014 so first I need to know which AIR should I publish in?
    newest is AIR 14.0.0.178 for IOS
    IOS deployment type is App Store
    publishes with no error.
    I see the following files included .swf and app.xml
    I convert the .ipa to a zip file
    Upload that thru the Application Loader I get the following error
    The package does not contain an Info.plist.
    Where is the infoplist for this and do I convert the .ipa and the info to a zip file?
    I converted the .ipa to a .zip and the intoplist file is NOT THERE  how do I generate this?
    Any help here?

    Ok this is becoming very very frustrating as I have been at this for hours now. So the only way to explain this is to write what I did step by step as I have to be doing something wrong, just to recap:
    I was publishing from Flash CC 2014 using AIR 14.0 and getting Digital Certificate is not valid message.
    Was instructed to download new AIR 17 , I did this installed into Flash and used to publish.
    I used my previous p12, app ID and distribution certificates all generated properly.
    The file worked ONCE but I got an app ID error ( I understood I used the wrong app ID)
    I changed it to the right app ID and the very next time and after 10 attempts I got the same error  Digital Certificate is not valid
    SO I then downloaded AIR 16.0
    RE DID ALL MY CERTIFICATES AND P12'S
    went to publish and I STILL GET THE SAME MESSAGE   Digital Certificate is not valid

  • How to load multiple swfs to my main flash file??

    I am using the following code
    In actions for Frame 1:
    var myrequest:URLRequest=new URLRequest("A.swf");     
    var myloader:Loader=new Loader();
    myloader.load(myrequest);
    img1.addEventListener(MouseEvent.CLICK, clickButton);
    function clickButton(event:MouseEvent):void{               
        stage.addChild(myloader);
    img1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
    function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
         gotoAndStop(13);
    In action for Frame 13:   (img2 is another button)
    img2.addEventListener(MouseEvent.CLICK, unloadFunction);
    function unloadFunction(event:Event):void{
         stage.removeChild(myloader);
    This code works perfectly fine. My only problem is, How do I get multiple swf loaded. When I tried to copy and paste the same code for the other swf, but the following errors appear. I'm pretty sure theres a way to have multiple swfs (btw the multiple swfs will be linked from different frames).
    Scene 1, Layer 'PAGES!', Frame 2, Line 7 1021: Duplicate function definition.
    Scene 1, Layer 'PAGES!', Frame 2, Line 2 1151: A conflict exists with definition myloader in namespace internal.
    Scene 1, Layer 'PAGES!', Frame 2, Line 1 1151: A conflict exists with definition myrequest in namespace internal.
    Can someone please help me with this. Thanks

    You define the same variable or function names more than once in a file.  But you can reuse them in other frames.  Try something more like the following in frame 2....
    myrequest=new URLRequest("A.swf");     
    myloader.load(myrequest);
    leave all of the rest out for starters... the same function from frame 1 can be re-used without rewriting them.  I don't know what the deal is with img1, but if you need to change what it does, then add that back in.

  • How to Load a SWF in Dynamically Loaded HTML

    Hello,
    I have a Flash movie with a multi-line text field that loads
    HTML text. As per the below Macromedia documentation I have swfs as
    images inside my HTML text.
    I'm trying to find a way to pre-load these swfs - if I do
    loadmovie to load the swf, when the html file is loaded will it
    need to reload the swf from scratch or will it take my loaded
    version? I'd love to show a "loading" message in the text as the
    swf was loading but am unsure how to do this now that I have the
    swf reference embedded in the html text.
    Any ideas?
    Thanks!
    Julia
    From the Macromedia documentation:
    Image tag (<img>
    The <img> tag lets you embed external JPEG files, SWF
    files, and movie clips inside text fields. The <img> tag has
    one required attribute, src, which specifies the path to a JPEG
    file, a SWF file, or the linkage identifier of a movie clip symbol.

    Thanks - your answer is exactly what I was looking for.
    I'm noticing that every swf I load via dynamic HTML is
    distorted - is there a way to prevent this? I can set the width and
    height of each swf in the HTML, which works ok, but then I run into
    a problem when I try and have a component item (like an accordion)
    included in the dynamic text field. It works properly, and the
    framing is sized correctly, but the guts are still skewed. I
    haven't been able to figure out why the swfs are being distorted in
    the first place.
    Any ideas?
    Thanks,
    Julia

  • AIR for iOS: How can I distribute for only Retina Displays?

    I am nearing completion of an app I have designed for iOS and tested on my iPhone 4. I bought a 2nd gen iPhone so I could test on both screen resolutions (320x480 and 640x960) before discovering AIR for iOS does not support very old iOS devices (I believe the rule is it must be iOS 4+).
    My question is how is distribution handled if the app will not run on these older models? Wouldn't people with a 2nd gen iPhone still have access to an app that I publish via AIR for iOS and then be angry when it is not supported on their device? Has anyone run into this issue?

    AIR 2.5+ requires iPhone 3GS+ to run. It's based on the CPU inside that
    device and newer which includes a NEON SIMD coprocessor - a requirement
    of newer AIR builds on all platforms (newer than PFI/AIR 2.0, which
    shipped with Flash Pro CS5.0).
    There should be a "resolution" drop down in the AIR for iOS Settings
    dialog, if you updated your PFI in CS5.0 or upgraded to CS5.5. You can
    select "High" to get iPhone retina display support. This will not enable
    iPad 3 retina support though.
    Kevin N.
    Edit: I didn't make it clear that the device requirements are set in your app, and enforced by the App Store - users on old devices will never see your AIR apps in their app store, and if they link into the App Store, they'll get an explaination of why they can't install the app (it'll be either the OpenGL ES 2.0 requirement, or the CPU requirement - it's similar to if you try to install an iPad only app on an iPhone). Android actually works the same way - old/cheap ARMv6 device users will not see your ARMv7 requiring app in their Google Play/Marketplace app.

  • Out of Memory Error when exporting release build for IOS

    I recently changed my project to use the new AIR 3.3 SDK.
    When I try to package my game for iOS, I get an error part way through the build, that says
    Exeption in thread "main" java.lang.OutOfMemoryError: Java heap space.
    I took a screenshot:
    It's frustrating because now it doesn't build at all.
    I have tried changing the -vmargs for the sdk to have 16Gb of RAM available, (and many other multiples of 1024m) in the hope that this would fix it.
    I've also installed the JDK as it is supposed ot handle memory better than the JRE, but have no idea how to point FB to use that.
    I've changed the Xmx value to 1024m in Flashbuilder.ini and eclipse.ini (it seems it doesn't start if it's higher than that) and still no luck.
    Can anyone help with this?
    Cheers,
    Ben

    Well I don't have to render as I go, it is just a choice. I checked to see if all the video and stills were rendered. I re-rendered after making sure all of the options were checked, removed all of the stills from the timeline just in case the still format was the problem, then attempted to export again. It took about 2 hours. I watched with activity monitor and it took almost all of the available disc space then my computer shut itself down. When I rebooted there was a Quicktime file 320 GB in size but would not open. I got an error message that it was not a mov. file.
    But to answer your question:
    Video is 29.97fps DV/DVCPRO
    Frame size is 720 x 480
    3.0 mb/sec
    16 bit Integer
    Aplha= None /ignore
    Composit is Normal
    NTSC-CCIR 601
    Stereo
    Stills are at 25.0 fps JPEG

  • Build for iOS in phonegap CS6

    Hello I am trying to figure out how to export for iOS using phonegap.
    When I build my app for the other types it works but for iOS it says a "signing key required"
    This stuff is new so it seems like there is still not a whole lot of documentation available...any help with this specific question would be great and any blogs or threads to look at?  

    Log into the PhoneGap Build site, and go to this page:
    https://build.phonegap.com/docs/ios-builds
    In short, you need an iOS Developer Account (for which you have to pony up some cash to Apple), and the signing key must be created on a Mac.
    My Dreamweaver CS6 New Features Workshop includes three videos stepping you through this tedious process. The workshop is published by video2brain and costs $29.99. More details about the course.

  • How to load external SWF used sharing library.

    Hi~~~
    Before ask the question, plz understand my bad English..
    Recently I try to load the Swf file that is maded by Flash CS 6.0.
    Especially it used shared library..
    When I try to load this SWF, I used FileStream instead URLRequest.
    This is because the target SWF File located same device with the Swf Application.. So when I use the URLRequest
    it give me the warning - Sandbox security violation.
    But by using FileStream, the warning did not occur.
    This is the sample code below..
      var myFile = new File(path);
      var myStream = new FileStream();
      myStream.open(myFile, FileMode.READ;
      var myBytes:ByteArray = new ByteArray();
      myStream.readBytes( myBytes );
       mSwfLoader.loadBytes( fileStream, context );
       mSwfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadedComplete);
    As you can see, I made a event listener to get the content of the Loader, after receving Complete Event(I guess.. after decording?).
    But I can't receive any event call, so I removed symbol used sharing library in the SWF.
    And this gave me the result as I respected... So I guess the problem caused by using sharing Library..!
    (In parenthease, I can see the valid result in running debug time on the Flash CS6..)
    What should I do? I respect that using sharing libary give saving memory.  So I want to using it as possible.
    Thanks for your reading...!

    Here is one way:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f9c.html
    HTH,

  • How to open other swf at the same window \ click to dissolve?

    Hey guys,
    I'm creating a simple flash feature with only three buttons, but I need your help:
    First button - click and it opens our inventory flash flip book. the problem is, the flip book is already in flash, and I have no idea how to make it so when i'm clicking the button, it opens the flip book in the same window.
    Second button - when you click it, it dissolves to a new window where you can see our contact information + 'back' button. how do I create this dissolve on demand and back?
    I got the third button ok.
    please help me with that,
    thank you!

    AS3 or AS2
    Escencially you can create a container with a tween alpha animation controled by the second button. To load the swf you can externally load the file swf as an image
    var myLoader : Loader = new Loader ( ) ;
      myLoader . contentLoaderInfo . addEventListener ( ProgressEvent . PROGRESS , onProgressStatus ) ;
      myLoader . contentLoaderInfo . addEventListener ( Event . COMPLETE , onLoaderReady ) ;
      var fileRequest : URLRequest = new URLRequest ( "myImage.jpg" ) ;
      myLoader . load ( fileRequest ) ;
      public function onProgressStatus ( e : ProgressEvent ) {
      // this is where progress will be monitored
      trace ( e . bytesLoaded , e . bytesTotal ) ;
      public function onLoaderReady ( e : Event ) {
      // the image is now loaded, so let's add it to the display tree!
      addChild ( myLoader ) ;

  • HELP! How to load multiple swfs using the following code?

    In actions for Frame 1:
    var myrequest:URLRequest=new URLRequest("A.swf");     
    var myloader:Loader=new Loader();
    myloader.load(myrequest);
    img1.addEventListener(MouseEvent.CLICK, clickButton);
    function clickButton(event:MouseEvent):void{               
        stage.addChild(myloader);
    img1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
    function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
         gotoAndStop(13);
    In action for Frame 13:   (img2 is another button)
    img2.addEventListener(MouseEvent.CLICK, unloadFunction);
    function unloadFunction(event:Event):void{
         stage.removeChild(myloader);

    do you want to load another swf (eg, B.swf) when you're in frame 13 and img2 is clicked?  if yes, and you don't want A.swf to continue to play, use:
    //In action for Frame 13:   (img2 is another button)
    img2.addEventListener(MouseEvent.CLICK, loadF2);
    function loadF2(event:Event):void{
        myloader.load(new URLRequest("B.swf"));

  • How to Load an SWF into the Parent SWF

    Hi all,
    I have 3 SWFs.
    X.SWF - Parent application. Contains an empty movie clip for
    loading external swfs using loadClip() method.
    B.SWF - Has some text and pics. Gets loaded into the empty
    movieclip on X.SWF. Also has a button saying 'Load A.SWF'.
    A.SWF - Similar to B.SWF with a button saying 'Load B.SWF'.
    When I start the main application (X.SWF) and load B.SWF into
    it all is fine.
    But would like to click on the 'Load A.SWF' button on B.SWF
    and load A.SWF into X.SWF. And visa-vesa.
    The problem is I'm not able to refer to the parent container
    (X) from these child (A and B) SWFs.
    Is there any way to do this?
    Thanks

    First if you use
    Button.onPress=function(){
    this._parent.loadMovie();
    the movie try to load swf into B.swf because "this" mean the
    button.Try with more ._parent or just if you X.swf is into the one
    MovieClip in 1st stage _level0.SWF.loadMovie();.Also if you want to
    load the A,B.swf into the stage simultaneously just create two
    movieclips into the X.swf mcA and mcB and the path has gone to
    _level0.SWF.mcA.loadMovie("A.swf"); :)

  • Export Release Build for iOS crash

    Hello,
    From time to time I'm having a problem with building IPA for iOS from Flash Builder.
    "From time to time..." here means that I can't find what code makes FB to crash, sometimes it started working again, sometimes it works without any changes but after machine restart, but after some time it stops working again.
    Once we have fixed the crash by updaing AIR SDK (3.1 -> 3.4), but after approximately 2 month it stopped working.
    Again, update of AIR SDK (3.4 -> 3.5) worked for about 2 weeks, but then failed.
    Note that after the crash window popped, there is no crash log on the disk (folder stated in a message is removed immediately).
    Any ideas what causes a crash? Is there any solution?
    Thanks,
    Ivan
    Here is my machine config:
    * Win 7-8 Pro
    * Flash Builder 4.6
    * AIR SDK 3.1-3.5
    * Mobile application for iOS (~2.5 MB of source code)
    * Native extension (Adobe's NetworkInfo from samples)
    Screenshot of error message:

    if anyone finds themselves here take a look at this post...http://forums.adobe.com/message/4796079
    was tearing my hair out but it turned out to be @ symbols in embedded images!

Maybe you are looking for