Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
641 views
in Technique[技术] by (71.8m points)

actionscript 3 - Load and reload external SWF in AIR for iOS

I found several info on how to load one or more external SWF files, packaged with my AIR iOS App, the actual working code is:

var myUrlRequest:URLRequest = new URLRequest(mySWF);
var myLoaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
var loader: Loader = new Loader();
loader.load(myUrlRequest, myLoaderContext);
Object(root).MK.addChild(loader)

It works on Android devices and on Windows PC, but on iOS it loads the external SWFs only the first time. In my project I have several buttons that loads an external SWF, but each button works only the first time.

Any idea? It seems very unuseful if I can't reload an SWF.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you can't load something a second time, perhaps it would be best to simply cache it and make a point of only loading it once?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...