1

I read this was possible here:http://blogs.adobe.com/airodynamics/2012/11/09/packaging-and-loading-multiple-swfs-in-air-apps-on-ios/

However I can seam to get it right. My project is an ActionScript Mobile Project it uses the new AIR SDK 3.7. I create my SWF with Flash CS4. As publishing settings I use the Flash Player 10 with ActionScript 3.0. The ActionScript code is in the root. I set the swf version in the ActionScript Compiler to 10 -swf-version=10. I use the following code to load the swf:

    public function TestSWF_Apple()
    {
        super();

        // support autoOrients
        stage.align = StageAlign.TOP_LEFT;
        stage.scaleMode = StageScaleMode.NO_SCALE;


        var _urlRequest:URLRequest = new URLRequest("preload.swf");
        var _loader:Loader = new Loader();
        var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
        _loader.load(_urlRequest, _lc);

        addChild(_loader);
    }

Can someone tell me what am I missing. I still get the error: Uncompiled ActionScript. Thanks, Dave

Dave
  • 598
  • 2
  • 4
  • 17

1 Answers1

0

If you're sure you're compiling with AIR 3.6 or higher and that preload.swf is included in your iOS app on export (check your Build Packaging settings): have you tried using an absolute path? If preload.swf ends up in the root folder of your app, try using

var absoluteReference:File = File.applicationDirectory.resolvePath("preload.swf");
var _urlRequest:URLRequest = new URLRequest(absoluteReference.nativePath);