[Flashcoders] Flash CS5 IDE
rant I've just moved from CS3, that I'd been happily using for a few years to CS5 (so we can target FP10) and it seems to me to be a massive step backwards in usability. The properties dialogs for pretty much everything are trickier to use especially the way you apply filters. Just arranging and navigating the panels all seems massively inferior to how it worked before. /rant Has anyone else found this transition a bit painful and/or have any suggestions as to how to improve productivity with it. Maybe... does anyone know if it's possible to rig the CS3 IDE (I am on Mac) to publish for FP10. Tom ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash CS5 IDE
On 27/07/2010 11:09, Tom Gooding wrote: rant I've just moved from CS3, that I'd been happily using for a few years to CS5 (so we can target FP10) and it seems to me to be a massive step backwards in usability. The properties dialogs for pretty much everything are trickier to use especially the way you apply filters. Just arranging and navigating the panels all seems massively inferior to how it worked before. /rant Has anyone else found this transition a bit painful and/or have any suggestions as to how to improve productivity with it. Maybe... does anyone know if it's possible to rig the CS3 IDE (I am on Mac) to publish for FP10. Tom Probably best get used to it now. I have recently had to move from CS3 to CS5 because the CS5 Adobe software won't export from CS5 back to CS3 and my customers are starting to go ahead with CS5.. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash CS5 IDE
Yep - I guess I will need to get used to it - am I alone in thinking it's a bit of a dog's dinner of an app? On 27 Jul 2010, at 11:25, Paul Andrews wrote: On 27/07/2010 11:09, Tom Gooding wrote: rant I've just moved from CS3, that I'd been happily using for a few years to CS5 (so we can target FP10) and it seems to me to be a massive step backwards in usability. The properties dialogs for pretty much everything are trickier to use especially the way you apply filters. Just arranging and navigating the panels all seems massively inferior to how it worked before. /rant Has anyone else found this transition a bit painful and/or have any suggestions as to how to improve productivity with it. Maybe... does anyone know if it's possible to rig the CS3 IDE (I am on Mac) to publish for FP10. Tom Probably best get used to it now. I have recently had to move from CS3 to CS5 because the CS5 Adobe software won't export from CS5 back to CS3 and my customers are starting to go ahead with CS5.. ___ 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] Flash CS5 IDE
On 27/07/2010 11:09, Tom Gooding wrote: Has anyone else found this transition a bit painful and/or have any suggestions as to how to improve productivity with it. Maybe... does anyone know if it's possible to rig the CS3 IDE (I am on Mac) to publish for FP10. Yes, a little painful - unfortunately some bright spark decided we did not want to lay our properties panel out horizontally anymore. I find putting this to the LHS has helped a little, but it would be nice if Adobe could have done a floating type of layout for the properties - e.g. divide properties into sections and allow each section to float left so it can be laid out horizontally or vertically. I do find there is not much stage space any more with having to have the properties panel sitting on the left the tools panel is pretty useless if you stack the properties in the same panel but I tend to have a project window open too, which fills up the space regardless. Because most of my work is code based rather than animation, I don't spend much time in the IDE, although I find authoring controls, and doing layout a chore in CS5 - hiding the timeline has helped a bit. I found Flash 8 / CS3 to be more easy for authoring, but then I had that nicely setup and I am still tweaking CS5. If I have to do any more heavily graphic oriented sites I might have to knuckle down... At least they fixed the stacking issue where SWF's used to get stuck behind the panels if they were a high resolution and it does not crash like CS4 with projects, I am reasonably happy with it. Maybe Adobe bought shares in some large computer company a while ago because we always need more real-estate, more memory and faster processors with each new upgrade of Flash ;) 2 monitors is useful, but wish I could have a setting where it always opens my test movie on the 2nd monitor without me having to move 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] Flash CS5 IDE
That would be nice to have it auto open in a second monitor. I think they are just trying to bring the application look feel closer to both After Effects and Illustrator. Date: Tue, 27 Jul 2010 12:02:24 +0100 From: g...@engineeredarts.co.uk To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Flash CS5 IDE On 27/07/2010 11:09, Tom Gooding wrote: Has anyone else found this transition a bit painful and/or have any suggestions as to how to improve productivity with it. Maybe... does anyone know if it's possible to rig the CS3 IDE (I am on Mac) to publish for FP10. Yes, a little painful - unfortunately some bright spark decided we did not want to lay our properties panel out horizontally anymore. I find putting this to the LHS has helped a little, but it would be nice if Adobe could have done a floating type of layout for the properties - e.g. divide properties into sections and allow each section to float left so it can be laid out horizontally or vertically. I do find there is not much stage space any more with having to have the properties panel sitting on the left the tools panel is pretty useless if you stack the properties in the same panel but I tend to have a project window open too, which fills up the space regardless. Because most of my work is code based rather than animation, I don't spend much time in the IDE, although I find authoring controls, and doing layout a chore in CS5 - hiding the timeline has helped a bit. I found Flash 8 / CS3 to be more easy for authoring, but then I had that nicely setup and I am still tweaking CS5. If I have to do any more heavily graphic oriented sites I might have to knuckle down... At least they fixed the stacking issue where SWF's used to get stuck behind the panels if they were a high resolution and it does not crash like CS4 with projects, I am reasonably happy with it. Maybe Adobe bought shares in some large computer company a while ago because we always need more real-estate, more memory and faster processors with each new upgrade of Flash ;) 2 monitors is useful, but wish I could have a setting where it always opens my test movie on the 2nd monitor without me having to move 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 _ http://clk.atdmt.com/UKM/go/195013117/direct/01/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Listeners (was no subject)
- Original Message From: Taka Kojima t...@gigafied.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Mon, July 26, 2010 1:33:43 PM Subject: Re: [Flashcoders] Listeners (was no subject) John, This is going to come across as harsh, however you really should maybe go and get a book on AS3. These problems, forgetting an import, trying to pass arguments to a listener, etc. are pretty rudimentary, and not really the purpose of this list. Yep, a little rough. Got a good book. My question isn't how to pass arguments. I know how to do that. My question is far more specific. It's why don't I have to pass the e:Event argument? Why does the compiler complain that I only pass one argument when I try to pass the other since apparently the first argument is passed automatically? How can I pass that first argument manually when I can't even see what it is? Didn't notice that Moock addressed those questions, so I thought I'd ask here. Would you be so kind as to address those questions, not how to pass arguments? TIA, John Taka On Mon, Jul 26, 2010 at 10:58 AM, John Singleton johnsingleton...@yahoo.com wrote: Original Message From: Henrik Andersson he...@henke37.cjb.net To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Mon, July 26, 2010 12:06:55 PM Subject: Re: [Flashcoders] (no subject) John Singleton wrote: function RotateGearsLoaded(e:Event):void Why is that? I tried to pass that var like this: loader.contentLoaderInfo.addEventListener(Event.COMPLETE,RotateGearsLoaded(displayGearsCounter)); RotateGearsLoaded returns void, not Function. The return value is not a legal listener. Yet you are calling it here to get the listener to add. Remember, you are not the one calling the listener, thusly, you can't decide the arguments. That makes sense. Unfortunately, it's not clear to me how I should proceed. Could you either recommend a tutorial or give an example? TIA, John PS. Original code for those who skipped this message because it had no subject: function Main() { InitRotateGears(); } function InitRotateGears() { for (var i = 0; i gearsPaths.length; i++) { RotateGears(); displayGearsCounter += 1; } function RotateGears() { var path:String = new String(); path = gearsPaths[displayGearsCounter]; var req:URLRequest = new URLRequest(path); var loader:Loader = new Loader(); loader.load(req); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,RotateGearsLoaded); } function RotateGearsLoaded(e:Event):void { var loaderInfo:LoaderInfo = e.target as LoaderInfo; var displayObject:DisplayObject = loaderInfo.content; displayObject.width = gearWidths[displayGearsCounter]; displayObject.height = gearHeights[displayGearsCounter]; // displayObject.x = - gearWidths[displayGearsCounter]; // displayObject.y = - gearWidths[displayGearsCounter]; displayObject.x = 0; displayObject.y = 0; trace(displayGearsCounter); parent_container.addChild(displayObject); parent_container.x = 0; parent_container.y = 0; parent_container.alpha = 1; addChild(parent_container); var myTimeline:TimelineLite = new TimelineLite({useFrames:true}); myTimeline.append(new TweenMax(parent_container, 1, {shortRotation:{rotation:gearAngles[displayGearsCounter]}})); } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders s 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] Listeners (was no subject)
You'll want to learn how to create custom events and pass data with those. With a custom event, you can have it contain any amount and form of data. The custom events we use in our internal development framework all have a public data property with a type wildcard *, but you can specify more specific typecast properties than that of course. Don't feel bad about your questions, I disagree with Taka I suppose, that's the point of this list and the best way to learn. If you were constantly bombarding us with newbie questions, I would probably refer you elsewhere as he did, but you aren't. If you aren't using FlashDevelop or a similar tool of equivalent power, I would recommend it. You'll know right away if you're missing an import for example, and it also will clean up your imports, removing the unused ones. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John Singleton Sent: Tuesday, July 27, 2010 8:45 AM To: Flash Coders List Subject: Re: [Flashcoders] Listeners (was no subject) - Original Message From: Taka Kojima t...@gigafied.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Mon, July 26, 2010 1:33:43 PM Subject: Re: [Flashcoders] Listeners (was no subject) John, This is going to come across as harsh, however you really should maybe go and get a book on AS3. These problems, forgetting an import, trying to pass arguments to a listener, etc. are pretty rudimentary, and not really the purpose of this list. Yep, a little rough. Got a good book. My question isn't how to pass arguments. I know how to do that. My question is far more specific. It's why don't I have to pass the e:Event argument? Why does the compiler complain that I only pass one argument when I try to pass the other since apparently the first argument is passed automatically? How can I pass that first argument manually when I can't even see what it is? Didn't notice that Moock addressed those questions, so I thought I'd ask here. Would you be so kind as to address those questions, not how to pass arguments? TIA, John Taka On Mon, Jul 26, 2010 at 10:58 AM, John Singleton johnsingleton...@yahoo.com wrote: Original Message From: Henrik Andersson he...@henke37.cjb.net To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Mon, July 26, 2010 12:06:55 PM Subject: Re: [Flashcoders] (no subject) John Singleton wrote: function RotateGearsLoaded(e:Event):void Why is that? I tried to pass that var like this: loader.contentLoaderInfo.addEventListener(Event.COMPLETE,RotateGearsLo aded(displayGearsCounter)); RotateGearsLoaded returns void, not Function. The return value is not a legal listener. Yet you are calling it here to get the listener to add. Remember, you are not the one calling the listener, thusly, you can't decide the arguments. That makes sense. Unfortunately, it's not clear to me how I should proceed. Could you either recommend a tutorial or give an example? TIA, John PS. Original code for those who skipped this message because it had no subject: function Main() { InitRotateGears(); } function InitRotateGears() { for (var i = 0; i gearsPaths.length; i++) { RotateGears(); displayGearsCounter += 1; } function RotateGears() { var path:String = new String(); path = gearsPaths[displayGearsCounter]; var req:URLRequest = new URLRequest(path); var loader:Loader = new Loader(); loader.load(req); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,RotateGearsLoad ed); } function RotateGearsLoaded(e:Event):void { var loaderInfo:LoaderInfo = e.target as LoaderInfo; var displayObject:DisplayObject = loaderInfo.content; displayObject.width = gearWidths[displayGearsCounter]; displayObject.height = gearHeights[displayGearsCounter]; // displayObject.x = - gearWidths[displayGearsCounter]; // displayObject.y = - gearWidths[displayGearsCounter]; displayObject.x = 0; displayObject.y = 0; trace(displayGearsCounter); parent_container.addChild(displayObject); parent_container.x = 0; parent_container.y = 0; parent_container.alpha = 1;
Re: [Flashcoders] Combat Game in flash
pleasure :) On 27 July 2010 06:47, Sumeet Kumar sume...@sebiz.net wrote: Thanks a lot. The link really helped. - Original Message - From: allandt bik-elliott (thefieldcomic.com) alla...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, July 26, 2010 6:17 PM Subject: Re: [Flashcoders] Combat Game in flash You could try somewhere like flashkit.com if you're after samples On 26 Jul 2010 10:20, Sumeet Kumar sume...@sebiz.net wrote: Hi All, We are developing a one to one combat game(sword fighting). We are planning to use AS3.0 and Flash cs4. Are there any tutorials/sample code available for help? Any guidance in this regard would be great help. Thanks Sumeet ___ 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] Flash CS5 IDE
Performance wise, so far its a lot better than CS4 was. That was a dog. on 7/27/10 5:53 AM, Tom Gooding at t...@quickthinkmedia.co.uk wrote: Yep - I guess I will need to get used to it - am I alone in thinking it's a bit of a dog's dinner of an app? John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Listeners (was no subject)
- Original Message From: Merrill, Jason jason.merr...@bankofamerica.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tue, July 27, 2010 8:23:16 AM Subject: RE: [Flashcoders] Listeners (was no subject) You'll want to learn how to create custom events and pass data with those. With a custom event, you can have it contain any amount and form of data. The custom events we use in our internal development framework all have a public data property with a type wildcard *, but you can specify more specific typecast properties than that of course. Don't feel bad about your questions, I disagree with Taka I suppose, that's the point of this list and the best way to learn. If you were constantly bombarding us with newbie questions, I would probably refer you elsewhere as he did, but you aren't. If you aren't using FlashDevelop or a similar tool of equivalent power, I would recommend it. You'll know right away if you're missing an import for example, and it also will clean up your imports, removing the unused ones. Your response was incredibly helpful. Thank you very much! John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Listeners (was no subject)
Custom events are usually overkill. The issue is not what event, but what the listener knows about the object that it happened to. Most often, the listener can simply access a property of the class that it lies in instead of using some complicated custom event solution. The event object should only contain data that is about the event itself. Not what the listener should do, that is up to the listener. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and Domino
Anyone have tips on how to integrate Flash and Domino - basically looking to update Domino fields from a Flash interface Domino supports web services: http://www.ibm.com/developerworks/lotus/library/nd7-webservices/ In Flex, it's fairly straightforward to consume SOAP services via the WebService object. I don't know enough about Flash to recommend the best option there, but if you can consume SOAP services in Flash you should be all set. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Flash and Domino
Anyone have tips on how to integrate Flash and Domino - basically looking to update Domino fields from a Flash interface I haven't worked with Domino specifically (I worked with LotusNotes servers about 10 years ago), but it does appear to have Webservices available: http://www.ibm.com/developerworks/lotus/library/nd7-webservices/ (that is unless your server admin has disabled them) So you could call the Webservices with one of the following methods from Flash: 1. Build your project using the Flex framework and use the Flex web service components available in that framework. 2. Download a third party class to use Webservices in Flash, like http://alducente.wordpress.com/2007/10/27/web-service-in-as3-release-10/ 3. Use ExternalInterface and Javascript to call the webservice and communicate the data to and from Flash. First though, you'll have to investigate what Webservices are available to you and which ones you need to call and how. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Tuesday, July 27, 2010 2:13 PM To: Flash Coders List Subject: [Flashcoders] Flash and Domino Anyone have tips on how to integrate Flash and Domino - basically looking to update Domino fields from a Flash interface ___ 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] Listeners (was no subject)
Paul Andrews wrote: If you try and call a function designed to be an event handler directly, you must create an event object instance to correspond with the event argument yourself when it is called. You must at the very least give the parameter a value. A null reference counts as a value. You can either make it optional or simply pass null each time you are calling it yourself. If it is valid depends on what the function does with it. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Listeners (was no subject)
Kerry Thompson wrote: Henrik Andersson wrote: Custom events are usually overkill. If I understand you correctly, Henrik, I disagree. Custom events are incredibly useful. That they are. But they are not miracle tool. You should use them wisely and only when it makes sense. AS3 is event-driven, and I routinely have all sorts of custom events. In a recent game, I added event listeners to 7 different custom events in the main class's constructor. When an animation in a MC finishes, the MC sends the ANIMATION_FINISHED message. When the timer fires, it sends another message. When the student answers a question, I send another message. Sounds like you missed Event.COMPLETE, it is just as good to signal when a task is done. I have a class that extends Event, and custom events are defined in this class. So, when you send a custom event, you get an event object just as you would with a system event. Did you bother adding any properties in your custom class? If not, you could just have used the Event class instead. To me, this is a lot cleaner and easier to follow than callbacks or calls to other methods. It's also less prone to mysterious bugs--when you call a method, it always returns to the caller. If that caller no longer exists, you get a crash that can be very hard to diagnose. When you send a custom message, the code doesn't automatically return to the sender. Actionscript is a garbage collected language, objects can not vanish while they are used as the value of this for a method. And if you manage to pull a stunt like that in something like c++, bad you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Listeners (was no subject)
Here's the deal: If you had googled your error message 1046: Type was not found or was not a compile-time constant: Event, you would have found the answer to your first question in the first 3 results. A 1046 error is a very common error message, seasoned developers already know what's wrong before they finish reading the message, but that's not the point. The point is that this list shouldn't be the first option for such a trivial issue. Secondly, it is basic programming knowledge that you never pass arguments to a listener/callback function by doing testFunction(callbackFunction(argument1,argument2)), because that will run the function and use the return value of that function as the argument for testFunction. In my opinion, both of his questions, albeit they were encountered while working with flash/as3, are not really flash/as3 related questions. The first is not knowing when/how to run a simple search to solve basic programming bugs/errors. The second is just a general lack of basics in programming in general. Maybe I'm alone here, which is fine and John, I am not trying to single you out or anything like that, I just see too many of these types of questions happen on this list. There are some notorious offenders in the past that I'm sure we can all think of (at least those of us that have been on this list for a while). I'm subscribed to this list to help people when I see an actual issue that really warrants help, maybe I should just ignore these types of messages in general and not get myself involved, I don't know. On Tue, Jul 27, 2010 at 11:54 AM, Henrik Andersson he...@henke37.cjb.netwrote: Kerry Thompson wrote: Henrik Andersson wrote: Custom events are usually overkill. If I understand you correctly, Henrik, I disagree. Custom events are incredibly useful. That they are. But they are not miracle tool. You should use them wisely and only when it makes sense. AS3 is event-driven, and I routinely have all sorts of custom events. In a recent game, I added event listeners to 7 different custom events in the main class's constructor. When an animation in a MC finishes, the MC sends the ANIMATION_FINISHED message. When the timer fires, it sends another message. When the student answers a question, I send another message. Sounds like you missed Event.COMPLETE, it is just as good to signal when a task is done. I have a class that extends Event, and custom events are defined in this class. So, when you send a custom event, you get an event object just as you would with a system event. Did you bother adding any properties in your custom class? If not, you could just have used the Event class instead. To me, this is a lot cleaner and easier to follow than callbacks or calls to other methods. It's also less prone to mysterious bugs--when you call a method, it always returns to the caller. If that caller no longer exists, you get a crash that can be very hard to diagnose. When you send a custom message, the code doesn't automatically return to the sender. Actionscript is a garbage collected language, objects can not vanish while they are used as the value of this for a method. And if you manage to pull a stunt like that in something like c++, bad you. ___ 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] Listeners (was no subject)
On 27/07/2010 19:37, Henrik Andersson wrote: Paul Andrews wrote: If you try and call a function designed to be an event handler directly, you must create an event object instance to correspond with the event argument yourself when it is called. You must at the very least give the parameter a value. A null reference counts as a value. You can either make it optional or simply pass null each time you are calling it yourself. If it is valid depends on what the function does with it. Well it will work, though I think it's not the best practice. If I have an event handler that does taskX, and I want to do taskX directly without an event, I would code this as function onSomeEvent(e:Event):void { taskX(); } and have a separate taskX() function to allow that to be called directly. Then there's no ambiguity over whether a function is an event handler or not. Generally speaking calling event handlers directly is to be avoided. 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
RE: [Flashcoders] Listeners (was no subject)
maybe I should just ignore these types of messages in general and not get myself involved I'd vote for that one. His questions were legit, he doesn't need condescension no matter how elementary his question seemed. From the perspective of an advanced programmer, they seem very Googleable, but from someone learning, you don't know what you don't know, so a list like this is sometimes the obvious place to ask. John - check out Flash_Tiger on Yahoo (it's a mailing list like this one and also has an online searchable forum) - where any Flash and Actionscript related question is legit. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Listeners (was no subject)
Jason Merrill wrote: John - check out Flash_Tiger on Yahoo (it's a mailing list like this one and also has an online searchable forum) - where any Flash and Actionscript related question is legit. Second that. Jason, you somehow neglected to mention that you are one of the Flash Tiger moderators ;-) I would like to say, once again, Flash Tiger isn't interested in stealing readers from Flash Coders. I do urge you to join--it's a smaller and more personal list--but don't leave Flash Coders. Flash Tiger is complementary to Flash Coders, not competitive. Cordially, Kerry Thompson P.S: Should I have mentioned that I'm also one of the Flash Tiger moderators? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Listeners (was no subject)
and you can also do... function onSomeEvent(e:Event = null):void{ } and then just call the function directly, without creating a new Event instance. i.e.: onSomeEvent(); On Tue, Jul 27, 2010 at 12:20 PM, Paul Andrews p...@ipauland.com wrote: On 27/07/2010 19:37, Henrik Andersson wrote: Paul Andrews wrote: If you try and call a function designed to be an event handler directly, you must create an event object instance to correspond with the event argument yourself when it is called. You must at the very least give the parameter a value. A null reference counts as a value. You can either make it optional or simply pass null each time you are calling it yourself. If it is valid depends on what the function does with it. Well it will work, though I think it's not the best practice. If I have an event handler that does taskX, and I want to do taskX directly without an event, I would code this as function onSomeEvent(e:Event):void { taskX(); } and have a separate taskX() function to allow that to be called directly. Then there's no ambiguity over whether a function is an event handler or not. Generally speaking calling event handlers directly is to be avoided. 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] Listeners (was no subject)
On 27/07/2010 20:34, Taka Kojima wrote: and you can also do... function onSomeEvent(e:Event = null):void{ } and then just call the function directly, without creating a new Event instance. i.e.: onSomeEvent(); Yes, but I specifically avoid that - I like to separate event handlers and other functionality. It's a choice, not a necessity. On Tue, Jul 27, 2010 at 12:20 PM, Paul Andrewsp...@ipauland.com wrote: On 27/07/2010 19:37, Henrik Andersson wrote: Paul Andrews wrote: If you try and call a function designed to be an event handler directly, you must create an event object instance to correspond with the event argument yourself when it is called. You must at the very least give the parameter a value. A null reference counts as a value. You can either make it optional or simply pass null each time you are calling it yourself. If it is valid depends on what the function does with it. Well it will work, though I think it's not the best practice. If I have an event handler that does taskX, and I want to do taskX directly without an event, I would code this as function onSomeEvent(e:Event):void { taskX(); } and have a separate taskX() function to allow that to be called directly. Then there's no ambiguity over whether a function is an event handler or not. Generally speaking calling event handlers directly is to be avoided. 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Listeners (was no subject)
Henrik Andersson wrote: That they are. But they are not miracle tool. You should use them wisely and only when it makes sense. I agree completely. Custom messages are for the intermediate programmer, at least. I wouldn't recommend them for a beginner. On the other hand, I don't think you can consider yourself an advanced coder unless you understand custom messages (including when to use them). Sounds like you missed Event.COMPLETE, it is just as good to signal when a task is done. No, I know all about Event.COMPLETE. I have a lot of things happening that send a message when they finish, and I like to target the right method. Another legimate approach would be to send all the Event.COMPLETE message to a method that decides where to route them, probably in a switch statement. I just happen to prefer to target a specific listener. Did you bother adding any properties in your custom class? If not, you could just have used the Event class instead. Of course. The custom class has properties and methods that aren't in the Event class. Actionscript is a garbage collected language, objects can not vanish while they are used as the value of this for a method. And if you manage to pull a stunt like that in something like c++, bad you. Agreed completely. I've been programming for over 25 years, and I made all the stupid mistakes years ago. My blunders now are more sophisticated ;-) I think it's a valid point, though--even though it's garbage-collected, it still has a call stack. If a method in object A calls a method in object B, object A won't be eligible for garbage collection until the method in object B is finished. An advanced programmer will understand this (or at least should). It could lead to hard-to-find bugs, though. If you destroy an object while it's on the call stack, you will get, at a minimum, a memory leak. Things like a call stack, garbage collection, memory leaks, and the like are more advanced concepts. And, as Jason says, we should be willing to accomodate less-advanced coders here. Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Combat Game in flash
Easy Peasy: Just de-compile this and draw a sword on the character - 5 minutes, job's-a-good-un, laughing all the way to Beno's. http://www.dan-dare.org/FreeFun/Games/Fightman.htm :) Steven Sacks wrote: Haha! This thread reminds me of another classic one: http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com/msg13415.html On 7/26/2010 5:47 AM, allandt bik-elliott (thefieldcomic.com) wrote: You could try somewhere like flashkit.com if you're after samples On 26 Jul 2010 10:20, Sumeet Kumarsume...@sebiz.net wrote: Hi All, We are developing a one to one combat game(sword fighting). We are planning to use AS3.0 and Flash cs4. Are there any tutorials/sample code available for help? Any guidance in this regard would be great help. Thanks Sumeet ___ 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