actionscript-3

reload embedded swf in html page in IE

做~自己de王妃 提交于 2019-12-24 06:34:14
问题 I have a swf file embedded in a html page. I want to reload the swf file without refreshing the page. There is a same problem asked here: reload/ reset embedded swf on click And I tried the accepted answer and it works in chrome: var obj = $("object#flash_99674493"); obj.html(obj.html()); But it seems it doesn't work in IE. How to make it work in IE? 回答1: If your .swf is embedded with <object> , use data property: document.getElementById('flash_99674493').data += ''; For ones embedded with

Flex3: Custom Item Renderer does not listen to events dispatched by parent

偶尔善良 提交于 2019-12-24 06:21:05
问题 I have a List with a custom ItemRenderer. The ItemRenderer contains a Checkbox and a Label. The component with the List has a 'select all' checkbox. When the 'select all' checkbox is checked, it dispatches an event that each item should listen to in order to select its own checkbox. The eventlistener is added on creationComplete of each item, and the event is dispatched correctly when the 'select all' checkbox is selected, but the listener in the custom ItemRenderer does not listen. How do I

AS3 RegExp question

二次信任 提交于 2019-12-24 06:07:29
问题 I just wrote a Flex app which handles some Wikipedia text content as strings. I'm trying to use RegExp to cleen all the Wikipedia markup. Here is an example: I'd like this: var pageText:String = new String("was an [[People of the United States|American]] [[film director]], writer, [[Film producer|producer]], and [[photographer]] who lived in England during most of the last four decades of his career. Kubrick was noted for the scrupulous care with which he chose his subjects, his slow method

AS3 RegExp question

时间秒杀一切 提交于 2019-12-24 06:07:03
问题 I just wrote a Flex app which handles some Wikipedia text content as strings. I'm trying to use RegExp to cleen all the Wikipedia markup. Here is an example: I'd like this: var pageText:String = new String("was an [[People of the United States|American]] [[film director]], writer, [[Film producer|producer]], and [[photographer]] who lived in England during most of the last four decades of his career. Kubrick was noted for the scrupulous care with which he chose his subjects, his slow method

Flex 3 equivalent of '<fx:Declarations>'?

你。 提交于 2019-12-24 05:38:15
问题 I'm trying to migrate a Flex 4 project backwards to Flex 3, and I need to move stuff mapped in a <fx:Declarations> block in MXML. Does Flex 3 have something similar to this? It's been a while since I've done Flex 3. 回答1: There is no equivalent in Flex 3. You can declare things alongside your other components. The difference in Flex 4 makes the separation between visual and non-visual items (including things like effects, validators, formatters, data declarations, and RPC classes) clearer. For

Check if Class Implements a Specific Interface

浪子不回头ぞ 提交于 2019-12-24 05:24:10
问题 in ActionScript 3.0, there are a few ways to check a class's extension. for example, if i want to know of a custom class extends Sprite i could use the is operator: trace(MyClass is Sprite); or i could use flash.utils.getQualifiedSuperclassName : trace(getQualifiedSuperclassName(MyClass)); i would like to accept a class as an argument and check to see if the passed class implements an certain interface. is there an equally simple or common way to check if my custom class adheres to an

how to open an Instagram page by as3 in android air application?

假装没事ソ 提交于 2019-12-24 05:05:16
问题 i want open an instagram page by clicking on a button in my app, for example "instagram/mypage" in Instagram app. whats the code? mybuttun.addEventListener(MouseEvent.CLICK, open_instagram_page); function open_instagram_page(event:MouseEvent) { //what should i write here? } i found this code that open "setting" page of android device,how change it to open specific page on instagram app: var url:String = ("intent:#Intent;" + "action=android.intent.action.MAIN;" + "category=android.intent

Assigning unique identifiers to array of objects in actionscript3

南笙酒味 提交于 2019-12-24 04:47:08
问题 Here i have an actionscript3 code in which i am creating an array of objects. Basically in the array are multiple instances of the same object. I want to make an event listener which calls a function f0 which rotates the object 90 degrees. My problem is i can't find a way to asign unique identifiers to each object in array, so when i click an object i want it to rotate, but only the first element of the array rotates. I also want to center my rotation so that the object doesn't rotate in (0,0

Can i save byteArray to mp3 file?

我是研究僧i 提交于 2019-12-24 04:36:27
问题 Well, i am recording the voice from heaphone and the sound data is stored in ByteArray at runtime, now can i stored as mp3 ?? i want to save as mp3 file on the client system.. For that, i think i have to use air application.. Am i right? 回答1: I found this link where someone used Alchemy to convert to MP3. 来源: https://stackoverflow.com/questions/3342179/can-i-save-bytearray-to-mp3-file

How do I call a Flex SWF from a remote domain using Flash (AS3)?

非 Y 不嫁゛ 提交于 2019-12-24 04:36:07
问题 I have a Flex swf hosted at http://www.a.com/a.swf. I have a flash code on another doamin that tries loading the SWF: _loader = new Loader(); var req:URLRequest = new URLRequest("http://services.nuconomy.com/n.swf"); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderFinish); _loader.load(req); On the onLoaderFinish event I try to load classes from the remote SWF and create them: _loader.contentLoaderInfo.applicationDomain.getDefinition("someClassName") as Class When this code