RE: [Flashcoders] SOT: (Rant) Why is Adobe.com such a bad website?
Great post! I've spent many hours searching through the Adobe site trying to find things. For a company trying to spearhead web development it's a poor show. Sunil -Original Message- From: Radley Marx [mailto:[EMAIL PROTECTED] Sent: 04 September 2008 20:50 To: Flash Coders List Subject: [Flashcoders] SOT: (Rant) Why is Adobe.com such a bad website? As a designer and developer, I *envied* the design of macromedia.com. I studied it. Other companies copied it. I remember what a beautiful website MM once had, and at the time how Adobe's was the exact opposite - ugly, hard to use, thoughtless. When Adobe bought Macromedia, they immediately adopted the MM site. Brilliant move! But over the past couple of years, Adobe has really beat it down with the ugly stick. With the demise of Flashpaper, I came across this page: http://www.adobe.com/products/flashpaper/eod_faq/ This is probably one of the ugliest, thoughtless pages from a serious source I've ever experienced in my career. Aesthetically, it's depressing. Depression-era-chic depressing. As a utility, it's restrictive. I must click on each question to discover the facts, with many simply answering No. Functionality, it's ridiculously ironic. Topic: Flashpaper discontinued. First link: Buy online. Other rants / examples: 1) How does a developer download the debug player via the download page? There's no link! http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Sho ckwaveFlash Answer? It's actually down in Support / Flash Player. But most developers find it via a better source: Google search. 2) Link icons on the debugger download page have been wrong for *years*. The text links are right, but check out what happens if you use the actual download arrows. You may accidently get Flash 8, or Windows .exe instead of .dmg for Mac downloads. http://www.adobe.com/support/flashplayer/downloads.html (Note that I even managed to get an Adobe team member to forward these bugs to the web team. Was never fixed.) 3) Look at this product page: http://www.adobe.com/products/ Why does it look like an abandoned store? It looks like a outsourced Drupal project. Where's the flair? The edge? Adobe.com makes me want to submit a bid to fix it. What happened? I *REALLY* want to know! I just don't get it. My apologies to the list for this rant. I really hope this gets the attention of someone significant @ Adobe. thank you. -radley -- Radley Marx www.radleymarx.com [EMAIL PROTECTED] -- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Flash CMS
I've used Drupal with the AMFPHP module very successfully. S -Original Message- From: Paul Andrews [mailto:[EMAIL PROTECTED] Sent: 02 July 2008 11:05 To: Flash Coders List Subject: Re: [Flashcoders] Flash CMS Interesting - thank you. - Original Message - From: SJM [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, July 02, 2008 10:36 AM Subject: Re: [Flashcoders] Flash CMS there are a few I like this one... http://www.flashden.net/item/strongflashstrong-xml-editor/7588 Some others... http://www.flashloaded.com/flashcomponents/fcms/ http://fcmspro.com/ http://flashblocks.com/ http://www.flashden.net/item/simple-website-strongcmsstrong/1074 - Original Message - From: Paul Andrews To: Flash Coders List Sent: Wednesday, July 02, 2008 9:50 AM Subject: [Flashcoders] Flash CMS I just wondered if there was a favourite CMS that was popular for use with Flash applications, or (as I suspect) do most developers just roll their own with MySQL? Paul ___ 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] Exclude classes
Hi Steven, I've joined this conversation half-way through so sorry if this has already been said: If you're wanted to exclude some classes because you want to load them at runtime, then you can create an SWC with the classes in them and put that in your classpath in the Flash IDE. Classes in the SWC will be used for compile time checking but will not be included. If you are compiling using the Flex Compiler then you can use the external-library-path option to use SWCs in the same way. Sunil -Original Message- From: Steven Sacks [mailto:[EMAIL PROTECTED] Sent: 17 June 2008 18:51 To: Flash Coders List Subject: Re: [Flashcoders] Exclude classes In AS3, there is no exclude.xml. Whether this was an oversight or, for some reason, not possible, you cannot do this in AS3. You can, however, use the Bridge pattern. http://www.stevensacks.net/2008/01/23/update-gaia-bridge-pattern-api/ In a nutshell, you: 1. Make an Interface for the class you want to share between swfs (the implementation), but only want to be compiled in one. 2. Make a class to Bridge the gap that contains a static getter that returns the Interface, but really returns the Implementation. You could also just make it a public static var if you really want. I used an internal namespace because I don't want developers overwriting the implementation. 3. Set the Implementation in your primary swf to make it available to all the other swfs. 4. Import the Bridge class in your other swfs and now you can access the implementation. Here is a trivial example that would work. package { import IClass; public class Bridge { public static var api:IClass; } } /// import Bridge; Bridge.api.yourMethod(); /// AFAIK, this is easiest way to overcome the lack of exclude.xml in AS3. There are other ways, but they are complicated and difficult. HTH, Steven ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Using FlexBuilder3 profiler with FlashCS3
If you enable debugging in your SWF and use a debug version of the flash player, then you can use the Profile external application option. After selecting that, select Launch the application manually outside Flex Builder and hit Launch. If you have trouble, try using a different browser and/or changing the port number under preferences-Flex-Profiler-Connections. Hope that helps! Sunil -Original Message- From: Jon Bradley [mailto:[EMAIL PROTECTED] Sent: 25 April 2008 18:07 To: Flash Coders List Subject: Re: [Flashcoders] Using FlexBuilder3 profiler with FlashCS3 Good question. I haven't tried that yet. What you could try to do, off the top of my head, is use the SWFLoader and load up the SWF file into a simple Flex application. I believe the profiler will also profile the content loaded through SWFLoader, but I'm not certain of it. good luck! jon On Apr 25, 2008, at 12:59 PM, Martin Tremblay wrote: Hello, Is there a way to use the Flexbuilder3 profiler with a FlashCS3 file? I just want to take a swf and run it through the profiler. Is it possible? Martin t. LVL ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] [AS3] Memory leaks unloading
Hi Henry, I've found that even if items are garbage collected in the Flash Player memory will be necessarily be freed in the browser. If you want to check for garbage collection you can use the Flex Profiler (In Flex Builder 3) to check whether items are collected or not. What you will most likely find is that your items are being gc'd but Flash is unable to free up the memory. We had an application loading in a large game and trying to unload it. Although the game was garbage collected most of the memory was not freed up. In the end we gave up trying to get Flash to load/unload large amounts of data since we didn't believe it was able to release memory well enough. Hope that helps! Sunil -Original Message- From: Henry Cooke [mailto:[EMAIL PROTECTED] Sent: 12 March 2008 17:25 To: Flash Coders List Subject: Re: [Flashcoders] [AS3] Memory leaks unloading Wow, thanks for all the tips, guys. I forgot to mention that I was removing all my listeners, too, but weak referencing definitely looks useful, as does the rest of the stuff that Mr Skinner's written on resource management. And I'll dig into my copy of Moock as soon as I get the chance. Thanks again! Any more suggestions welcome, of course ;) On 12/03/2008, Matthew James Poole [EMAIL PROTECTED] wrote: True, but its sounds like Henry has lots of stuff not marked for GC so he still has references somewhere, just a case of finding them... Easier said than done -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allandt Bik-Elliott (Receptacle) Sent: 12 March 2008 16:30 To: Flash Coders List Subject: Re: [Flashcoders] [AS3] Memory leaks unloading as far as i know, there is no way of dumping the garbage manually - you have to wait for the flash plugin to dump it once it has been marked you can check chapter 14 of essential actionscript 3.0 (moock) for more info about that On 12 Mar 2008, at 15:54, Henry Cooke wrote: Hey all, I'm currently working on a Flash module to sit inside a larger Flash site being developed by another agency. This module needs to be loaded and unloaded as needed, and has a fair few library assets, quite substantial codebase and will be running PV3D or Away3D, so I need to be very careful about destroying everything when my module is finished with; the container site is pretty resource-hungry too. So, my current problem: I've built initialisation and destruction routines that run on Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE, and a test loader which loads and removes my module. However, watching the test loader unload my module in the Flash Player shows no noticeable drop in memory after my destructors have been called in the module and $loader.unload() has been called in the test loader, so it seems like a lot o stuff is gettign stuck in memory. Basically, my destructors set any class variables which reference objects to null, which I believe should mark them for garbage collection, if nothing else points to them? I also do things like removeChild() and bitmapData.dispose() where relevant. I've compiled in XRay, which shows what you'd expect: various bits present on stage while my module is loaded, all gone when it's not. So I guess my questions are: does anyone know any secret voodoo techniques to track down memory use in the Flash player? Is there anything better I can be doing than just setting pointers to null? Back in the AS2 day, I'd suspect the _global namespace of becoming cluttered and just try and nuke _global[ package_name ], but dirty hacks like that don't exist in our shiny new AS3 world, do they? I'd be grateful if anyone can offer any advice about how to properly clear up memory after unloading my module. This is my first AS3 project, and none of my old tricks work :( Cheers, Henry ___ 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 __ This e-mail has been scanned for viruses by the Virtual Universe e-mail security system - powered by MessageLabs. http://www.virtual-universe.net __ The contents of this email (which include its attachments) are confidential and may be subject to legal privilege and protected by copyright. If you are not the intended recipient any use, copying or disclosure of this e-mail to any third party is strictly forbidden by the sender and we reserve all rights and remedies against any person or entity making any such unauthorised use. If
RE: [Flashcoders] mc code still runs after being removed...Huh?!?
Hi Boyd, I don't fully understand your example. Does this article help at all? http://gskinner.com/blog/archives/2006/07/as3_resource_ma_1.html Sunil -Original Message- From: BOYD SPEER [mailto:[EMAIL PROTECTED] Sent: 29 January 2008 18:06 To: Flash Coders List Subject: [Flashcoders] mc code still runs after being removed...Huh?!? Another problem: code from a movieclip that has been removed from the DisplayList with removeChild(sparkle) and then nulled by using sparkle= null or sparkle = void . how can I turn off the repetition of the try-catch code (which tells the main class to kill sparkle) after the clip should be totally out of the movie? Thanks -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do you tell if an Object is dynamic?
Have you got an example Jamie? Sunil -Original Message- From: Jamie S [mailto:[EMAIL PROTECTED] Sent: 05 January 2008 01:51 To: Flash Coders List Subject: [Flashcoders] How do you tell if an Object is dynamic? I ran into a particular situation where i had a function that took an Object as a parameter. I needed that Object to be an actual Object i.e. dynamic because the function was going to add properties to it. But since everything in ActionScript is an Object I had trouble enforcing this. Is there a way to check to see if an Object is dynamic? Or is there a way to enforce something as an Object rather than a subclass of in Object (which is everthing else)? Jamie ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] flash contact form backend
Hi Robert, You'll need to post your form data to a URL which contains a script which will grab the posted variables and then will email out the information. If you're using PHP it's quite simple and there are lots of scripts. This is the first Google result for php emailer. I haven't tried it but it sounds like what you need. http://www.bellonline.co.uk/web-services/free/scripts/php-mailer-script/ Your server will need to be configured to send out emails, but I believe this is a pretty basic function that most should have enabled. Hope that helps. Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of robert nikolic Sent: 13 September 2007 14:01 To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] flash contact form backend I have a flash contact form, and I'm struggling to implement a proper backend code to be able to send it to an email recipient. Could anyone help with an example, many thanks, Robert ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:flashInspector/luminicBox not working in browser
That *is* strange! Is something interfering with the localconnection? Another luminicbox hidden away somewhere or another app in the browser? Any app config settings that are different in the IDE to the browser? Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 05 September 2007 17:12 To: flashcoders Subject: [Flashcoders] Q:flashInspector/luminicBox not working in browser For some reason I'm not getting any of my log calls from the browserworks fine when testing in the IDE though Anyone have an idea on how to get back my log calls? Strange...this hasn't happened before and I use luminicbox all the time... [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:Papervision 3D for 'simple' rotating cube effect
Hi J.Bach, It would be interesting to see/hear how you get along with this if you can post a link back here when it's done? Thanks, Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zeh Fernando Sent: 30 July 2007 17:35 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Q:Papervision 3D for 'simple' rotating cube effect Use PV3D. Just create a couple of planes, place them on the correct position, rotate them, and you're done. Works with AS2 and AS3 and should be something pretty simple as long as you understand the concept of 3d space and cameras. Zeh [EMAIL PROTECTED] wrote: I am trying to achieve an effect similar to the 3D User switching effect in OSX. Would implementing Papervision 3D be overkill for something like this? Or is there an 'open source' solution available somewhere that uses matrix transformations, etc. My concerns for implementing this in order of priority are: 1) Must be AS2 compatible (but ideally easilly upgraded to AS3) 2) File size, don't want to add 80k in code to achieve this! 3) Learning curve, I need to implement within 2 days!! Thanks for any advice! [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS3 Events
Hi Ian, back at the start of this you asked: - Why, in AS3, is my equivalent of using Delegate Not The Done Thing? (Someone mentioned type-safety; and yes, at compile time, you'll lose type safety) Does anyone know why Delegate is frowned upon? Seems like a simple and elegant solution to the problem to me! Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: 25 July 2007 11:04 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] AS3 Events Hi Ian, Been thinking about this a bit more and you're correct, contextInfo doesn't belong in class A and I'd go for storing a list of contextInfos in class B. regards, Muzak - Original Message - From: Ian Thomas [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Wednesday, July 25, 2007 10:14 AM Subject: Re: [Flashcoders] AS3 Events On 7/25/07, Muzak [EMAIL PROTECTED] wrote: Well, alot depends on the context of the whole thing (the bigger picture). If contextInfo isn't used/part of class A or B, it shouldn't even be there. But since you said: object B wraps it and wants to do something context specific once A has finished loading Then contextInfo should probably be a property of A or B. IMO that doesn't break encapsulation but rather enforces it. contextInfo is relevant to B, not A; and I agree, that doesn't break encapsulation (it does if contextInfo is placed in A). However, because there might be multiple outstanding requests through B, B can't simply have a property called contextInfo (because each request has a different contextInfo). It could conceivably have a _map_ of contextInfos, keyed in some way to each request. But this just seems like overkill, particularly when a simply Delegate(handler,contextInfo) solves the problem and is a lot easier to read. I honestly can't understand why other people aren't tripping over this situation; it seems an obvious problem in an environment like Flash, where you have lots of asynchronous requests kicking around. I was hoping there'd be a standard approach to the issue; it looks like there isn't. Ian ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS3 Events
Hi Ian, It seems like the proper way would be to create the extra functions/classes to handle this. That would solve those two issues which aren't major, but would make your code cleaner. Its more effort/work I guess but it might pay off in the long run! (Which is what clean code is all about isn't it?) :) If you were doing a quick knock-out job then Delegate/Proxy might be the solution for that situation though. ;) Sunil PS - There are more discussions at http://stimpson.flashvacuum.net/mt/archives/2006/08/as_30_delegate.html (you've probably see that already) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: 25 July 2007 12:33 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] AS3 Events Oh - and off the top of my head I can think of two fairly obvious objections/complications: i) Not type safe at compile time (but should(?) complain at runtime if the wrong argument types are sent, at least in the debug player) ii) Potential memory leakage with creating a closure - you'll have to remember to remove the Callback object as a listener (unless you're using weak references). Ian On 7/25/07, Ian Thomas [EMAIL PROTECTED] wrote: On 7/25/07, Sunil Jolly [EMAIL PROTECTED] wrote: Does anyone know why Delegate is frowned upon? Seems like a simple and elegant solution to the problem to me! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS3 Events
Hi Ian, I didn't fully understand your reply to Muzak's suggestion, but this is based on that and seems to fit the bill. Sorry it's a bit messy but you get the idea... Are there still issues with this one? --- //call class b passing extra param var b:B = new B(); b.addEventListener(Event.COMPLETE, onBComplete); b.loadSomethingAndProcessIt(url.swf, someParameter); function onBComplete(event:Event) { var thingYouWant:Object = event.customEventValue; } //Class B based on Muzak's(thanks!) class B { private var contextInfo:Object; public function loadSomethingAndProcessIt(url:String, ontextInfo:Object):void{ contextInfo = contectInfo; r a:A = new A(); a.addEventListener(Event.COMPLETE,onALoaded); a.loadSomething(url); } function onALoaded(event:Event):void { dispatchEvent(new CustomEvent(contextInfo)); } } //Custom Event to be fired from Class B package etc... public class CustomEvent extends Event { private var customEventValue:Object; Function CustomEvent(contextInfo) { super(etc...) customEventValue = contextInfo; } } Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: 25 July 2007 14:16 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] AS3 Events Oh, and reading the link you supplied, the only concrete suggestion is from Aral Balkan, who suggests (as someone did in an earlier thread) that you subclass the Event class. How would that help in my case? Any suggestions? To go back to my original example, if you assume class A is a black box that fires an event of class Event (Event.COMPLETE), we have no way (to the best of my knowledge) to make class A produce subclasses of Event instead; unless the suggestion is to subclass A to produce different events, which (depending on A's implementation) could be very difficult. Ian (Getting frustrated!) On 7/25/07, Ian Thomas [EMAIL PROTECTED] wrote: On 7/25/07, Sunil Jolly [EMAIL PROTECTED] wrote: Hi Ian, It seems like the proper way would be to create the extra functions/classes to handle this. That would solve those two issues which aren't major, but would make your code cleaner. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS3 Events
Hi Ian, Sorry, it's not very clear in all that garbled code. If you make a new instance of B each time then only 1 request would be made to each instance. The event could then be sent to the same listener for each instance but with the appropriate parameter as part of the (custom) event. If you think about it, it's very similar to how Delegate works by creating a holding area but now you have a (custom) event dispatched which is fully typed. I suppose you have to decide if it's worth the extra time or not based on what you're doing. :) Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: 25 July 2007 16:10 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] AS3 Events Hi Sunil, That won't work if multiple requests are filtering through the same B - which is where the whole problem starts from. :-) Because request 2 overwrites the contextInfo written by request 1 - which is why both Muzak (and I) suggested B has an internal list of contextInfos. But that gets more tricky... But thanks! Ian On 7/25/07, Sunil Jolly [EMAIL PROTECTED] wrote: Hi Ian, I didn't fully understand your reply to Muzak's suggestion, but this is based on that and seems to fit the bill. Sorry it's a bit messy but you get the idea... Are there still issues with this one? --- //call class b passing extra param var b:B = new B(); b.addEventListener(Event.COMPLETE, onBComplete); b.loadSomethingAndProcessIt(url.swf, someParameter); function onBComplete(event:Event) { var thingYouWant:Object = event.customEventValue; } //Class B based on Muzak's(thanks!) class B { private var contextInfo:Object; public function loadSomethingAndProcessIt(url:String, ontextInfo:Object):void{ contextInfo = contectInfo; r a:A = new A(); a.addEventListener(Event.COMPLETE,onALoaded); a.loadSomething(url); } function onALoaded(event:Event):void { dispatchEvent(new CustomEvent(contextInfo)); } } //Custom Event to be fired from Class B package etc... public class CustomEvent extends Event { private var customEventValue:Object; Function CustomEvent(contextInfo) { super(etc...) customEventValue = contextInfo; } } Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: 25 July 2007 14:16 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] AS3 Events Oh, and reading the link you supplied, the only concrete suggestion is from Aral Balkan, who suggests (as someone did in an earlier thread) that you subclass the Event class. How would that help in my case? Any suggestions? To go back to my original example, if you assume class A is a black box that fires an event of class Event (Event.COMPLETE), we have no way (to the best of my knowledge) to make class A produce subclasses of Event instead; unless the suggestion is to subclass A to produce different events, which (depending on A's implementation) could be very difficult. Ian (Getting frustrated!) On 7/25/07, Ian Thomas [EMAIL PROTECTED] wrote: On 7/25/07, Sunil Jolly [EMAIL PROTECTED] wrote: Hi Ian, It seems like the proper way would be to create the extra functions/classes to handle this. That would solve those two issues which aren't major, but would make your code cleaner. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Object Detection AS3
This works for me: - var myObject:Object; if (myObject) { removeChild(myObject); } --- Another method would be to catch the error: - try { removeChild(myObject); } catch (e:Error) { //do nothing } -- Or you can compare it to null: -- if (myObject != null) { removeChild(myObject); } -- Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Trim Sent: 19 July 2007 13:58 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Object Detection AS3 Hi Flashcoders, Learning AS3 in the deep end at the moment, so excuse the questions if too newb for this list. In AS2 I may have done something like the following. _1___ if(myObject){ myObject.removeMovieClip(); } this.attachMovie(MyObject,myObject,1); _ What would similar code look like in AS3? As _2 removeChild(myObject); _ fails if myObject doesn't exist yet as does _3___ if(myObject) _ Which I don't think you can do anyway? It's the last one I'm really interested in, how do you detect if something exists? Thanks Michael ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Object Detection AS3
If you use the try, catch method that shouldn't be a problem. --- try { removeChild(myObject); } catch (e:Error) { //object doesn't exist as a child, do nothing } - That should fail unless myObject has been added to the stage. Or am I missing something here? Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel Sent: 19 July 2007 15:40 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Object Detection AS3 the problem with your approach is that if the object does exist but is not on the display tree it will fail On 7/19/07, Sunil Jolly [EMAIL PROTECTED] wrote: This works for me: - var myObject:Object; if (myObject) { removeChild(myObject); } --- Another method would be to catch the error: - try { removeChild(myObject); } catch (e:Error) { //do nothing } -- Or you can compare it to null: -- if (myObject != null) { removeChild(myObject); } -- Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Trim Sent: 19 July 2007 13:58 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Object Detection AS3 Hi Flashcoders, Learning AS3 in the deep end at the moment, so excuse the questions if too newb for this list. In AS2 I may have done something like the following. _1___ if(myObject){ myObject.removeMovieClip(); } this.attachMovie(MyObject,myObject,1); _ What would similar code look like in AS3? As _2 removeChild(myObject); _ fails if myObject doesn't exist yet as does _3___ if(myObject) _ Which I don't think you can do anyway? It's the last one I'm really interested in, how do you detect if something exists? Thanks Michael ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- j:pn http://www.memorphic.com/news/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Object Detection AS3
That makes sense. I've always wondered if it was improper use of try/catch. Do you know what a better solution for this would be? And would you say you're supposed to use try/catch? Just curious. :) Thanks, Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel Sent: 19 July 2007 16:40 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Object Detection AS3 it should be fine, but i come from a background where catching an error is not considered a sollution. its an error and you should deal with it, not a very real and potential use case On 7/19/07, Sunil Jolly [EMAIL PROTECTED] wrote: If you use the try, catch method that shouldn't be a problem. --- try { removeChild(myObject); } catch (e:Error) { //object doesn't exist as a child, do nothing } - That should fail unless myObject has been added to the stage. Or am I missing something here? Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel Sent: 19 July 2007 15:40 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Object Detection AS3 the problem with your approach is that if the object does exist but is not on the display tree it will fail On 7/19/07, Sunil Jolly [EMAIL PROTECTED] wrote: This works for me: - var myObject:Object; if (myObject) { removeChild(myObject); } --- Another method would be to catch the error: - try { removeChild(myObject); } catch (e:Error) { //do nothing } -- Or you can compare it to null: -- if (myObject != null) { removeChild(myObject); } -- Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Trim Sent: 19 July 2007 13:58 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Object Detection AS3 Hi Flashcoders, Learning AS3 in the deep end at the moment, so excuse the questions if too newb for this list. In AS2 I may have done something like the following. _1___ if(myObject){ myObject.removeMovieClip(); } this.attachMovie(MyObject,myObject,1); _ What would similar code look like in AS3? As _2 removeChild(myObject); _ fails if myObject doesn't exist yet as does _3___ if(myObject) _ Which I don't think you can do anyway? It's the last one I'm really interested in, how do you detect if something exists? Thanks ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] RE: obfuscation swf !
I agree with JC that it wasn't really necessary to be quite so spiteful about defeating his code. I think the problem may have come from a here's my solution, try and break it attitude instead of simply giving details of how it (was supposed to) work. Everyone here shares their knowledge to help other people, where in this case it didn't seem like it. As far as I know, any flash file (.swf) is downloaded to a client's computer to be played, so its impossible to stop people from downloading your swf files. Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hans Wichman Sent: 18 July 2007 05:56 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] RE: obfuscation swf ! Hi, I might be wrong but like Bart said, I think SWFEncrypt does all this already. At least I haven't had any problems with this andits fast too AND usable from a build file. But I'm sure some of you will be able to crack it. What I do have problems with is the attitude displayed towards Jimbo by some of the responders for trying to come up with a nice and easy solution, even it isn't foolproof. Putting a donkey sign over someones head is less than motivating. He offered us a challenge, some of us took it and won. No need to get all nasty about it imo. greetz JC ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] obfuscation swf !
Yeah - looks like it to me! And what's with all the secrecy about the technique? :) Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Priou Sent: 17 July 2007 17:26 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] obfuscation swf ! Isn't all the swf content in that url ? http://jimbo.us/Games/mahJongg/advert.php?data=content so : $ curl -LO http://jimbo.us/Games/mahJongg/advert.php?data=content $ mv advert.php?data=content ad.swf $ swfdump -a ad.swf Interesting content. Is this trick so hard to find ? Le 17 juil. 07 à 18:06, Jim Berkey a écrit : If the viewer cannot get your swf, they cannot decompile it: http:// jimbo.us/swf_protect/ - Original Message - From: Bart Wttewaall [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Sunday, May 07, 2006 8:10 AM Subject: Re: [Flashcoders] obfuscation swf ! http://www.amayeta.com/software/swfencrypt/ This doesn't obfuscate, but really encrypt your swf's. I've tried every swf decoder I could find to check if it works, and it does. All you get is rubbish when decompiling. 2006/5/7, [EMAIL PROTECTED] [EMAIL PROTECTED]: Is there any good way or method for obfuscation a Flash file so that swf works fine after obfuscation and also prevent any one to understand the code easily . Few common softwares for obfuscation are just not that good as swf stops working after using them . Of if not obfuscation is there any other method to prevent swf to be decompiled to fla . help will be really appreciate . Thx Max ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Accessing MovieClips on a timeline from an AS3 class
Muzak - I share some of your frustrations though I see why they've done it. So what do people think the best practice for this is? I don't like the idea of not declaring the MCs/Buttons in the class because it's a great help knowing what a class can deal with without having to refer to the Flash file constantly. Adjusting the publish settings and setting the instances to public doesn't seem great. Using getChildByName is a bit of a long solution too! Also how would FDT (when the AS3 version is finally released!!) handle this? Without declaring the instances they wouldn't have access to the Flash stage before compilation would they? So I guess you'll have to declare them for that functionality to work. Thanks, Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francis Cheng Sent: 13 July 2007 02:34 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Accessing MovieClips on a timeline from an AS3 class Sorry, I wasn't clear about my theory. Let me try again. I think that you have to declare variables that represent stage instances as public because Flash CS3 automatically executes an assignment statement at runtime that involves those variables. If those variables are declared as private, they are invisible at runtime, so the assignment attempt results in an error. Francis -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Thursday, July 12, 2007 6:14 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Accessing MovieClips on a timeline from an AS3 class I'm aware of the differences, I just don't understand why it *has* to be public. Or put differently, I don't like that it has to be public. If I had to guess, I'd say it has something to do with the display list. regards, Muzak - Original Message - From: Francis Cheng [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, July 13, 2007 2:45 AM Subject: RE: [Flashcoders] Accessing MovieClips on a timeline from an AS3 class I'm guessing that the odd reason has something to do with the behavior of the private attribute in AS2 versus AS3. As most of you are aware, the private attribute in AS2 only restricts access at compile time. In AS3, however, private restricts access at both compile time and runtime. Just a guess, though, I could be barking up the wrong tree. Francis -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Thursday, July 12, 2007 5:21 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Accessing MovieClips on a timeline from an AS3 class This means that you either have to declare the variables yourself (and they have to be public, by the way) or declare the class as dynamic so that the variables can be added at runtime (specifically, at the time the assignment statements are executed). I think the has to be public thing is one of the most annoying things that has changed between AS2 and AS3. In AS2 you can place assets on stage and declare them as private in your class. In AS3 this is not allowed/possible for some odd reason. regards, Muzak ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Application Structure - Flash Remoting MovieClipLoader
Hi, I would recommend ARP for this too. It's a bit tricky to use (at first), but it will keep your code clean for sure and save you a lot of time. There's a remoting example that you could adjust quite easily. As for the moviecliploader, I try to use a single class to do all my loading. I guess that's what you mean by a smart loader. Sunil http://www.suniljolly.com PS - Hi! I'm new to the list, I hould have joined a long time ago! -Original Message- Hi, I would suggest looking at ARP or another Framework to handle your Service calls through a single interface which you create services for. It is well documented with examples and OS so you should be able to get the hang of it quite quickly. osflash.org/projects/arp HTH Glen Richard Mueller wrote: I'm building an application that is going to use Flash Remoting very heavily. I'm wondering how I should structure my Service connections. Should I put them in each(several) loaded movies or in the root timeline where any loaded move can access them. The latter would cause issues when trying to test each movie individually. But by putting the Service connections in each movie would require imports needed for FR at the top.. Also, I'm new to using the moviecliploader. I have a few functioning properly, however, is it wise to try and create a smart loader? Meaning use one loader and zip when the zip.swf is loaded and zag with zag.swf. Or should I just accept, and get in the habit of using a zip loader and a zag loader separately, meaning each loader simply serve a specific function. Richard ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Application Structure - FlashRemoting MovieClipLoader
I think that if you're just starting out with classes then using MVC would be an excellent place to start since ARP could be quite overwhelming. Others might disagree. :) I've spent many hours trying to figure out how to do some seemingly basic things in ARP and to be honest I'm still not 100% sure I'm doing the right thing in places! Do you know about singletons? To make your service(s) available to all items in Flash it would be best to use it in a singleton pattern. (http://www.flashcoder.net/blog/?p=81). Sunil -Original Message- Well, the past 24 hours have been interesting to say the least. I've never really written a class, yet I know a lot about them and understand them for the most part. Before starting the project, I knew I was going to run into data access issues but didn't really have a solution. I'd never heard of mvc until yesterday so thanks for pointing me in the right direction. I'm confident I can start building classes using the mvc pattern, however, I don't think I'm quite ready for something like ARP. I think I'd be taking on too much and our development resources are almost tapped. Or should I seriously reconsider using ARP, is it something I can easily implement later once I'm more confident with classes? At 7/12/2007 Thursday 04:00 AM, you wrote: Hi, I would recommend ARP for this too. It's a bit tricky to use (at first), but it will keep your code clean for sure and save you a lot of time. There's a remoting example that you could adjust quite easily. As for the moviecliploader, I try to use a single class to do all my loading. I guess that's what you mean by a smart loader. Sunil http://www.suniljolly.com PS - Hi! I'm new to the list, I hould have joined a long time ago! -Original Message- Hi, I would suggest looking at ARP or another Framework to handle your Service calls through a single interface which you create services for. It is well documented with examples and OS so you should be able to get the hang of it quite quickly. osflash.org/projects/arp HTH Glen ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Accessing MovieClips on a timeline from an AS3 class
Hi Matt, AS3 is slightly different. You need to say: private var fullScreen_mc:MovieClip = getChildByName(fullscreen); Note that the reference (fullscreen_mc) can't be the same as the name on the stage (fullscreen). Also in AS3 you can actually set instance variables outside of functions. I'm quite new to AS3 so I'd be interested if there's another way to do this. I haven't really worked out a good naming convention for this yet either - anyone have any ideas? Sunil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hans Wichman Sent: 12 July 2007 15:34 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Accessing MovieClips on a timeline from an AS3 class Hi, reserver keyword maybe? greetz JC On 7/12/07, Matt Muller [EMAIL PROTECTED] wrote: I feel like a bit of an idiot asking this, but I keep getting errors. I'm creating some custom player skin templates and have some ui elements which are MovieClips on the stage. Bearing in mind, this will be a swf loaded into another swf all I'm trying to do is create class definitions and its throwing errors. in as2, it would normally be something like name your instance on stage 'btn_fullScreen' and then in the class just type it to have access to it. private var btn_fullScreen:MovieClip; So in the document class I have something like this (as3) with a MovieClip with a matching instance name fullScreen thats on the stage/timeleine but its clashing when I try and access it from the class. and I get this error when I try to trace it. 1151: A conflict exists with definition fullScreen in namespace internal. package com.foo.view.playerSkins { import flash.display.MovieClip; public class SkinInventory extends MovieClip{ private var fullScreen:MovieClip; public function SkinInventory() { trace(fullScreen) } } } Any ideas?? thanks matt ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Accessing MovieClips on a timeline from an AS3 class
Does that work? I'm getting a namespace conflict. Sunil -Original Message- Thanks all, I ended up with something like this... package com.foo.view.playerSkins { import flash.display.MovieClip; import com.sky.view.playerSkins.*; public class SkinInventory extends MovieClip{ private var fullscreen:MovieClip; public function SkinInventory() { _init(); } private function _init():void { fullscreen = getChild(this, fullScreen); fullscreen = (fullscreen as FullScreen); } public function getChild(stage, _name:String):MovieClip { return stage.getChildByName(_name); } } } On 7/12/07, Sunil Jolly [EMAIL PROTECTED] wrote: Hi Matt, AS3 is slightly different. You need to say: private var fullScreen_mc:MovieClip = getChildByName(fullscreen); Note that the reference (fullscreen_mc) can't be the same as the name on the stage (fullscreen). Also in AS3 you can actually set instance variables outside of functions. I'm quite new to AS3 so I'd be interested if there's another way to do this. I haven't really worked out a good naming convention for this yet either - anyone have any ideas? Sunil ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com