Skip to main content
Participating Frequently
June 15, 2013
Question

iOS app crashes loading ext. swf calling a class with specific name

  • June 15, 2013
  • 0 replies
  • 289 views

Adobe Air SDK 3.7.0.1860 for iOS

I load an external swf from my Main fla with this code.

var mLoader:Loader = new Loader  ;

var mRequest:URLRequest = new URLRequest("fileName.swf");

var loaderContext:LoaderContext = new LoaderContext(false,ApplicationDomain.currentDomain,null);

mLoader.load(mRequest, loaderContext);

addChild(mLoader);

All goes well but if from the swf I create an instance of a class named GeneralFunctions the app crashes.

On the stage of the swf I have a MC with associated a Class named Activity.

This is the Activity Class code.

          public class Activity extends MovieClip {

                    public function Activity() {

                              var generalFunctions:GeneralFunctions;

                              generalFunctions = new GeneralFunctions;

                    }

          }

This is the GeneralFunctions class.

          public class GeneralFunctions {

                    public function GeneralFunctions() {

                              trace("GeneralFunctions")

                    }

          }

If I change the class name all goes well…I cannot believe…where I'm wrong?

This topic has been closed for replies.