Re: [Flashcoders] Attention Recursion Speed Experts
On 7/25/06, Mark Winterhalder [EMAIL PROTECTED] wrote: On 7/25/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: It is iterating. It still needs to iterate through all nested arrays using the same method, which means recursion. Yes, but function calls aren't the only way to do recursion. What you're doing is essentially like a depth-first search, which can be done with a stack. Hmm... now that I'm having coffee and slowly waking up, I'm getting serious doubts about how to do depth-first without function calls. I'm probably wrong, sorry. Mark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Weird problem with encryption...
I'm working on some encryption classes, and I've run into an extremely odd problem. Let me give you an example: http://www.horsefish.net/businesstools/sample.html Scroll to the bottom to the Encryption Test and type asdf in the clear text string field. You'll notice that it breaks when you type the f. However, if you change any character in the string or any character in the key, it works fine. If you continue typing asdf repeatedly you'll see that it breaks at predictable intervals. My first thought was that something must be wrong with the characters being used to pad the strings, since it always seems to break when you reach half a block. So I spent all kinds of time going through the algorhithm and replacing the pad characters to see what I was doing wrong, etc, but found nothing. Then I noticed something odd. If you switch to XXTEA using the combobox in the top right corner, you can produce the same error. Type Hello, my name is (including the space at the end) and you'll see the same thing happening. Add a character or change any character in the string and it encrypts and decrypts correctly. Needless to say, I find it exceedingly odd that both ciphers would suffer the same flaw, despite the same flawed developer working on both of them. I don't know if the MD5 class suffers the same problem, since it's one way and I don't have a good way to check it short of using someone else's implementation to repeatedly check strings until I find a key/message pair that produce the wrong result. So, the point of all of this is that I believe, after banging on this for some time, that there must be some character that is being generated by the cipher that Flash isn't handling properly. The encrypted string is generated in both classes by using bitwise operators to alter character codes, and what I think may be happening is some non-printable or otherwise unimplemented or incorrectly implemented character code is being generated in the cipher text, which is causing it to output garbage instead of valid cipher text. Of course, when I try to decrypt the garbage, it only returns garbage. Does anyone have any ideas on this? Has anyone experienced anything similar? Any light you guys can shed on this would be helpful. ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] as3 and attachmovie
Hello :) read in french : - http://iteratif.free.fr/blog/index.php?2006/07/11/44-bibliotheque-partagee-sous-flash-9 attachMovie is remove in AS3 :) Use [embed(source=)] metadata and create the instance with new MyClass and addChild() method :) eKA+ :) 2006/7/25, Carl Welch [EMAIL PROTECTED]: I just downloaded the demo of Flash 9 / as3 and I noticed you can't use attachmovie anymore. I've found some new methods on google but it seems like the only way I can do it is by using classes. Is there another way to handle an attachmovie equivilent without using a class in as3? thanks. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] I am new to here
Hi, All I am new to here, happy every day! jack 2006-07-25 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Key.CAPSLOCK woes.
Hi, the isDown call traces true when i test it here, the isToggled traces false (both when holding down capslock ofcourse). Tested on xp, flash 8 Just to be sure, 'disable keyboard shortcuts' doesnt have anything to do with it? When i do: Key.addListener(this); this.onKeyUp = function () { if (Key.getCode() == Key.CAPSLOCK) trace (caps up); } it shows 'caps up' just fine. greetz Hans On 7/25/06, Daniel Barber [EMAIL PROTECTED] wrote: Long time Flasher with the discovery of a simple issue that appears to be a show stopper. I have never had any issues with keyboard input, but can't seem to detect whether the caps lock key is held down. These two trace actions consistently return the same Boolean value based on the toggled state of the caps lock key: function onEnterFrame() { trace(Key.isDown(Key.CAPSLOCK)); trace(Key.isToggled(Key.CAPSLOCK)); } I can only test on the Mac at the moment, but when I test the SWF in the Flash debug player or through the Flash plugin I get the same results. Both of those trace actions return true if the key is toggled, and false if it is not. Even more frustrating is that the caps lock key does not trigger a Key.onKeyUp event when it is released – if it did it would be possible to workaround the problem. Has anyone else encountered this problem or discovered a solution? Is this a Mac only bug? Does anyone know if screentime or an equivalent application can workaround not being able to accurately detect key events with the caps lock key? Thanks. Daniel Barber___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Avi to flv converter
Hi, Flash Video MX is powerful avi to flv converter, you can get it at http://www.flash-video-mx.com/video_to_flash_web/ Best regards! jack 2006-07-25 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Attention Recursion Speed Experts
On 7/25/06, Mark Winterhalder [EMAIL PROTECTED] wrote: Hmm... now that I'm having coffee and slowly waking up, I'm getting serious doubts about how to do depth-first without function calls. I'm probably wrong, sorry. Interesting problem, though. Got me thinking. So, here's my proposal for a function to flatten an array without calling it recursively: class Main { public static function main () : Void { var foo : Array = [0, [1, 2], 3, [4, [5, 6], 7], 8, [], 9]; var out : String = flatten( foo ).toString(); _root.createTextField( tf, 100, 0, 0, 1000, 100 ); _root.tf.text = out; } public static function flatten( inArray : Array ) : Array { var outArray : Array = []; var list = inArray; list.index = 0; var item : Object; var index : Number; var length : Number; do { index = list.index; length = list.length; while( index length ) { item = list[ index++ ]; if( item.__proto__ == Array.prototype ) { item.parent = list; list.index = index; list = item; index = 0; length = list.length; } else { outArray.push( item ); } } } while( list = list.parent ); return outArray; } } I hope you have a big enough testcase to compare performance, it would be interesting which one is faster. Mark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] SWF player...
Hi List, I am trying not to re-invent the wheel and am looking for what I call a SWF player like the one at Adobe: http://www.adobe.com/products/flash/flashpro/ All it needs to do is load in one external .swf but if it loads in more great! Anybody know of an open-source .fla file(s) that will get me close to this? Not having any luck with my Google searches yet. Thanks, -Steve ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Mac IDE for AS !
Good morning chatty peeps, Quick question to people with Mac knowledge... What Program do you all develop you AS classes etc.. On PC I use Flash develop (www.osflash.org/flashDevelop) but I'm stumped on a Mac! Is there any software which will show me all my class members and stuff :) Thanks, DanC -- danCourse [EMAIL PROTECTED] 07790 13 83 23 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Mac IDE for AS !
It seems that a lot of people use PrimalScript On 7/25/06, Dan Course [EMAIL PROTECTED] wrote: Good morning chatty peeps, Quick question to people with Mac knowledge... What Program do you all develop you AS classes etc.. On PC I use Flash develop (www.osflash.org/flashDevelop) but I'm stumped on a Mac! Is there any software which will show me all my class members and stuff :) Thanks, DanC -- danCourse [EMAIL PROTECTED] 07790 13 83 23 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Ramon Miguel M. Tayag ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Mac IDE for AS !
I currently using ADT/AST or something for it. Works fine. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Attention Recursion Speed Experts
On 7/25/06, Mark Winterhalder [EMAIL PROTECTED] wrote: On 7/25/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: It is iterating. It still needs to iterate through all nested arrays using the same method, which means recursion. Yes, but function calls aren't the only way to do recursion. What you're doing is essentially like a depth-first search, which can be done with a stack. Hmm... now that I'm having coffee and slowly waking up, I'm getting serious doubts about how to do depth-first without function calls. I'm probably wrong, sorry. No, it's always possible to unroll a recursion, and usually faster. What about this concept? (I'm sure it could be optimised some more!): function flatten(a:Array) { var r:Array = new Array(); // the flattened array var p:Array = new Array(); // the index stack var s:Array = new Array(); // the array stack var c = a; // the currently evaluating array var i = 0; // the current array index var t:Boolean; // a flag to show if we've finished a level while (true!Key.isDown(Key.SHIFT)) { t = true; for (var i; i c.length; i++) { var e = c[i]; if (e instanceof Array) { p.push(i+1); i = 0; s.push(c); c = e; t = false; break; } r.push(e); } if (t) { if (p.length) { i = p.pop(); c = s.pop(); } else { break; } } } return r; }; Here's what I used to test it: function randomArray(p) { var l = random(5) var a = new Array(); for (var i = 0; i l; i++) { if (Math.random() p) { a.push(i); } else { a.push(randomArray(p + 0.2)); } } return a; } var a:Array = randomArray(0.4); trace(a+ +a.length) var r:Array = flatten(a) trace(r+ +r.length); And here's the result: ,0,1,2,1,0,1,2,3,0,0,1,2 4 0,1,2,1,0,1,2,3,0,0,1,2 12 Note that it works fine even with empty arrays. Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Attention Recursion Speed Experts
Ha - you beat me to it... public static function flatten( inArray : Array ) : Array { var outArray : Array = []; var list = inArray; list.index = 0; var item : Object; var index : Number; var length : Number; do { index = list.index; length = list.length; while( index length ) { item = list[ index++ ]; if( item.__proto__ == Array.prototype ) { item.parent = list; list.index = index; list = item; index = 0; length = list.length; } else { outArray.push( item ); } } } while( list = list.parent ); return outArray; } } Just out of interest, I tried a speed test using the three methods - mine was the fastest by a very long way: iterative 3068 length: 343932 recursive 7865 length: 343932 Mark's version 6771 length: 343932 iterative 1814 length: 371470 recursive 7554 length: 371470 Mark's version 7607 length: 371470 iterative 1483 length: 312964 recursive 5822 length: 312964 Mark's version 5530 length: 312964 (the first number shows the time taken for the calculation, the second shows the length of the flattened array) This seemed a weird result, so I took a look for other differences. It turns out that the test for array.__proto__ == Array.prototype is *way* slower than using instanceof Array. When I replaced the two relevant lines in the other two functions, mine was relegated to a rightful third place iterative 2387 length: 264356 recursive 1175 length: 264356 Mark's version 1096 length: 264356 Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Attention Recursion Speed Experts
On 7/25/06, Danny Kodicek [EMAIL PROTECTED] wrote: Just out of interest, I tried a speed test using the three methods - mine was the fastest by a very long way: Thanks -- I was hoping somebody would test it :) This seemed a weird result, so I took a look for other differences. It turns out that the test for array.__proto__ == Array.prototype is *way* slower than using instanceof Array. When I replaced the two relevant lines in the other two functions, mine was relegated to a rightful third place I thought about that when I saw yours. It kinda makes sense that it's faster when being handled internally (saves two getProperty's after all), but I would have never expected it to have such a huge effect. So we learn that instanceOf is very fast. iterative 2387 length: 264356 recursive 1175 length: 264356 Mark's version 1096 length: 264356 This seems to be extreme. Any chance something is going wrong with the test? Did you wait a few frames before doing the first test to ensure initialization has finished? Maybe switch the order to see if the first one always is the slowest? Frankly, I only had a quick look at yours, but it seemed to follow roughly the same principle as mine. So where is the bottleneck (if the test works correctly)? BTW, the reason I didn't have a detailed look were the shortened, non-descriptive variable names. This is most likely not necessary. It makes sense for properties, but variables usually are stored as registers (if the compiler chooses to use function2 instead of the old function tag, which it normally does for class methods), the names you give them in your source code are irrelevant and don't appear in the SWF. Given the minuscule performance difference, I'd go with the original (recursive) version for elegance and readability. Unless somebody feels like giving mine a work over with flasm, that is, it has more potential for bytecode optimizations because the recursive one's bottleneck is the function call, and that can't be changed. Mark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Attention Recursion Speed Experts
BTW, the reason I didn't have a detailed look were the shortened, non-descriptive variable names. This is most likely not necessary. It makes sense for properties, but variables usually are stored as registers (if the compiler chooses to use function2 instead of the old function tag, which it normally does for class methods), the names you give them in your source code are irrelevant and don't appear in the SWF. I thought so too, but I was trying to follow Steve's version as closely as possible in order to limit the number of variables (in the experimental sense) being tested. Given the minuscule (but consistent!) performance difference, I'd go with the original (recursive) version for elegance and readability. Unless somebody feels like giving mine a work over with flasm, that is, it has more potential for bytecode optimizations because the recursive one's bottleneck is the function call, and that can't be changed. I think you're right. I think it's very rare that the kinds of millisecond-level performance gains you can get in a function have any serious impact on the average program. It's easy to get focused on tiny speed gains while ignoring the other places where there are more obvious bottlenecks, like the rendering engine. On the other hand, a five-fold speed increase by using instanceof was certainly worth noticing! Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Attention Recursion Speed Experts
On 7/25/06, Mark Winterhalder [EMAIL PROTECTED] wrote: This seems to be extreme. Any chance something is going wrong with the test? Did you wait a few frames before doing the first test to ensure initialization has finished? Maybe switch the order to see if the first one always is the slowest? Frankly, I only had a quick look at yours, but it seemed to follow roughly the same principle as mine. So where is the bottleneck (if the test works correctly)? OK, had a (slightly) closer look after all. Avoid the Array.length property. Avoid properties in general (I have some, too, but only when the algorithm comes across another array). Also, while generally is faster than for(;;) for loops, especially in the while( i-- ) form (fastest loop possible when going through an array, but not usable in this case). Mark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] send and read datas
Hi I try to read data as this and I meet security problem : Theres two domains A : http://www.laurentcuchet.fr/test/ B : http://www.aniblog.com 1. index.swf from A load sys1.swf from A : sys1 can read index.swf datas 2. index.swf from A load sys1.swf from B : sys1 can¹t read index.swf datas Actionscript from index : System.security.allowDomain(www.aniblog.fr,aniblog.fr,http://www.aniblo g.fr); var link = http://www.aniblog.com/;; this.var1.text = test; stop(); Wwhen button is clicked you load local from A or external from B There¹s ³crossdomain.xml² on each basedomain, ?xml version=1.0? !DOCTYPE cross-domain-policy SYSTEM http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd; cross-domain-policy allow-access-from domain=www.aniblog.com / allow-access-from domain=www.laurentcuchet.fr / allow-access-from domain=aniblog.com / allow-access-from domain=laurentcuchet.fr / allow-access-from domain=* / /cross-domain-policy HTML : security: allowScriptAccess=always Thank for your help Laurent Msn : [EMAIL PROTECTED] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Re: Re: Form Help Needed, Please - STILL NEED HELP
Can you explain that code a little to me? You could try using loadVars and return a status in xml rather than loadVariablesNum... var myVars:LoadVars = new LoadVars; var xml_results:XML = new XML(); xml_results.ignoreWhite = true; xml_results.onLoad = function(success:Boolean){ if (success){ } else { } } myVars.sendAndLoad(yourfile.asp, xml_results, POST); Sincerely, Loren ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] send and read datas
I think you need to specify allowDomain(www.laurentcuchet.fr) in sys1.swf in B - Original Message - From: Laurent CUCHET [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Tuesday, July 25, 2006 4:29 PM Subject: [Flashcoders] send and read datas Hi I try to read data as this and I meet security problem : Theres two domains A : http://www.laurentcuchet.fr/test/ B : http://www.aniblog.com 1. index.swf from A load sys1.swf from A : sys1 can read index.swf datas 2. index.swf from A load sys1.swf from B : sys1 can¹t read index.swf datas Actionscript from index : System.security.allowDomain(www.aniblog.fr,aniblog.fr,http://www.aniblo g.fr); var link = http://www.aniblog.com/;; this.var1.text = test; stop(); Wwhen button is clicked you load local from A or external from B There¹s ³crossdomain.xml² on each basedomain, ?xml version=1.0? !DOCTYPE cross-domain-policy SYSTEM http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd; cross-domain-policy allow-access-from domain=www.aniblog.com / allow-access-from domain=www.laurentcuchet.fr / allow-access-from domain=aniblog.com / allow-access-from domain=laurentcuchet.fr / allow-access-from domain=* / /cross-domain-policy HTML : security: allowScriptAccess=always Thank for your help Laurent Msn : [EMAIL PROTECTED] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Converting stage elements into code
Does anyone know any utilities for Flash which make it possible to convert stage elements into ActionScript, in such way that the elements get created at runtime? I am looking for something which make it easy to get the settings of existing (dynamic) text fields at the stage, and make it work in ActionScript 2. Somehow the content looks better at the Stage, then when textfields are created at runtime. Anyone have some magic tools for this? Maybe even some nice tool which convert graphic symbols (simple ones) into Drawing API code? Yours, Weyert ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Converting stage elements into code
Does anyone know any utilities for Flash which make it possible to convert stage elements into ActionScript, in such way that the elements get created at runtime? I don't, but it sounds like something that wouldn't be *insanely* hard to do with JSFL. I am looking for something which make it easy to get the settings of existing (dynamic) text fields at the stage, and make it work in ActionScript 2. Somehow the content looks better at the Stage, then when textfields are created at runtime. I can't see how the above would help with this, though. Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Converting stage elements into code
Hi Danny, I don't, but it sounds like something that wouldn't be *insanely* hard to do with JSFL. Hmm, JSFL time to read more about that. I suppose their will be a PDF about it. I can't see how the above would help with this, though. Well, this would save myself time, because I won't be needed to dig up all the magic settings for anti aliasing :) Yours, Weyert de Boer ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Converting stage elements into code
I remember one of the Development kits released by macromedia contained an action which would take a stage drawn object and convert that to actionscript. Not exactly what you need, but might be a good place to start. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Weyert de Boer Sent: dinsdag 25 juli 2006 14:39 To: Flashcoders mailing list Subject: Re: [Flashcoders] Converting stage elements into code Hi Danny, I don't, but it sounds like something that wouldn't be *insanely* hard to do with JSFL. Hmm, JSFL time to read more about that. I suppose their will be a PDF about it. I can't see how the above would help with this, though. Well, this would save myself time, because I won't be needed to dig up all the magic settings for anti aliasing :) Yours, Weyert de Boer ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Converting stage elements into code
Ben Smeets wrote: I remember one of the Development kits released by macromedia contained an action which would take a stage drawn object and convert that to actionscript. Not exactly what you need, but might be a good place to start. Hmm, what do you mean with Development Kit one of those kits you get when you had that subscription at Macromedia? If so, I wouldn't have it :) Yours, Weyert ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Mac IDE for AS !
I use TextMate http://www.macromates.com/ - Juan On Jul 25, 2006, at 1:28 AM, Dan Course wrote: What Program do you all develop you AS classes... I'm stumped on a Mac! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Converting stage elements into code
Hi Danny, I don't, but it sounds like something that wouldn't be *insanely* hard to do with JSFL. Hmm, JSFL time to read more about that. I suppose their will be a PDF about it. Ahahahaha! Yeah, right :) Actually, it's not that bad. It's a bit confusing, though, because it's like a weird bastardised hybrid of JavaScript and ActionScript, and the docs don't really make it clear which bits of JS you can use and which you can't. On the other hand, I've written macros in VBScript, photoshop and other tools, and JSFL is pretty cool. But you do come up against Flash's limit of code execution far too often. It would be great if we could increase the limit of function calls to enable more complex processes. I can't see how the above would help with this, though. Well, this would save myself time, because I won't be needed to dig up all the magic settings for anti aliasing :) Hmm - you may find yourself spending a lot *more* time on the JSFL... Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Mac IDE for AS !
On Jul 25, 2006, at 9:44 AM, Juan Carlos Anorga wrote: I use TextMate http://www.macromates.com/ AFAIK, TextMate isn't really kept up-to-date with AS syntax though. Of course, if you don't care about colorization or autocomplete it probably doesn't matter. -- Troy RPSystems, Ltd. http://www.rpsystems.net ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Mac IDE for AS !
Hi, I first used SE|PY Action Script editor on Windows (and still do) but they do have a Mac version which I have not used that much, it is always a little behind the current build but I have found it to be excellent on the Windows platform for coding, all my code is now done with this editor in external AS files. http://sourceforge.net/project/showfiles.php? group_id=90749release_id=416560 Regards, Peter Witham On Jul 25, 2006, at 8:44 AM, Juan Carlos Anorga wrote: I use TextMate http://www.macromates.com/ - Juan On Jul 25, 2006, at 1:28 AM, Dan Course wrote: What Program do you all develop you AS classes... I'm stumped on a Mac! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com Peter Witham [EMAIL PROTECTED] http://www.evolutiondata.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] SWF player...
Wow wow! What are you asking for? A SWF player is the Flash Player. I think there is terminology issue here. Perhaps you are looking for a FLV Player? One that you can just point to a FLV file and it will play, etc. If this is the case then look in your components. There is an FLV player there. Charles P. On 7/25/06, Steve Lloyd [EMAIL PROTECTED] wrote: Hi List, I am trying not to re-invent the wheel and am looking for what I call a SWF player like the one at Adobe: http://www.adobe.com/products/flash/flashpro/ All it needs to do is load in one external .swf but if it loads in more great! Anybody know of an open-source .fla file(s) that will get me close to this? Not having any luck with my Google searches yet. Thanks, -Steve ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Mac IDE for AS !
I use TextMate. I'd say it's the best text editor out there for mac. The built in actionscript bundle (sorta like a plugin) comes with some cool features, like command-enter for testing the movie in flash. it's also very extensible and easy to add functionality to a bundle...I've seen people use it to compile with mtasc and things like that. On 7/25/06, Peter Witham [EMAIL PROTECTED] wrote: Hi, I first used SE|PY Action Script editor on Windows (and still do) but they do have a Mac version which I have not used that much, it is always a little behind the current build but I have found it to be excellent on the Windows platform for coding, all my code is now done with this editor in external AS files. http://sourceforge.net/project/showfiles.php? group_id=90749release_id=416560 Regards, Peter Witham On Jul 25, 2006, at 8:44 AM, Juan Carlos Anorga wrote: I use TextMate http://www.macromates.com/ - Juan On Jul 25, 2006, at 1:28 AM, Dan Course wrote: What Program do you all develop you AS classes... I'm stumped on a Mac! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com Peter Witham [EMAIL PROTECTED] http://www.evolutiondata.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Re-parenting movie clips in AS 2.0
Surely there is a work-around, however convoluted, for assigning a movie clip instance to some other parent movie clip in AS 2.0. Does someone know of a trick? It can involve undocumented features, removing/attaching... whatever. Much appreciated. - pixelTwiddler, a.k.a. Jason ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] SWF player...
I think he is looking for a movie that can load external swf files. You should look at the MovieClipLoader class http://livedocs.macromedia.com/flash/8/main/2538.html#wp379952 Hth Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Parcell Sent: 25 July 2006 15:58 To: Flashcoders mailing list Subject: Re: [Flashcoders] SWF player... Wow wow! What are you asking for? A SWF player is the Flash Player. I think there is terminology issue here. Perhaps you are looking for a FLV Player? One that you can just point to a FLV file and it will play, etc. If this is the case then look in your components. There is an FLV player there. Charles P. On 7/25/06, Steve Lloyd [EMAIL PROTECTED] wrote: Hi List, I am trying not to re-invent the wheel and am looking for what I call a SWF player like the one at Adobe: http://www.adobe.com/products/flash/flashpro/ All it needs to do is load in one external .swf but if it loads in more great! Anybody know of an open-source .fla file(s) that will get me close to this? Not having any luck with my Google searches yet. Thanks, -Steve ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] catching errors by webservice
Hi List Has anyone any way to receive the exceptions thrown by a webservice server please? as it's asynchronous, the classical try...catch can't work on the service method call. but, as soon as the server throws an exception (the sent SOAP is a correct fault soap file if I call it from a browser), I only receive an event in my Log listener, saying unable to connect to endpoint... How do you actually do to receive and interpret the server faults? ++ PiR ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] as3 and attachmovie
Carl, Everything in AS3 is classes, so you can't do anything without using classes. It's actually easier than attachmovie. Just make a var newMC=new MovieClip(); this.addChild(newMC); feels alot cleaner that attachmovie(gf,gf+_root.getNextHighestDepth(),_root.getNextHighestDepth()); doesn't it ;). good luck! Meinte ps. you can checkout senocular.com , he has some excellent tutorials on AS3 On 7/25/06, eka [EMAIL PROTECTED] wrote: Hello :) read in french : - http://iteratif.free.fr/blog/index.php?2006/07/11/44-bibliotheque-partagee-sous-flash-9 attachMovie is remove in AS3 :) Use [embed(source=)] metadata and create the instance with new MyClass and addChild() method :) eKA+ :) 2006/7/25, Carl Welch [EMAIL PROTECTED]: I just downloaded the demo of Flash 9 / as3 and I noticed you can't use attachmovie anymore. I've found some new methods on google but it seems like the only way I can do it is by using classes. Is there another way to handle an attachmovie equivilent without using a class in as3? thanks. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] SWF player...
Charles, Unfortunately the client has provided me a locked .swf which contains their movie instead of a .flv. The default components appear to only handle .flv and .mp3 files so that ruled that out. I was able to find something workable on Flashkit.com and have it fairly tweaked to what I want now but I thank you for the response. Regards, -Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Parcell Sent: Tuesday, 25 July 2006 10:58 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] SWF player... Wow wow! What are you asking for? A SWF player is the Flash Player. I think there is terminology issue here. Perhaps you are looking for a FLV Player? One that you can just point to a FLV file and it will play, etc. If this is the case then look in your components. There is an FLV player there. Charles P. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Re-parenting movie clips in AS 2.0
Simple movies can be almost re-parented by deep-copying all the data and methods from one movie into another, but you'll run into problems if you try this with MovieClip subclasses that require constructor calls, and things rapidly get complicated as the clip you need to reparent gets more complicated. There is no magic bullet for this. (But there's always another way to accomplish whatever you're trying to do.) From: Jason Lutes [EMAIL PROTECTED] Date: 2006/07/25 Tue AM 09:02:12 CDT To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Re-parenting movie clips in AS 2.0 Surely there is a work-around, however convoluted, for assigning a movie clip instance to some other parent movie clip in AS 2.0. Does someone know of a trick? It can involve undocumented features, removing/attaching... whatever. Much appreciated. - pixelTwiddler, a.k.a. Jason ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] SWF player...
if you're looking to extract those resources (FLV, mp3) from the compiled SWF for your client, check out ASV: http://buraks.com/asv/ Open your SWF with it and extract all of the resources/embedded assets JG On 7/25/06, Steve Lloyd [EMAIL PROTECTED] wrote: Charles, Unfortunately the client has provided me a locked .swf which contains their movie instead of a .flv. The default components appear to only handle .flv and .mp3 files so that ruled that out. I was able to find something workable on Flashkit.com and have it fairly tweaked to what I want now but I thank you for the response. Regards, -Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Parcell Sent: Tuesday, 25 July 2006 10:58 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] SWF player... Wow wow! What are you asking for? A SWF player is the Flash Player. I think there is terminology issue here. Perhaps you are looking for a FLV Player? One that you can just point to a FLV file and it will play, etc. If this is the case then look in your components. There is an FLV player there. Charles P. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- John Grden ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] as3 and attachmovie
Everything in AS3 is classes, so you can't do anything without using classes. not necessarily. You can use AS3 to code on the timeline as well. check out http://as3.betaruce.com/tut/appendix/app_1/app_1.html ~Arul Prasad. On 7/25/06, Meinte van't Kruis [EMAIL PROTECTED] wrote: Carl, Everything in AS3 is classes, so you can't do anything without using classes. It's actually easier than attachmovie. Just make a var newMC=new MovieClip(); this.addChild(newMC); feels alot cleaner that attachmovie(gf,gf+_root.getNextHighestDepth(),_root.getNextHighestDepth()); doesn't it ;). good luck! Meinte ps. you can checkout senocular.com , he has some excellent tutorials on AS3 On 7/25/06, eka [EMAIL PROTECTED] wrote: Hello :) read in french : - http://iteratif.free.fr/blog/index.php?2006/07/11/44-bibliotheque-partagee-sous-flash-9 attachMovie is remove in AS3 :) Use [embed(source=)] metadata and create the instance with new MyClass and addChild() method :) eKA+ :) 2006/7/25, Carl Welch [EMAIL PROTECTED]: I just downloaded the demo of Flash 9 / as3 and I noticed you can't use attachmovie anymore. I've found some new methods on google but it seems like the only way I can do it is by using classes. Is there another way to handle an attachmovie equivilent without using a class in as3? thanks. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] SWF player...
I've got something that works with the .swf now but I will definitely keep your link handy for the next time I run into this problem. Thanks -Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Grden Sent: Tuesday, 25 July 2006 11:25 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] SWF player... if you're looking to extract those resources (FLV, mp3) from the compiled SWF for your client, check out ASV: http://buraks.com/asv/ Open your SWF with it and extract all of the resources/embedded assets JG On 7/25/06, Steve Lloyd [EMAIL PROTECTED] wrote: Charles, Unfortunately the client has provided me a locked .swf which contains their movie instead of a .flv. The default components appear to only handle .flv and .mp3 files so that ruled that out. I was able to find something workable on Flashkit.com and have it fairly tweaked to what I want now but I thank you for the response. Regards, -Steve ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Key.CAPSLOCK woes.
Perhaps a more detailed explanation will help explain the problem. On the Mac, if the capslock key is not toggled and not down, the Key.onKeyDown event is triggered when the key is pressed. While the key is held down both isDown and isToggled return true. When the key is released the onKeyUp event is not called and the isDown and isToggled methods still return true. When the caps lock key is pressed again the Key.onKeyUp event is triggered even though the key is being pressed, not released. While the key is held down both isDown and isToggled return false. When the key is released no key event is triggered. Though the isToggled method returns the correct boolean value in all cases, the isDown method is not accurate. When I publish the SWF for v8 and test in on Mac OS X (Flash authoring tool, Safari and Firefox) it functions in the way that is outlined above. This makes it impossible to track whether the caps lock key is up or down. I don't have access to a PC to test this and see if it functions in the same way. Has anyone experienced this before? More importantly does anyone have a solution? It is critical I be able to track the up/down state of this key for a project. Thanks. Daniel Hi, the isDown call traces true when i test it here, the isToggled traces false (both when holding down capslock ofcourse). Tested on xp, flash 8 Just to be sure, 'disable keyboard shortcuts' doesnt have anything to do with it? When i do: Key.addListener(this); this.onKeyUp = function () { if (Key.getCode() == Key.CAPSLOCK) trace (caps up); } it shows 'caps up' just fine. greetz Hans ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] catching errors by webservice
Check out the WebServiceConnector.status event. -josh On Jul 25, 2006, at 8:12a, PR Durand wrote: Hi List Has anyone any way to receive the exceptions thrown by a webservice server please? as it's asynchronous, the classical try...catch can't work on the service method call. but, as soon as the server throws an exception (the sent SOAP is a correct fault soap file if I call it from a browser), I only receive an event in my Log listener, saying unable to connect to endpoint... How do you actually do to receive and interpret the server faults? ++ PiR ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] catching errors by webservice
thanks a lot, josh, I'll look at this. but I was using the webservice and pendingcall classes. Is there a way with it or do I have to use the connector component? thx PiR Josh Santangelo a écrit : Check out the WebServiceConnector.status event. -josh On Jul 25, 2006, at 8:12a, PR Durand wrote: Hi List Has anyone any way to receive the exceptions thrown by a webservice server please? as it's asynchronous, the classical try...catch can't work on the service method call. but, as soon as the server throws an exception (the sent SOAP is a correct fault soap file if I call it from a browser), I only receive an event in my Log listener, saying unable to connect to endpoint... How do you actually do to receive and interpret the server faults? ++ PiR ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] catching errors by webservice
I changed everything to work with the connector instead of the service class : same result If I right understood, an exception thrown with server should give me a faultcode=Server and faultstring=[the exception message], isn't it? here I got once more a Server.connection faultcode, with the unable to connect to endpoint : [url] string... the service rocks with good values. Last year, I worked with a remote Java server, now with a local .Net server... Developpers are really different, but the results are all the same : flash is unable to read the SOAP fault, and sends a connection error... :( any idea please? thx PiR Josh Santangelo a écrit : Check out the WebServiceConnector.status event. -josh On Jul 25, 2006, at 8:12a, PR Durand wrote: Hi List Has anyone any way to receive the exceptions thrown by a webservice server please? as it's asynchronous, the classical try...catch can't work on the service method call. but, as soon as the server throws an exception (the sent SOAP is a correct fault soap file if I call it from a browser), I only receive an event in my Log listener, saying unable to connect to endpoint... How do you actually do to receive and interpret the server faults? ++ PiR ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] onLoadInit works when testing movie, but inconsistent in Projector
Is anyone familiar with this -- I see several posts but none with this specific twist: I am loading all content as swf files into a content clip in my program, using the movieClipLoader event onLoadInit to show the page once ready for displaying. This works perfectly when testing the movie in the authoring environment. But when I launch the projector (or a generated swf of the program) directly, the onLoadInit event does not fire consistently. For certain pages - always the same ones - the last event to fire is onLoadComplete. Since the pages are identical (they are placeholder pages at the moment) I've eliminated differences between the files. Thanks for any advice -- Tony F. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Attention Recursion Speed Experts
First off, thanks to everyone helping on this thread. I originally was using object == typeof(this[a]). Glad to see instanceof Array was fastest. What I'm trying to do here is write new methods for Array (and next up is String) that other languages have but Flash does not. Some of these methods are extremely useful. This is why I'm injecting them right into Array with prototype for now. This is also why I'm trying to squeeze the absolute fastest performance out of these methods. The fastest loop in flash is not while (i--). Pre-decrementing is faster than Post-decrementing. while (--i -(-1)) is actually the fastest because of what it compiles to in bytecode. For more information on this and other cool optimizations, check out the Flasm page. One thing I'm wondering is if a decrementing loop and then a reverse() at the end is faster than an incrementing loop. I'm working on compacting Danny's script at the moment. -Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] catching errors by webservice
Hi, just to be clear on this, PendingCall.onFault is not working for you? greetz hans On 7/25/06, PR Durand [EMAIL PROTECTED] wrote: I changed everything to work with the connector instead of the service class : same result If I right understood, an exception thrown with server should give me a faultcode=Server and faultstring=[the exception message], isn't it? here I got once more a Server.connection faultcode, with the unable to connect to endpoint : [url] string... the service rocks with good values. Last year, I worked with a remote Java server, now with a local .Net server... Developpers are really different, but the results are all the same : flash is unable to read the SOAP fault, and sends a connection error... :( any idea please? thx PiR Josh Santangelo a écrit : Check out the WebServiceConnector.status event. -josh On Jul 25, 2006, at 8:12a, PR Durand wrote: Hi List Has anyone any way to receive the exceptions thrown by a webservice server please? as it's asynchronous, the classical try...catch can't work on the service method call. but, as soon as the server throws an exception (the sent SOAP is a correct fault soap file if I call it from a browser), I only receive an event in my Log listener, saying unable to connect to endpoint... How do you actually do to receive and interpret the server faults? ++ PiR ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Attention Recursion Speed Experts
Oh, I just noticed that Mark's was fastest. But, I can't get it to work (freezes flash) There seems to be an error in the final while loop. It's a single = not a double ==. Is that a typo? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] png transparency - size of stage
App using: Flash 8 with png file imported from a swift 3d export. I am working on a project in which i bring in png files exported out of swift 3d. For some reason even though there is tons of transparent area it brings the png at the size of the stage. I tried opening up the pngs individually in fireworks and then bringing them back over to flash and still the same issue. I did notice that if I opened up one of the png files in fireworks I could select the image and it would not be the entire stage size. Though I exported from fireworks and it still came in at full stage size. I did get it to work by cutting the image and pasting it into a new fireworks document then saving it out. I could use this method but there are quite a few png files and my time is limited. Anyone ever have the problem of bringing in png files and it ends up being a bitmap the size of the stage in flash? Will all that extra transparent area add to file size? The only reason why i would like to fix this is because it slows down the processor animating through 15 frames bitmaps at the stage size. I assume if it only has to update the size of the actual image it will run faster. Jordan Robinson | [EMAIL PROTECTED] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Weird problem with encryption...
I'm working on some encryption classes, and I've run into an extremely odd problem. Let me give you an example: Nothing? Not a single response on the list? ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Multiple instances of ExternalInterface in IE
hey, here's an update (and a fix) to this issue: it looks like (as you pointed out) it is a bug in the new fp9 - this code was added in to fix an issue in IE with streaming media... if you were using flash media server to stream video, and left the page while the video was playing, the audio would keep going. this only happened in ie5 or 6 when you used innerHTML to insert the swf into the page - something more and more people are now doing because of the Eolas stuff. so to fix this, you had to clear our all the functions that the flash player inserted into the page, to allow IE to do proper cleanup on the activex control. I came up with a fix a few weeks back after discussing it a bit with an adobe engineer, and my fix was very similar to this one (it was integrated into SWFObject 1.4.2). So naturally when fp9 came out, they wanted to include the fix with it, and did, but apparently the code isn't all that great. Anyway, long story short, we've been working on a fix today and I just uploaded the new version of SWFObject to my SVN repository, and it looks like it takes care of the problem. it basically just removes the Adobe code that the player inserts and uses some custom code to clean up the controls instead. have a look, let me know if you have any problems with it: I haven't made a tag for it yet, so just grab it from the trunk folder: http://svn.deconcept.com/swfobject/trunk/ On Jul 5, 2006, at 12:47 AM, Alexis Glass wrote: In absence of a response, I thought I'd post more results from my investigation. Debugging IE's scripts, we come across the culprit - ExternalInterface saves the previous unload handler and installs its own. Its own unload handler calls the saved unload handler after freeing up all its resources. Pity that it saves the previous unload handler in a global variable so that if ExternalInterface is initialized twice on one page it recursively calls the __flash_savedUnloadHandler until IE complains about no memory. As Brad Neuberg wrote in his blog about ExternalInterface's broken XML implementation (http://codinginparadise.org/weblog/ 2006_02_03_archive.html), In general, whoever coded ExternalInterface should be fired. Well, or whoever signed off on it :( On the up side, I guess it should be possible (if not exactly future-proof) to overwrite the default __flash_unloadHandler behaviour. --- function __flash_unloadHandler() { myflash_object.style.display = 'none'; for (var prop in myflash_object) { if (typeof(myflash_object[prop]) == function) { myflash_object[prop]=null; } } if (__flash_savedUnloadHandler != null) { __flash_savedUnloadHandler(); } } function __flash_setupUnloadHandler() { if (window.onunload != __flash_unloadHandler) { __flash_savedUnloadHandler = window.onunload; window.onunload = __flash_unloadHandler; } } -- Alexis Glass wrote: I have two entirely separate SWFs on a page, both using ExternalInterface to interface with my JavaScript. Things seemed just fine under Firefoxi, but under IE I get an Out of memory at line: 56 error following a really long delay when the page is unloaded as I try to navigate to another page. This only happens when both SWFs are displayed on the page at the same time. They both have different IDs set in their object tags and are realized from entirely separate SWFs, so I don't see why there should be any conflict by including both on one page... I don't seem to be the only person to have encountered this problem (http://blog.deconcept.com/2006/05/18/flash-player-bug- streaming-content-innerhtml-ie/ ), but I haven't been able to find a solution mentioned anywhere. Has anyone else encountered this problem -- or, better yet, found a solution? Thanks (fingers crossed) Alexis ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Attention Recursion Speed Experts
Ok, I got Mark's to work however it does not work when turned into a prototype and I set list = this. Why it doesn't work may be the result of another problem, though, and I'm not sure yet what it is, but here's the behavior. I created a movie with 3 buttons. An new array is instantiated. ButtonA generates an array of 100,000 items. ButtonB does recursive, ButtonC does iterative. The first time I feed Mark's script a list of 100,000 items, it scores ~2135ms. The second and every subsequent time I run his script on the same list, it scores ~1250ms. That's a suspiciously huge jump. So, then I generate a new array and run the test again and again the first test runs much slower than subsequent tests. Somehow, Mark's script is cheating. ;) So, I decided to run his script on the empty array the first time and then feed it then 100,000 item array. I got 0ms on the empty array, as expected, but then I fed it the 100,000 item array and it scored 0ms every time. Something is amiss. I'm not sure what's wrong with his code, but the results I got with the recursive script were consistent every time and consistently faster than the iterative code's first run speed, especially the more items there were. At 10,000 items, it was close. At 100,000 items, it was almost a second difference (recursion scored ~1400ms to ~1700ms while iterative scored well over ~2000ms every time). Mark, please check your script to try and find out what's wrong with it. I'd like to run some more accurate comparisons. Thanks, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Attention Recursion Speed Experts
On 7/25/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: Oh, I just noticed that Mark's was fastest. But, I can't get it to work (freezes flash) There seems to be an error in the final while loop. It's a single = not a double ==. Is that a typo? No, not a typo. I know it's confusing, but since this is about speed... 'list' is the current array. Say we have array A containing array B. 'list' is A and we iterate through it. At some point, we come across B, so the current index gets stored away in A.index, A itself is stored as B.parent, B gets assigned to 'list' and index reset to iterate through B. Once we're at the end of B, we continue where we left off in A (B.parent == list.parent at this point). However, the inArray we want to flatten is the outermost array and has no parent -- when it's finished the loop ends. Put differently, it would have been possible to write it like this: do { // ... list = list.parent; } while ( list != undefined ); Better readable, but oh so slightly slower... If you want to use it for a library, though, there would be some changes required. Out of laziness I stored the index and parent as a property of the array. You wouldn't want that in a library, especially not with such common names. One way would of course be to hide it with AsSetPropFlags, but a stack would be better. Unless you have a ridiculously deep recursion depth, you could even use the VM's stack directly. That would save some getMembers and you could do some additional optimizations while you're at it. Disadvantage would be that you'd have to do it in flasm, obviously. I tested this option, it shaves off a few percent (depending on recursion depth between, say, 1% and 5%), is nowhere near finished, only almost-not tested, to be used at your own risk and so on, but could quite possibly be improved further. Oh, and it needs proper register and variable names -- sorry. function2 (r:2='inArray') (r:1='this') // begin init // declare 'outArray' push 0 initArray setRegister r:3 pop // put 'null' on stack to mark end push NULL // push 'length' of 'inArray' and 'index' of 0 on // stack, followed by 'inArray' push r:inArray, 'length' getMember push 0, r:2 // stack now looks like this: // NULL, inArray.length, 0, inArray // end init branch label2 // check if something (should be an array) is on the // stack, otherwise it's NULL and we're done label1: dup not branchIfTrue label7 // begin new loop: next array on stack label2: // take sub-array from stack setRegister r:4 pop // take 'index' from stack setRegister r:6 pop // take 'length' from stack setRegister r:7 pop // begin new loop: loop through current array label3: // condition: (index length) push r:6, r:7 lessThan not branchIfTrue label1 push r:4, r:6, r:6 // stack: array, index, index increment // index++ setRegister r:6 pop // get array[ index ] (i.e., 'item') getMember setRegister r:5 // condition: ('item' instanceof 'Array') push 'Array' getVariable instanceOf not branchIfTrue label4 // 'item' is an array // put length, index and current array on stack push r:7, r:6, r:4 // put new current array on stack and into register push r:5 setRegister r:4 // get length and store in register push 'length' getMember setRegister r:7 pop // set 'index' to 0 push 0 setRegister r:6 pop // continue with new array branch label3 // 'item' is no array label4: // append 'item' to 'outArray' push r:5, 1, r:3, 'push' callMethod pop branch label3 // done going through the array label7: // remove NULL from stack pop // return 'outArray' push r:3 return end // of function Mark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Attention Recursion Speed Experts
On 7/25/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: Mark, please check your script to try and find out what's wrong with it. I'd like to run some more accurate comparisons. Ah, yes, just noticed I forgot to look into the freezing problem you mentioned in your last mail (also, I noticed I wrote that it needed proper variable names when I meant label names). It's strange, I didn't encounter this problem in my tests. I let it take turns with the flasm version to test how much could be gained by using the VM stack, each took the same array 20 times, taking turns, giving constant results. Could you post (or send me) the test script, please? (Not as .fla please, I don't have the Flash IDE. I use MTASC, but don't think this is causing the problem.) Also, I might not be able to look into it tonight, need to go to the park and drink wine. :) It's probably better that way, I haven't slept last night so I might make things worse if I fiddle with it right now, unless it's something obvious. Mark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Back button fun
This is an age-old problem but I still can't find a decent solution. I'm looking for a JavaScript library or script for browser back-button support for Flash, and one that uses the hash notation in the browser window so users can navigate to points in a Flash movie through the address bar, e.g. mypage.html#page123. There are so many about and they all seem to be overly complex, use Flash 5 code, require twenty different JavaScript files and two or three hours to get your head around what it is exactly you're supposed to do to get it to work, and even then it'll only work in Internet Explorer 5.5 on a Tuesday morning. I'm using SWFObject and Flash 8, so a simple, easy to use, drag and drop back button functionality would be ideal. Anybody know of such a beautiful thing? Thanks lorry loads. Paul. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Back button fun
it's been on my list for months now... i did create one, but it was a bit buggy and not documented at all - http://blog.deconcept.com/code/historymanager/ and there's changes to this I wanted to make, so it does more friendly looking hashes, instead of name/value pairs as it does now... and it doesn't work in safari (only one does that i know of, and it doesn't support page title updates). I was trying to modify this one from kevin newman: http://www.unfocus.com/projects/HistoryKeeper/ because it sorta works in safari, but i kept running into more and more problems... so my patience finally gave out. the lessrain guys also have really nice solution they use (and they use it with swfobject,too), so check out their blog and see what they say about it. On Jul 25, 2006, at 3:23 PM, Paul Neave wrote: This is an age-old problem but I still can't find a decent solution. I'm looking for a JavaScript library or script for browser back-button support for Flash, and one that uses the hash notation in the browser window so users can navigate to points in a Flash movie through the address bar, e.g. mypage.html#page123. There are so many about and they all seem to be overly complex, use Flash 5 code, require twenty different JavaScript files and two or three hours to get your head around what it is exactly you're supposed to do to get it to work, and even then it'll only work in Internet Explorer 5.5 on a Tuesday morning. I'm using SWFObject and Flash 8, so a simple, easy to use, drag and drop back button functionality would be ideal. Anybody know of such a beautiful thing? Thanks lorry loads. Paul. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Attention Recursion Speed Experts
One thing I'm wondering is if a decrementing loop and then a reverse() at the end is faster than an incrementing loop. I'd be astounded if it was! I'm working on compacting Danny's script at the moment. Sounds like an odd idea to me: Mark's was way faster and was essentially the same idea anyway. Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Attention Recursion Speed Experts
Oh, I just noticed that Mark's was fastest. Sorry, replied to an easlier mail before noticing the thread continued... Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Back button fun
Do you think you'll carry on development on it? yeah eventually... i haven't had much time lately for stuff like this, but it's at the top of my 'would be nice to have...' list. On Jul 25, 2006, at 3:53 PM, Paul Neave wrote: On 25/07/06, Geoff Stearns [EMAIL PROTECTED] wrote: i did create one, but it was a bit buggy and not documented at all - http://blog.deconcept.com/code/historymanager/ This looks really great Geoff. The nice thing about it is that it's just one js file and only a few lines of code to get it to work, just the way SWFObject is. Although it may not be as compatible as most at the moment it's simple and simplicity wins for me every time. Do you think you'll carry on development on it? Paul. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Attention Recursion Speed Experts
Could you post (or send me) the test script, please? Sure, here you go. --- function randomArray(p) { var a = []; for (var i = 0; i p; i++) { if (random(2) random(5)) { a.push(i); } else { a.push(randomArray(random(3) + 1)); } } return a; } function flatten(inArray:Array):Array { var outArray:Array = []; var list = inArray; list.index = 0; var item:Object; var index:Number; var len:Number; do { index = list.index; len = list.length; while (index length) { item = list[index++]; if (item instanceof Array) { item.parent = list; list.index = index; list = item; index = 0; len = list.length; } else { outArray.push(item); } } } while (list = list.parent); return outArray; } Array.prototype.flatten = function(r) { if (!r) r = []; var n = this.length; for (var a = 0; a n; a++) { if (this[a] instanceof Array) { r.push(this[a]); } else { this[a].flatten(r); } } return r; }; p = 1000; x = randomArray(p); n = new Date().getTime(); z = x.flatten(); trace(recursive: + (new Date().getTime() - n) + ms); n = new Date().getTime(); z = flatten(x); trace(iterative: + (new Date().getTime() - n) + ms); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Attention Recursion Speed Experts
I don't know if I understand this correctly, but is it making a array flat? Then this is the fastest way I think: var foo : Array = [a, b, c, [d, e,[d, e,[d, e,[d, e, f, [g, [h]], [[], i], j]; var fooString:String = foo.join(;); fooString = fooString.split(,).join(;); foo = fooString.split(;); output: a,b,c,d,e,d,e,d,e,d,e,f,g,h,,i,j Bernard -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Danny Kodicek Verzonden: dinsdag 25 juli 2006 21:51 Aan: Flashcoders mailing list Onderwerp: Re: [Flashcoders] Attention Recursion Speed Experts Oh, I just noticed that Mark's was fastest. Sorry, replied to an easlier mail before noticing the thread continued... Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] resize flash stage after the fact.
hi. quick question about adding width to an fla and arranging the elements without having to change the registration point of each symbol. you can do this easily in photoshop by choosing the side of the canvas you want the dimensions added to. basically, i'm adding 180 pixels of width and flash ide adds the extra space to the right...when i want it to the left. is there an elegent way to accomplish this? thanks for any helpful tips. matt. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Attention Recursion Speed Experts
Why have the step with the semicolon? You can just do this: var foo:Array = [a, b, c, [d, e, [d, e, [d, e, [d, e, f, [g, [h]], [[], i], j]; var fooFlat:Array = foo.toString().split(,); Potential problems with this approach: - It does not preserve the type of the elements, converting them all to string. - Any element that equates to a string with a comma in it will be evaluated as two elements. E.g, if foo is set to [a,b, c], it will flatten to a 3-element array. So it's only useful if the atomic elements are strings, and they are guaranteed not to include commas. I have no idea how efficient it is, processor-wise, although I would suspect it is rather slow. -- T. Michael Keesey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bernard Visscher Sent: Tuesday, July 25, 2006 2:05 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Attention Recursion Speed Experts I don't know if I understand this correctly, but is it making a array flat? Then this is the fastest way I think: var foo : Array = [a, b, c, [d, e,[d, e,[d, e,[d, e, f, [g, [h]], [[], i], j]; var fooString:String = foo.join(;); fooString = fooString.split(,).join(;); foo = fooString.split(;); output: a,b,c,d,e,d,e,d,e,d,e,f,g,h,,i,j Bernard -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Danny Kodicek Verzonden: dinsdag 25 juli 2006 21:51 Aan: Flashcoders mailing list Onderwerp: Re: [Flashcoders] Attention Recursion Speed Experts Oh, I just noticed that Mark's was fastest. Sorry, replied to an easlier mail before noticing the thread continued... Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Back button fun
I've found a couple of sites that seem to work: http://www.orange-project.com/ http://www.redbulltrackattack.co.uk/index_phase3.php The RB track attack site seems to fail in safari for pages that require two values. Orange-project seems to be solid in all browsers and is based on a variation of unfocus, using less code. I've followed OP to some degree and have managed to implement semi- successfully back/forward deep links for all browsers. There's still a few bugs to work out. I should have it resolved in the next week or so. I'm slightly familiar with Javascript since it's like AS, and my AS is primitive, so I'm a bit shy to share with the group. Maybe once I have it fully resolved... -radley On Jul 25, 2006, at 12:32 PM, Geoff Stearns wrote: it's been on my list for months now... i did create one, but it was a bit buggy and not documented at all - http://blog.deconcept.com/code/historymanager/ and there's changes to this I wanted to make, so it does more friendly looking hashes, instead of name/value pairs as it does now... and it doesn't work in safari (only one does that i know of, and it doesn't support page title updates). I was trying to modify this one from kevin newman: http://www.unfocus.com/projects/HistoryKeeper/ because it sorta works in safari, but i kept running into more and more problems... so my patience finally gave out. the lessrain guys also have really nice solution they use (and they use it with swfobject,too), so check out their blog and see what they say about it. On Jul 25, 2006, at 3:23 PM, Paul Neave wrote: This is an age-old problem but I still can't find a decent solution. I'm looking for a JavaScript library or script for browser back- button support for Flash, and one that uses the hash notation in the browser window so users can navigate to points in a Flash movie through the address bar, e.g. mypage.html#page123. There are so many about and they all seem to be overly complex, use Flash 5 code, require twenty different JavaScript files and two or three hours to get your head around what it is exactly you're supposed to do to get it to work, and even then it'll only work in Internet Explorer 5.5 on a Tuesday morning. I'm using SWFObject and Flash 8, so a simple, easy to use, drag and drop back button functionality would be ideal. Anybody know of such a beautiful thing? Thanks lorry loads. Paul. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Radley Marx [EMAIL PROTECTED] 310.220.4088 http://www.radleymarx.com -- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Array Empowerment
Other programming languages have more comprehensive Array methods. While some are rarely used, some are quite useful, and some are merely shortcuts. I have included them all here in my Array Empowerment script. If anyone can speed any of these up, please let me know. Some of these for loops have to increment, though, as order is important. // Array Empowerment // Remove all elements from Array Array.prototype.clear = function() { this.length = 0; }; // Invoking block once for every element, passing each element as a parameter to block // The result of block is used as the given element in the array Array.prototype.collect = function(block) { var n = this.length; for (var a = 0; a n; a++) { this[a] = block(this[a]); } }; // Removes all null and undefined elements from Array Array.prototype.compact = function() { this.delete_all(null); this.delete_all(undefined); }; // Deletes items from the Array that are equal to obj Array.prototype.delete_all = function(obj) { var i = -1; var a = this.length; while (--a -(-1)) { if (this[a] == obj) { i = a; break; } else if (this[a] instanceof Array obj instanceof Array) { if (this[a].eql(obj)) i = a; break; } } if (i -1) { this.splice(i, 1); this.delete_all(obj); } }; // Deletes the element at the specified index, returning that element, or undefined if the index is out of range Array.prototype.delete_at = function(i) { if (i this.length i -1) return this.splice(i, 1)[0]; return undefined; }; // Deletes every element of Array for which block evaluates to true Array.prototype.delete_if = function(block) { var r = []; var n = this.length; for (var a = 0; a n; a++) { if (!block(this[a])) { r.push(this[a]); } } this = r; }; // Calls block once for each element in Array, passing that element as a parameter Array.prototype.each = function(block) { var n = this.length; for (var a = 0; a n; a++) { block(this[a]); } }; // Same as Array.each, but passes the index of the element instead of the element itself Array.prototype.each_index = function(block) { var n = this.length; for (var a = 0; a n; a++) { block(a); } }; // An array is equal to another array if the lengths are equal and each corresponding element is equal Array.prototype.eql = function(arr) { if (arr.length != this.length) { return false; } else { var a = this.length; while (--a -(-1)) { if (this[a] instanceof Array arr[a] instanceof Array) { if (!this[a].eql(arr[a])) return false; } else if (this[a] != arr[a]) { return false; } } } return true; }; // Runs block on every item in the array // Returns true if the function returns true for every item Array.prototype.every = function(block) { var a = this.length; while (--a -(-1)) { if (!block(this[a])) return false; } return true; }; // Sets the selected elements of Array (which may be the entire array) to obj // A start of undefined is equivalent to zero. // A length of undefined is equivalent to Array.length. Array.prototype.fill = function(obj, start, len) { if (!start) start = 0; if (len == undefined) len = this.length; len = start + len; if (len this.length) len = this.length; while (--len - (-1) start) { this[len] = obj; } }; // Runs a function on every item in the array // Returns an array of all items for which the function returns true. Array.prototype.filter = function(block) { var r = []; var n = this.length; for (var a = 0; a n; a++) { if (block(this[a])) r.push(this[a]); } return r; }; // Returns a new array that is a one-dimensional flattening of this Array (recursively) // That is, for every element that is an array, extract its elements into the new array Array.prototype.flatten = function(r) { if (!r) r = []; var l = this.length; for (var a = 0; a l; a++) { if (!(this[a] instanceof Array)) { r.push(this[a]); } else { this[a].flatten(r); } } return r; }; // Returns true if the given obj is present in Array (if any element == obj) Array.prototype.include = function(obj) { var a = this.length; while (--a -(-1)) {
Re: [Flashcoders] Back button fun
I'm also going to work on this capability soon, and my search led to: http://chakramedia.com/deeplink-backbutton/index.html -A On 7/25/06, Radley Marx [EMAIL PROTECTED] wrote: I've found a couple of sites that seem to work: http://www.orange-project.com/ http://www.redbulltrackattack.co.uk/index_phase3.php The RB track attack site seems to fail in safari for pages that require two values. Orange-project seems to be solid in all browsers and is based on a variation of unfocus, using less code. I've followed OP to some degree and have managed to implement semi- successfully back/forward deep links for all browsers. There's still a few bugs to work out. I should have it resolved in the next week or so. I'm slightly familiar with Javascript since it's like AS, and my AS is primitive, so I'm a bit shy to share with the group. Maybe once I have it fully resolved... -radley On Jul 25, 2006, at 12:32 PM, Geoff Stearns wrote: it's been on my list for months now... i did create one, but it was a bit buggy and not documented at all - http://blog.deconcept.com/code/historymanager/ and there's changes to this I wanted to make, so it does more friendly looking hashes, instead of name/value pairs as it does now... and it doesn't work in safari (only one does that i know of, and it doesn't support page title updates). I was trying to modify this one from kevin newman: http://www.unfocus.com/projects/HistoryKeeper/ because it sorta works in safari, but i kept running into more and more problems... so my patience finally gave out. the lessrain guys also have really nice solution they use (and they use it with swfobject,too), so check out their blog and see what they say about it. On Jul 25, 2006, at 3:23 PM, Paul Neave wrote: This is an age-old problem but I still can't find a decent solution. I'm looking for a JavaScript library or script for browser back- button support for Flash, and one that uses the hash notation in the browser window so users can navigate to points in a Flash movie through the address bar, e.g. mypage.html#page123. There are so many about and they all seem to be overly complex, use Flash 5 code, require twenty different JavaScript files and two or three hours to get your head around what it is exactly you're supposed to do to get it to work, and even then it'll only work in Internet Explorer 5.5 on a Tuesday morning. I'm using SWFObject and Flash 8, so a simple, easy to use, drag and drop back button functionality would be ideal. Anybody know of such a beautiful thing? Thanks lorry loads. Paul. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Radley Marx [EMAIL PROTECTED] 310.220.4088 http://www.radleymarx.com -- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] flash 8 video, cue points, and actions based on those cue points
im having a hell of a time finding info on this. ive got a person with a transparent background (in an flv file), and based on cue points i need to trigger different animations in different movie clips. cant for the life of me figure out how to set up the scripts to respond to the different cue points. cue points in video being stop1 stop2 stop3 stop4 etc with no naming/parameter info attached anyone know where to find this info? ive got the video cut and imported fine, ive put the cue points on it fine. just need code to collect the cue points, and based on which cue point it is, fire off play(2) commands to different movieclips triggering animations timed with the video here's what ive got so far: but this just sees all the cue points.. I need to trigger different actions based on which cue point it is, and have that send an action to a separate clip var vidList:Object = new Object(); vidList.cuePoint = function(cues) { ex.gotoAndPlay(2); }; vid.addEventListener(cuePoint, vidList); eek im guessing that I need to stick if statements in the function to check for the cue name? not sure how to set that up, im a front end guy, this coding turns my brain numb :-) thanks! dare-ick-ee-toe ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Flash 7 image upload and .NET
With a .NET MS SQL backend, and a Flash 7 player in IE front end, what are some of my options for image uploading to the server by the user? Can't use PHP, ColdFusion, etc. in this case. Thanks, Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] resize flash stage after the fact.
well by hand I would group all symbols, register the lef margin for the group, modify the document size, and add/subtract the value added/subtracted to the symbols group´s left margin. I think it works, not tested yet. João Carlos - Original Message - From: Matthew Ganz [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, July 25, 2006 6:07 PM Subject: [Flashcoders] resize flash stage after the fact. hi. quick question about adding width to an fla and arranging the elements without having to change the registration point of each symbol. you can do this easily in photoshop by choosing the side of the canvas you want the dimensions added to. basically, i'm adding 180 pixels of width and flash ide adds the extra space to the right...when i want it to the left. is there an elegent way to accomplish this? thanks for any helpful tips. matt. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flash 7 image upload and .NET
Javascript and an hidden form ;) Old style file upload. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: terça-feira, 25 de Julho de 2006 23:53 To: Flashcoders mailing list Subject: [Flashcoders] Flash 7 image upload and .NET With a .NET MS SQL backend, and a Flash 7 player in IE front end, what are some of my options for image uploading to the server by the user? Can't use PHP, ColdFusion, etc. in this case. Thanks, Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] flash 8 video, cue points, and actions based on those cue points
Check the manual under NetStream onCuePoint event. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of derrickito Sent: terça-feira, 25 de Julho de 2006 23:34 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] flash 8 video, cue points, and actions based on those cue points im having a hell of a time finding info on this. ive got a person with a transparent background (in an flv file), and based on cue points i need to trigger different animations in different movie clips. cant for the life of me figure out how to set up the scripts to respond to the different cue points. cue points in video being stop1 stop2 stop3 stop4 etc with no naming/parameter info attached anyone know where to find this info? ive got the video cut and imported fine, ive put the cue points on it fine. just need code to collect the cue points, and based on which cue point it is, fire off play(2) commands to different movieclips triggering animations timed with the video here's what ive got so far: but this just sees all the cue points.. I need to trigger different actions based on which cue point it is, and have that send an action to a separate clip var vidList:Object = new Object(); vidList.cuePoint = function(cues) { ex.gotoAndPlay(2); }; vid.addEventListener(cuePoint, vidList); eek im guessing that I need to stick if statements in the function to check for the cue name? not sure how to set that up, im a front end guy, this coding turns my brain numb :-) thanks! dare-ick-ee-toe ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] update tween value while running
Hi there, I've got a question about updating actionscript tweens in real time. When for example you use the mx.transitions.Tween class and have an object move from x value 50 to 100, how would you go about updating that end value while the tween is running? If you update the x value manually the tween onMotionChanged event overrides it during the next cycle. You could stop the tween and start a new one based on the updated end value and calculate how much of the duration is left but if you apply any easing that doesn't do the trick. Any thoughts on how to handle this? Would really like to find a clean solution to do it so I can still keep using the Tween class rather than scripting the calculation myself and checking end value every frame or x milliseconds. Question basically is how I can update the value of an object that is being tweened without it being overwritten and/or changing the end value of a tween. Thanks for any advice! J ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] update tween value while running
As far as I know, you have to stop the tween a start a new one. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jagadishwaran Sent: quarta-feira, 26 de Julho de 2006 0:14 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] update tween value while running Hi there, I've got a question about updating actionscript tweens in real time. When for example you use the mx.transitions.Tween class and have an object move from x value 50 to 100, how would you go about updating that end value while the tween is running? If you update the x value manually the tween onMotionChanged event overrides it during the next cycle. You could stop the tween and start a new one based on the updated end value and calculate how much of the duration is left but if you apply any easing that doesn't do the trick. Any thoughts on how to handle this? Would really like to find a clean solution to do it so I can still keep using the Tween class rather than scripting the calculation myself and checking end value every frame or x milliseconds. Question basically is how I can update the value of an object that is being tweened without it being overwritten and/or changing the end value of a tween. Thanks for any advice! J ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] jigsaw puzzle
Hi Natalia, I think it's best to attach a screen dump as Hans said earlier.. since you mention in your previous post that when you hadn't apply the mask mc, both pic and mask mc looks fine, but once mask, I say pic.setMask(mask) after that picture is masked but it has configuration that is different from mask shape. probably send both versions... (without mask and with mask).. cheers, Guntur N. Sarwohadi ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] jigsaw puzzle piece algorithm
Hi Hans, Sorry for the long reply on this subject,.. my previous mail got rejected at hadn't notice it till now.. o_O I think your algorithm is about how to search for puzzle pieces, but what I'm looking for is how to tell pieces in the same group to move together.. Here's what I have: For each piece, before randomly positioning them, I register every piece by their location: north, south, east and west. So every piece has 4 properties containing at most 1 MC name. I also added a group property (array class) which will register pieces (mc names) as groups when combined together. Here's a simple diagram of a 3x3 puzzle just to make it easy to explain things: A B C D E F G H I So, for piece A, A.east is B, A.south is D. In B, B.west is A, B.east is C, B.south is E, etc.. Initially each piece group property is an empty array, but for a group something like: A B C D then, A.group is an array of (B, C, D). B.group is an array of (A, C, D), etc.. I've tried several attempts for piece movement... but none meets my expectation let me explain my case with an example,.. say we have a group something like A B D E and we're moving piece E First attempt, I iterate array members of E.group and calculate the distance between each piece from piece E. On mouseMove, I update the distance for every array member of E.group from the piece E current coordinate. This is the easy way to move group members all at once, but having them stick to each other is another thing since I get every piece displacing on every movement. It seems like they're not updating as fast as the mouse move.. Second attempt, similar to the previous attempt but now I calculate the delta of E and update the delta for each array member of E.group. Each piece in E.group moves but displaces too, probably the same issue as the first attempt.. Third attempt, I use the north, east, south, west (N-E-W-S) property in every piece. So on mouseMove I iterate each array member of E.group and tell them to update position by E as parameter. I provided an updating method for each piece class to see if either their north, east, south or west property is the moving MC (in this case, E). Then it updates their coordinates by placing themselves from the moving MC (if north, then E._y + E._height). This sticks the pieces real good, but somehow piece E sometimes slips off and you can see a minor gap. But the problem with this attempt is that it's hard to tell pieces not related directly with E to move as well. Like piece A. So the forth attempt, instead of telling group members to update by E, I'm telling E to update it's own N-E-W-S MC and let it 'spread the word' besides the source (tell B to update it's own N-E-W-S.. tell D to update it's own N-E-W-S, etc... but not return it back to E). This is a better way to tell every piece to move by E, but flash spits out an error about endless looping and that's because A is being called by both B and D. The hard part is, I can't tell which should A listen to. now, i think i'm doing this the wrong way somewhere.. any ideas, anyone? thanks, Guntur N. Sarwohadi On 7/15/06, Hans Wichman [EMAIL PROTECTED] wrote: Hi, great nice to hear, it's all starting to work now. With respect to the moving, are you moving the pieces to round _x, _y values, not sure, but this might have something to do with it. I remember building a panorama with hotspots area's that had to move along with the panorama, and I had the same problem, the area's slowly moved away from where they should be. I rounded all the delta x's and y's and the problem went away. With respect to the other problem, I think (but I haven't yet so sorry if this isnt the way to go!) I wouldn't use a ref and neighbour ref search, but actually define groups. After moving a piece, it can match on four sides. The matches could be groups themselves or single pieces. You could take the first match, and either join the new piece to an already existing group, or start a new group between the matching piece on the moved piece. You could make it more complex, for example, when the moved piece matches on both the left and right side, that you combine all those matches into one group, however that isn't strictly necessary, since if you use only the first match, you simply need to move it after the first grouping and it will group again. This still leaves a lot of questions to be answered though, but still the principle would be to update groups. I'm not sure which solution would be better, they both have something to say for them i think. ANYWAYZ: with respect to A*, it would be something like: - build a childlist for all children not already in the list in pseudo: var piecesToFind = new Array(); var piecesToIterate = [masterPiece]; while (piecesToIterate.length 0) { var currentNode = piecesToIterate.shift(); piecesToFind.push (currentNode); for each matchingPiece in currentNode { if
[Flashcoders] Creating dynamic text field using font embedded in parent movie clip
In Flash 6, I was able to embed a font in an FLA (we'll call it base.fla), load into base.swf an external SWF (we'll call it main.swf), and create a text field in main.swf using the font embedded in base.swf. However, I can't seem to get this approach to work in Flash 7. More specifically, in Flash 6, I can add a text field off stage in base.fla, and embed the font. Let's say the font is Proxima Nova Bold. In main.fla, I can create a text field using the Proxima Nova Bold font with the following code: createTextField(myText,1,0,0,100,25); var myStyle = new TextFormat(); myStyle.font = Proxima Nova Bold; myText.setNewTextFormat(myStyle); myText.embedFonts = true; myText.text = Hello World!; But if I export main.fla as Flash 7, the technique no longer works. Has anyone else used this approach successfully in Flash 6, and found that it does not work in Flash 7? Or is it possible I'm missing something. I would rather avoid the use of a shared font library, because I've heard they have the potential to corrupt FLAs. However, if anyone would like to convince me my fears are unfounded, I'm open to being convinced. Thanks, Raymond Simmons ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Array Empowerment
Thank you for your comments. Writing these methods is like creating and solving little puzzles. Much fun! // Remove all elements from Array Array.prototype.clear = function() { this.length = 0; }; This function scares me to death. According to the official Flash documentation Note: If you assign a value to the length property that is shorter than the existing length, the array will be truncated. Which is faster, iterating over an array of size N once and checking for elements that are either null or undefined in a single pass, or iterating over an array of size N checking for nulls and then iterating again over an array of size N-x and checking for the undefineds? You're right. I've updated my script. You do this sort of thing in several of your functions and I think you _might_ be able to squeeze a bit of theoretical speed out of things by if obj is an array loop checking for array equality else loop checking for value equality In stead of loop over the entire array check value equality if obj is an array check array equality Good catch. I've added an or to the first if in the eql method to verify the argument passed is an array and have changed the other methods so instanceof checks happen as infrequently as possible. I've also modified all the places that I run these if statements to minimize instanceof checks. Also, what's the performance hit for splice()? I know it's bad in some languages. Would it be potentially faster to build a new array in stead of re-splicing the old one? I guess it depends on the length of the array as compared to the number of elements being removed. What is the threshold where one becomes preferrable to the other? Splice is slow. Creating a new array is preferable but reassigning another array to 'this' doesn't work inside a prototype because an instance can't delete or replace itself. But, clearing the array and reiterating is a better overall strategy than splicing. I wrote a pair of methods to help. Director has a method 'duplicate' which is missing from Flash. I have added that and its sister method, 'replicate' to my extension. duplicate makes a copy of 'this' in a new array and returns it, replicate turns 'this' into a copy of another array. filter I love this one. I use it absolutely all the time in other languages. RecordSet has it, but Arrays do not. About time, too. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Array Empowerment
Here is the next iteration - new and improved. Again, all comments and optimizations, including conversations about optimizations, are most welcome! // Array Empowerment // Removes all elements from Array Array.prototype.clear = function() { this.length = 0; }; // Invoking block once for every element, passing each element as a parameter to block // The result of block is used as the given element in the array Array.prototype.collect = function(block) { var n = this.length; for (var a = 0; a n; a++) { this[a] = block(this[a]); } }; // Removes all null and undefined elements from Array Array.prototype.compact = function() { var i = -1; var n = this.length; var r = []; for (var a = 0; a n; a++) { if (this[a] != null this[a] != undefined) { r.push(this[a]); } } }; // Deletes items from the Array that are equal to obj Array.prototype.delete_all = function(obj) { var n = this.length; var r = []; if (!(obj instanceof Array)) { for (a = 0; a n; a++) { if (this[a] == obj) r.push(this[a]); } } else { for (a = 0; a n; a++) { if (!this[a].eql(obj)) r.push(this[a]); } } this.replicate(r); }; // Deletes the element at the specified index, returning that element, or undefined if the index is out of range Array.prototype.delete_at = function(i) { if (i this.length i -1) return this.splice(i, 1)[0]; return undefined; }; // Deletes every element of Array for which block evaluates to true Array.prototype.delete_if = function(block) { var r = []; var n = this.length; for (var a = 0; a n; a++) { if (!block(this[a])) { r.push(this[a]); } } this.replicate(r); }; Array.prototype.duplicate = function() { var r = []; var a = this.length; while (--a -(-1)) { r[a] = this[a]; } return r; }; Array.prototype.replicate = function(r) { this.length = 0; var a = r.length; while (--a -(-1)) { this[a] = r[a]; } }; // Calls block once for each element in Array, passing that element as a parameter Array.prototype.each = function(block) { var n = this.length; for (var a = 0; a n; a++) { block(this[a]); } }; // Same as Array.each, but passes the index of the element instead of the element itself Array.prototype.each_index = function(block) { var n = this.length; for (var a = 0; a n; a++) { block(a); } }; // An array is equal to another array if the lengths are equal and each corresponding element is equal Array.prototype.eql = function(arr) { if (arr.length != this.length || !(arr instanceof Array)) { return false; } else { var a = this.length; while (--a -(-1)) { if (this[a] instanceof Array) { if (!this[a].eql(arr[a])) return false; } else if (this[a] != arr[a]) { return false; } } } return true; }; // Runs block on every item in the array // Returns true if the function returns true for every item Array.prototype.every = function(block) { var a = this.length; while (--a -(-1)) { if (!block(this[a])) return false; } return true; }; // Sets the selected elements of Array (which may be the entire array) to obj // A start of undefined is equivalent to zero. // A length of undefined is equivalent to Array.length. Array.prototype.fill = function(obj, start, len) { if (!start) start = 0; if (len == undefined) len = this.length; len = start + len; if (len this.length) len = this.length; while (--len - (-1) start) { this[len] = obj; } }; // Runs a function on every item in the array // Returns an array of all items for which the function returns true. Array.prototype.filter = function(block) { var r = []; var n = this.length; for (var a = 0; a n; a++) { if (block(this[a])) r.push(this[a]); } return r; }; // Returns a new array that is a one-dimensional flattening of this Array (recursively) // That is, for every element that is an array, extract its elements into the new array Array.prototype.flatten = function(r) { if (!r) r = []; var l = this.length; for (var a = 0; a l; a++) { if (!(this[a] instanceof Array)) { r.push(this[a]); } else {
Re: [Flashcoders] Array Empowerment
Here is the next iteration - new and improved. Again, all comments and optimizations, including conversations about optimizations, are most welcome! Those are great additions. You need a duplicate_deep and a replicate_deep, though. Right now, any obejcts stored in the array will be references in the new array. A _deep method would make copies of those too, recursively caling Array.duplicate, or Object.duplicate. ;-) ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Array Empowerment
Question totally unrelated to implementation and optimization: Why do the function names have underscores when camel-humped names are the customary syntax in ActionScript (and Java, and Javascript...)? Some of the names could be clearer: - nitems looks like number of items (i.e., length); why not numSetItems or countSetItem? - rindex is a bit confusing; why not lastIndexOf (as in the String object)? (Also index could be indexOf, to better agree with the String interface.) - some -- maybe forSome, or exists? (Also, every makes more sense to me as forAll.) - uniq -- do those two characters make much difference? - eql -- equals is far more standard - include is pretty close to a reserved word -- why not hasItem? - the delete functions don't so much delete (i.e., totally destroy) as remove or strip. Cool stuff, though! -- T. Michael Keesey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ryanm Sent: Tuesday, July 25, 2006 7:31 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Array Empowerment Here is the next iteration - new and improved. Again, all comments and optimizations, including conversations about optimizations, are most welcome! Those are great additions. You need a duplicate_deep and a replicate_deep, though. Right now, any obejcts stored in the array will be references in the new array. A _deep method would make copies of those too, recursively caling Array.duplicate, or Object.duplicate. ;-) ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Creating dynamic text field using font embedded in parent movie clip
I have successfully used this exact technique when targeting Flash 6 but, as I think about it, I haven't used it in any Flash 7 projects yet. That said, due to a quirk in the way a current project has evolved, it has ended up using this technique but with the addition of identical Symbols in the library of 'base.fla' and every child .fla. So, base.fla has 2 Font Symbols in the library for the Normal and Bold versions of the Font. 2 text fields exist on stage with the fonts embedded (we've assigned the Font name given to the Symbols to the text field, not the original font). The font symbols are then duplicated in each sub library but the text fields are not. This seems to be working with no problems. I'm doing a bit of optimisation at the moment and was considering using a Shared Font Library to tidy things up but you hav me worried now :) HTH Adrian On 7/26/06, Raymond Simmons [EMAIL PROTECTED] wrote: In Flash 6, I was able to embed a font in an FLA (we'll call it base.fla), load into base.swf an external SWF (we'll call it main.swf), and create a text field in main.swf using the font embedded in base.swf. However, I can't seem to get this approach to work in Flash 7. More specifically, in Flash 6, I can add a text field off stage in base.fla, and embed the font. Let's say the font is Proxima Nova Bold. In main.fla, I can create a text field using the Proxima Nova Bold font with the following code: createTextField(myText,1,0,0,100,25); var myStyle = new TextFormat(); myStyle.font = Proxima Nova Bold; myText.setNewTextFormat(myStyle); myText.embedFonts = true; myText.text = Hello World!; But if I export main.fla as Flash 7, the technique no longer works. Has anyone else used this approach successfully in Flash 6, and found that it does not work in Flash 7? Or is it possible I'm missing something. I would rather avoid the use of a shared font library, because I've heard they have the potential to corrupt FLAs. However, if anyone would like to convince me my fears are unfounded, I'm open to being convinced. Thanks, Raymond Simmons ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com