Skip to main content
emmau10371638
Inspiring
August 10, 2016
해결됨

Home_btn to reload iOS app is not working???

  • August 10, 2016
  • 1 답변
  • 3076 조회

hello again,

I can't find the solution.

I hope someone can help me because I'm desparate.

I  have a main-SFW within several levels-SWF's.

Now I want on each level a Home_btn so I can reload the app.

Here is my code in some SWF-level:

Home_btn.addEventListener(MouseEvent.CLICK, go_home);

function go_home(event: MouseEvent) {

  var appDomain_1:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);

var context1:LoaderContext = new LoaderContext(false, appDomain_1);

var loader1:Loader = new Loader();

var file1: File = File.applicationDirectory.resolvePath("main.swf");

loader1.load(new URLRequest (file1.url), context1);

  addChild(loader1);

}

in the main.SWF the level_SWF's won"t open again.

I have included all SWF's in the MainSWF and the main SWF also.

I hope someone can help me.

이 주제는 답변이 닫혔습니다.
최고의 답변: kglad

hello,

the movieclip go_1 doesn't work on the ipad.

when you touch  the movie clip nothing happens

.(the mouse(down)_function )on the computer it works very good.

a mouse function separately (not in a for loop )is not a problem on the ipad.

tnx for reply.


attach a screenshot of your air for ios settings panel that shows your included files.

1 답변

kglad
Community Expert
August 10, 2016

each level swf can direct the main swf to unload the level swf, but because your main swf is not loaded, i don't think you want to load it into itself.

emmau10371638
emmau10371638작성자
Inspiring
August 10, 2016

hello,

tnx for reply..

the structure of my app is:  before I open a new level the previous level has been unloaded.

But now I want back to start the whole app again with new levels SWF's.

First I think I must close the app.But I don't know how to do this. Because the NativeApplication.

NativeApplication.exit (); didn't work. Sorry i didn't understand it at all. I hope you can help me.

emmau10371638
emmau10371638작성자
Inspiring
August 18, 2016

does your go_1 button appear when you expect?


yes the button appears on the Ipad. But when you click on it I get  when in the debugging screen the error above:

Error #2044: Unhandled IOErrorEvent:. text=Error #3764: Reloading a SWF is not supported on this operating system.