gpt-3.5-turbo-0613· openai
Suzhen/CodeChat
Untitled conversation
- User
{ var options:NativeWindowInitOptions = new NativeWindowInitOptions(); while (this.guiLayer.numChildren > 0) { this.guiLayer.removeChildAt(0); }; options.renderMode = "direct"; options.maximizable = true; var window:NativeWindow = new NativeWindow(options);
codewindow.minSize = new Point(0x0400, 0x0300); window.maxSize = new Point(4095, 2880); window.stage.scaleMode = StageScaleMode.NO_SCALE; window.stage.align = StageAlign.TOP_LEFT; var loader:Loader = new Loader(); var flashvars:URLVariables = new URLVariables(); flashvars["locale"] = this.locale; flashvars["rnd"] = Math.random(); //loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSWFLoaded); loader.load(new URLRequest("loader.swf")); window.stage.addChild(loader); window.activate(); window.addEventListener(Event.CLOSE, onWindowClose); stage.nativeWindow.close(); // Закрытие предыдущего окна } как для loader.load(new URLRequest("loader.swf")); сделать типо такого urlReq.data = flashvars; - Assistant
To pass flashvars as data in the URLRequest, you can use the URLRequest.data property and the URLVariables object. Here's an updated version of the code:
actionscriptvar loader:Loader = new Loader(); var flashvars:URLVariables = new URLVariables(); flashvars["locale"] = this.locale; flashvars["rnd"] = Math.random(); var request:URLRequest = new URLRequest("loader.swf"); request.data = flashvars; loader.load(request); window.stage.addChild(loader);This sets the flashvars as the data for the URLRequest object and then loads the loader.swf file with the updated request.