actionscript-3

How to load flex swf from flash?

混江龙づ霸主 提交于 2019-12-23 17:41:11
问题 I have some swf compiled in flex I want to load it into my movie clip in flash pro. ...So how to for example load flex swf inside Flash CS4? how to do such thing? 回答1: Here you can read more about it: http://troygilbert.com/2009/05/loading-flex-based-swfs-in-as3-only-swfs/ Here is the code for loading the flex swf: var loader:Loader = new Loader(); addChild(loader); loader.load(new URLRequest("my-flex-app.swf")); loader.addEventListener("mx.managers.SystemManager.isBootstrapRoot",

How to disable automatic sorting in Editable Datagrid in Flex 4

不打扰是莪最后的温柔 提交于 2019-12-23 17:29:46
问题 I have an editable datagrid. If sorting is applied by clicking any header of datagrid, it works fine. But after that, if data values are changed in any row of datagrid, sorting is applied automatically. How to prevent from this behaviour? i.e. sorting should only be applied if user clicks on any header of datagrid and sorting should not be applied when user modifies data in grid. 回答1: You have to set sortableColumns to false and handle the headerRelease event, where you do the sorting

AS3: Is it possible to capture stage elements or bitmap data into a netstream?

大城市里の小女人 提交于 2019-12-23 17:27:28
问题 I'm looking at the netstream documentation. but can't really glean if appendBytes() can really take arbitrary data. Could I really just take arbitrary bitmap data (as a byte array) and append the frame to stream (presumably before sending it to a FMS to save a file)? I think I am wrong: it's only useful for dynamic streaming. I know that it is possible to grab a webcam feed and directly encode video via FMS. But say I wanted to add some overlays before encoding, is that even possible in Flash

Any pointers to good AS3 code snippets/samples?

回眸只為那壹抹淺笑 提交于 2019-12-23 17:26:31
问题 I am newbie in AS3 and learning day by day. I am looking for good AS3 code snippets/samples/small projects which I can use for learning purpose and for reference (with no dependency on Flash IDE because I use Flex SDK and Flash Develop). Also, I am specifically looking for tutorials/articles about Audio/Video streaming, creating own audio/video player, playing audio/video files and working with other media (such as images) and creating special effects. If there's any good websites(other than

Event.MOUSE_LEAVE not working in AS3

删除回忆录丶 提交于 2019-12-23 17:16:31
问题 I just tossed this super simple code example into a Flash CS4 IDE frame script, but it doesn't output anything in the console. I'm simply rolling over my mouse over the window, not clicking anything, and nothing is happening. Why doesn't this work as I expect? stage.addEventListener(Event.MOUSE_LEAVE, traceMouse); function traceMouse(Evt:Event):void { trace("Mouse Left Stage"); } ________________________________________________ [EDIT] i find Event.MOUSE_LEAVE incredibly useless. first, it

How to set/access external swf file's dynamic text field in action script 3?

孤者浪人 提交于 2019-12-23 16:33:47
问题 I am working in a fla file where i added a swf file. How I set a text on that swf file's dynamic text. Is there any to to direct set text. I don't want to pass as parameter in url. I tried like this var rq:URLRequest = new URLRequest("subwindow/Time_date.swf"); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, done); ldr.load(rq); function done(e:Event):void { var externalSWF:MovieClip = MovieClip(e.currentTarget.content); // I have dynamic text field named dDate. I tried like this but

Does Flash not support username/password in a URL? What are my alternatives?

*爱你&永不变心* 提交于 2019-12-23 16:21:51
问题 I've been trying to load some JSON from a URL with a username/password at the beginning. So the URL resembles: http://username:password@www.myaddress.org.uk/api/profiles/ I've been using the DataLoader class from greensock and it returns a Error #2032: Stream Error if the authentication is up but loads fine when it is disabled. I'm trying to add a 'Authorization' URLRequestHeader to get round this issue? Is this the best way forward? If it is relevant, I'm developing using FlashDevelop 4.0 /

ActionScript problem with prototype and static type variables

荒凉一梦 提交于 2019-12-23 15:35:47
问题 I'm developing a flash (Flash 9, AS3) to connect to a server and send/receive/parse data to a chat on JavaScript/HTML. I have a structure like this: package { public class myClass { String.prototype.escapeHtml = function() { var str = this.replace(/&/g, "&"); str = str.replace(/</g, "<"); str = str.replace(/>/g, ">"); return str; } function writeToBrowser(str:String) { ExternalInterface.call("textWrite",str.escapeHtml()); } } } When I compile it, I get this error: 1061: Call to a possibly

AS3/JavaScript if statement commas instead of & &

家住魔仙堡 提交于 2019-12-23 15:15:10
问题 This runs in ActionScript 3 and JavaScript. Why? I know how && and || work, but a list? Is this AS3 specific? Is this in other languages? I'm a mouth breathing PHP/AS2 programmer. Or did everyone already know this and I'm a tool for not reading documentation properly? AS3 if (true, true, true) { trace("true?") } //result - "true?" traced JavaScript if (true, true, true) { alert("true?"); } //result - "true?" alert message popped up if (false, false, false) { alert("true?"); } else { alert(

Is there any other alternate ways to access camera?

风流意气都作罢 提交于 2019-12-23 15:08:21
问题 Is there any other way to access the camera using ActionScript 3 other than import flash.media.Camera; videoInstance.attachCamera(cameraInstance); Or should I use any API s? If so, please suggest me any API suitable and some tutorials if possible. Thank You very much for helping. . . My previous post on Camera is How to increase the Quality of the camera using AS3? 回答1: If you need better Camera quality... check this ActionScript Mobile Flex Project. This is the main file package { import