What is or isn't possible on iOS?  (Not having Loader, loadBytes(), external swfs, etc)

My basic question is:  "What are the classes which we should not use for iOS using the packager."
I have been trying for a few days trying to get a simple Flash app to run on the iPad.  A very simple app (with sound!) with just 2 classes works fine (Performance is a whole other issue.  We will get to that).  But if I try anything else, all I get is a white/black screen on the iPad.  So it would be really nice to know what classes, functions, etc we CANNOT use for the Packager.
I have fairly simple app (not as simple as 2 classes) which loads some art assets via URLRequest/Loader, puts them on the stage.  Fairly common standard practice in AS3.
I've read about not able to load an external file using the Packager.  So to fix the situation of loading assets, I have looked into the [embed] tag, which seems to work.  I hope the blogger doesn't mind, but this page is an excellent source on what works and doesn't work with the [embed] tag in it's various flavors:  http://www.richardleggett.co.uk/blog/index.php/2010/03/08/flash_builder_and_flash_pro_asse t_workflows.  For example, AS3 in a swf is stripped out from an external swf using [embed].
The best way to load an external swf file for iOS seems to be using [embed] with "application/octet-stream" and load the swf through ByteArray (Option #4 in the link above).  This works great on the PC.  HOWEVER, on iPad, it fails.  The [embed] tag works on the iPad with the other ways, so my guess is that loadBytes() does not work.  Is this true Adobe/Flash guys?  Can you confirm this?
My initial question is "why is this not allowed on iOS?".  If it is because of the fact that it uses a Loader, can it be changed so it's not using a Loader to construct a MovieClip?  I have a ByteArray with the raw swf/MovieClip data.  Why can't I construct a MovieClip from it without going through Loader?
This loadBytes() failure seems to be the only thing preventing me from using the normal pipeline of Flash development in loading external assets.  If there are other ways people have found, please share!
Now on to performance.  Adobe, can you post some examples/samples of code which runs at decent performance?  Like a "tech demo" of what is possible using the Packager running on iPad/iPhone.  That would be extremely helpful for everyone.  I have done a lot of the optimizing suggestions on various sites and pages ( and by Adobe http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html), but I am not seeing the 30 fps performance that is MORE than possible on iPhone/iPad.  Displaying and moving around Bitmaps (I don't use any vector graphics) should be blazing fast.  Quake runs on iPad without any problems and that code is 10 years old.  Moore's law dictates that drawing Bitmaps using CPU should be faster than a 3D engine written 10 years ago...  I am trying out the new iOS 4.2 which is supposed to be "significantly" better, but I am still stuck on loadBytes().
So at this point, I am blocked on loadBytes() and my performance for a simple app which draws a few Bitmaps and MovieClips is terrible.  I am hopeful some people out there have figured out some solution (there are lots of clever people out there) and I will stumble on to something.  But being forced to go native Objective-C seems to be my only option at this point.
In summary, here are the questions I would like to ask the Adobe/Flash group for some more help/information/advise:
- Why is Loader not allowed on iOS?  Is it a technical limitation of the hardware/os/Flash?  Will it never be supported?  What is the future of this class on iOS?
- Why is loadBytes() not allowed on iOS?  I have the raw embedded data in memory.  I don't need to make a remote call so security should not be an issue.  Can I create a MovieClip without using Loader?
- Why is AS3 stripped from the timeline when a Symbol is retrieved using [embed]?  Maybe this is the same reason loadBytes() fails, but if I could use [embed] and get a copy of the Symbol, that is what I need.  (There are issues with the mx.core.MovieClipLoaderAsset/Asset, but it is better than being blocked by loadBytes())
- What are some apps you guys have written that we can use to compare PC vs iOS?  Again, a "tech demo" or sample code of what you as experts in Packager for iOS have done which runs at decent framerate (30+fps) would be of tremendous help.  If the Adobe/Flash group hasn't gotten the current Packager for iOS to handle more than 50+ 2D Bitmaps on screen running at 30+fps, that would be good to know.  Please let us know what the experts and owners of your software are capable of getting the most throughput using the Packager.  I'd hate to sound a bit fed up/angry, but I think you are wasting a lot of people's time and energy with a piece of software that, to me, seems like it was a bit early to release.  Flash can do some great things.  If it can do it on iOS, even better.  But PROVE it to us that it's possible, before having your customers run into barriers imposed on us by trial and error.
Thanks.

I have hardly ever seen a post here from someone at Adobe, so you may need to be patient.
Read this article, and get its associated demo files, to see some good performing tech demos:
http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html
Back to your main point, loaders are working, what isn't working for you is accessing of things in the library of a successfully loaded swf, that have been set to Export for ActionScript. That means that the swf you have loaded has an ActionScript Class, to represent the library symbol. iOS Flash apps are native ARM code, and don't include the virtual machines that a browser plugin has, and so it's not able to interpret ActionScript. That may be why it would fail.
Now, I can think of at least a couple of reasons why you might want to have external swfs with elements that you want to reuse in the main swf. One would be if you're intending to make a lot of them, like say if you wanted to have an Asteroids game and the ability to use artwork from a set of different swfs. Another reason might be if you want to skin your interface, by taking specific elements from the loaded swf and using them in the main swf. That way you could have artists preparing those swfs for you, and you just include them in your package, and load the one you want.
There is a way to do either of those things. The second one can be done by having the item as a named symbol on the stage of the loaded swf. With a to-be-loaded swf named "inner.swf", that has a movieclip on its stage named "mc1", this script in the main swf would load that external swf and use its symbol on the main swf's stage, without having to make the inner swf's symbol use ActionScript:
var req:URLRequest = new URLRequest("inner.swf");
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
ldr.load(req);
function loaded(e:Event) {
var mc:MovieClip = e.target.content as MovieClip;
var innermc:* = mc.mc1;
innermc.x = 50;
innermc.y = 50;
addChild(innermc);
For the other case, you can take the item off the stage of the loaded swf and draw it into a bitmapdata, and then make as many bitmaps from that as you like. Here's the above example, only it adds the original movieclip to the main swf stage, and also creates a bitmap that looks the same:
var req:URLRequest = new URLRequest("inner.swf");
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
ldr.load(req);
function loaded(e:Event) {
var mc:MovieClip = e.target.content as MovieClip;
var innermc:* = mc.mc1;
innermc.x = 50;
innermc.y = 50;
addChild(innermc);
var bmd:BitmapData = new BitmapData(innermc.width,innermc.height);
bmd.draw(innermc);
var bm:Bitmap = new Bitmap(bmd);
bm.x = 150;
bm.y = 150;
addChild(bm);
So, the thing to learn is that a native ARM code application does not have an ActionScript interpreter in it, and if you need to do something that normally requires interpreting ActionScript, find another way to do it.

Similar Messages

  • Is it possible to load an external swf at a specific frame?

    Hey! I've got a flash file which acts as the main menu for a
    program I'm developing. Everything works fine from the main menu
    however when you click to return to the main menu the whole main
    menu file reloads. Is it possible to use loadMovieNum( ) to go to a
    specific frame within the main swf file? If not, is there a way to
    do this?
    Here's the button code I'm using now:
    on (release) {
    unloadMovieNum(0); //unloads the current movie so we can
    reload the main menu
    loadMovieNum("DemoMainMenu.swf", 0); //reloads the main menu
    Thank you for whatever help you can provide! :)

    mcommini wrote:
    > Hey! I've got a flash file which acts as the main menu
    for a program I'm
    > developing. Everything works fine from the main menu
    however when you click to
    > return to the main menu the whole main menu file
    reloads. Is it possible to
    > use loadMovieNum( ) to go to a specific frame within the
    main swf file? If
    > not, is there a way to do this?
    First let me clarify one thing with you. Level zero is the
    main level on the flash
    player. By loading things in level zero you will remove
    current content and replace
    it with the new one. This is not a good idea because it works
    like purge, clears the
    player and from there on you can't maintain any functionality
    unless you reload the
    whole html document over again. Also, do not unload and load
    in the same time in the
    same level. Flash can hold single SWF per level, once you
    load content, whatever previously
    loaded will be automatically replaced, so just the loadMovie
    action and you all set.
    Good practice is to have the main level (zero) an empty base
    and than load and unload
    things in above levels, 1 and so on...
    > Here's the button code I'm using now:
    > on (release) {
    > unloadMovieNum(0); //unloads the current movie so we can
    reload the main menu
    > loadMovieNum("DemoMainMenu.swf", 0); //reloads the main
    menu
    > }
    >
    In regard to the load and go to. Yes it is possible but no
    matter what frame you want to
    go to,you need to load the whole movie first. I will come
    back to that in a second.
    While you execute the loadMovie action, you can set up a
    variable, for example:
    loadMovieNum("file.swf", 1);
    Variable="mcommini_01";
    Than in the loaded movie you have preloader which makes sure
    that the movie is loaded before
    playing and once done loading, make it jump to frame which
    has IF ELSE condition in some kind
    of loop, using setInterval or Enterframe. That condition
    checks for the variable value and based
    on it proceed to particular frame.
    That's why I told you not to clear level zero, if you set
    variable and load movie in that level
    in the same time, all the information will be gone and you
    have totally no reference point to
    get the variable from.
    You could as well use shared object which is native form of
    Flash's cookies. Write SOL file into
    user drive temp folder, than read it from the other file and
    go to frame based on the given value.
    Best Regards
    Urami
    Beauty is in the eye of the beer holder...
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • What does "Your url is invalid and can not be loaded." mean?

    Logged on, pulled up mail on bookmark (aol), clicked on home symbol and got the message. Got rid of the aol tab, the home page had nothing on it, no google, no anything but my tool bar.

    See [https://support.mozilla.org/en-US/questions/908165 this support question] esp. Vivec.Wilfred's response. Sounds like it answers the question of Firefox 9.0.1 not being able to load its own default homepage on certain Win XP systems (I get this as well). Need to install appropriate DLLs to fix, or wait for official fix.

  • If I ran an ios diagnostic quick test, and was not having problems with my ipod touch before can running that test harm the ipod in any way?

    I chose the wrong category in support before I came to the forum (I chose service request and troubleshooting instead of using ipod with itunes, and they had me run an ios diagnostic quick test. What exactly does that do if I'm not having problems? Can that harm the files or hardware on the ipod if I'm not having any problem with my ipod and don't want to troubleshoot anything on it?

    I have no idea what iOS test you are talking about,. Please provided details.
    I can't imagine that the test would effect the iPod.

  • [ISSUE] Load external .swf into an AIR for iOS app

    I want to load an external .swf which is included theme objects of the application. The loader class finishes loading but after this when I try to get objects in the swf I get this error.
    Device is iPad v.2 iOS v5.1.
    ReferenceError: Error #1065: Variable MenuHome is not defined.
        at adaptive.controls.thememanager::ApplyTheme/applyStyle()[D:\ConsumerProductInterface\Consu merProductBusiness\src\adaptive\controls\thememanager\ApplyTheme.as:41]
        at adaptive.controls.thememanager::ApplyTheme/apply()[D:\ConsumerProductInterface\ConsumerPr oductBusiness\src\adaptive\controls\thememanager\ApplyTheme.as:54]
        at adaptive.controls.thememanager::ThemeManagerSystem/checkIfAllLoaded()[D:\ConsumerProductI nterface\ConsumerProductBusiness\src\adaptive\controls\thememanager\ThemeManagerSystem.as: 139]
        at adaptive.controls.thememanager::ThemeManagerSystem/backgroundImageLoadHandler()[D:\Consum erProductInterface\ConsumerProductBusiness\src\adaptive\controls\thememanager\ThemeManager System.as:119]
        at adaptive.controls.thememanager::ThemeManagerSystem/backgroundImageLoadHandler()
        at flash.events::EventDispatcher/dispatchEvent()
        at adaptive.controls.thememanager::ThemeManagerImageLoader/loadImageCompleteHandler()[D:\Con sumerProductInterface\ConsumerProductBusiness\src\adaptive\controls\thememanager\ThemeMana gerImageLoader.as:60]
        at adaptive.controls.thememanager::ThemeManagerImageLoader/loadImageCompleteHandler()
        at flash.events::EventDispatcher/dispatchEvent()
        at adaptive.controls.imageloader::ImageLoader/imageCompleteHandler()[D:\ConsumerProductInter face\ConsumerProductControls\src\adaptive\controls\imageloader\ImageLoader.as:32]
        at adaptive.controls.imageloader::ImageLoader/imageCompleteHandler()
    Steps are:
    1- Create a .fla file and one object in it (like below):
    2- In Flash Builder 4.6
    Load the external swf:
                    var swfLoader:Loader = new Loader();
                    var url:URLRequest = new URLRequest("themes/DefaultTheme/DefaultTheme.swf");
                    var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
                    swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
                    swfLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
                    swfLoader.load(url, loaderContext);
            private function completeHandler(event:Event):void
                var evt:LoadThemeSWFEvent = new LoadThemeSWFEvent(LoadThemeSWFEvent.COMPLETE);
                if (AdaptiveHelper.getInstance().platform == PlatformType.DESKTOP)
                    evt.swfLoader = SWFLoader(event.currentTarget);
                else
                    evt.loader = Loader(event.currentTarget.loader)
                dispatchEvent(evt);
              // load is OK
            private function ioErrorHandler(event:IOErrorEvent):void
    After load is complete I tried to get the object from the swf file and use it as a skin class of a button.
    cssSelector.setStyle(property, Class(content.loaderInfo.applicationDomain.getDefinition("MainMenu")));
    I am stuck here. Any ideas what the problem is?
    My Best,
    Suat

    Hi Suat,
    Can you send me a sample application  @[email protected] with which I can reproduce your problem and can look into the issue?
    Thanks,
    Nimisha

  • What happens when the Main Flash is 25 fps and an external SWF file is 12 fps?

    Hello everyone,
    I have a Main Flash which is set to 25 fps. This Flash is
    used to load an external swf file which was created using 12 fps. I
    would like to know what really happens when the Main Flash loads
    the external swf file? Does the Main file forces the external file
    to be run on 25 fps or the swf file is run with its own 12 fps?
    Any ways, if someone can take the time and explain this, I
    would be greatful.
    Thank you very much and have a great day.
    Khoramdin

    the external swf plays at 25fps - all loaded movies will take
    on the frame rate of the parent movie.
    Chris Georgenes
    Adobe Community Expert
    mudbubble.com
    keyframer.com
    http://tinyurl.com/2urlka
    Khoramdin wrote:
    > Hello everyone,
    >
    > I have a Main Flash which is set to 25 fps. This Flash
    is used to load an
    > external swf file which was created using 12 fps. I
    would like to know what
    > really happens when the Main Flash loads the external
    swf file? Does the Main
    > file forces the external file to be run on 25 fps or the
    swf file is run with
    > its own 12 fps?
    >
    > Any ways, if someone can take the time and explain this,
    I would be greatful.
    >
    > Thank you very much and have a great day.
    >
    > Khoramdin
    >

  • Spark.core.ContentCache with AIR 3.7 on iOS not working

    I've been trying to migrate a large Flex 4.6 mobile project from AIR 3.5 to AIR 3.7 for several days with no luck. The issue that kills me is Error #3747: Multiple application domains are not supported on this operating system.
    This happens only on iOS when I load art only SWF files from web. I changed all my classes to use ApplicationDomain.currentDomain and this fixed it for them but it doesn't work for spark.core.ContentCache
    Error: Error #3747: Multiple application domains are not supported on this operating system.
        at flash.display::Loader/load()
        at spark.core::ContentCache/load()[E:\dev\4.y\frameworks\projects\spark\src\spark\core\Conte ntCache.as:385]
    I looked through the code there and it is as follows:
    // Execute Loader
    var loaderContext:LoaderContext = new LoaderContext();
    loaderContext.checkPolicyFile = true;
    loader.load(urlRequest, loaderContext);
    I can't change (and don't want a custom modified flex sdk) it because this is inside the Flex framework code. I've checked AIR 3.8 Beta and same thing happens there. This is a breaking change from AIR 3.5. It shouldn't throw an error, but just load in ApplicationDomain.currentDomain instead when the OS is iOS.
    Is there any good fix for this thing? All advices are appreciated. Thanks.

    Try "monkey patching" as described here:
    http://forums.adobe.com/message/5267844
    i.e. copy ContentCache.as into a folder spark/core in your own source folder and edit it. Then the edited spark.core.ContentCache will be used instead of the original one.

  • Every time I want to download an app From AppStore when I start downloading it after I write my password there is warning that says to me that it isn't possible right now to download power DVD mobile even now were this app is deleted from my ipad

    Every time I want to download an app From AppStore when I start downloading it after I write my password there is warning that says to me that it isn't possible right now to download power DVD mobile even now were this app is deleted from my ipad

    The power DVD app is active, and seems to download ok.  You have already deleted the app? 
    I suspect what is happeneing is that a download is in your queue, and is blocking the queue until it completes, thus the message every time you try to do a down load.  It may be failing because while it thinks you have the app, it is not finding it, and doesn't know what to do.  ( sounds like a poorly designed download).
    I think the way around this might be for you to resync with your iTunes, and let it reload the app onto your pad.  Let it complete the download.  Then, if you do not want the app, delete it again from your pad, and if you never want it, from I tunes as well.
    The next time they do an update, you may wind up in the same situation, so if it happens again, until they fix the download routine, you will get stuck again.
    So try the suggestion, and see if this clears it out.
    The other option would be to open your account in I tunes on your computer, let it complete the download there.

  • HT201406 Please help! I can power the device off but when i try to unlock the screen its like it cant feel my finger tracing over my unlock design, thus I cannot sign into itunes to download what i have before I possibly loose everything :(   My warranty

    Please help! I can power the device off but when i try to unlock the screen its like it cant feel my finger tracing over my unlock design, thus I cannot sign into itunes to download what i have before I possibly loose everything    My warranty is expired and I dont know if there is any other solution before I dump a bunch of money into this devise. ThaNK YOU!

    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
      Apple Retail Store - Genius Bar

  • I recently got a charging case for my iPhone 5s, but it says it isn't certified and may not work reliably with my iPhone. What can I do to fix it?

    I recently got a charging case for my iPhone 5s, but it says it isn't certified and may not work reliably with my iPhone. What can I do to fix it?

    Buy one that is certified. Your current case might work without problems, and then might stop working in the future.  iOS 7 is especially "sensitive" to uncertified peripherals. With this iOS release they have started to clamp down on "pirate" peripherals.

  • Why isn't there an iOS app to access a Time Capsule?

    Synology has apps to access their NAS systems. Wouldn't it make sense for Apple to have an app for Apple iOS devices to connect to Apple Time Capsules?

    It would, if Apple wanted you to do this. But, they don't, since there would already be an Apple App for this if they did. I assume that you already know about FileBrowser here, which is not an Apple App.
    So you might want to tell Apple what you want, rather than have them tell you what you want.
    Apple - Time Capsule - Feedback
    Why isn't there an iOS app to access a Time Capsule?
    The bottom line here is that "Why" questions can only be answered by Apple. Only they know the "Why" about anything.
    If you happen to be asking about a non-Apple App, and do not know about FileBrowser, you might want to take a look.
    Stratospherix - FileBrowser - Overview

  • Is there a way that i can downgrade my iOS 7.1 on my iPhone 4 to iOS 6xx? battery life not good, and performance isn't better than iOS 6.. Please apple i am really disappointed with iOS 7 on my iPhone 4

    Is there a way that i can downgrade my iOS 7.1 on my iPhone 4 to iOS 6xx? battery life not good, and performance isn't better than iOS 6.. Please apple i am really disappointed with iOS 7 on my iPhone 4, it can runs great on iPhone above 4 such as 5/5s/etc.. iPhone 4 just good with iOS 6...

    No.

  • The replay of the song isn't possible because the song isn't available or through DRM is restricted. All the songs are buyed in the iTunes Store. Give it a solution to activate the songs on my ipod touch ?

    Hello together, I've a problem with some songs in my playlists on my new ipod touch. The error message says that the replay of the song isn't possible because the song isn't available or through DRM is restricted. All the songs are buyed in the iTunes Store. Give it a solution to activate the songs on my ipod touch ?

    Do the non-syncing songs play in iTunes?
    Were the syncing and non-syncing songs purchased with the same account?
    Can you directly download the the songs to the iPod? See:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Adobe Acrobat XI pro version, Windows 7, running on iMac parallels, converting pdf to a pdf with reduced size is not possible, error: error in converting the file! What to do? Its a bit annoying not to be able to store pdf files in reduced size, any idea?

    Adobe Acrobat XI pro version, Windows 7, running on iMac parallels, converting pdf to a pdf with reduced size is not possible, error: error in converting the file! What to do? Its a bit annoying not to be able to store pdf files in reduced size, any idea?? Thanks, Jörg

    Hi Jorg ,
    Are you trying to reduce the file size with the "Reduced size PDF" in the save as other option.
    Give it a try if you haven't done it prior.
    Open that PDF>File>Save as Other>Reduced size PDF.
    If possible ,please share the snapshot of the error message with us so that we can have a look in order to assist you further.
    Regards
    Sukrit Dhingra

  • I recently upgraded to iTunes 11.1.5 and now my iPod Nano is not recognized in iTunes. I also upgraded my iPhone 5s to iOS 7.1. i Tunes on my computer does recognize my iPhone. What is the problem with my iPod Nano not being recognized?

    I recently upgraded to iTunes 11.1.5 and now my iPod Nano is not recognized in iTunes. I also upgraded my iPhone 5s to iOS 7.1. i Tunes on my computer does recognize my iPhone. What is the problem with my iPod Nano not being recognized?

    I would think, Twins1995, that if we are having the problem, others are as well. Hopefully, Apple will shortly issue a follow-up software release to fix the problem. Or is that just wishful thinking on my part.
    It would be helpful, if there were some kind of work-around in the interim, so we can use our devices. Pretty frustrating when you consider that all of the hardware and software is produced by Apple.

Maybe you are looking for

  • Enabling parallellism in oracle sql

    Hi All, I have a question related to parallilism enabling statements . I have seen that before running a sql statement we may use alter session enable parallel DDL; alter session enable parallel query; alter session enable parallel DML; What exactly

  • IOs Home Screen icons in Muse

    Hi, I was just wondering how you would export a Muse site with a built in iOs Home Screen icon, enabling those viewing a web page to bookmark a site with custome icon?  

  • Airport Express 802.11n Destroyed my external drive?

    Ok.. taking a deep breath. My new 802.11n apple extreme base station could no longer recognize my external drive. (post 10.4.9 install). I am not sure if the new aebs killed it or 10.4.9 or a combination of both. Note I've had it this drive for about

  • Sf302-08 and radius vsa keys

    Greetings all, I recently received a SF302-08 to configure and I have to say quite an improvement over the SRW208 I had earlier. One thing bugs me though, with authentication requests it does not send the Service-Request parameter. On our Catalyst sw

  • Weak Signal in Denver, CO

    I live in the middle of Denver, CO in an area called Capital Hill (zip code 80203).  My cell reception is great throughout the rest of the city, but its horrible on the block surrounding my house (inside and outside).  This is confusing to me, as I a