Using .swc in Flash CS5

I have a user who is having trouble using my library .swc in flash CS5.
I do not have CS5 to help him out much; but the .swc does work fine with mxmlc from the Flex SDK, as well as under flashdevelop using the Flex SDK. And although not this exact version of the .swc I have previously found it work fine under CS4 and have other users with CS3 who do not have any trouble.
under mxmlc, using the compiler options:
--include-libraries $(NAPE_BIN)/debug_nape.swc
There are no issues, and everything works as expected.
The error my user is receiving is about an undefined reference to a specific class contained in the .swc (DummyNapeMain)
This error appears also with mxmlc if I use the option --library-path instead of --include-libraries
I repeat the test case here if it will help to find a working configuration for CS5.
package {
     import flash.display.MovieClip;
     import flash.events.Event;
     import nape.util.*;
     import nape.space.*;
     import nape.phys.*;
     import nape.shape.*;
     import nape.geom.*;
     public class Main extends MovieClip {
          public function Main() {
               super();
               if(stage!=null)
                    addEventListener(Event.ADDED_TO_STAGE, init);
               else init(null);
          public function init(ev:Event):void {
               if(ev!=null) removeEventListener(Event.ADDED_TO_STAGE, init);
               haxe.init(null);
               var debug:Debug = new BitmapDebug(600,600,0x333333);
               addChild(debug.display);
               var space:Space = new Space(new Vec2(0,400));
               var walls:Body = new Body(BodyType.STATIC);
               walls.shapes.add(new Polygon(Polygon.rect(0,0,600,20)));              
               walls.shapes.add(new Polygon(Polygon.rect(0,600,600,-20)));              
               walls.shapes.add(new Polygon(Polygon.rect(0,0,20,600)));              
               walls.shapes.add(new Polygon(Polygon.rect(600,0,-20,600)));              
               walls.space = space;
               for(var i:int = 0; i<100; i++) {
                    var b:Body = new Body();
                    b.position.setxy(50+Math.random()*500,50+Math.random()*500);
                    b.shapes.add(new Polygon(Polygon.box(16,16)));
                    b.rotation = Math.random()*2*Math.PI;
                    b.space = space;
               addEventListener(Event.ENTER_FRAME, function (ev:Event):void {
                    space.step(1/60,10,4);
                    debug.clear();
                    debug.draw(space);
                    debug.flush();
the .swc is available at: https://github.com/deltaluca/nape/raw/master/bin/release/debug_nape.swc
Thank you.

I downloaded a CS5.5 trial to test this out myself.
The error does indeed happen with the test case;
my user found a hack to get around the error which is to do:
DummyNapeMain;
(just like that) to force the compiler to include it from the .swc and prevent the error occuring.
Why is there no way in Flash CS5/5.5 to have the entire .swc included without flash trying (and failing) to determine what does, and doesn't need to be included?

Similar Messages

  • Alt key stuck when using mouse in flash CS5.5 on os x lion. sucks. please help.

    Hi there,
    since I've updated to lion flash cs5.5 is utterly unusable. The alt key is always stuck in this app when I use the mouse. So if I select something then try to move it, it copies it (as if I was holding down alt key). It basically means I can't use flash for anything..
    Has anyone else had this issue and resolved it?
    I saw similar forum posts for photoshop cs5 and snow leopard, and even tried the utility provided on those forums. Didn't work.
    I removed my wacom tablet driver,
    I reinstalled flash,
    I shut down EVERYTHING except flash.  Nothing works - alt key is always active in flash.
    Is this some kind of bad joke from Adobe? Is there really no fix for this? I can't believe it - honestly...
    Additional note - in the key remapping page - it reckognizes the alt key normally, and all other key combinations - it is only when using the mouse that the alt key is stuck.
    El mensaje fue editado por: georgecookontheroad

    Hello,
    I was having the same exact problems with Flash Professional after upgrading my OS X to Lion.  (Alt/Option key seems like it's stuck / Duplicating objects on stage just by clicking and moving the object.)  My main problem was not being able to curve a straight line with the Arrow tool.  Instead it would create a corner point as if the Alt/Option key was being held.
    I stumbled upon this thread before finding my solution so I thought I'd share what worked for me.
    Here is the thread I found with the solution that worked:
    http://forums.adobe.com/message/5222999
    Basically I had a program called AirDisplay installed.  AirDisplay allows me to use my iPad as a second monitor for my Mac.  So if you have this program installed, or one similar to AirDisplay, uninstalling this program may get your Flash Professional to work correctly again.  It certainly did for me to my amazement.
    Hope this works for you or anyone else who is experiencing this weird and frustrating problem!

  • Use WCF with Flash CS5

    Hi,
    Is it possible to call WCF service with flash CS5.
    Regards------Amit

    I am trying this with the following code
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.remoting.RemoteObject;
    import mx.rpc.soap.*;
    import mx.rpc.soap.*;
    import flash.events.Event;
    import mx.messaging.channels.StreamingAMFChannel;
    var wcfProxy:RemoteObject= new RemoteObject( "GenericDestination" );
    wcfProxy.source = "http://Domain.org/Service.svc?wsdl";
    wcfProxy.addEventListener( ResultEvent.RESULT, gotResult );
    wcfProxy.addEventListener( FaultEvent.FAULT, gotError );
    var arg1:Number=5;
    var arg2:Number=7;
    var user:String="test";
    var opList:String= "a";
    function calculate(e:Event)
            wcfProxy.logOn(user,user);
    function gotResult( event:ResultEvent ):void
        trace("The Vlue is = "+event.result.toString());
    function gotError(event:FaultEvent):void
        trace("Error is = "+event)
    sndBtn.addEventListener(MouseEvent.CLICK,calculate);
    but it always give the following error
    Error is = [FaultEvent fault=[RPC Fault faultString="[MessagingError]" faultCode="InvokeFailed" faultDetail="null"] messageId="0102BC47-CED4-B019-F8FE-338684D3DBEB" type="fault" bubbles=false cancelable=true eventPhase=2]
    Please help me out
    Thanks

  • Using as1 in flash cs5

    hi i am using macromedia flash 6 at the moment and i realise i need to update to adobe cs5 however it has taken me so long
    to learn  the as1 scripting language  that i was wondering if i can still access and edit and publish my  old swfs in adobe without the
    need to learn as3
    goof

    Welcome to our community
    Unfortunately, you goofed. This forum is for discussion of a specific output type called FlashHelp produced from an Adobe application known as RoboHelp. It is not for seeking help with using Adobe Flash.
    You need to visit the link below and re-post your issue in the other forum.
    Click here to view
    Cheers... Rick

  • Importing swc file (created in FB4.5) in Flash CS5.5

    Hallo. I am trying to create a library inside flex. This library includes as files and visual mxml files. I am trying to make this swc communicate with my Flash CS 5.5 application but i can't do it. I just wish to ask you if i can import swc in flash cs5.5 if the swc has been created inside fb and contains mxml files... Is that possible??
    Thx
    Max

    Nobody understand my question or nobody knows the answer?
    Max

  • SWF with TLF compiled in Flash CS5 can't be imported into Flex 4.5

    Hello there,
    Trying out Flex 4.5 preview I've run into a problem:
    In my Flex project I dynamically load various SWF files compiled in Flash CS5. These SWFs use TLF.
    With Flex 4.1 everything worked as expected, but in Flex 4.5 I get RTE(s).
    Just to be clear: if the SWF uses old classic text, Flex 4.5 displays it normally, but once you try TLF - nothing but RTE.
    Anybody has experienced that?
    I've also posted this on the TLF forum.
    I'm on OS 10.6.6, and use the prerelease version of Hero (not the latest 18623)
    Thanks,
    FTQuest

    I tried to add the newer TLF swc to FLash CS5 (pointing to it in the library path), but it didn't work.
    So, we'll wait till Flash team releases next update.
    Thanks for the clarification,
    FTQuest

  • Recommended CP5 - Flash CS5 Workflow?

    Hi all,
    I'm wondering what the best workflow is for projects using CP5 and Flash CS5. Is it better to embed Flash within a larger CP project? How well does embedding CP .swfs into a Flash project work? What are the gotchas associated with working either way? I'm using AS3 and current versions of CP and Flash on a Mac.
    FYI, here's specifically what I'm trying to do: the e-learning course opens to an interface with multiple buttons (images with down/up states, animations, etc.); the main interface is essentially a simulation of a process (i.e., not a software simulation) so it also includes text fields, sliders, listboxes and other interface elements. There are also Help and Hint buttons that need to display content (currently I'm thinking these will open in a new window sitting within the larger interface (kind of like how the Flash stage is a smaller window within the larger Flash IDE), or they could overlay the entire screen).
    I think the larger interface/process simulation lends itself better to Flash, so I would prefer to use Flash for this and then import CP questions and content into the Flash file. CP content just needs to play, but the quiz questions need to be able to record scores out to the LMS and I also need access to quiz results in the Flash file. I'm concerned that LMS reporting won't work properly because my CP files will just be individual quizzes and not part of a larger CP "course."
    Is it possible in this scenario to build the entire project in CP with these project requirements? Would I be able to import Flash animation/AS3 programming .swfs into CP, place these at specified screen locations and then pass values back to CP for processing?
    I'd also like to be able to show the Top 10 scores on the process simulation. Surely CP doesn't have the capability to show this kind of thing does it?
    For all of these reasons, I'm wondering if it would be preferable to create a CP project, and just load the Flash  process simulation full screen within that CP project as, essentially, a  standalone .swf? If I were to do this, I still need full Flash  capability, including reading/processing XML, database access for Top 10 scores, etc...  What issues are there with this approach where the Flash .swf is essentially a child .swf of the CP project? In particular, what are the gotchas?
    Any thoughts/best practices you may have on how best to architect the structure for this type of project are surely welcomed!
    Kevin

    Any widget can offer an interface that allows its customization. If your animation should vary based on developer's choices, then you put these choices in the widget interface. If you want to see for yourself, just insert any widget on the stage (from the widget panel) and double click on it. It will open the widget interface.
    However, from what I understand, you animation does not need to be customized so it's not mandatory to build it in a widget. Make it a widget only if you need to present customization options.
    Whyves
    www.flash-factor.com

  • MP3 Player in AS3 Flash CS5 with autoresume feature?

    I created a web site with an MP3 player on several of the pages. I created the player using AS3 in Flash CS5 Professional. It has a volume slider on it that I set the initial value to 2. It music that is loaded is identified in an XML file. If the user changes the volume, pauses or stops the music, I want to use autoresume (or something equivalent) to make sure the player continues in the same status across pages.The player is embeded on the pages using SWFObject.
    I have searched for several days on the web trying to find a solution and have not found one. I don't know if there is something I need to do in AS3, in Flash, on my pages or if it can be handled in PHP or XML. Does anyone know a good approach?

    Thank you for your help. I put the code in and it works except for one thing, the position of the slider does not change when I bring the player up the second time, it is always set to the default position. I do not know what value to store and reset for the slider position.
    I have three different books that I have searched and I have searched on the Internet but cannot find the answer. I have pasted the Action Script below. I hope you can help me. In the meantime, I will continue to look more myself. Thank you again.
    import flash.display.DisplayObject;
    import fl.events.SliderEvent;
    import flash.media.SoundTransform;
    import flash.net.SharedObject;
    // rewind and fast forward rate
    const SEARCH_RATE:int = 3000;
    // XML file that holds reference to the mp3 files and used to load the tracks
    const XML_FILE:String = "tracks.xml";
    const FORWARD:String = "forward";
    const BACKWARD:String = "backward";
    var playDirection:String;
    var index:Number = 0;
    var trackPos:Number = 0;
    var trackOn:Boolean = false;
    var trackXML:XML;
    var trackList:XMLList;
    var urlRequest:URLRequest;
    var urlLoader:URLLoader;
    var track:Sound = new Sound  ;
    var newTrack:Sound;
    var newUrlRequest:URLRequest;
    var chan:SoundChannel = new SoundChannel  ;
    var context:SoundLoaderContext = new SoundLoaderContext(7000,false);
    var trackTimer:Timer = new Timer(200);
    var trans:SoundTransform;
    var mySO:SharedObject = SharedObject.getLocal("MP3Vol");
    var currVol:Number = mySO.data.MP3CurrVol;
    if (!mySO.data.MP3CurrVol) {
        currVol = .2;
    // create a new URLRequest object and use to reference the XML file
    urlRequest = new URLRequest(XML_FILE);
    // create a new URLLoader object to load the XML file
    urlLoader = new URLLoader(urlRequest);
    urlLoader.addEventListener(Event.COMPLETE, onceLoaded);
    urlLoader.load(urlRequest);
    //listener for the volume slider;
    volSlide.addEventListener(SliderEvent.CHANGE, volumeChange);
    function onceLoaded(e:Event):void
        trackXML = new XML(e.target.data);
        trackList = trackXML.track;
        urlRequest = new URLRequest(trackList[index].path);
        trans = new SoundTransform(currVol);
        track.addEventListener(Event.COMPLETE, trackCompleteHandler);
        track.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
        track.load(urlRequest, context);
        chan = track.play(trackPos);
        chan.soundTransform = trans;
        chan.addEventListener(Event.SOUND_COMPLETE, playNext);
    function trackCompleteHandler(e:Event):void
        trackOn = true;
        title_txt.text = trackList[index].title;
        performer_txt.text = trackList[index].performer;
        e.target.removeEventListener(Event.COMPLETE, trackCompleteHandler);
        e.target.removeEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
    function trackProgressHandler(pe:ProgressEvent):void
        var percent:int = (pe.target.bytesLoaded / pe.target.bytesTotal) * 100;
        performer_txt.text = "Loading...";
        title_txt.text = percent + "%";
    play_mc.addEventListener(MouseEvent.CLICK, playTrack);
    stop_mc.addEventListener(MouseEvent.CLICK, stopTrack);
    next_mc.addEventListener(MouseEvent.CLICK, nextTrack);
    prev_mc.addEventListener(MouseEvent.CLICK, prevTrack);
    pause_mc.addEventListener(MouseEvent.CLICK, pauseTrack);
    ffwrd_mc.addEventListener(MouseEvent.CLICK, ffwrdTrack);
    rewind_mc.addEventListener(MouseEvent.CLICK, rwndTrack);
    function playTrack(e:MouseEvent):void
        trackTimer.stop();
        if (! trackOn)
            newUrlRequest = new URLRequest(trackXML.track[index].path);
            newTrack = new Sound  ;
            newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
            newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
            newTrack.load(newUrlRequest, context);
            chan = newTrack.play(trackPos);
            chan.soundTransform = trans;
            chan.addEventListener(Event.SOUND_COMPLETE, playNext);
            play_mc.removeEventListener(MouseEvent.CLICK, playTrack);
    function stopTrack(e:MouseEvent):void
        trackTimer.stop();
        if (trackOn)
            chan.stop();
            trackOn = false;
            play_mc.visible = true;
            play_mc.addEventListener(MouseEvent.CLICK, playTrack);
        trackPos = 0;
    function nextTrack(e:MouseEvent):void
        if (index < trackList.length() - 1)
            index++;
        else
            index = 0;
        trackPos = 0;
        chan.stop();
        newUrlRequest = new URLRequest(trackList[index].path);
        newTrack = new Sound  ;
        newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
        newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
        newTrack.load(newUrlRequest, context);
        chan = newTrack.play(trackPos);
        chan.soundTransform = trans;
        chan.addEventListener(Event.SOUND_COMPLETE, playNext);
        track = newTrack;
    function prevTrack(e:MouseEvent):void
        if (index > 0)
            index--;
        else
            index = trackList.length() - 1;
        trackPos = 0;
        chan.stop();
        newUrlRequest = new URLRequest(trackList[index].path);
        newTrack = new Sound  ;
        newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
        newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
        newTrack.load(newUrlRequest, context);
        chan = newTrack.play(trackPos);
        chan.soundTransform = trans;
        chan.addEventListener(Event.SOUND_COMPLETE, playNext);
        track = newTrack;
    function pauseTrack(e:MouseEvent):void
        if (trackOn)
            trackPos = chan.position;
            chan.stop();
            play_mc.visible = true;
            play_mc.addEventListener(MouseEvent.CLICK, playTrack);
            trackOn = false;
    function ffwrdTrack(e:MouseEvent):void
        if (trackOn)
            playDirection = FORWARD;
            trackTimer.addEventListener(TimerEvent.TIMER, trackSearch);
            trackTimer.start();
    function rwndTrack(e:MouseEvent):void
        if (trackOn)
            playDirection = BACKWARD;
            trackTimer.addEventListener(TimerEvent.TIMER, trackSearch);
            trackTimer.start();
    function trackSearch(te:TimerEvent):void
        trackPos = chan.position;
        chan.stop();
        chan.removeEventListener(Event.SOUND_COMPLETE, playNext);
        if (playDirection == FORWARD)
            if (trackPos + SEARCH_RATE < track.length)
                trackPos +=  SEARCH_RATE;
                chan = track.play(trackPos);
                chan.soundTransform = trans;
                chan.addEventListener(Event.SOUND_COMPLETE, playNext);
            else
                if (index < trackList.length() - 1)
                    index++;
                else
                    trackPos = 0;
                    chan.stop();
                    newUrlRequest = new URLRequest(trackList[index].path);
                    newTrack = new Sound  ;
                    newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
                    newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
                    newTrack.load(newUrlRequest, context);
                    chan = newTrack.play(trackPos);
                    chan.soundTransform = trans;
                    chan.addEventListener(Event.SOUND_COMPLETE, playNext);
                    track = newTrack;
                    te.target.stop();
                    te.target.removeEventListener(TimerEvent.TIMER, trackSearch);
        else if (playDirection == BACKWARD)
            if (trackPos - SEARCH_RATE > 0)
                trackPos -=  SEARCH_RATE;
                chan = track.play(trackPos);
                chan.soundTransform = trans;
                chan.addEventListener(Event.SOUND_COMPLETE, playNext);
            else
                if (index > 0)
                    index--;
                else
                    index = trackList.length() - 1;
                trackPos = 0;
                chan.stop();
                newUrlRequest = new URLRequest(trackList[index].path);
                newTrack = new Sound  ;
                newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
                newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
                newTrack.load(newUrlRequest, context);
                chan = newTrack.play(trackPos);
                chan.soundTransform = trans;
                chan.addEventListener(Event.SOUND_COMPLETE, playNext);
                track = newTrack;
                te.target.stop();
                te.target.removeEventListener(TimerEvent.TIMER, trackSearch);
    function playNext(e:Event):void
        if (index < trackList.length() - 1)
            index++;
        else
            index = 0;
        trackPos = 0;
        chan.stop();
        chan.removeEventListener(Event.SOUND_COMPLETE, playNext);
        newUrlRequest = new URLRequest(trackList[index].path);
        newTrack = new Sound  ;
        newTrack.addEventListener(Event.COMPLETE, trackCompleteHandler);
        newTrack.addEventListener(ProgressEvent.PROGRESS, trackProgressHandler);
        newTrack.load(newUrlRequest, context);
        chan = newTrack.play(trackPos);
        chan.soundTransform = trans;
        chan.addEventListener(Event.SOUND_COMPLETE, playNext);
        track = newTrack;
    // uses volume slider value to control volume
    function volumeChange(e:SliderEvent):void
        currVol = e.target.value;
        trans.volume = currVol;
        chan.soundTransform = trans;
        mySO.data.MP3CurrVol = currVol;
        mySO.flush();

  • Creating a SDK (.swc) in Adobe Flash CS5 - Error + Best Practices Questions

    Hello all,
    I'm currently developing a client library for a server-based API which is developed by my company.
    The goal is for the .swc to be usable in both Flash and Flash Builder (any Actionscript environment, really).  So far I've just been creating it in Flash CS5 and have yet to test it in Flash Builder.  It contains a single piece of UI (a login window) but is intended to expose a number of actionscript classes as API interface points to the developer.  The login window is a single Movie Clip placed onto the stage.  I have been testing by simply running the Flash project for the SDK and it works well.
    However, I run into problems when I attempt to use the SWC in other projects (I have the Flash project for the SDK set to create a SWC as well as a SWF)...
    I link the SWC to the other project using the flash compiler settings
    com.mycompany.SDK is a class required for initialization (singleton) and com.mycompany.LoginWindow is the UI window for logging in
    The developer needs to call SDK.Initialize(), which seems to work fine
    When the following code is added I get the below error: addChild(new LoginWindow())
    1046: Type was not found or was not a compile-time constant: InstanceInfo.
    I take it that the error is a result of an undefined class - but I cannot figure out where InstanceInfo (it is not a class of mine) is being used or how to fix this...

    Found a good example that helped me figure this out.
    http://www.adobe.com/devnet/air/flex/quickstart/articles/xml_prefs.html
    Will share the results when complete.
    Thanks

  • How to debug swc files in Flash CS5

    Hi, to coin a familiar phrase "I'm new to Flash developement". My question is very simple. How do I debug .swc files (that I've created in Flash Builder 4) in Flash Professional CS5. I've incorporated the .swc file in the Publish Settings->Flash tab. But when I attempt to consume the objects in the .swc file I get an error saying it "Cannot display source code at this location."
    Can someone tell me the best pratice for debugging .swc files. Do I debug them in Flash Builder or Adbobe Professional Flash CS5?

    I think I found the solution to my problem..... but dont know how to implement it correctly.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageScal eMode.html#SHOW_ALL
    I believe I need to use the SHOW_ALL constant, but there isn't an example of how to do it
    Heres my code, it compiles without errors, but when I publish it as .exe I get the 'Error 1037: Package cannot be nested':
    package
              import flash.display.StageScaleMode
              import flash.media.Camera;
              import flash.media.Video;
              public class ScaleMode
                        public static const SHOW_ALL:String = StageScaleMode.SHOW_ALL;
                        var camera:Camera = Camera.getCamera();
                        if (camera != null) {
                                  videoTwo.attachCamera(camera);
                        } else {
                                  trace("You need a camera.");
              stop();
    Any ideas??

  • Using Air 2.6 with Flash CS5

    hey there all,
    here is what i am doing so far to use Air 2.6 with Flash CS5. i counts seem to find any help online with this, hope this helps someone...
    Setting Up Flash CS5
    1. replace Program FIles\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\AIR2.0\airglobal.swc with the airglobal.swc in the AdobeAIRSDK\frameworks\libs\air folder of the AIR 2.6 SDK zip file (AdobeAIRSDK.zip)
    This lets you compile with the new SDK and use all the new API for camera roll, microphone, etc.
    2. replace Program Files\Adobe\Adobe Flash CS5\AIK2.0 with the AdobeAIRSDK folder in the zip file (AdobeAIRSDK.zip) you downloaded from Adobe.
    now you can do a test movie in Flash CS5 and it will use the new ADL for testing in Flash (finally works with landscape!).
    Publishing
    for publishing, unfortunately you cant use the built-in publish for iOS. i wrote this batch file and use it (also you can write an ant task if you use FDT/Flash Builder). This is for windows 64bit...
    "C:\Program Files (x86)\Java\jre6\bin\java" -jar C:\AdobeAIRSDK\lib\adt.jar -package -target ipa-ad-hoc -storetype pkcs12 -keystore [KEYFILE].p12 -storepass [KEY PASSWORD] -provisioning-profile [MOBILE PROVISION FILE].mobileprovision [IPA NAME].ipa [XML FILE NAME].xml [SWF FILE NAME].swf Icon_29.png Icon_48.png Icon_57.png Icon_72.png Icon_512.png Default-Landscape.png Default-Portrait.png Default-PortraitUpsideDown.png Default-PortraitLandscapeLeft.png Default-PortraitLandscapeRight.png
    i have a 64bit system so i had to specify the 32 bit JRE and use the ADT jar for packaging. now i just double-click the batch file and it compiles for iOS.
    Adjusting the app.xml File
    the yourapp-app.xml file needs some tweaks from the CS5 packager to work in 2.6:
    1. namespace has to change from
    <application xmlns="http://ns.adobe.com/air/application/2.0">
    to
    <application xmlns="http://ns.adobe.com/air/application/2.6">
    2. the version node needs to be renamed versionNumber
    from
    <version>.5.572<</version>
    to
    <versionNumber>0.5.572</versionNumber>
    notice you need to include the leading zero if you arent using a whole number version
    ok, thats what i have so far, hope this helps...

    hey there all, for those on Windows,
    here is a compile script i put together for iOS using AIR 2.6. Copy and past this into a file named "compile ios.wsf". All you have to do is double-click and it will compile and paclage your app.
    the script assumes you have a versionNumber like: 0.4.123 it takes and incrememnts the build number (the last 3 numbers only) by one. i will imrpove this later.
    <?xml version="1.0" ?>
    <job>
    <script language="JScript">
         This file assumes you are using a 3-segment version system.
         It is not very inteligent, it just increments the last set of numbers in the
         versionNumber in the XML file by 1. !!be aware that it is not yet smart enough
         to update the second number!!
         // these properties change depending on your project
         var XML_FILE = "YourApp-app.xml";
         var SWF_FILE = "YourApp.swf";
         var IPA_FILE = "YourApp.ipa";
         var TARGET = "ipa-ad-hoc";
         var KEY_FILE = "dist.p12";
         var KEY_PASSWORD = "PASSWORD";
         var PROVISIONING_PROFILE = "YourApp.mobileprovision";
         var ICONS = "Icon_29.png Icon_48.png Icon_57.png Icon_72.png Icon_512.png";
         var SPLASH_SCREENS = "Default-Landscape.png Default-Portrait.png Default-PortraitUpsideDown.png Default-PortraitLandscapeLeft.png Default-PortraitLandscapeRight.png";
         // the location of your JRE/JDK and Air SDK files
         var JRE_BIN = "C:\\Progra~2\\Java\\jre6\\bin\\java";
         var ADT_JAR = "C:\\AdobeAIRSDK\\lib\\adt.jar";
         // this stuff shouldnt need to change
         var objXML = new ActiveXObject( "Microsoft.XMLDOM" );
         objXML.async = false;
         objXML.load(XML_FILE);
         var root = objXML.documentElement;
         var versionNumberNode = root.selectSingleNode("versionNumber");
         var versionNumberArray = versionNumberNode.text.split(".");
         var buildNumber = parseInt(versionNumberArray[2]) + 1;
         versionNumberNode.text = versionNumberArray[0] + "." + versionNumberArray[1] + "." + buildNumber;
         objXML.save(XML_FILE);
         var cShell = WScript.CreateObject("WScript.Shell");
         var compileCommand = '"' + cShell.CurrentDirectory + '\\compile ios.bat"';
         compileCommand = JRE_BIN + " -jar " + ADT_JAR + " -package -target " + TARGET + " -storetype pkcs12 -keystore " + KEY_FILE + " -storepass " + KEY_PASSWORD + " -provisioning-profile " + PROVISIONING_PROFILE + " " + IPA_FILE + " " + XML_FILE + " " + SWF_FILE + " " + ICONS + " " + SPLASH_SCREENS;
         //WScript.Echo(compileCommand);
         var runVal = cShell.run(compileCommand, 1, true);
    </script>
    </job>
    i will see if there's time to do a shell script of OSX and an ANT script for Eclipse...

  • Successfully using a Native Extension with Flash CS5.5 Pro, having issues

    Hey all,
    I'm trying to use a native extension due to an app rejection about the new storage guidelines. I'm hoping someone can help me figure out how to use a native extension from Flash CS5.5 and the adt command line utility (I've never used before).
    Apples storage guidelines in 5.0.1 require files saved to Documents (and other places) to be marked with the icloud "do not back up" bit. I'm trying to use Adobe's IOS 5.0.1 data storage native extension to do that as I have file sharing enabled and my app downloads files I want the user to be able to copy to their desktop.
    From the bits and fragments I'm reading all over, getting it to compile means using the command line adt tool (I've never used it before) because Flash Pro CS5.5 doesn't support native extensions. Also, this native extension requires a v14 SWF published (11.1) and CS5.5 only goes up to 10.2 (or higher if you install the players).
    I edited the AiriPhone.xml file and pointed it to an AIR 3.1 airglobal.swc and I have AIR 3.1 overlayed in flash. I can't test AIR for iOS anymore after that change but I can get it to compile a SWF. The adt command line adt utility stopped complaining that my SWF version was 13 when it needed 14, so I assume this worked?
    I am trying to compile a debug version so I can see trace statements to see if the native extension reports success on changing the bit. Here is my command line cobbled together from scraps of info on adobe.com and the -help data:
    adt -package -target ipa-debug -connect 192.168.1.80 -provisioning-profile myApp.mobileprovision -storetype pkcs12 -keystore myApp.p12 myApp.ipa myApp-app.xml myApp.swf dat AppIconsForPublish Default-Landscape.png Default-LandscapeRight.png -extdir extensionDir
    Before this iCloud change this app published directly from Flash Pro CS5.5 without any issues. I am only running into issues getting this app to work with this native extension and/or published correctly.
    I am including the folders "dat" and "AppIconsForPublish" as well as splash screens (this app is landscape-only) as well as that extension in the folder extensionDir.
    After putting in my password my app compiles into an IPA which I can drop into iTunes. It has the same general size as the IPA generated from Flash Pro. The icon is correct, etc.
    When I sync this file, the progress bar goes across, I see it loading on my iPad and then once it goes to install I get a popup saying "iTunes Sync: 'myApp' failed to install."
    Is there anything obvious wrong with my adt line? Has anyone else used this native extension? Ideas on what I can do to fix this?
    No, unfortunately I did not build this with Flash Builder. I am an avid user of it now and this would be a moot point as it uses ANEs and changes SWF versions trivially. I have to get this to compile using Flash Pro CS5.5 though.
    Any help is greatly appreciated!
    edit:
    Just FWIW, after I updated the .xml to use the latest AIR and such (so the version is 14) I removed the extension, exported purely from Flash Pro CS5.5 and the app works fine. As soon as I enable the <extension> in the XML I can no longer install the app. This just appears to be a noob adt publish issue.

    My app downloads PDFs, movies and other information-esque files and saves them to the apps Documents folder so they can be retrieved via file sharing. These files not being in something purgable like /Library/Caches and not having the "do not back up" bit is why I was rejected.
    update: It's definitely my command line building.. I took out the native extension completely and published from flash to an IPA and it works. I then run adt on the same SWF that just worked and it fails to install. So the install failing is my command line. I see this article and my command line is very similar. I'm really uncertain why it's failing.

  • Properly updating Flash CS5.5 to use the lastest Flash Player/Debugger

    Hey all,
    I'm just about to uninstall and reinstall at this point but I'm getting my install all screwed up trying to update Flash Pro CS5.5 to use Flash Player 11. I had it fine using the MXP provided in this adobe blog. Though that's 11.0 not 11.1. It did work however.
    I downloaded the latest Flash Player / Debugger .exe and the latest SWC for 11.1 and now Stage3D is no longer being seen. Clearly I screwed something up. I uninstalled and reinstalled the MXP after deleting the FP11 XML and FP11 directory but it's not working anymore.
    Is there a clear cut simple way to explain how to overlay the latest Flash Player for FPCS5.5?
    I used the AIR overlay instructions for 2.6 - 3.1 and it worked every time. Now I just need Flash Player overlay instructions.
    I'm very interested to start trying to Starling framework with Stage3D. I select FP11 to export and it tells me it can't find Stage3D. D'oh!
    Thanks for tips!

    Just an update. Upon printing flash.system.Capabilities.version I can see for CTRL+ENTER it's using version WIN 10,2,153,2. When I do a debug test it's using version WIN 11,1,102,55. That clearly explains why Stage3D is only available in debug testing.
    I did overlay release and debug .exes in the Flash CS5.5 Player folder. Does anyone know of another place I might need to overwrite the flash player or which .exe CTRL+ENTER actually launches?

  • Importing anything (swf, swc, etc) compiled from Flash CS5.5 into FB 4.5 throws Errors

    I'm using FB 4.5 with sdk 4.1.0.16076.
    I've tried importing an swc file, using the "convert symbol to flex component" command and it throws a VerifyError: Error #1053: Illegal override.
    I've tried just compiling an swf and embedding it in a Flex compoent, again i get a VerifyError: Error #1053: Illegal override.
    I've tried changing a number of compile settings in Flash CS5.5 but with no luck.
    Does anyone have any ideas how to fix this error?

    with the swf it is: Illegal override of createTextLine in flashx.textLayout.compose.ComposeState.
    the swc is  Illegal override of FTETextFieldHostFormat in FTETextField.as$134.FTETextFieldHostFormat.
    these errors seem arbitrary, since the first time i loaded an swc i got a different Illegal override error regarding some kind of CSS object that i can't remember.
    i have read other threads that indicate this problem may occur when compiling objects using different SDKs in the same project. Does Flash CS5.5 compiled objects need to be imported to the 4.5 sdk maybe? (i'm using sdk 4.1).

  • Flash CS5: Export SWC doesn't work

    Could anyone help me with this problem. I have Flash CS5 and I'm trying to export SWC from it to use as a library with Flex SDK (FlashDevelop). I have "Export SWC" checked in publish settings and for a while it worked. Now, even if it still is checked, SWC isn't created (at least in the same directory as SWF). I even tried creating a completely new FLA and copied everything from the old library in there. Still it doesn't work.

    I periodically run into this issue too. I tried various 'voodoo' practices like:
    removing old versions of the exported files first
    reverting to "Use Default Names" on the Formats tab
    adding HTML as a Type
    removing HTML as a Type
    un-checking "Include XMP metadata"
    But I still haven't found out what makes or breaks the magical SWC export...
    I'm using Flash CS5 Professional 11.0.2.489 on a PC
    Publishing as AS3, Player 10
    The .fla is quite large, 7,200 KB,
    The resulting .swf is 1,808 KB...
    still no swc...
    Anyone else have any tips on this issue?

Maybe you are looking for