Loading swf files from an iPhone Air App

Although the faq says its possible ( http://bit.ly/gyxmCo  )  I can't seem to load .swf files from my app.
There's no .AS code in the .swf file I'm trying to load.
PNG files load with no problems, swf's fail.
A working example would be appreciated instead of suggestions, I've spent the entire day trying out suggestions
regards,
Martijn

Because I can't see any library assets in an as2.0 file.
I've discovered that the swf fails to load as soon as you make a symbol 'export for actionscript'
probably because it will then create a class. So you can only load SWF's as simple pictures or animations, you cant use it as an asset library with multiple animations/images/sounds in it..
As for you other questions:
it doesnt matter if the file is local or on the web. same results
I created the swf file from a fla in CS4,  and I'm compiling my air project that loads the swf  with FlashDevelop.

Similar Messages

  • Can I turn SWF files from adobe encore into apps for iphone and ipads?

    Everybody Im trying to make my SWF files that I created from adobe encore into apps for varies platforms mostly mobile devices and the ipad does anybody have any ideas?

    I got an idea for you. I think you can convert SWF to video format which can play on you iphone and ipad.
    Here are my suggestion,
    try this software
    I think it can solve your problem.

  • Load swf file in html based air?

    1. The start window opens up a transperant window in an iframe.
    2. Then the transperant window loads an external asp file from my server (content.asp) in an iframe.
    3. In the content.asp file i try to load an swf file, but nothing is visible?
    I use the following code in content.asp to show the swf file:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="300">       
    <param name="movie" value="flashtest.swf" />
    </object>
    I have uploaded a testpage with this code to the server and it works fine, but not in the air application!?
    What Im I doing wrong?

    No, nothing with HTML.
    I have 2 SWF applications. One is the Gallery, and the second is my Main Page.
    My Main Page must integrate the Gallery module in one of its page.
    The problem is when I try to integrate it, I think I must give de future loaded SWF some parameters like this :
    (My Main SWF loading in HTML)
    var so = new SWFObject("WebSite.swf", "flashcontent", "520", "700", "10", "#111111");
    so.addParam("allowfullscreen","true");
    so.addParam("allowScriptAccess","always");
    so.addParam("menu","false");
    so.addParam("wmode","opaque");
    so.addParam("bgcolor","#000000");
    so.setAttribute("id","flash");
    so.write("flashcontent");
    It was for the Main App. For my Gallery SWF I had to load it like this (in HTML) :
    var so = new SWFObject("Gallerie.swf", "gallery", "249", "249", "10", "#111111");
    so.addVariable("xml_path","Galerie/config.xml"); // this line is adding the path to the xml file make sure that it's name is xml_path
    so.addParam("allowfullscreen","true"); 
    so.write("flashcontent");
    So at the beginning I had 2 different projects with an HTML page for each.
    Now I wan't to directly integrate the Gallery SWF into the Main SWF. And as you have seen I must give it some parameters such as the "xml_path" and "allowfullscreen". This must be done in ActionScript 3 and I don't know how...
    I think I have to use FlashVars but I don't know how. As I said before, I have tried using the loaderinfo.parameters, but it is in read-only...
    Do you have an idea of how I can make it work ?

  • Android kitkat issue in loading swf file from device. URL found but not working

    Hi,
    I am facing one issue from a very long time regarding file access in Android Kitkat version 4.4.*. I have developed Adobe Air player application for android and it is working as expected below kitkat version but not on kitkat.
    I am following this methods -
    NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);
    public function onInvoke(event:InvokeEvent):void
                                        var newFile:String = String(event.arguments[0]);
                                        trace("Received new file from Android: "+newFile)
    Received URL form device in Android Kitkat -
    /storage/emulated/0/.iProfData/swf/playListFiles/ContentCreation/Ma_V2_522/en/Animation/27 031_1_Welcome screen.swf
    file:////storage/emulated/0/.iProfData/swf/playListFiles/ContentCreation/Ma_V2_522/en/Anim ation/27031_1_Welcome screen.swf 
                    -  Loading this URL using loader class in AS3 AIR but not working.
    file%3A///storage/emulated/0/.iProfData/swf/playListFiles/ContentCreation/Ma_V2_522/en/Ani mation/27031_1_Welcome%20screen.swf
           - Have used also by doing escape character but still it is not working showing file not found both SWF and mp4 case. (Mp4 case NetStream.Play.FileNotFound)
    By using the above methods I can have swf or mp4 video url but when I am loading it, It is not working giving error message "File not found/ IO Error". I have read that if use escape character then it will work but I have used escape character also but it is not working.
    Humble request you to please advise how can I solve this issue.
    Best regards,
    Sunil Kumar

    Starting in KitKat, Google requires that applications have permission to access files on the system. You must specifically add either the READ_EXTERNAL_STORAGE or WRITE_EXTERNAL_STORAGE permissions in order to access files. Adding either one of those permissions should let you read/access files on the device. Prior to KitKat, you didnt have to have these permissions listed in the manifest to access files.

  • Is it possible to load SWF files from an SQL database?

    Hi all, I am very new to flash (I am primarily a C'# developer!) and I have been asked to investigate the possibility of doing the following;
    Create an application that allows swf files to be uploaded and stored inside of a SQL database as binary data (Why a database is a long story!)
    Allow this binary data to be extracted via a http request to be dynamically loaded inside of a web page.
    Now the first part was easy. I have all of my swf's uploaded and stored inside of the database. I have code that can make a request for the binary and write it to the response, so far so good. Now this is where I am stuck.
    I thought I could dynamically load the swf binary data by creating a very basic swf that simply contains a movie clip holder and for now a simple loadMovie statement. My idea being that I can could provide a url for the loadMovie statement that returns the swf binary data. This is where I have ground to a halt.
    I can see the call being made from the swf, I can see the data being returned but I cannot get it to render. I remember seeing an article some time agao where someone stated that they had used this method with success but I cannot find now. Has anyone ever done anything like? Is it even possible? Am I missing something simple?
    I have tried to return both the raw binary data and also used response.write but to no avail. Can anyone help?

    You are possibly trying to load AS3 swf into an AS2 Container at least the use of loadMovie() points in that direction. Be sure to use AS3 and target at least Flash 9 in your Loader/Main.swf. Also the AS3 concept of how to load swfs  differs a lot from the old concept.
    Look into the docu:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Loader.ht ml
    But the biggest Problem seems to me -what you mentioned- that Loader needs a (defined) URLRepuest and since your swf files have no "real" URL and you surely don`t want to let the user directly write to your server, a workaround would be to write the BinaryStream with AIR-functionality to a local installlation directory and load it then from there.

  • Load SWF file from AIR library module.

    Hi,
    I am writing a testing agent (record and playback agent) for Flex applications.
    Here, I am required to load a SWF object (in a new window) from a AIR module library.
    And then I need a handle to the newly opened SWF so that I can perform testing operations on it.
    How can I accomplish this. Any links or sample code is welcome.
    Thanks,
    Pradeep.

    10.0.1 is very old, we're on 11.2 now.  Do you know about when this started breaking for you?  I'd suggest two things.  First, you might want to post over on the Flash Pro forums as there's a larger developer audience there and someone might have a quick answer for you.  Next, you might want to open a new bug at bugbase.adobe.com.  Please include detailed steps to reproduce, along with a link to your site and / or sample code so we can test this internally.

  • Loading local swf files from Application Dir (ios)

    Hi Guys,
    I would like to load additional local swf files to my ios release build but I am confused a little bit because of the new API changes.
    As far as I know at the moment (from Air 3.7 or newer) it is allowed to load local swf files that contains compiled actionscript both from local folder and from a predefined remote host as well. 
    My assumption based on this article:
    http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air- apps-on-ios/
    I created the text file to include all of my local swf file names and created the following node in the application.xml:
    <iPhone>
           <externalSwfs>assets/SampleSWFInfoFile.txt</externalSwfs>
    </iPhone>
    When I compile the release build (ipa) using command line adt, it converts all of my local swfs into the stripped swfs which is perfect, but even though I include all the swfs in the compiler command, it puts only the SampleSWFInfoFile.txt file into the assets folder in the ipa but not the swf files.
    I assume, it thinks I will load these files from an external host, but I would like to include them in the app itself.
    I tried to copy the stripped swf files from the externalStrippedSwfs folder and comment the <externalSwfs>assets/SampleSWFInfoFile.txt</externalSwfs> node in the application.xml and compile it and this way it puts the swf files into the ipa, but when I try to install and launch the app it crashes and when I test it using Flash Builder it shows an error message
    "VerifyError: Error #1042: Not an ABC file."
    Do any of you guys know the  solution for this problem?
    Thank you for your help in advance!

    You're publishing in AOT mode as long as you use one of these:
    The AIR Developer Tool or ADT has targets that lets you package apps either for the AOT mode or Interpreter mode. The targets for packaging in AOT mode are ipa-app-store, ipa-ad-hoc, ipa-test and ipa-debug.
    Flash Pro CS6 and Flash Builder automate this process pretty well so it's invisible but the SWF loads and executes code just fine for me when directly published.
    If I take it to command line I can use this to compile successfully (iPad test app):
    adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore my.p12 -provisioning-profile my.mobileprovision NameOfApp.ipa NameOfApp-app.xml NameOfApp.swf iTunesArtwork iTunesArtwork@2x AppIconsForPublish swfs/swfs.txt swfs/GenerateText.swf
    I at least include generic icons in there but I made a 'swfs' folder and placed 'swfs.txt' and 'GenerateText.swf' in there. The SWF uses code to randomly generate text and changes every second using a Timer. I load it in using the same code you do with the ApplicationDomain.currentDomain context. I see the SWF appear and text start randomly changing.
    As I compile there's a folder generated called 'externalStrippedSwfs' with the stripped SWF in there.
    One thing to note is I do not supply <externalSwfs>swfs/swfs.txt</externalSwfs> in my iPhone settings. If I do that it doesn't work. I supply the path to the text file containing the SWF I want to be stripped to adt itself along with the SWFs I want stripped and it takes care of the rest.

  • How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    In iTunes with your iPhone connected, click on the iPhone device, select the Apps tab, scroll down to the File Sharing section and pick an app that plays Quicktimes ("Files Connect" works in this example, but I'm open to suggestions of better apps for playing transferred Quicktimes) and drag your Quicktime from Finder to the Documents pane for the File Sharing app.   Once the file transfer is complete, go to the app on your iPhone to play the Quicktime.

  • Load Flat File from App Server

    HI, all.
    I want load flat file from appliation server. I created CSV file and loaded it on app. server with FM ARCHIVEFILE_CLIENT_TO_SERVER. After I created datasource and tried load data in the infocube. In this procedure I encountered with two problem
    1. When I look file in AL11, I doesn't see cyrillic symbols, instead this symbols I see #.
    2. When I try load data with data source, I get exception RS_EXCEPTION 000 "File don't open"
    Anybody can help me resolve this problem?
    wbr, Fanil.

    Hi, kodanda pani KV.
    2. File is was closed.
    1. Can me you clearly explain what you meen?
    wbr, Fanil

  • Is it possible to recover deleted files from the Microsoft Word app for iPhone? I am desperate.

    Is it possible to recover deleted files from the Microsoft Word app for iPhone? I am desperate.

    From the Microsoft Word app they say "Access Word documents from OneDrive, Dropbox, iCloud, OneDrive for Business, or SharePoint" so it sounds like you can specify where they are saved. However, my guess would be that the default will be OneDrive.
    To the OP: Have you tried logging into onedrive.live.com to see if you can see your letter there?

  • Can I store and email files from my iphone? Is there an app?

    Hi,
    Sorry you've heard this all before. I'm new to apple discussions. I've seen apps that let you transfer files, but how do I email files from my iphone?
    Thanks

    You cannot officially store emails on the phone other than photo's which come in via iTunes and attachments to emails. There is no disk mode on the iPhone.
    If you want to store files on the phone you can use something like DropBox App which will let you if you have an internet connection.

  • Can not load an external swf file from my site

    Hi ...
    I have a fla file which is loading external swf files from my local folders.
    I inserted some of the swf files to a web site and tried to load them from the site, not from my local folder...
    So it gave me a security error like below:
    *** Güvenlik Sanal Alanı İhlali ***security domain-area violation
    http://www.celiktek.com.tr/KIRIL.swf' SecurityDomain öğesi -- security domain element, 'file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf' uyumsuz bağlamına erişmeye çalıştı - tried to reach this incompatible url
    SecurityError: Error #2070: Güvenlik sanal alan ihlali -- security area violation: http://www.celiktek.com.tr/KIRIL.swf arayanı - searcher of this can not reach stage in file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf içindeki Stage'e erişemiyor. -
    at flash.display::Stage/requireOwnerPermissions()
    at flash.display::Stage/get numChildren()
    at KIRIL_fla::MainTimeline/frame1()
    so in my computer, I can load this swf , but how from a website ?
    thnx ...

    Thnaks ...
    I tried to use the securiyt panel that is openede and I added there my site
    www.celiktek.com.tr/KIRIL.swf
    but I still take the error
    *** Güvenlik Sanal Alanı İhlali ***
    http://www.celiktek.com.tr/KIRIL.swf' SecurityDomain öğesi, 'file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf' uyumsuz bağlamına erişmeye çalıştı
    SecurityError: Error #2070: Güvenlik sanal alan ihlali: http://www.celiktek.com.tr/KIRIL.swf arayanı file:///C|/Users/Acer/AppData/Local/Temp/Untitled%2D1.swf içindeki Stage'e erişemiyor.
    at flash.display::Stage/requireOwnerPermissions()
    at flash.display::Stage/get numChildren()
    at KIRIL_fla::MainTimeline/frame1()
    from my code
    var req:URLRequest=new URLRequest("http://www.celiktek.com.tr/KIRIL.swf");
    var lod:Loader=new Loader();
    lod.load(req);
    addChild(lod);
    lod.x=0;
    does this code works on your computer ... I know it is a weird question ... you dont have to try ...

  • How can i print my files from mi iphone 5 throught the airport express?

    How can i print my files from mi iphone 5 throught the airport express?? i have the last iOS version installed and also the last firmware version of the printer. the printer is already connected to the USB airport express and when i look for printers in airprinter there is no printer found. i have an HP LASERJET P1606dn(i think that is supported by the airprinter).

    In order to function with AirPrint, a printer must connect to the network wirelessly.
    Even if you have an AirPrint compatible printer, iOS devices will not be able to print to the printer when it is connected via USB.
    So, you have two options:
    1) Reconfigure the printer to connect to the network using wireless only and the iOS devices should be able to print that way....assuming that you have up to date drivers for the printer installed.
    2) Leave the printer connected via USB and then use a third party App like Printopia installed on your Mac as a "workaround" to (hopefully) allow the iOS to device to be able to print.  If you want to give this a try, there is a free trial for Printopia, so you will know if it will work before you buy. You must have a Mac running on the network in order for Printopia to function correctly.
    Printopia - AirPrint to Any Printer - Print from iPad - Print from iPhone ...

  • Ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    ipad i have load swf file but swf  is not working proper(flex 4.6) but android is fine to work how

    On the MBP, in iTunes, switch to Song view and enable the iCloud Status column by pulling down View > View options and selecting the option for "iCloud Status." Close the small window. Look for any tracks that have a status of "waiting." If you see several of them disable iTunes Match while holding down the Option key. Quit iTunes, wait a few seconds, then open it again and turn iTM back on. Let it compelete the scan. Wait until all tracks that are "waiting" have a status of either "matched" or "uploaded."
    On the iPad, turn off iTunes Match then launch the Music app and let the contents clear out. Power cycle the iPad for good measure, then re-enable the service once all the tracks in iTunes have been processed.

  • Load XML file from addon domain without cross-domain Policy file

    Hello.
    Assuming that there are two addon domains on the same server: /public_html/domain1.com       and      /public_html/domain2.com
    I try to load XML file from domain2.com into domain1.com without using cross-domain policy file (since it doesn’t work on xml files in my case).
    So the idea is to use php file in order to load XML and read it back to flash.
    I’ve found an interesting scripts that seems to do the job but unfortunately I can't get it to work. In my opinion there is somewhere problem with AS3 part. Please take a look.
    Here are the AS3/PHP scripts:
    AS3 (.swf in www.domain1.com):
    // location of the xml that you would like to load, full http address
    var xmlLoc:String = "http://www.domain2.com/MyFile.xml";
    // location of the php xml grabber file, in relation to the .swf
    var phpLoc:String = "loadXML.php";
    var xml:XML;
    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest(phpLoc+"?location="+escape(xmlLoc) );
    loader.addEventListener(Event.COMPLETE, onXMLLoaded);
    loader.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorHandler);
    loader.load(request);
    function onIOErrorHandler(e:IOErrorEvent):void {
        trace("There was an error with the xml file "+e);
    function onXMLLoaded(e:Event):void {
        trace("the rss feed has been loaded");
        xml = new XML(loader.data);
        // set to string, since it is passed back from php as an object
        xml = XML(xml.toString());
        xml_txt.text = xml;
    PHP (loadXML.php in www.domain1.com):
    <?php
    header("Content-type: text/xml");
    $location = "";
    if(isset($_GET["location"])) {
        $location = $_GET["location"];
        $location = urldecode($location);
    $xml_string = getData($location);
    // pass the url encoded vars back to Flash
    echo $xml_string;
    //cURLs a URL and returns it
    function getData($query) {
        // create curl resource
        $ch = curl_init();
        // cURL url
        curl_setopt($ch, CURLOPT_URL, $query);
        //Set some necessary params for using CURL
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       //Execute the curl function, and decode the returned JSON data
        $result = curl_exec($ch);
        return $result;
        // close curl resource to free up system resources
        curl_close($ch);
    ?>

    I think you might be right about permissions/settings on the server for php. Unfortunately I'm not allowed to adjust them.
    So I wrote my own script - this time I used file path instead of http address of the XML file.  It works fine in my case.
    Here it is:
    XML file on domain2.com:
    <?xml version="1.0" encoding="UTF-8"?>
    <gallery>
        <image imagePath="galleries/gallery_1/images/1.jpg" thumbPath="galleries/gallery_1/thumbs/1.jpg" file_name= "1"> </image>
        <image imagePath="galleries/gallery_1/images/2.jpg" thumbPath="galleries/gallery_1/thumbs/2.jpg" file_name= "2"> </image>
        <image imagePath="galleries/gallery_1/images/3.jpg" thumbPath="galleries/gallery_1/thumbs/3.jpg" file_name= "3"> </image>
    </gallery>
    swf  on domain1.com:
    var imagesXML:XML;
    var variables:URLVariables = new URLVariables();
    var varURL:URLRequest = new URLRequest("MyPHPfile.php");
    varURL.method = URLRequestMethod.POST;
    varURL.data = variables;
    var MyLoader:URLLoader = new URLLoader;
    MyLoader.dataFormat =URLLoaderDataFormat.VARIABLES;
    MyLoader.addEventListener(Event.COMPLETE, XMLDone);
    MyLoader.load(varURL);
    function XMLDone(event:Event):void {
        var imported_XML:Object = event.target.data.imported_XML;
        imagesXML = new XML(imported_XML);
       MyTextfield_1.text = imagesXML;
       MyTextfield_2.text = imagesXML.image[0].attribute("thumbPath");  // sample reference to attribute "thumbPath" of the first element
    php file on domain1.com:
    <?php
    $xml_file = simplexml_load_file('../../domain2.com/galleries/gallery_1/MyXMLfile.xml');  // directory to XML file on the same server
    $imported_XML = $xml_file->asXML();
    print "imported_XML=" . $imported_XML;
    ?>
    Regards
    PS: for those who read the above discussion: the first and the second script work but you must test which one is better in your situation. The first script will also work between two domains on different servers. No cross domain policy file needed.

Maybe you are looking for

  • How can I delete all the files in the Adobe CS4 Master Collection from my machine?

    How can I delete all the files in the Adobe CS4 Master Collection from my machine. I have tried Control Panel but it will not do anything, there are no error messages, it is like as if it is ignoring my instruction. Why should it be so difficult to d

  • 0material master data - attribute updated - not reflected in all providers

    Hello, An attribute of 0material was populated with data.  Previously it was blank. Since 0material is available in the dso's and cubes, the attributes come in as navigational. I am a bit confused.  The DSO which loads to the cube is not reflecting t

  • Battery on MacBook Pro drains very fast (even in sleepmode!)

    After upgrading to Leopard, my MacBook Pro has become almost unusable as a laptop, since the battery drains very, very fast (I get around half the battery time as before the upgrade). What's more.. It even drains battery when in sleepmode. When I clo

  • Sluggish performance - Mac Mini and MBP?

    I'm experiencing sluggish performance on my Mac Mini with Leopard (upgrade installation) when using the genie effect, expose, spaces, gadgets, 3d dock, etc. It's jerky, as if the animation is missing frames. Is it related to the graphics card? I also

  • No ICC printer profiles available

    I am using Lightroom 2.4 and tried to select a printer / media profile, but there are none of my profiles availabe. Just if I click the "Include Display Profiles" I can see the display profiles, but no more. Does any one know how to get the printerpr