Re: [Flashcoders] physics engines - which do you recommend?
I've used motor2 and box2d, but I preferred the motor2 api. Piers On 25 Jun 2010, at 10:56, allandt bik-elliott (thefieldcomic.com) wrote: hi guys bit of a high level / preference question really - we've been tasked with finding a physics engine and i was wondering which ones you guys prefer? Which are compatible with other tech (like 3d), which are the most flexible and which are the simplest? the ones we're looking at (but certainly not limited to) are APE, Fisix and Box2d. thanks for your input A ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Realaxy ActionScript Editor public beta
Yeah, haXe support would be really good. On 10 Jun 2010, at 08:58, Mark Winterhalder wrote: 2010/6/10 Cor c...@chello.nl: This is free and works perfectly: If you happen to be on Windows, yes. Are there any plans for haXe support in the future? Also, I couldn't find any screenshots on the site. I'd like to get an impression before I download, and don't want to start the trial period until I have some time for a small personal project. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Realaxy ActionScript Editor public beta
I understand that, but what is the performance as good? I mean at runtime. With haXe you get not just extra language features, but also improved (sometimes much improved) runtime performance. I think the language features you've put in Realaxy are amazing, but I haven't benchmarked anything yet. Piers On 10 Jun 2010, at 13:31, Евгений Потапенко wrote: Yeah, haXe support would be really good. Why? Realaxy uses the MPS platform and it is designed to create language extensions AS. Already, there are Enums, Closures and ObjectBuilder languages. In my opinion AS3 with language extensions is more elegant than Haxe. If you need Html5 - then Realaxy will be able to generate html+js+css closer to release and you will be able to make an application for the iPhone, iPad in familiar AS3 environment. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Realaxy ActionScript Editor public beta
Oh, actually I was talking about Flash runtime performance. By building and compiling your app with haXe, your compiled SWF can run faster than a typical SWF. What I was therefore saying is, the language features in Realaxy are lovely, and I'm already starting to use them, but if I'm writing something where performance is really important, like a 3D engine, I'm going to be building it in haXe because I can get a little bit more performance out of it. Because of this, it'd be great to be able to work on those types of things in Realaxy, as well as working on standard AS. See: http://www.splashdust.net/2009/10/as3-vs-haxe-performance/ http://en.wikipedia.org/wiki/HaXe#Compiler_implementation_and_performance Please be clear that I'm not having a go at your editor, in fact I love it. haXe support would just be a nice-to-have, and is apparently coming to FDT in version 4. Piers On 10 Jun 2010, at 14:13, Евгений Потапенко wrote: We are aware of performance issues. This is our main problem. The next beta will work a few times faster. RASE depends on the MPS platform and MPS-guys did a hard work last six months! Performance of MPS platform increased several times! This is very cool! RASE beta based on new MSP platform will be released in 2-3 weeks. I understand that, but what is the performance as good? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Realaxy ActionScript Editor public beta
Cool, that would be lovely. How do your generics extensions work behind the scenes? If I have a class like so: public class GenericsTestT { } And I use it twice: var test1:GenericTestString = new GenericTestString(); var test2:GenericTest int = new GenerticTestint(); How is that implemented at compile time? Does it create a clone of the GenericTest class for each type I use it with? Piers On 10 Jun 2010, at 16:16, Евгений Потапенко wrote: We have ideas about performance. There is even the idea of binary transformations and the generation of binary code from AST. Plus performance language. I am sure that the RASE help make flash code faster. Eugene Potapenko author and lead of Realaxy Action Script Editor development eugene.john.potape...@gmail.com 10.06.2010, в 15:29, Piers Cowburn написал(а): What I was therefore saying is, the language features in Realaxy are lovely, and I'm already starting to use them, but if I'm writing something where performance is really important, like a 3D engine, I'm going to be building it in haXe because I can get a little bit more performance out of it. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Realaxy ActionScript Editor public beta
Ah ok, yeah I think that's probably best. Performance is most important :) Piers On 10 Jun 2010, at 16:54, Евгений Потапенко wrote: We did not add type system checks on code (think for performance). Only editor phase. I think that such asserts can be added. For example, in the development state. We will add a special option when the developer indicated that such tests are needed at run time. Eugene Potapenko author and lead of Realaxy Action Script Editor development eugene.john.potape...@gmail.com 10.06.2010, в 17:37, Piers Cowburn написал(а): Cool, that would be lovely. How do your generics extensions work behind the scenes? If I have a class like so: public class GenericsTestT { } And I use it twice: var test1:GenericTestString = new GenericTestString(); var test2:GenericTest int = new GenerticTestint(); How is that implemented at compile time? Does it create a clone of the GenericTest class for each type I use it with? Piers On 10 Jun 2010, at 16:16, Евгений Потапенко wrote: We have ideas about performance. There is even the idea of binary transformations and the generation of binary code from AST. Plus performance language. I am sure that the RASE help make flash code faster. Eugene Potapenko author and lead of Realaxy Action Script Editor development eugene.john.potape...@gmail.com 10.06.2010, в 15:29, Piers Cowburn написал(а): What I was therefore saying is, the language features in Realaxy are lovely, and I'm already starting to use them, but if I'm writing something where performance is really important, like a 3D engine, I'm going to be building it in haXe because I can get a little bit more performance out of it. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flex generative art???
Have you seen http://www.minimalcomps.com/ ? They're just controls, so no layout assistance, but they're very handy and much more lightweight than the flex controls. Piers On 10 Jun 2010, at 20:46, Jim Andrews wrote: I'm a bit confused as to how to proceed with Flash. I've been using Director for the last 11 years. You can see the sort of (Director Shockwave) apps I like to create at http://vispo.com/dbcinema/sw/sw.htm and http://vispo.com/jig/arteroids/exe . These apps contain menus, spin controls, drop-down menus, and similar types of controls, and generally lots of them. But they also contain, in the case of http://vispo.com/dbcinema/sw/sw.htm , high-performance generative art. They're both very 'interactive interface' oriented and also very high-performance-art-oriented. Windowing, menuing, dialog boxes, and interactive controls are important to them. But so is lots of room for the art. I don't really care about filesize being bulked up by Flex. High speed access is common, these days. But if Flex is slow in performance, that's the more important thing, to me. Is it? How is it in terms of speed? How would you approach making the above sorts of apps in Flash? Would you create them as ActionScript projects or would you use Flex? ja http://vispo.com - Original Message - From: Jer Brand thejhe...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, June 10, 2010 12:03 PM Subject: Re: [Flashcoders] Flex generative art??? Flex is for RIA's and helps you with layouts and common controls and doesn't really provide anything useful for generating art with either vectors or drawing to a sprite. With the framework itself bulking up the size of your swf and consuming additional resources, it's not really a good thing. The generative art I typically use straight ActionScript with a library of choice -- Hype (http://www.hypeframework.org/) being particularly awesome for that kinda thing. There's nothing stopping you from using Flex / Flash Builder as your editor though. Just create an ActionScript or Flash Professional project. If you're just looking for ActionScript generative art, I'm fairly partial to http://levitated.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Realaxy ActionScript Editor public beta
wow. On 9 Jun 2010, at 16:16, Ivan Dembicki wrote: Hello flashCoders, Realaxy ActionScript Editor public beta released. http://realaxy.com -- iv http://www.bezier.ru http://bezier.googlecode.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Detecting MovieClip Type
if (foo is MovieClip) On 15 May 2010, at 16:46, Fahim Akhter wrote: Hi, I'm wondering about something I need to have a check on movieclip. If it is a movieclip then the check should return true. How can I put a if statement on movieclips? if(movieClip) ? Fahim Akhter Game Developer | White Rabbit Studios | http://apps.facebook.com/feline-frenzy/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] faster work flows?
You might want to take a look at FlashCamo: http://flashcamo.flashartofwar.com/ It's a framework for simplifying the type of work you're talking about, by letting you use a much more complete CSS than Flash supports by default (FlashCamo supports inheritance, etc), and set up sheets of decals for various images in your app so you don't have to have a million slice files all over the place. If you're thinking about making your own tool, it might be advantageous to write something that generates your decals, CSS etc for FlashCamo to then read in – you'll have your parser built for you, so you'll just have to write the generator. Piers On 15 Mar 2010, at 16:19, Anthony Pace wrote: I currently use a few methods based on who I am working with or if I am on my own 0.pure timeline based animation with some simple scripting 1.Positioning by code of imported assets, after taking all x,y data from illustrator or flash (one frame or no frames because I am using flashdevelop or the flex IDE) (I wanted to work with catalyst, but it is proving not to be all that useful right now; thus, I am toying with the idea of making my own basic tool to do something similar for simple code gen purposes. I have heard a lot of hardcore pros talk about how they did this, so I am hoping it will work out for me.) 2.frames on the timeline using the flash IDE to position assets; yet, this makes doing transitions between frames more difficult. Is there a faster way? Right now everything seems so tedious. Time I should be coding is being spent working with the design to figure out x,y, so everything is pixel perfect. Any tips? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ternary operator with function.call?
A lot of people don't like it, stylistically, but it will certainly work. Generally I don't use ternary operators for anything other than assignments. Piers On 9 Mar 2010, at 20:23, Mendelsohn, Michael wrote: Hi list... Can something like this be done? Just curious... - MM function traceNum(i:int):void{ trace(i); } function traceString(a:String):void{ trace(a); } var s:String = hi; (s!=)?traceString.call(yes):traceNum.call(44); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Question in regards to NetStream
AFAIK YouTube uses lighttpd http://redmine.lighttpd.net/ On 25 Feb 2010, at 19:09, Merrill, Jason wrote: How is YouTube able to provide such accurate seeking? I would guess it's because they are using Adobe Media Server which has more robust seeking features like what they call Timeshifting seek and stream data access. That's just my guess though. Jason Merrill Bank of America Global Learning Learning Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Alpha Out a SWF?
wmode = transparent http://kb2.adobe.com/cps/142/tn_14201.html Piers On 19 Feb 2010, at 12:24, Susan Day wrote: Hi; I have what is essentially a splash page that I would like to tween alpha to 0. Beneath it is an HTML page with a swf embedded in it as a masthead. I can tween the alpha of all the elements of the page, but it appears impossible to tween the stage itself. Is that the case? Or, how can it be done? TIA, Susan ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: is it ever ideal to NOT use weak references?
Yep I'm with you – it definitely makes sense to have it default to false...would lead to a lot of unexpected behaviour especially for beginners if it defaulted to true. Piers On 8 Feb 2010, at 14:41, Merrill, Jason wrote: So what would be wrong with always using strong references and always deleting them when you're done? That's what I do - I feel like I have more control over what's going on in my code that way. Sure, if I forget to remove it, it could still be out there, but if you get in the habit of always removing them when they are no longer needed, it's second nature. To me, it makes sense that it defaults to false because of the problems already mentioned. Jason Merrill Bank of America Global Learning Learning Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of W.R. de Boer Sent: Monday, February 08, 2010 5:06 AM To: Flash Coders List Subject: Re: [Flashcoders] Re: is it ever ideal to NOT use weak references? Yes, but it can also cause a lot of trouble when used. I have had causes where the event listener got deleted too early and then you spend a lot of time finding the issue. And that was not with the Loader-class and Event.COMPLETE or others. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: is it ever ideal to NOT use weak references?
I use a strong listener only when I know I'm not holding a reference to the dispatcher anywhere else. In all other cases, i.e. if I know I'm going to be keeping the dispatcher on the display list (if it's a DisplayObject) until I no longer need it, or if I know I'm storing a reference the dispatcher somewhere in a parent class or a dictionary or something, I always use a weak reference. That way, if I forget to remove the event listener in a destroy method or whatever, it should still end up eligible for GC. Cases where the event doesn't fire because a weak reference was used only happen if there are no strong references anywhere else, so the object rightly gets GC'd Piers On 7 Feb 2010, at 13:27, Cor wrote: Could you give an example of the way you use the strong listener? TIA -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: zondag 7 februari 2010 4:32 To: Flash Coders List Subject: Re: [Flashcoders] Re: is it ever ideal to NOT use weak references? function loadImage():void { var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, onComplete, false, 0, true); loader.load(new URLRequest(url)); } function onComplete(event:Event):void { trace(event); } Guess what never fires? If you guessed onComplete, you win the prize. Now imagine that it defaulted to true and you wrote the same thing leaving off the false, 0, true. You would have no idea why it didn't work. It didn't work because the loader was cleaned up by GC as soon as the loadImage() function reached the end. Generally, I only use weak listeners with Timers and enter frame listeners. Everything else I use strong listeners and write a remove listener for them when they're expected to unload or be garbage collected at some point. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.733 / Virus Database: 271.1.1/2673 - Release Date: 02/07/10 08:22:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Filters in flash 8
You can do a lot of things, including sharpen, with the ConvulsionFilter: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7da3.html Use this kind of matrix: [0, -1, 0 -1, 5, -1 0, -1, 0] Larger matrices and different values will give a different range of sharpening. If you want to hook up sliders to control the radius and strength (like the Unsharp Mask filter in PS), you need to have them adjust these values. Piers On 4 Feb 2010, at 12:22, Glen Pike wrote: Look in the AS2 documentation in Flash or on the Adobe site: Bitmap Filter class http://help.adobe.com/en_US/AS2LCR/Flash_10.0/0808.html Then all filters like GlowFilter, etc are a subset of these. MovieClip.filters is an array property that you can set at runtime with constructed filters - see the examples. http://help.adobe.com/en_US/AS2LCR/Flash_10.0/0337.html You can also set Filters at authortime in the IDE - click on a movieclip, next to the Properties Tab click on Filters and start adding/playing to see what you want. Most of the parameters you set in here translate to parameters for the particular filter in AS2. HTH Glen Sumeet Kumar wrote: Thanks for your reply Are there any classes available on the net for these filters? I have searched a lot but not able to find any classes related to AS2 and flash. Can you please point me to some links. Thanks again. Regards Sumeet Kumar - Original Message - From: Henrik Andersson he...@henke37.cjb.net To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, February 04, 2010 5:32 PM Subject: Re: [Flashcoders] Filters in flash 8 Sumeet Kumar wrote: Hi All, Is there any way by which we can achieve following filters in flash 8. Noise Pixelate Sharp Water Metallic Neon Noise is possible with BitmapData, Pixelate is done with drawing to BitmapData and upscaling the bitmap. Sharp is done with one of the more complicated filters. Water is too losely defined and so is metallic. Neon can be done with the glow filter. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Filters in flash 8
Wow. *Ordered* On 4 Feb 2010, at 12:41, Henrik Andersson wrote: Piers Cowburn wrote: You can do a lot of things, including sharpen, with the ConvulsionFilter: http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7da3.html Use this kind of matrix: [0, -1, 0 -1, 5, -1 0, -1, 0] Larger matrices and different values will give a different range of sharpening. If you want to hook up sliders to control the radius and strength (like the Unsharp Mask filter in PS), you need to have them adjust these values. Piers I know of a good book about this: http://www.dspguide.com/pdfbook.htm If you manage to survive it, you should fully understand how to use the convulsion filter. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Ideas, Please
Hi Jason, I did that on my site, you can see it here: http://www.pierscowburn.com/ (click on the thumbnails on the right when it loads). You can have the code if you like. Piers On 27 Jan 2010, at 15:28, Merrill, Jason wrote: It would be cool to do this with copyPixels and drawing those as materials of many planes in Papervision3D - you could explode (animate) each plane in 3D space however you like, and easily animate them back. Hmm I might have to try that this weekend... thanks for the idea :) Jason Merrill Bank of America Global Learning Learning Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Gerry Sent: Wednesday, January 27, 2010 10:16 AM To: Flash Coders List Subject: Re: [Flashcoders] Ideas, Please You should be looking for Bitmap copyPixels or setPixel32 (andre michelle example link below) I made something similar to what you want but want to make a newer version with images. http://blog.thespikeranch.com/2008/12/22/as3-bitmap-manipulation/ Andre Michelle does some cool stuff along the lines of what you want to do... http://lab.andre-michelle.com/bitmap-particles -Gerry On Jan 27, 2010, at 9:59 AM, beno - wrote: Hi; I have two graphics. I want to explode one and then immediately thereafter reverse explode the other. I can do the reverse with TweenLite or Max, that should be easy. But what about the explosion itself? Can y'all just point me in the right direction, tutorials, what to search? Searching explosions per se was futile. TIA, beno ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Ideas, Please
Hi Jason, I did that on my site, you can see it here: http://www.pierscowburn.com/ (click on the thumbnails on the right when it loads). You can have the code if you like :) Piers On 27 Jan 2010, at 15:28, Merrill, Jason wrote: It would be cool to do this with copyPixels and drawing those as materials of many planes in Papervision3D - you could explode (animate) each plane in 3D space however you like, and easily animate them back. Hmm I might have to try that this weekend... thanks for the idea :) Jason Merrill Bank of America Global Learning Learning Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Gerry Sent: Wednesday, January 27, 2010 10:16 AM To: Flash Coders List Subject: Re: [Flashcoders] Ideas, Please You should be looking for Bitmap copyPixels or setPixel32 (andre michelle example link below) I made something similar to what you want but want to make a newer version with images. http://blog.thespikeranch.com/2008/12/22/as3-bitmap-manipulation/ Andre Michelle does some cool stuff along the lines of what you want to do... http://lab.andre-michelle.com/bitmap-particles -Gerry On Jan 27, 2010, at 9:59 AM, beno - wrote: Hi; I have two graphics. I want to explode one and then immediately thereafter reverse explode the other. I can do the reverse with TweenLite or Max, that should be easy. But what about the explosion itself? Can y'all just point me in the right direction, tutorials, what to search? Searching explosions per se was futile. TIA, beno ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Ideas, Please
Thanks :) I've posted the code, but it was over the list's size limit for a message, so it might take a while. Piers On 27 Jan 2010, at 15:41, Merrill, Jason wrote: Hey - nice work! Jason Merrill Bank of America Global Learning Learning Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Piers Cowburn Sent: Wednesday, January 27, 2010 10:34 AM To: Flash Coders List Subject: Re: [Flashcoders] Ideas, Please Hi Jason, I did that on my site, you can see it here: http://www.pierscowburn.com/ (click on the thumbnails on the right when it loads). You can have the code if you like. Piers On 27 Jan 2010, at 15:28, Merrill, Jason wrote: It would be cool to do this with copyPixels and drawing those as materials of many planes in Papervision3D - you could explode (animate) each plane in 3D space however you like, and easily animate them back. Hmm I might have to try that this weekend... thanks for the idea :) Jason Merrill Bank of America Global Learning Learning Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Gerry Sent: Wednesday, January 27, 2010 10:16 AM To: Flash Coders List Subject: Re: [Flashcoders] Ideas, Please You should be looking for Bitmap copyPixels or setPixel32 (andre michelle example link below) I made something similar to what you want but want to make a newer version with images. http://blog.thespikeranch.com/2008/12/22/as3-bitmap-manipulation/ Andre Michelle does some cool stuff along the lines of what you want to do... http://lab.andre-michelle.com/bitmap-particles -Gerry On Jan 27, 2010, at 9:59 AM, beno - wrote: Hi; I have two graphics. I want to explode one and then immediately thereafter reverse explode the other. I can do the reverse with TweenLite or Max, that should be easy. But what about the explosion itself? Can y'all just point me in the right direction, tutorials, what to search? Searching explosions per se was futile. TIA, beno ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Ideas, Please
Hi Beno, It's on the way over to the list, but I've just posted the part that does the actual explosion, it assumes you've got your plane set up in PV3D already, so I'd get that bit done first if you want to try integrating my code with it. I'd give more than just the explosion part, but it's all quite heavily integrated with the rest of my site, and I don't have time right now to just pull out the relevant parts and put it into a separate project. Piers On 27 Jan 2010, at 15:54, beno - wrote: On Wed, Jan 27, 2010 at 11:36 AM, Piers Cowburn m...@pierscowburn.com wrote: Hi Jason, I did that on my site, you can see it here: http://www.pierscowburn.com/(click on the thumbnails on the right when it loads). You can have the code if you like :) That site's nuts! I love it! Yeah, I'm sure I can make my sample size tiny as opposed to your relatively large triangles. Please send me your code. Thanks! beno ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] 3D Explosion Code
Hi, See if I can sneak this in under the 40k limit... // Initialise the shards array shards = []; // Clear the current background plane geometery clearGeometery(); // Make the background plane more complex (so there are more shards) background.segmentsH = 8; background.segmentsW = 3; background.buildPlane(widthPixels, heightPixels); // Initialise some variables we need for the next section var totalFaces:int = background.geometry.faces.length; var explodeForce:int = 110; var a:Vertex3D; var c:Vertex3D; var b:Vertex3D; var uvA :NumberUV; var uvC :NumberUV; var uvB :NumberUV; var face:Triangle3D; var newFace:Triangle3D; var shard3D:Shard3D; // Remove the background from the scene removeChild(background); // Turn off smoothing thumbnailMaterial.smooth = false; //thumbnailMaterial.tiled = true; // Loop through the faces in the background plane and create a seperate shard from each one for (var i:int = 0; i totalFaces; i++) { // Get a reference to this face face = background.geometry.faces[i] as Triangle3D; // Copy the vertices from this face a = face.vertices[0].clone(); b = face.vertices[1].clone(); c = face.vertices[2].clone(); // Cope the uv coordinates from this face uvA = face.uv0.clone(); uvB = face.uv1.clone(); uvC = face.uv2.clone(); // Create a new face newFace = new Triangle3D(this, [ a, b, c ], thumbnailMaterial, [ uvA, uvB, uvC ] ); // Create a new shard, using the copied vertices and new face shard3D = new Shard3D(thumbnailMaterial, [a, b, c], [newFace]); addChild(shard3D); // Offset the shard to the middle of the plane (the internal coords each // vertex had will be relative to the plane, and so are wrong) shard3D.x = widthPixels / 2; shard3D.y = -heightPixels / 2; // Give the shard a random speed in each direction shard3D.speedX = Math.random() * explodeForce - explodeForce/2; shard3D.speedZ = Math.random() * explodeForce - explodeForce/2; shard3D.speedY = Math.random() * explodeForce - explodeForce/2; shard3D.rotationSpeedX = Math.random() * explodeForce / 10; shard3D.rotationSpeedY = Math.random() * explodeForce / 10; shard3D.rotationSpeedZ = Math.random() * explodeForce / 10; // Tween the shard to its new exploded position TweenMax.to(shard3D, 1.6, { x:shard3D.speedX * 12, y:shard3D.speedY * 12, z:shard3D.speedZ * 12, rotationX:shard3D.rotationSpeedX * 5, rotationY:shard3D.rotationSpeedY * 5, rotationZ:shard3D.rotationSpeedZ * 5, ease:Cubic.easeOut }); // Store the reference to this shard shards[shards.length] = shard3D; }___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Using MVC for a site framework
+1 for RobotLegs (I used to use PureMVC, and still do, but I've really enjoyed getting into RobotLegs) -10 for Cairngorm Piers On 20 Jan 2010, at 11:29, John McCormack wrote: Steven, Have you found it better than pureMVC and Cairngorm? John Steven Sacks wrote: Want to do MVC right? Use this: http://www.robotlegs.org/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Using MVC for a site framework
Haha, sorry, that was a bit off the cuff :) Like I said, I still use PureMVC, especially if I've got large parts of a PureMVC based app that I can reuse in a new one. But RobotLegs removes the extra typing that PureMVC requires to get hold of things (retrieving mediators/proxies, etc). To be clear though, I was more than happy with the extra bits of code that are associated with PureMVC, especially once you have code templates set up for the various retrieve/register bits. Adding/typing them becomes trivial, and it's more than worth it for the cleanliness and level of organisation that PureMVC gives you. But they're still kind of littered throughout the app. With RobotLegs things just happen, you don't have to worry about it, you can still lay out your app in the exact same way as you would with PureMVC, but if a class needs access to the model, it's automatically plumbed in by the framework. Just strips out those bits. Piers On 20 Jan 2010, at 12:21, John McCormack wrote: -10 sounds a teensy bit harsh. Had to laugh! I guess Cairngorm was good once. Tell me Piers, _why_ do you like RobotLegs so much better than PureMVC? I haven't used either but I could certainly use a good MVC approach. John Piers Cowburn wrote: +1 for RobotLegs (I used to use PureMVC, and still do, but I've really enjoyed getting into RobotLegs) -10 for Cairngorm Piers On 20 Jan 2010, at 11:29, John McCormack wrote: Steven, Have you found it better than pureMVC and Cairngorm? John Steven Sacks wrote: Want to do MVC right? Use this: http://www.robotlegs.org/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] [JOB] AS3 Developer Position in London
Hi, Hope nobody minds a job post, hopefully it'll help somebody out. The agency I work at, Pushbutton ( http://www.pushbutton.tv ) is looking for an experienced interactive developer to join us. We mainly work in the areas of interactive TV and mobile development, but also do some desktop and browser based work. I've been working here for a year, and it's a great place to work :) Details are as follows: You will be working on jobs for the likes of Virgin Media, BBC, Sky and Microsoft, as well as our own exciting internal projects. The applications you will be architecting and developing will shape the future of interactive TV over the next few years. Requirements You are either a Javascript or AS3 developer with 2-4 years’ experience of application development. You have a keen interest (obsession would be better) in new technology, the web, and interactive TV. Whether or not you have experience of a specific framework, you understand the principles of MVC and its benefits in application development. You keep up to date with the latest developments in your chosen area (Javascript or AS3), and can tell the difference between a fad and something useful. You won’t be required to produce any designs yourself, but a good eye for design and a desire to get things pixel-perfect is a big plus. You know what’s going on in the back end. An understanding of server terminology and how it integrates with your applications is a must. You have experience managing version control using Subversion or Git. Above all, you’re easy to get along with, and have excellent written and verbal communication skills. Responsibilities Interpret client/internal briefs into a logical and well planned app architecture. Interpret UI designs and advise on ease of implementation. Develop your area of the application from start to finish. Liase with other members of the team to make sure the finished application works well as a whole. Write basic documentation for your code to ensure other members of the team can work with it in your absence. Please reply off list to piers.cowb...@pushbutton.tv with some examples of work. Salary based on experience, but competitive. Cheers, Piers___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Performance from casting array/vector?
あぁ、もちろんです!ありがとう。 On 27 Dec 2009, at 06:02, Fumio Nonaka wrote: A variable declaration is processed before statements. Therefore, it does not matter if it is inside or outside a loop. myClass = new MyClass(); trace(myClass); // Output: [object MyClass] while (false) { var myClass:MyClass; } _ Piers Cowburn wrote: AFAIK, using implicit casting rather than explicit in this case is faster, so A1 in your examples is faster than A2. Also, it's better to move your variable declaration outside the loop: var i:int = myArray.length; // Variable is declared once here and then reused var myClass:MyClass; while (i--) { myClass = myArray[i]; } Good luck, -- Fumio Nonaka http://www.FumioNonaka.com/ My bookshttp://www.FumioNonaka.com/Books/index.html Flash communityhttp://F-site.org/ English bloghttp://blog.jactionscripters.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Performance from casting array/vector?
Hi Steve, I thought it'd be useful to have some actual figures, so I put together a quick test. Test code was as follows: package { import flash.display.Sprite; import flash.utils.getTimer; /** * @author Piers Cowburn */ public class ArrayAccessTest extends Sprite { private const ITERATIONS:int = 100; public function ArrayAccessTest() { trace(Starting tests...); var startTimer:int; var i:int; var j:int; var array:Array = [new TestClass(), new TestClass(), new TestClass()]; var vector:Vector.TestClass = new Vector.TestClass(); vector.push(new TestClass()); vector.push(new TestClass()); vector.push(new TestClass()); var numItems:int = array.length; var implicitCast:TestClass; var explicitCast:TestClass; var asCast:TestClass; // // [Array 0a] Array access test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { array[j].someMethod(); } } trace([Array 0a] Array access test: + (getTimer()-startTimer)); // // [Array 1a] Implicit cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { implicitCast = array[j]; implicitCast.someMethod(); } } trace([Array 1a] Implicit cast test: + (getTimer()-startTimer)); // // [Array 2a] Explicit cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { explicitCast = TestClass(array[j]); explicitCast.someMethod(); } } trace([Array 2a] Explicit cast test: + (getTimer()-startTimer)); // // [Array 3a] As cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { asCast = array[j] as TestClass; asCast.someMethod(); } } trace([Array 3a] As cast test: + (getTimer()-startTimer)); // // [Array 0b] Array access test (two operations) startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { array[j].someMethod(); array[j].someOtherMethod(); } } trace([Array 0b] Array access test (two operations): + (getTimer()-startTimer)); // // [Array 1b] Implicit cast test (two operations) startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { implicitCast = array[j]; implicitCast.someMethod(); implicitCast.someOtherMethod(); } } trace([Array 1b] Implicit cast test (two operations): + (getTimer()-startTimer)); // // [Array 2b] Explicit cast test (two operations) startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { explicitCast = TestClass(array[j]); explicitCast.someMethod(); explicitCast.someOtherMethod(); } } trace([Array 2b] Explicit cast test (two operations): + (getTimer()-startTimer)); // // [Array 3b] As cast test (two operations) startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { asCast = array[j] as TestClass; asCast.someMethod(); asCast.someOtherMethod(); } } trace([Array 3b] As cast test (two operations): + (getTimer()-startTimer)); // // [Vector 0a] Vector access test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i
Re: [Flashcoders] Performance from casting array/vector?
Hi Cor, This was my test class, just a couple of dummy methods that do a variable declaration and an increment: package { /** * Internal test class */ public class TestClass { public function someMethod():void { var i:int = 0; i++; } public function someOtherMethod():void { var i:int = 0; i++; } } } Piers On 27 Dec 2009, at 11:52, Cor wrote: Hi piers, I am trying to follow your topic. What is in your TestClass.as?? Kind regards Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Piers Cowburn Sent: zondag 27 december 2009 12:35 To: Flash Coders List Subject: Re: [Flashcoders] Performance from casting array/vector? Hi Steve, I thought it'd be useful to have some actual figures, so I put together a quick test. Test code was as follows: package { import flash.display.Sprite; import flash.utils.getTimer; /** * @author Piers Cowburn */ public class ArrayAccessTest extends Sprite { private const ITERATIONS:int = 100; public function ArrayAccessTest() { trace(Starting tests...); var startTimer:int; var i:int; var j:int; var array:Array = [new TestClass(), new TestClass(), new TestClass()]; var vector:Vector.TestClass = new Vector.TestClass(); vector.push(new TestClass()); vector.push(new TestClass()); vector.push(new TestClass()); var numItems:int = array.length; var implicitCast:TestClass; var explicitCast:TestClass; var asCast:TestClass; // // [Array 0a] Array access test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { array[j].someMethod(); } } trace([Array 0a] Array access test: + (getTimer()-startTimer)); // // [Array 1a] Implicit cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { implicitCast = array[j]; implicitCast.someMethod(); } } trace([Array 1a] Implicit cast test: + (getTimer()-startTimer)); // // [Array 2a] Explicit cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { explicitCast = TestClass(array[j]); explicitCast.someMethod(); } } trace([Array 2a] Explicit cast test: + (getTimer()-startTimer)); // // [Array 3a] As cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { asCast = array[j] as TestClass; asCast.someMethod(); } } trace([Array 3a] As cast test: + (getTimer()-startTimer)); // // [Array 0b] Array access test (two operations) startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { array[j].someMethod(); array[j].someOtherMethod(); } } trace([Array 0b] Array access test (two operations): + (getTimer()-startTimer)); // // [Array 1b] Implicit cast test (two operations) startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { implicitCast = array[j]; implicitCast.someMethod(); implicitCast.someOtherMethod(); } } trace([Array 1b] Implicit cast test (two operations): + (getTimer()-startTimer)); // // [Array 2b] Explicit cast test (two operations) startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { explicitCast = TestClass(array[j]); explicitCast.someMethod(); explicitCast.someOtherMethod
Re: [Flashcoders] Performance from casting array/vector?
Cool, looks like the implicit cast is faster across the board, and almost twice as fast as just using the array access operator. On 27 Dec 2009, at 13:13, Cor wrote: With this, my results are: Starting tests... [Array 0a] Array access test: 462 [Array 1a] Implicit cast test: 258 [Array 2a] Explicit cast test: 406 [Array 3a] As cast test: 429 [Array 0b] Array access test (two operations): 1062 [Array 1b] Implicit cast test (two operations): 477 [Array 2b] Explicit cast test (two operations): 647 [Array 3b] As cast test (two operations): 652 [Vector 0a] Vector access test: 458 [Vector 1a] Implicit cast test: 252 [Vector 2a] Explicit cast test: 402 [Vector 3a] As cast test: 425 [Vector 0b] Vector access test (two operations): 1034 [Vector 1b] Implicit cast test (two operations): 483 [Vector 2b] Explicit cast test (two operations): 624 [Vector 3b] As cast test (two operations): 679 -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Piers Cowburn Sent: zondag 27 december 2009 14:07 To: Flash Coders List Subject: Re: [Flashcoders] Performance from casting array/vector? Hi Cor, This was my test class, just a couple of dummy methods that do a variable declaration and an increment: package { /** * Internal test class */ public class TestClass { public function someMethod():void { var i:int = 0; i++; } public function someOtherMethod():void { var i:int = 0; i++; } } } Piers On 27 Dec 2009, at 11:52, Cor wrote: Hi piers, I am trying to follow your topic. What is in your TestClass.as?? Kind regards Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Piers Cowburn Sent: zondag 27 december 2009 12:35 To: Flash Coders List Subject: Re: [Flashcoders] Performance from casting array/vector? Hi Steve, I thought it'd be useful to have some actual figures, so I put together a quick test. Test code was as follows: package { import flash.display.Sprite; import flash.utils.getTimer; /** * @author Piers Cowburn */ public class ArrayAccessTest extends Sprite { private const ITERATIONS:int = 100; public function ArrayAccessTest() { trace(Starting tests...); var startTimer:int; var i:int; var j:int; var array:Array = [new TestClass(), new TestClass(), new TestClass()]; var vector:Vector.TestClass = new Vector.TestClass(); vector.push(new TestClass()); vector.push(new TestClass()); vector.push(new TestClass()); var numItems:int = array.length; var implicitCast:TestClass; var explicitCast:TestClass; var asCast:TestClass; // // [Array 0a] Array access test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { array[j].someMethod(); } } trace([Array 0a] Array access test: + (getTimer()-startTimer)); // // [Array 1a] Implicit cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { implicitCast = array[j]; implicitCast.someMethod(); } } trace([Array 1a] Implicit cast test: + (getTimer()-startTimer)); // // [Array 2a] Explicit cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { explicitCast = TestClass(array[j]); explicitCast.someMethod(); } } trace([Array 2a] Explicit cast test: + (getTimer()-startTimer)); // // [Array 3a] As cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { asCast = array[j] as TestClass; asCast.someMethod(); } } trace([Array 3a] As cast test: + (getTimer()-startTimer)); // // [Array 0b] Array access test (two operations) startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { array[j].someMethod(); array[j
Re: [Flashcoders] Performance from casting array/vector?
Yeah, I was thinking along those lines. However, it's interesting that in tests Vector 0a vs Vector 1a, the implicit cast is still faster than using [ ] to access the reference directly from the vector. You'd think that with the vector being typed as TestClass, vector[i].someMethod() should be faster than var reference:TestClass = vector[i]; reference.someMethod() Unless you were then going to use the reference again, in which case storing a temporary reference will always be faster. But for a one time look up from a typed vector, I'm surprised that two lines of code executes faster than one. I was wondering whether there might be something wrong with my test, but I can't see anything. Piers On 27 Dec 2009, at 14:05, Paul Andrews wrote: Piers Cowburn wrote: Cool, looks like the implicit cast is faster across the board, and almost twice as fast as just using the array access operator. For an object of a known class, I think the compiler is just referring directly to the method rather than looking it up. When a method is invoked on an abstract object it has to look at the class info for the object to locate the method AT RUNTIME - hence the overhead. When the class is known it can call the method directly without a runtime lookup. In the case of the explicit cast, I would expect that the cast is pointless and adding needless overhead since the method reference is using the method lookup at compile time from the variable, not from the cast. The cast adds needless overhead at run time. Paul On 27 Dec 2009, at 13:13, Cor wrote: With this, my results are: Starting tests... [Array 0a] Array access test: 462 [Array 1a] Implicit cast test: 258 [Array 2a] Explicit cast test: 406 [Array 3a] As cast test: 429 [Array 0b] Array access test (two operations): 1062 [Array 1b] Implicit cast test (two operations): 477 [Array 2b] Explicit cast test (two operations): 647 [Array 3b] As cast test (two operations): 652 [Vector 0a] Vector access test: 458 [Vector 1a] Implicit cast test: 252 [Vector 2a] Explicit cast test: 402 [Vector 3a] As cast test: 425 [Vector 0b] Vector access test (two operations): 1034 [Vector 1b] Implicit cast test (two operations): 483 [Vector 2b] Explicit cast test (two operations): 624 [Vector 3b] As cast test (two operations): 679 -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Piers Cowburn Sent: zondag 27 december 2009 14:07 To: Flash Coders List Subject: Re: [Flashcoders] Performance from casting array/vector? Hi Cor, This was my test class, just a couple of dummy methods that do a variable declaration and an increment: package { /** * Internal test class */ public class TestClass { public function someMethod():void { var i:int = 0; i++; } public function someOtherMethod():void { var i:int = 0; i++; } } } Piers On 27 Dec 2009, at 11:52, Cor wrote: Hi piers, I am trying to follow your topic. What is in your TestClass.as?? Kind regards Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Piers Cowburn Sent: zondag 27 december 2009 12:35 To: Flash Coders List Subject: Re: [Flashcoders] Performance from casting array/vector? Hi Steve, I thought it'd be useful to have some actual figures, so I put together a quick test. Test code was as follows: package { import flash.display.Sprite; import flash.utils.getTimer; /** * @author Piers Cowburn */ public class ArrayAccessTest extends Sprite { private const ITERATIONS:int = 100; public function ArrayAccessTest() { trace(Starting tests...); var startTimer:int; var i:int; var j:int; var array:Array = [new TestClass(), new TestClass(), new TestClass()]; var vector:Vector.TestClass = new Vector.TestClass(); vector.push(new TestClass()); vector.push(new TestClass()); vector.push(new TestClass()); var numItems:int = array.length; var implicitCast:TestClass; var explicitCast:TestClass; var asCast:TestClass; // // [Array 0a] Array access test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j) { array[j].someMethod(); } } trace([Array 0a] Array access test: + (getTimer()-startTimer)); // // [Array 1a] Implicit cast test startTimer = getTimer(); for (i = 0; i ITERATIONS; ++i) { for (j = 0; j numItems; ++j
Re: [Flashcoders] Performance from casting array/vector?
*Disclaimer* This is un-benchmarked, but it's what I usually work to! If anyone has any corrections re. speed, I'd be glad to hear them :) AFAIK, using implicit casting rather than explicit in this case is faster, so A1 in your examples is faster than A2. Also, it's better to move your variable declaration outside the loop: var i:int = myArray.length; // Variable is declared once here and then reused var myClass:MyClass; while (i--) { myClass = myArray[i]; } With vectors, you don't need to cast at all. However, though you can access your references directly from the vector using [ ], like you've done in V3, it will be faster to store a local reference if you're using it more than once. So for example: var i:int = myVector.length; var myClass:MyClass; while (i--) { // Store the reference in a temporary variable to avoid using [ ] unnecessarily myClass = myVector[i]; myClass.someMethod(); myClass.someOtherMethod(); } will be faster than: var i:int = myVector.length; while (i--) { // This uses [ ] twice myVector[i].someMethod(); myVector[i].someOtherMethod(); } If you're only using the reference once though, it should be faster just to use [ ], so: var i:int = myVector.length; while (i--) { // Just using the reference once, so not defining a temporary variable: myVector[i].someMethod(); } will be faster than: var i:int = myVector.length; var myClass:MyClass; while (i--) { // This is a waste as we're only using it once myClass = myVector[i]; myClass.someMethod(); } As I said, I don't have benchmarked figures for these, so don't take it as gospel, but I think this was what I read when I read it. Piers On 27 Dec 2009, at 00:24, Steven Sacks wrote: var instance1:MyClass = new MyClass(); var instance2:MyClass = new MyClass(); var instance3:MyClass = new MyClass(); var myArray:Array = [instance1, instance2, instance3]; // QUESTION A: CASTING WITH ARRAYS var i:int = myArray.length; while (i--) { // [A1] - Does Flash have to do a look up here? var myClass:MyClass = myArray[i]; // [A2] - Does casting it like this boost performance var myClass:MyClass = MyClass(myArray[i]); // [A3] - I know using as is slower than direct casting var myClass:MyClass = myArray[i] as MyClass; } // QUESTION B: CASTING WITH VECTORS var myVector:Vector.MyClass = Vector.MyClass(myArray); var i:int = myVector.length; while (i--) { // [V1] - Will this avoid the lookup? var myClass:MyClass = myVector[i]; // [V2] - Or do I need to cast here even though it's a Vector? var myClass:MyClass = MyClass(myVector[i]); // [V3] - And if so, can I do this without a lookup? myVector[i].someMethod(); // [V4] - Or do I need to do this? MyClass(myVector[i]).someMethod(); } Thanks in advance for anyone who can shed some light here. I believe A2/V2 is fastest but I'm not certain, and I also don't know if it's required for Vector. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MVC and Event Architecture
It depends which type of framework you're talking about, because in PureMVC the controller is the commands. The commands only exist temporarliy, and so you can't 'listen to events from the controller', if that makes sense. So in PureMVC you have the commands directly call public methods in the view classes (or I do anyway!). Piers On 4 Aug 2009, at 16:36, Merrill, Jason wrote: So, if you want the Controller to alter the View (say, tell it to animate), you don't have the controller call a public method of the view - you have the controller dispatch an event and some other class (say, a command class) tells the view to animate? Or do you have the view listen to the controller for the event directly and then react? Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MVC and Event Architecture
I'll sometimes use callbacks in small, enclosed parts of a system, which are coupled by their nature and are never going to have their component classes used individually in other systems. As a general rule though, this is the only time that I use them. WRT the event / notification question, I usually find a place for both. I tend to use events if the information is going 'up' the heirachy, and notifications if it's going 'across'. To put it more clearly, I use events for smaller 'happenings', and notifications for larger, system wide 'happenings'. Hope that makes sense! Piers On 4 Aug 2009, at 16:27, Merrill, Jason wrote: Ok thanks Paul, yeah, I know about the concept of loose coupling, I was just wondering how strict people generally follow event-driven loose coupling design when using MVC - so it seems you're saying, for small MVC projects, callbacks are OK, but for large projects, they should really be 100% event driven-loosely coupled. Gotcha - thanks! Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com ] On Behalf Of Paul Andrews Sent: Tuesday, August 04, 2009 11:19 AM To: Flash Coders List Subject: Re: [Flashcoders] MVC and Event Architecture Merrill, Jason wrote: I know there is probably no definite right or wrong answer here, and it depends on the type of project, but I'm curious to get your opinion, if you're experienced with the MVC pattern (not frameworks per se that use MVC, I know about, say, Commands in Cairngorm and have checked into the Pure MVC architecture with its use of Notifications [though I only partially understand the Façade - I do something similar I think in a class I call MVC]- just interested in your opinions of raw MVC development). My question is, in practice, when programming with the MVC design pattern, I know the Model is usually completely decoupled from outside classes, but do you usually completely decouple all other classes like views and controllers as well, in favor of dispatching events? Therefore communication between MVC classes are triggered completely by events (seems logical, but its also a heck of a lot of event handling) or do you have some coupling going on (i.e. the controller calls a method in the view telling it to change). Or do you follow what some frameworks do and use Command classes with lots of event handling going on? Trying to find a good mix, I can see advantages and disadvantages both ways. I'm doing a lot of event dispatching, but it seems a bit like overkill in some cases and harder to manage than just calling public methods. Interested in how you handle it when you use MVC pattern(s). Thanks, The real point is that to call public methods, you have to know about the object whose method you want to call and you need to know about the method itself. When you broadcast an event, you don't need to know whose listening, your just indicating that something meaningful has happenned and perhaps also passing data that is meaningful. Because of this you can build standalone components that don't need to know everything about the world that surrounds them, so they can be reused and also other people can look at them and understand how the system fits together via the event system. That said, for small systems I still sometimes use callbacks.. Paul Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Intersection on circle based on angle
Lots of cool stuff in the Rectangle class too, in case you didn't know :) Piers On 17 Mar 2009, at 15:00, Eric E. Dolecki wrote: Thanks man, you just changed my world. On Tue, Mar 17, 2009 at 10:26 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: I have the angle (say 0 degrees). The length would then be pixels from the center (ie. radius)? Yes, radius is pixel distance from starting point (in your case, the center point of the circle). Then you just need to convert angle to radians and you're good to go. var cartesianPoint:Point = Point.polar(len, angleInRadians); Here are some handy methods for you from one of my extended math classes: public static function polarToCartesian(distance:Number, degrees:Number):Point { var radians:Number = (degrees * Math.PI) / 180; return Point.polar(distance, radians); } public static function degreesToRadians(degrees:Number):Number { return (degrees * Math.PI)/180; } public static function radiansToDegrees(radians:Number):Number { return (radians*180)/Math.PI; } public static function cartesianAngle(fromPoint:Point, toPoint:Point):Number { var radians:Number = Math.atan2(toPoint.y-fromPoint.y, toPoint.x-fromPoint.x); var backAzimuthDegrees:Number = MathTranslation.radiansToDegrees(radians); return MathTranslation.getBackAzimuth(backAzimuthDegrees); } public static function getBackAzimuth(angle:Number):Number { var backAzimuth:Number; if(angle 180) { var tempNeg:Number = angle-180; backAzimuth = tempNeg + 360; } else { backAzimuth = angle-180; } return backAzimuth; } Also, see this article: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=2060.html Jason Merrill Bank of America | Learning Performance Solutions Instructional Technology Media Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://ericd.net Interactive design and development ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Piers m...@pierscowburn.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] multi-touch directly in flash...
There's good stuff by Grant Skinner too: http://incomplet.gskinner.com/index2.html#camwriter Piers On 8 Jan 2009, at 10:35, Ian Thomas wrote: Yeah, I absolutely get the idea (as I said, we were discussing it yesterday - with reference to an infra-red camera, but same principle). Check out Mario's stuff, there are areas-of-colour recognition algorithms there which will be of help, I think. Cheers, Ian On Thu, Jan 8, 2009 at 10:08 AM, Anthony Pace anthony.p...@utoronto.ca wrote: To my knowledge all flash integration for multi-touch has been made possible by using flosc by ben chun, or with OpenCV and touchLib; however, what I am proposing is that it is possible directly through the use of the flash player and a simple cam rig. I think that it should be possible, and at least somewhat comparably fast, considering the player doesn't have to parse xml socket data on a continuous basis, and all image conversions are done by the player. I do concede that doing in c++ will most likely prove to be faster; however, I figure why not try it out. Since I know c++ somewhat I figure I will probably look at their libraries if I get stuck; yet, in the meanwhile, this is a nifty experiment. Here is the video that sparked it... http://www.youtube.com/watch?v=pQpr3W-YmcQ Colour tracking would be efficient in a system where you have multi coloured thimbles or reflective tape, which is what I was thinking of when I came up with this idea. http://anthony-pace.deviantart.com/art/add-VR-to-current-FPS-GAMES-91091960 Ian Thomas wrote: I was actually thinking of Mario's lecture at FoTB 2008 where he used very similar algorithms to read square barcodes (whatever those things are called) from a webcam. Not multitouch, but there's a lot of similar code (spotting areas of colour, eliminating noise). Worth a look, Anthony. Funnily enough we were talking about exactly the same system for multitouch here yesterday - spotting areas of colour. One of our developers had seen some demo of a similar system on TV over the weekend... Ian On Thu, Jan 8, 2009 at 9:12 AM, Glen Pike g...@engineeredarts.co.uk wrote: Hi, Mario Klingemann demo'd something like this at FlashOnTheBeach 2007 - have a look at quasimondo.com to see the 2D or not 2D lecture - not sure if he released any code though? http://lectures.quasimondo.com/ Glen Anthony Pace wrote: I have figured out how to make flash work as a multi-touch system... I am coding it now... it is so darn simple... it just came to me after watching a video on how to make your own multi-touch input device using a webcam a piece of white paper and a box to block most of the light so the cam only sees light and dark. Since it is all based on blobs, and processing the image through a filter to break down the logic, and flash has access to web cams, I can just convert the image to black and white, threshold the image to find the blobs, average out a hit test area based on the finger positions, and all that would come after is putting together the finger gesturing logic. for instance if two blobs exist around their averaged points and have not moved too much or at all, yet there is a third blob that is moving a significant amount, perform a specific function based on its direction (directional logic through tracking input fed into basic physics equations and Pythagorean concepts) If someone has beaten me to it, I would love to know; however, if you beat me to it, after reading my post, tell me about it and show me your source so my life is made easier. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] My rights - site not paid for.
I've been in this situation before and done the same as Paul, it ended up going to a small claims court and the client didn't even turn up for the hearing. I got paid and the costs were covered by the client. Piers On 8 Dec 2008, at 11:38, Paul Steven wrote: Hi Stephen I had a similar situation about a year ago and in this case I had no contract but just emails from the client agreeing on the cost for the work. Anyway I simply made a claim via https://www.moneyclaim.gov.uk/csmco2/index.jsp and I won my case. It was really simple and will cost you nothing as you get all your costs paid for by the customer if you win. I would be reluctant to take the site down as doing so will then mean the customer has nothing to pay for. By leaving the site up and running, you have fulfilled your obligations. Anyway good luck!! Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Matthews Sent: 08 December 2008 11:03 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] My rights - site not paid for. What are my rights ( in the UK ) for taking down a site which has not been paid for? The owner of the company is happy with his site, but is not coughing up. I still have FTP access. He says the site took too long, and makes lots of excuses for not paying - which do not tally. He changed the site drastically at least three times - I think it took too long too, due to this. He is updating the news section and other sections whenever he has new material. I would be interested in your thoughts. This person won an award for being a top business man this year - is this what you have to do to be a top business man - screw people? I am not the kind of person to take this action really, but I may consider it. Thanks S ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] snap to guide AS code?
You can do a bezier tween with something like TweenMax http:// blog.greensock.com/tweenmaxas3/ , is that what you're after? Piers On 22 Nov 2008, at 15:03, Rich Rodecker wrote: I'm looking for some code that can pull of 'snap to guide' in actionscript. I've found some snap to grid code, but all of them are in AS2, so I'm wondering if there might be a better way to do it in AS 3 as well? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FLV generation from jpg sequence?
It's certainly possible, what server set up are you using? On Red5 you could do it with FFmpeg, I believe. Piers On 30 Sep 2008, at 09:51, Wenzler, Thomas wrote: Hi to everyone on the List, I was asked if it was possible to (preferably serverside) generate .flv movies from a sequence of .jpgs. Is that possible? Any hint in the right direction is highly appreciated... Thanks in advance for all your efforts and excuse me if this is off-topic... :) Thomas ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FLV generation from jpg sequence?
HTH On 30 Sep 2008, at 10:37, Wenzler, Thomas wrote: Thank you, Piers, That might be it...just googled an article on how to maybe do exactly what I want. Thanks a lot for the hint. Regards Thomas -- Message: 28 Date: Tue, 30 Sep 2008 10:12:23 +0100 From: Piers Cowburn [EMAIL PROTECTED] Subject: Re: [Flashcoders] FLV generation from jpg sequence? To: Flash Coders List flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed It's certainly possible, what server set up are you using? On Red5 you could do it with FFmpeg, I believe. Piers On 30 Sep 2008, at 09:51, Wenzler, Thomas wrote: Hi to everyone on the List, I was asked if it was possible to (preferably serverside) generate .flv movies from a sequence of .jpgs. Is that possible? Any hint in the right direction is highly appreciated... Thanks in advance for all your efforts and excuse me if this is off-topic... :) Thomas ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 -- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders End of Flashcoders Digest, Vol 12, Issue 19 *** ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Text Input textPadding problem
Hi, I'm having a problem with text padding on the V3 TextInput component. I just want to get my text to appear properly vertically centered in the text field, so I added some text padding: var textFormatTextField:TextFormat = new TextFormat(); textFormatTextField.size = 12; textFormatTextField.color = 0xFF; textFormatTextField.font = Myriad Pro; StyleManager.setComponentStyle(TextInput, textFormat, textFormatTextField); StyleManager.setComponentStyle(TextInput, textPadding, 4); But I find that it makes the descenders on my text cut off, like the attached screenshot. Has anyone experienced this before, or have any idea of how to fix it? Cheers, Piers [EMAIL PROTECTED]  ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Saving user feedback to file
You could use a Shared Object, if the data you're saving is pretty simple. If it's going to get quite complex though then AIR is definitely the way to go, you get SQLLite built in. Piers On 11 Aug 2008, at 11:21, Paul Andrews wrote: Adrian, Flash can't write directly to a file when running in a browser. If you run in a browser the only way to write to a file will be via a server component. You'll either have to use AIR and the AIR API to write the data away. The other alternative is a technology such as Zinc to give you a wrapper to access the local filesystem. Paul - Original Message - From: Adrian MacTaggart [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Monday, August 11, 2008 10:02 AM Subject: [Flashcoders] Saving user feedback to file Hello, I need to create a Flash movie that can save user feedback to a file. The saving doesn't need to be very sophisticated but it does need to be very stable since it will be appearing in a public space and recording (museum) visitor feedback. There will be a number of objects, e.g. 10 objects and users will be able to view information about each object and rate the object 1-5 (stars?), similar to You Tube. There won't be any cookies used since it will be appearing on one standalone kiosk so users may be able vote more than once. I have no experience of saving user data with Flash and so any pointers and advise would be much appreciated. Can you easily save the votes to a CSV or other file? Are there any good tutorials you'd recommend? I'm short of time and out of my depth (haven't used Flash for a while now)! Apologies if this should be in the newbie list. My Flash has gone back to newbie level but I guess this is a more advanced topic! Many thanks, Adrian This message has been scanned for malware by WebSense Mailcontrol for the National Maritime Museum, Greenwich ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Five3D
Also you may find this interesting: http://blog.barcinski-jeanjean.com/2008/05/16/vectorsvision-vectors- in-papervision3d/ Piers On 30 Jul 2008, at 00:22, Patrick J. Jankun wrote: Hi Glen, I went through my links, and found those: http://www.flashandmath.com/advanced/ http://www.flashdevils.com/trigonometry/ maybe this is gonna help you out, cheers, Patrick On Jul 30, 2008, at 12:19 AM, Glen Pike wrote: Hi, I am working with the Five3D library and have a question regarding cameras so if anyone is familiar with this or really good at explaining 3D math to 5 year old kids (I am feeling a bit dumb here). The Five3D library itself does not have a camera, but projects its objects straight into the scene. I would like to create a way of orbiting a single cube object, like with a camera, rather than rotating the object itself. My aim is to achieve the type of manipulation used with the globe here - http://www.dasai.es/ - where the globe rotation does not end up looking wrong from a user perspective when you are looking along the Y axis or flip when the cube is upside down - here is an early trial of mine showing the problems - http://glenpike.co.uk/play/cubetest.html I have not discounted using Papervision as it has cameras to do this, but the text rendering of Five3D is cleaner than bitmapped PV3D text and this is what I am looking for, so I would like to try and get the Five3D working if possible before I discount it. As the world only consists of one object, I am guessing it would be fairly trivial to create a fake camera with a single matrix, apply rotations to that matrix, then concatenate this matrix with the cube objects. I tried a couple of things, but am flailing a bit in the dark here and could do with some pointers if anyone has any ideas. My first try was to apply X Y rotations to a Matrix class - in Five3D - then do Matrix to Euler to get the X, Y Z rotations to apply to my 3D object (meaning I did not have to hack the library yet). I reckon I am going to have to dig deeper and manipulate the private matrix used by each 3D object in the library. I am assuming - maybe wrongly - that because I am wanting to orbit around the origin, which is also the centre of the cube, I can pretend my camera is also in the centre of the world, rather than transformed a distance from the cube. This would mean I just have to rotate the x y axes of my camera to get pitch roll, then apply this to my cube matrix. Question is, do I have to include the distance of the camera from my object in the calculations and do I have to have a look at point too, or can I cheat as these are always fixed? Apart from looking at PV3D's camera's and some hardcore Wikipedia entries, I don't have much to go on, so any information to get my head around this would be helpful - particularly some real dumbed down tutorials on Matrices, possibly Quaternions. (I fell asleep in my lessons on the former and never covered the latter...) Thanks in advance. Glen Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Overlay problem
Do you want to use AS2 or AS3? Piers On 14 Jul 2008, at 12:37, Rajiv Seth (Pixelated) wrote: Hi, I want to create an effect like http://www.limoosoft.com/Limoosoft-En.html When user clicks on zoom image, large image loads in a movie, and all links, rollver effects/actions are disabled by a semi-transparent image. How to create such layer, which can disable all links? -- Regards Rajiv Seth Ph: 09839157388 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Overlay problem
An easier way of doing it is just to place a movieclip over the top of your content and give it an empty onRelease function (in AS2) or just make sure it's mouseEnabled in AS3. Piers [EMAIL PROTECTED] On 14 Jul 2008, at 12:51, allandt bik-elliott (thefieldcomic.com) wrote: if you add a boolean to your script that states whether the movie is operational or not, then you can add an if statement to your links / buttons that ask if the boolean is true so: var bMovieEnabled:Boolean = true; myLink.onRelease = Delegate.create(this, linkOnRelease); function linkOnRelease():Void { if (bMovieEnabled) { bMovieEnabled = false; //do stuff } } and on the close button for the panel add bMovieEnabled = true; best a On Mon, Jul 14, 2008 at 12:37 PM, Rajiv Seth (Pixelated) [EMAIL PROTECTED] wrote: Hi, I want to create an effect like http://www.limoosoft.com/Limoosoft-En.html When user clicks on zoom image, large image loads in a movie, and all links, rollver effects/actions are disabled by a semi-transparent image. How to create such layer, which can disable all links? -- Regards Rajiv Seth Ph: 09839157388 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Basic loop problem (with end of message)
Hi Paul, Try: var len2 = cueArray.length; for (var i = 0; ilen2; i++) { mainText.htmlText += b+cueArray[i]+/bbr; } Piers On 8 Jul 2008, at 11:56, Paul Jinks wrote: Apologies for last post: it got sent before I'd finished. That'll teach me to try to use the tab key using IMAP ;-). Here's the message again in full: I'm new to coding and I'm having a problem getting a for loop to do what I want it to. I think this is pretty basic, but I'll let you be the judge. I have a project to play through an flv which fires event cue points at certain points. At these points, text appears at the side of the video window as summaries of what's being said. The summary text is the name of the cue point and is added to an array called cueArray after checking that it doesn't already exist. So far so good. The last step is to output the full array to the text field and it's at this point that I'm at hitting head against wall pitch. I just can't get it to output the whole array in sequence. What I'm using is: var len2 = cueArray.length; for (var i = 0; ilen2; i++) { mainText.htmlText = b+cueArray[i]+/b; } But what this does is print only the last item in the array, whereas I'm expecting it to print the array in full. TIA Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Is there any way to get a list of the classes compiled into a SWF?
I'm trying to nail down where a reference to an unwanted class is coming from, and I need to be able to work out which classes are being compiled from my classpath. The reason is because I'm trying to take small element out of a larger project and put it into its own SWF. I've done this by extending the classes that are involved to override anything which has references to parts of the app which won't be in the smaller SWF, but one of them is still being included from somewhere, and I can't work out where. Thanks, Piers ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Is there any way to get a list of the classes compiled into a SWF?
Forgot to mention, I'm using Flash CS3 / Mac. Piers On 17 Jun 2008, at 10:33, Piers Cowburn wrote: I'm trying to nail down where a reference to an unwanted class is coming from, and I need to be able to work out which classes are being compiled from my classpath. The reason is because I'm trying to take small element out of a larger project and put it into its own SWF. I've done this by extending the classes that are involved to override anything which has references to parts of the app which won't be in the smaller SWF, but one of them is still being included from somewhere, and I can't work out where. Thanks, Piers ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Is there any way to get a list of the classes compiled into a SWF?
AS3, and I'm using Flash CS3. I wouldn't be opposed to using something else though! Piers On 17 Jun 2008, at 10:53, Hans Wichman wrote: Hi, as2 or as3? In as2 i'd use the verbose option on mtasc. greetz JC On Tue, Jun 17, 2008 at 11:33 AM, Piers Cowburn [EMAIL PROTECTED] wrote: I'm trying to nail down where a reference to an unwanted class is coming from, and I need to be able to work out which classes are being compiled from my classpath. The reason is because I'm trying to take small element out of a larger project and put it into its own SWF. I've done this by extending the classes that are involved to override anything which has references to parts of the app which won't be in the smaller SWF, but one of them is still being included from somewhere, and I can't work out where. Thanks, Piers ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Is there any way to get a list of the classescompiled into a SWF?
Ok, I'm getting Flash Develop. Only problem is, the reason I want to see what classes are getting compiled is because I'm getting compiler errors - so I don't think it'll produce a SWF which I can then open in FD. Does that make sense? Piers On 17 Jun 2008, at 11:20, Romuald Quantin wrote: I think Flash develop should show you the content of your SWF. Sothink decompiler will do the job as well, but PC software. I remember FDT is showing the content of a SWC, you might be able to do the same with a SWF. Romu www.soundstep.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Piers Cowburn Sent: 17 June 2008 11:07 To: Flash Coders List Subject: Re: [Flashcoders] Is there any way to get a list of the classescompiled into a SWF? AS3, and I'm using Flash CS3. I wouldn't be opposed to using something else though! Piers On 17 Jun 2008, at 10:53, Hans Wichman wrote: Hi, as2 or as3? In as2 i'd use the verbose option on mtasc. greetz JC On Tue, Jun 17, 2008 at 11:33 AM, Piers Cowburn [EMAIL PROTECTED] wrote: I'm trying to nail down where a reference to an unwanted class is coming from, and I need to be able to work out which classes are being compiled from my classpath. The reason is because I'm trying to take small element out of a larger project and put it into its own SWF. I've done this by extending the classes that are involved to override anything which has references to parts of the app which won't be in the smaller SWF, but one of them is still being included from somewhere, and I can't work out where. Thanks, Piers ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] as3 classes var query
You'd need to instantiate the other class and then access it, like this: package test { public class test2 extends Sprite { public function test2(){ var testInstance:test = new test(); trace(testInstance.hello); } } } Also, it's good practice to capitalise your class names: Test, Test2 rather than test, test2. Piers On 12 Jun 2008, at 13:33, Johnny Zen wrote: Hi all I am currently learning AS3, and I seem to be a bit confused on understanding accessing variables outside of the class it resides in. for example: package test { public class test extends Sprite { public var hello = hello; } } I thought this var will be available to access from within another class like this: package test { public class test2 extends Sprite { hello = hello from another class; } } --- But I get : 1120: Access of undefined property hello. Is anyone kind enough to put me right ? Thanks Johnny ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Is Adobe fixing this big FP9 problem?
I think any kind of fix they implement now would have to have some level of backwards-compatibility. Like passing a boolean which indicates whether you want to fully unload the movie or not. It's been too long without a fix for that in my opinion. Piers On 16 Apr 2008, at 12:19, Andrei Thomaz wrote: dear Jonathan, and what if Adobe fixes this in a near future? Your code would be broken... So, I don't think is a good idea to write code that needs this feature of Flash Player. []'s andrei On Wed, Apr 16, 2008 at 8:00 AM, jonathan howe [EMAIL PROTECTED] wrote: To put a practical question out about this. I'm setting up something that is more or less a game with levels. Each level has a different set of movieclips as its background graphics and enemies for the level. I store all assets for a single level in an external swf, and using techniques we've talked about before on the list (swc + getDefinitionByName) use these assets once they're loaded in via the swf. The plan was then to dump the assets once the level ends and load a new level's assets. The game is small enough that I can conceivably tolerate all level assets being in memory by the time the game is done. What I need to know is, should I NOT treat the data as if it's unloaded, given FP9+AS3 behavior? Because if the player revisits a level, I would normally reload the asset swf for that level ... now I wonder if that would make a duplicate copy of the assets in memory? There wouldn't be two copies of the swf's contents in memory because they'd have identical class definitions... right... or maybe not? Now I'm leaning towards an architecture that says: First time you play a level, load the assets for it, and keep it around always. Next time you play that level, the assets are already loaded. -jonathan On Tue, Apr 15, 2008 at 2:37 PM, Paul Andrews [EMAIL PROTECTED] wrote: I find it rather bizarre that people feel that it's necessary to beat a drum about this. I doubt that Adobe are sitting back on the issues raised. The thread has the Air of an hysterical mob. It's amazing how so many people have produced fantastic systems using Actionscript 3 in spite of the gloom and doom spouted here. From what I've read, the FP9 garbage collection is pretty much standard technology for object based systems - you can't just discard objects that have references to them. The real problem seems to be related to the other infrastructure that creates multiple object references that aren't always removable. I'm not saying bthere isn't a problem, just that it's not worthy of the histeria being generated. I understand completely it can be a serious issue for some people. Anyway, I'll express some faith that Adobe will resolve the issues - I won't be rolling back to AS2 despite the expert advice of some. I'll consign a lot of this thread to the same place as the 'end of the world is nigh' material that those people with placards dispense. No need to hand me a flaming torch just yet.. - Original Message - From: Chris Hill [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 15, 2008 6:40 PM Subject: Re: [Flashcoders] Is Adobe fixing this big FP9 problem? ON TOPIC: I can see that most of us feel very strongly about this bug. Adobe has made it clear that their formal channel to do something about it is to vote in their ticketing system for the bug. If there already is a bug, can someone link to it? Otherwise let's get a bug in there. And then let's vote for it. I'm pretty sure that based upon the support here we can make this the #1 bug in their database. Apologies if someone has already mentioned this. This thread is long and noisy. C ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Root casting as Main big problem
Have you tried MovieClip(root) ? On 28 Mar 2008, at 15:10, laurent wrote: Hi, It's very urgent, try to make it clear: I have one MovieClip index.swf, with a Main.as class attch to it. In this class I define properties and method, of course :) And I load external movieclip, one name content.swf in this content swf I need to talk with rootand I cast it with Main( root ).myproperty The problem when I publish this mc is looking for the Main class and check if element are there, for exemple some linked moviclip, but they are in the index library. so I can copy all needed asset in the content library, and perhaps it will fixe it but I will have all content duplicated...so is there a workaround ?? Thanks for any urgent help! ;) L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Arabic and other character sets text entry
Hi Karina, Yeah I was going to try posting on Flash Tiger but it doesn't seem my join request has been authorised yet. Thanks very much for the reply, that looks really interesting! I'll have a play around with it. Thanks again, Piers [EMAIL PROTECTED] On 14 Mar 2008, at 19:10, Karina Steffens wrote: Hey there, I just saw this thread :) I do tend to hang on Flash Tiger more these days (Hi Kerry!), but I was skimming through some threads here and this has caught my eye. The Hebrew project has been a total headache, but in the end I found one solution out there that was very helpful as a starting point. It's programmed for Hebrew, but you can add your own characters, so it should work with Arabic. You can find it here: http://www.electroinn.com/ blog/ Basically what it does, it breaks down the text field into a bunch of text fields, and populates them word by word. So it handles a combination of RTL and LTR quite well. Don't forget that the text field should be using device fonts (non- embedded) and you must have RTL fonts (Arabic in your case) support enabled in the Control Panel for the text to flow in the right direction in the first place. The Class is not 100% and you may need to customise it a bit, but it's the best solution I've seen so far. Hope this helps, Karina -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Piers Cowburn Sent: 13 March 2008 13:42 To: Flash Coders List Subject: Re: [Flashcoders] Arabic and other character sets text entry Good point, yes the email will probably be ltr. I'll try posting on Flash_Tiger in the hope that she's around, thanks very much :) Piers [EMAIL PROTECTED] On 13 Mar 2008, at 13:20, Piers Cowburn wrote: Begin forwarded message: From: Kerry Thompson [EMAIL PROTECTED] Date: 12 March 2008 17:51:41 GMT To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Arabic and other character sets text entry Reply-To: Flash Coders List flashcoders@chattyfig.figleaf.com Piers Cowburn wrote: I found one idea online which I thought might be a shot, see it here: http://broadcast.artificialcolors.com/ index.php?title=flash_rtl_via_a_simple_hack_non_rhetoric The only free-text fields I would need are name and email address, the rest of the options are combo boxes which I could do in arabic simply by having the letters in there as a graphic. Do you think I might be able to use something like the idea above for a simple name and email address? As I don't think there should be and bi-di in there, just rtl. I'm not sure, but you might be able to get the combo box to display an Arabic font. It's worth a try, and make for a lighter download than using graphics. But--won't the e-mail address be ltr? I'm not sure, but I think most e-mail servers only handle ltr. I have an Israeli friend in Dublin who is a Flash genius, and is currently working on a Hebrew-language project. She's quite helpful, and knows a lot more about bi-di issues than I do I don't think she's on this list, though--she's on Flash_Tiger. You might try posting over there. She might even still be working--I think it's only about 7:00 in Dublin. Do it now, though, because St. Patrick's day is this weekend ^_^ Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.7/1327 - Release Date: 12/03/2008 13:27 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.7/1328 - Release Date: 13/03/2008 11:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Arabic and other character sets text entry
Good point, yes the email will probably be ltr. I'll try posting on Flash_Tiger in the hope that she's around, thanks very much :) Piers [EMAIL PROTECTED] On 13 Mar 2008, at 13:20, Piers Cowburn wrote: Begin forwarded message: From: Kerry Thompson [EMAIL PROTECTED] Date: 12 March 2008 17:51:41 GMT To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Arabic and other character sets text entry Reply-To: Flash Coders List flashcoders@chattyfig.figleaf.com Piers Cowburn wrote: I found one idea online which I thought might be a shot, see it here: http://broadcast.artificialcolors.com/ index.php?title=flash_rtl_via_a_simple_hack_non_rhetoric The only free-text fields I would need are name and email address, the rest of the options are combo boxes which I could do in arabic simply by having the letters in there as a graphic. Do you think I might be able to use something like the idea above for a simple name and email address? As I don't think there should be and bi-di in there, just rtl. I'm not sure, but you might be able to get the combo box to display an Arabic font. It's worth a try, and make for a lighter download than using graphics. But--won't the e-mail address be ltr? I'm not sure, but I think most e-mail servers only handle ltr. I have an Israeli friend in Dublin who is a Flash genius, and is currently working on a Hebrew-language project. She's quite helpful, and knows a lot more about bi-di issues than I do I don't think she's on this list, though--she's on Flash_Tiger. You might try posting over there. She might even still be working--I think it's only about 7:00 in Dublin. Do it now, though, because St. Patrick's day is this weekend ^_^ Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Arabic and other character sets text entry
I'm working on a pitch for a viral campaign for one of the larger charities and one of the points on the brief is that it needs to be accessible to anyone working in different languages and character sets, what ever they may be. This will be based in an expandable banner ad and so I don't think there's going to be any element of select your language... before continuing. There will be an element of data collection involved and I was just wondering if anyone has any experience/advice for working with Flash and user entry in a number of different character sets? For instance I know with Arabic the shapes of letters change depending on their place in a word, etc. Thanks in advance, Piers [EMAIL PROTECTED] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] pixel-accurate _xmouse tracking?
The problem you're having is that the mouse is traveling at a faster rate than one pixel per frame. So the coordinates you get back are the coordinates that the mouse was on each time the script was executed, which is every frame. You could try increasing the frame rate but you're still not going to get it down to 1 pixel differences I wouldn't have thought, the only way to do that might be to interpolate the values you get back so that you get rough idea of what coordinates it passed through between each frame, though that would probably be a bit pointless. What are you trying to do? Piers On 12 Mar 2008, at 14:55, Matt S. wrote: Hi, can anyone recommend a way to have pixel-accurate mouse tracking? If I move my mouse slowly it pretty much grabs them all, but any fast movements result in huge gaps in the _xmouse tracking, so instead of being 1,2,3,4,5,6,7,8,9,10,11,12 etc, it'll be 1,4,6,9,12,15,16,23,30,35, etc. I need it it to be as accurate as possible. Can this be done? .m ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Arabic and other character sets text entry
Hi Kerry, Thanks for your detailed reply, seems there is a real problem with the lack of rtl support. I found one idea online which I thought might be a shot, see it here: http://broadcast.artificialcolors.com/ index.php?title=flash_rtl_via_a_simple_hack_non_rhetoric The only free-text fields I would need are name and email address, the rest of the options are combo boxes which I could do in arabic simply by having the letters in there as a graphic. Do you think I might be able to use something like the idea above for a simple name and email address? As I don't think there should be and bi-di in there, just rtl. Thanks, Piers [EMAIL PROTECTED] On 12 Mar 2008, at 16:32, Kerry Thompson wrote: Piers Cowburn wrote: I'm working on a pitch for a viral campaign for one of the larger charities and one of the points on the brief is that it needs to be accessible to anyone working in different languages and character sets, what ever they may be. There will be an element of data collection involved and I was just wondering if anyone has any experience/advice for working with Flash and user entry in a number of different character sets? For instance I know with Arabic the shapes of letters change depending on their place in a word, etc. The Flash player currently doesn't support bi-di languages like Arabic, Farsi, or Hebrew. Francis Cheng has told us that they're working on it, and it will be out soon, but for now, no Arabic input. (I could be wrong, but I think Urdu and Pashtoo are also r-t-l). The issue with Arabic isn't just that the letters change shape. It's also mostly right-to-left, but quotes from a ltr language are inserted left to right. You can imagine the complications there. Plus, I believe that numerals are ltr, which makes for some interesting issues identifying decimals vs. periods. Asian languages like Chinese and Japanese present unique issues. Both use ideograms--a character that represents a concept like sky, happy, person, etc. In Chinese, each character represents a concept, but they are often combined to make 2- or 3-character words. For example, the English word friendship is 友誼 in Chinese (that’s two characters, “you” and “yi”. “Sexy” is “性感”-two characters again. To make it more fun, Chinese is usually written left to right, but can also be written right to left or top to bottom. Plus you have two character sets-traditional (used in Hong Kong, Taiwan, and many overseas communities), and simplified (used on the Mainland, in Singapore, and, more and more, overseas). Japanese is even more fun, because they use 4 character sets-Kanji (Chinese characters), Hirigana and Katakana (syllable-based phonetic characters), and Romaji, or Western (Latin) characters. With both Japanese and Chinese, you will have, at a minimum, over 2,000 characters to deal with. The Japanese and Chinese have developed software-based IME’s (Input Method Editors) because, of course, a 2,000-character keyboard would be impractical. The bottom line is that the Chinese/Japanese/Korean use will only be able to do input on machines enabled for their language. A Korean business person using the business center at the Westin St. Francis in San Francisco probably won’t be able to type in Korean. Those are some of the issues you will face. It may sound daunting- and in fact it is-but it’s been done before (except for bi-di). Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] calculating distance between two points
Good point On 11 Mar 2008, at 13:53, Merrill, Jason wrote: Why not skip the math lessons and use the Point class? var dist:Number = Point.distance(p1, p2); Jason Merrill Bank of America GTO LLD Solutions Design Development eTools Multimedia Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal GTO Innovative Learning Blog subscribe. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] visible area of content in V2 ScrollPane
The vPosition value is the y offset of the content, so the size of the scroll bar handle is irrelevant when you're trying to work out the visible are of the content. On 10 Mar 2008, at 12:52, Mendelsohn, Michael wrote: It certainly seems this simple, but what if the scrollPane on the stage is 100px tall, but its content is 587px tall. The scrollbar dragger is then proportionately smaller and therefore, it's more difficult to figure out what the visible range of the content is. There would probably be a formula for it, right? - MM -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Piers Cowburn Sent: Friday, March 07, 2008 4:20 PM To: Flash Coders List Subject: Re: [Flashcoders] visible area of content in V2 ScrollPane Hi Michael, The top value is ScrollPane.vPosition, the bottom will be ScrollPane.vPosition + ScrollPane.height HTH, Piers ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] visible area of content in V2 ScrollPane
Hi Michael, The top value is ScrollPane.vPosition, the bottom will be ScrollPane.vPosition + ScrollPane.height HTH, Piers On 7 Mar 2008, at 20:29, Mendelsohn, Michael wrote: Hi list... Within a V2 ScrollPane, I'm trying to figure out what the top edge and bottom edge of the content's visible area are. Anyone have an idea? Thanks, - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] dynaically generated mc reference to class that created it
Is the movieclip on the display list? If so you should be able to do root.makeglow() Piers On 29 Jan 2008, at 14:54, BOYD SPEER wrote: Using AS3 I have a movieclip made (dynamically made) of a class called Dragon. Inside its main timeline in a frame script I want to tell the object (the main class called Cardgenerator) that created it to run a function called makeglow. But I can't seem to call a function there..any suggestions greatly appreciated. :) -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] (no subject)
You can try this: this.infoclip.info_txt.text = this[txt+ image1] But the best way of doing this would be to use an array: var txts:Array = new Array(); txts[1] = this is text 1; txts[2] = this is text 2; txts[3] = this is text 3; txts[4] = this is text 4; txts[5] = this is text 5; this.infoclip.info_txt.text = txts[image1]; Piers On 29 Jan 2008, at 13:15, sense co moh wrote: Hi all I have this problem, I'm making photo gallery and for each photo there are description text so first I made many var string for text like this var txt1:String = this is text 1; var txt2:String = this is text 2; var txt3:String = this is text 3; var txt4:String = this is text 4; var txt5:String = this is text 5; and I create dynamic text info_txt then I load the images using var image1 my_mcl5.loadClip(images/cate1/big/big+image1 +.jpg,_root.main.big_prev); now i want to use the same var image1 to load the text but the problem how to wirte it, if i but this.infoclip.info_txt.text = txt+ image1 i get in the text box stinf txt1 or 2 what ever the value of image1 if i use this.infoclip.info_txt.text = txt +image1 I get error can anyone tell me what to do thanks __ __ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders [EMAIL PROTECTED] 0207 631 3278 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] as3 creating sprite instances in a loop
I'm not quite sure if I understand your question fully but I think the problem you're having is that you need to do something with them - for example if you pushed each new sprite into an array then you'd have a reference to each of them, but the you're doing it at the moment you'll just lose the reference to the old one each time. Piers On 30 Dec 2007, at 16:23, Matt Muller wrote: Hi, does anyone know how to create individual sprite instances in a loop for (var j:uint = 0; j _columns; j++) { var sprite:Sprite = new Sprite(); } this just over writes the sprite. thanks MaTT ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders