swfloader

How to get Flex SWFLoader unloadAndStop to unload sound also?

人走茶凉 提交于 2020-01-16 00:59:08
问题 public var swfLoader:SWFLoader = new SWFLoader(); [Embed(source="/some/file1.swf")] public var file1:Class; [Embed(source="/some/file2.swf")] public var file2:Class; then I do: swfLoader.load(file1); Later on: swfLoader.unloadAndStop(true); which unloads the video, but not the sound! So I add in SoundMixer.stopAll(); Which is ok, for a while. Later on, I do: swfLoader.load(file2); And eventually, while watching file2, file1's audio will start playing in the background over file2's audio, with

actionscript project compiled as swf. how can i load it with flex and use the functions it provides?

一个人想着一个人 提交于 2019-12-25 05:32:34
问题 I have an ActionScript project with several classes that i compiled as an swf using Adobe Flex (by creating an actionscript project and clicking on export -> release build) Is there a way to load that swf so i'll be able to load it's classes and use them on a different swf ? i know i can use the following code to load an swf file: var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded); loader.load(new URLRequest("game.swf")); addChild(loader);

Can anyone tell me how to create an stand alone SWF launcher that loads the SWF

半城伤御伤魂 提交于 2019-12-24 07:46:23
问题 As Flash is going to be dead in few days. I want to know how I can create an .EXE file which loads the swf file from the server and plays in that application. Just like this: http://prntscr.com/n91uta 回答1: Option 1: Use Web Browser component (a .NET Control). See page from manual. A good tutorial #1. this.webBrowser1.Navigate("https://yoursite.com/YourFlashFile.swf"); You can set width and height to be 100% of the window size. Option 2: Use Flash component (a COM object). A good tutorial #2.

SWFLoader starts to play SWF without the loading being complete

一笑奈何 提交于 2019-12-24 06:45:04
问题 I need to play SWF files in my project. These SWF files have background music in them. The which Sound Sync Options of this music in Flash is set to "stream". This is done so that if you pause the Flash movie, the music will pause as well. Now I have a problem when I am loading these SWF files. For this I am using an SWFLoader. When I load it, the audio of the SWF starts playing already, but no visuals of the movie are shown for a certain time. The slower your connection is, the longer it

Flex: Impossible to resize the external loaded SWF's content

人走茶凉 提交于 2019-12-19 08:58:23
问题 I have an application where I try to load an external SWF. So, we have: My application: The Stage's dimensions are 768x1280. ScaleMode = EXACT_FIT. External SWF: It's another application where its stage is: 800x600. ScaleMode = EXACT_FIT. The problem is that the external SWF does not modify its size although I apply "scaleX, scaleY", change its width and so on. I also tried to insert it into a Canvas container (as "How to resize an external SWF to fit into a container?" ) but it didn't solve

How can I get the width/height of a loaded swf's stage in AS2?

一曲冷凌霜 提交于 2019-12-11 01:41:08
问题 I'm using MovieClipLoader to load an external as2 swf file into my as2 flash project, and I'm having trouble getting the original stage size of the loaded swf. When I run the following code: var popup:MovieClip = _root.createEmptyMovieClip("popup", 1); var loader:MovieClipLoader = new MovieClipLoader(); var loadHandler:Object = new Object(); loader.addListener(loadHandler); loader.loadClip(url, popup); loadHandler.onLoadInit = function(mc:MovieClip) { trace(mc._width + ", " + mc._height); } I

flex: take screenshot from loaded swf from swfloader

孤街醉人 提交于 2019-12-10 12:08:42
问题 can i save a screenshot from a loaded swf using the SWFLoader class ? 回答1: In case the loaded swf is already in a desired state in swfLoader, you should be able to do this var bitmapData:BitmapData = new BitmapData(swfLoader.content.width, swfLoader.content.height); bitmapData.draw(swfLoader); var bitmap:Bitmap = new Bitmap(bitmapData); var image:Image = new Image; image.source = bitmap; addChild(image); This would add the resulting screen capture in the display list of your application. Of

Passing flashvars-style parameters to a loaded SWF

对着背影说爱祢 提交于 2019-12-05 00:57:58
问题 I have a Flex 3 app (player v9) which loads a Flash SWF (AS3, also player v9) and needs to dynamically pass it a collection of parameters which are known at run-time. These are parameters that are normally passed via the flashvars element in an HTML page. The embedded movie accesses these parameters via the loaderInfo.parameters object. I've tried using SWFLoader and Loader classes with no success in param-passing. Relevant details: It's a local program, and cannot rely on query string

Why isn't the swfloader working?

柔情痞子 提交于 2019-12-04 06:15:07
问题 I am trying to use the mxml swfloader component to load the external flash from the following url, but it doesn't load anything. I'm using FlashBuilder 4.5. http://somesite.com/en/interface.swf?token=123 I have no idea why it isn't working. 回答1: My guess is that you have a Sandbox Security violation. You can't load a swf from another domain/port without having a crossdomain xml. 回答2: if swf is from another domain, u should probably add into your code System.security.allowDomain("domain"); 回答3

Passing flashvars-style parameters to a loaded SWF

寵の児 提交于 2019-12-03 16:23:17
I have a Flex 3 app (player v9) which loads a Flash SWF (AS3, also player v9) and needs to dynamically pass it a collection of parameters which are known at run-time. These are parameters that are normally passed via the flashvars element in an HTML page. The embedded movie accesses these parameters via the loaderInfo.parameters object. I've tried using SWFLoader and Loader classes with no success in param-passing. Relevant details: It's a local program, and cannot rely on query string parameters. I've mucked with setting loaderInfo.parameters["foo"] = "123" from the embedding code, but the