[flexcoders] Question on extending components for Mobile Apps
Hello All, If I am to create custom components inside of Flash Builder for Mobile, does it always have to begin by extending the View Class? I'm not talking about custom controls, but Views that would contain a ton of custom controls (one being a Loader component). Up until now (for non-mobile apps), I've always started by extending the UIComponent Class since that is probably the most basic class to build upon. Thanks for any advice you can throw my way, Mike
[flexcoders] Problem with data displayed in Drop Down, versus actual underlying data
Hello All, I am banging my head on the wall with this issue - I have 1 dropdown control's dataProvider, tied to the remoting results of another dropdown's database query. You can keep selecting a different value from the primary dropdown, and the secondary dropdown updates the underlying dataset beautifully, BUT if you click the secondary dropdown to display the actual values, it still displays the list from the PREVIOUS database query. The interesting thing is, if you click an actual value from the dropdown, it selects the correct underlying value contained in the index position, although the displayed value is wrong (the value from the previous query). I am using Cairngorm for my framework - and have the model.returnedQuery tied to the secondary dropdown box - so whenever I kick off a command, the values automatically update, since the dataProvider is tied to the model. Do any of you, have any ideas as to what's causing this? Thanks in advance for all your help, Mike P.S. I am using Flash Builder 4 compiling in Flex 3.5 (this problem still existed when using Flex Builder too).
RE: [flexcoders] FlexBuilder on 64bit machine any good?
I've had pretty good luck with it so far - I have it running on 3 different laptops and 1 desktop PC - ALL are 64-bit Operating Systems. I should say that 2 machines are running Vista x64 and 2 are running XP x64 Edition. One weird part when running on Vista (if you are using ColdFusion) is configuring IIS - it's fairly involved and can be frustrating. Lots of articles on the net though regarding how to set it up. One cool thing too, is Adobe has a 64-bit version of ColdFusion - so it takes advantage of all the RAM. My laptops are all limited to 4 gigs of RAM, but my desktop has 8 gigs. I am still using my previous FlexBuilder.ini file, which of course specifies all the RAM preferences. As far as I know (at least in my case) FlexBuilder and/or Eclipse is still only 32-bit, so they are still bound to the 32-bit limitations. Overall - I had good luck with it. Mike -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Ralf Bokelberg Sent: Monday, December 15, 2008 2:01 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FlexBuilder on 64bit machine any good? Hi guys I'm in the process of choosing a new machine to be placed under my christmas tree :). I wonder, if anybody has some experiences with 64 bit machines and FlexBuilder? Does it run at all? What is the performance like? Does it make use of lots of RAM? Cheers Ralf. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf- 1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Help! - Creating MS Access data source using ColdFusion 8 (64-Bit) w/Win2k3 (64-Bit)
Greetings All - I am currently moving my Flex Application (which uses ColdFusion as the backend) to my customer's production server - and I am coming to grips with a frightening discovery: Microsoft has decided to drop JET support, for servers running in 64-Bit mode. For some reason, this also translates to ADOBE not providing a native Access ODBC Driver in ColdFusion 8 (64-Bit Edition). I understand that there comes a time in the software business, where we must abandon older technologies in favor of new. However, there is usually some advanced notice given, in addition to backwards compatibility options for people that simply can't conform to the new ways. As a company, WE have upgraded all of OUR servers software, to the latest technologies. But that doesn't change the fact that we have CUSTOMERS that provide data to us, using virtually the only portable Database format available (an Access .MDB file). I know this is the FlexCoders list and this is largely a ColdFusion question, but I can only assume that a large number of you have been faced with this problem it makes sense to ask for help here. With that said, has anybody come across any solutions, that would allow for creating an Access data source using ColdFusion 8 running on Windows 2003 Server (in a 64-Bit environment across the board)? If a solution isn't found on this, heads will fly around here - as huge investments have been made in order to launch this Flex Application. Thank you in advance for any information that could help shed some light on this problem. Mike
RE: [flexcoders] Could the Flex Gurus shed some light on this behavior?
Actually, looking at it like that, it makes total sense. I didn't realize by setting the Source property of another control, I was stealing away a Child from another Control. Thanks for clearing that up for me :) Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Gold Sent: Wednesday, April 23, 2008 10:14 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Could the Flex Gurus shed some light on this behavior? I believe since the content is a DisplayObject, it's just falling under normal Flex parenting rules, a child can only have a single parent, so using the same content actually re-parents the content object to the new SWFLoader. If your navigation window is just a small preview of the total app, like it sounds like, you could actually create a new Bitmap from the content of your main SWFLoader and use that as a new UIComponent in your navigation window. Not sure if you'd run into effeciency problems with how often you'd have to re-copy the data, but sounds like it could work in your situation. On Wed, Apr 23, 2008 at 12:06 PM, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, For the longest time, I've been wondering why 2 Loader Controls, are unable to share the same content. Then again this may be by design, and my lack of knowledge relating to Flex could be why I don't understand this. For example, I have a SWFLoader Control which comprises the majority of my Application's desktop. It displays a loaded Map, in which users can drag icons onto the desktop, pan, zoom, as well as many other functions. I have a small navigator window that stays on top in a static position, in which the same content displayed in the SWFLoader, also gets displayed in the Navigator Control. The Navigator Control just gives the user an indication of the Map portion being displayed in the main window. In order to avoid having to load the SWF File TWICE, I thought I could set the content property of the Navigator Control, to the SWFLoader.contentLoaderInfo.content property - but when I do this, the loaded SWF disappears from the main screen, and appears in the small Navigator Window. Is this literally how things work in Flex? 2 data aware components can share the same ArrayCollection for their dataProvider Property, but 2 graphical display components, cannot share the same content? I would be grateful to hear the experts explanation on how this type of thing works within Flex. Thanks in advance for all your incredible help, Mike
[flexcoders] Could the Flex Gurus shed some light on this behavior?
Hello All, For the longest time, I've been wondering why 2 Loader Controls, are unable to share the same content. Then again this may be by design, and my lack of knowledge relating to Flex could be why I don't understand this. For example, I have a SWFLoader Control which comprises the majority of my Application's desktop. It displays a loaded Map, in which users can drag icons onto the desktop, pan, zoom, as well as many other functions. I have a small navigator window that stays on top in a static position, in which the same content displayed in the SWFLoader, also gets displayed in the Navigator Control. The Navigator Control just gives the user an indication of the Map portion being displayed in the main window. In order to avoid having to load the SWF File TWICE, I thought I could set the content property of the Navigator Control, to the SWFLoader.contentLoaderInfo.content property - but when I do this, the loaded SWF disappears from the main screen, and appears in the small Navigator Window. Is this literally how things work in Flex? 2 data aware components can share the same ArrayCollection for their dataProvider Property, but 2 graphical display components, cannot share the same content? I would be grateful to hear the experts explanation on how this type of thing works within Flex. Thanks in advance for all your incredible help, Mike
[flexcoders] Having difficulties cloning content within Loader Control
Hello All, I am attempting to clone a Vector Image contained within a Loader Control, and am having some problems. The only way I've seen this done before, is by using the Bitmap(loaderObject.content).bitmapData.clone() method, but maybe I am getting errors because it's a SWF File being loaded into the Loader, versus an actual Bitmap... If I wanted to clone the contents of a Loader, and place it into a simple mx:Image/ Control, what would be the best way to go about that? Thanks in advance for all your help, Mike
[flexcoders] Yahoo/Google Maps - Navigator Component
Hello All, I was curious if there were any examples, components, etc. which allow you to do the following: Imagine a large graphic or map taking up the entire Application Screen, and then a rectangular box (a fraction of the main graphic size) sitting in a static spot always on top, representing the image as a whole. Within this rectangular box Component, you can drag around a small rectangle which represents the present viewing area below. As the Zoom Level changes, the draggable rectangle dimensions change accordingly. For you Photoshop users, it's the Navigator Component - which lets you drag around the rectangular box within, and quickly Pan the image around in order to quickly access an area you'd like to work on (rather than having to use the scroll-bars). I believe Yahoo/Google Maps has this feature as well. Does anybody have a place for me to start, in order to learn more about how to do this, etc? Thank you all in advance for any information on this, Mike
RE: [flexcoders] Yahoo/Google Maps - Navigator Component
Greetings! Thank you for the reply. If I am properly interpreting your image, I think your example demonstrates what I am trying to do. If you have an online example, or source code outlining this functionality, I'd be very grateful to take a peek at it. Thank you in advance for all your help, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Romeo Obane Sent: Monday, April 21, 2008 7:22 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Yahoo/Google Maps - Navigator Component Hi, I made an example of this before and kindly see the attached screen shot if it's similar. On Tue, Apr 22, 2008 at 3:00 AM, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I was curious if there were any examples, components, etc. which allow you to do the following: Imagine a large graphic or map taking up the entire Application Screen, and then a rectangular box (a fraction of the main graphic size) sitting in a static spot always on top, representing the image as a whole. Within this rectangular box Component, you can drag around a small rectangle which represents the present viewing area below. As the Zoom Level changes, the draggable rectangle dimensions change accordingly. For you Photoshop users, it's the Navigator Component - which lets you drag around the rectangular box within, and quickly Pan the image around in order to quickly access an area you'd like to work on (rather than having to use the scroll-bars). I believe Yahoo/Google Maps has this feature as well. Does anybody have a place for me to start, in order to learn more about how to do this, etc? Thank you all in advance for any information on this, Mike
RE: [flexcoders] Yahoo/Google Maps - Navigator Component
Thank you sir! Right off the bat, I figured it would have to do with Image Cropping, so I feel good knowing my thought process was on the right track :) I will let you know how things work for me. Many Thanks!!! Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Romeo Obane Sent: Monday, April 21, 2008 10:07 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Yahoo/Google Maps - Navigator Component Hi, Kindly see the attached sample application, the main concept of it actually is about Image Cropping, but I believe it could somehow give you some good ideas. I'm sorry about my codes in there since this was only my quick experiment with it. Hope this helps. :) On Tue, Apr 22, 2008 at 11:02 AM, Romeo Obane [EMAIL PROTECTED] wrote: Hi, Kindly see the attached sample application, the main concept of it actually is about Image Cropping, but I believe is could somehow give you some good ideas. I'm sorry about my codes in there since this was only my quick experiment with it. Hope this helps. :) On Tue, Apr 22, 2008 at 11:30 AM, Mike Anderson [EMAIL PROTECTED] wrote: Greetings! Thank you for the reply. If I am properly interpreting your image, I think your example demonstrates what I am trying to do. If you have an online example, or source code outlining this functionality, I'd be very grateful to take a peek at it. Thank you in advance for all your help, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Romeo Obane Sent: Monday, April 21, 2008 7:22 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Yahoo/Google Maps - Navigator Component Hi, I made an example of this before and kindly see the attached screen shot if it's similar. On Tue, Apr 22, 2008 at 3:00 AM, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I was curious if there were any examples, components, etc. which allow you to do the following: Imagine a large graphic or map taking up the entire Application Screen, and then a rectangular box (a fraction of the main graphic size) sitting in a static spot always on top, representing the image as a whole. Within this rectangular box Component, you can drag around a small rectangle which represents the present viewing area below. As the Zoom Level changes, the draggable rectangle dimensions change accordingly. For you Photoshop users, it's the Navigator Component - which lets you drag around the rectangular box within, and quickly Pan the image around in order to quickly access an area you'd like to work on (rather than having to use the scroll-bars). I believe Yahoo/Google Maps has this feature as well. Does anybody have a place for me to start, in order to learn more about how to do this, etc? Thank you all in advance for any information on this, Mike
[flexcoders] Issue with ToolTips not auto sizing
Hello All, I am trying to create ToolTips, add them as Children, and apply the errorTip style to them. I have to do it this way, instead of using ToolTipManager. When using this method, the Border is extremely small, and is not aware of the Text width height. When you use ToolTipManager, you can pass the text parameter right in the constructor, which probably explains why it comes up at the proper size immediately (without having to set Width and Height manually). With that said, how can I use the errorTip Style with manually created ToolTips, and have it come up with the proper Width and Height? I am trying to avoid having to manually set the Width and Height parameters, but will be my last resort if necessary. Since you can't pass the Text property into the Constructor, are there any ideas on how to do this? Thanks in advance for any ideas, Mike
RE: [flexcoders] mx.controls.Text control not autosizing -
Thanks for the reply Alex - I think I may have used the wrong terminology in my initial question. When I said Content I was referring to Text or it's Text Property. I hope that changes things, if this question was to be re-addressed once again. I say that because why would a UIComponent need to ever handle the resizing of a Text component (in my specific situation)? The Text component should have intimate knowledge about the actual Text contained within it. And again, per the Flex Docs, if the Width and Height values are left blank, the control should size itself around it's Text. Now if I wanted the control to base it's width and height on it's parent container, than I'd completely understand where you are coming from. Like I said, I hope this changes things a little, and hope you can take a crack at this question again :) Many thanks, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Wednesday, April 16, 2008 8:43 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] mx.controls.Text control not autosizing - Children are sized by their parent, so you custom UIComponent will have to setActualSize on the Text appropriately From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Wednesday, April 16, 2008 3:21 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] mx.controls.Text control not autosizing - Hello All, I know there's been some discussion recently, regarding TextFields and having them grow automatically around their content. The TextInput and TextArea Controls must be extended in order to get this type of functionality - but what about the Text Control? It's my understanding that the Text Control will automatically size itself around it's content. In my case, I am not using the mx.controls.Text inside a MXML Component, it's being added as a Child inside of a Custom UIComponent. Per the Flex 3.0 Documentation: If you leave both the width and the height unspecified, Flex calculates them based on any explicit line breaks in the text, with no wordwrapping within lines. Is there something that I'm missing regarding this control? Thank you all in advance for any advice on this, Mike
[flexcoders] mx.controls.Text control not autosizing -
Hello All, I know there's been some discussion recently, regarding TextFields and having them grow automatically around their content. The TextInput and TextArea Controls must be extended in order to get this type of functionality - but what about the Text Control? It's my understanding that the Text Control will automatically size itself around it's content. In my case, I am not using the mx.controls.Text inside a MXML Component, it's being added as a Child inside of a Custom UIComponent. Per the Flex 3.0 Documentation: If you leave both the width and the height unspecified, Flex calculates them based on any explicit line breaks in the text, with no wordwrapping within lines. Is there something that I'm missing regarding this control? Thank you all in advance for any advice on this, Mike
[flexcoders] General list consensus using 'this' when referencing local vars
Greetings All, Whenever I study code generated by seasoned programmers (i.e. all the Adobe people supporting Flex on this list) as well as countless others on this list, I notice that some use this when referencing local variables contained within a Class. The last thing I want to do here, is start a heated discussion regarding best practices for programming. My goal on a daily basis, is to better myself as a programmer, and I want to make sure that the code I create, conforms to certain standards. Could some of you please offer your 2 Cents regarding the advantages/disadvantages of using this? Just a quick example: package { public class myClass() { private var testVar:String; public function myClass( value:String ) { this.testVar = value; // versus: testVar = value; } } } Thank you all so much in advance, for any help you can offer regarding this topic. Mike
[flexcoders] Adding Shape Objects to Canvas control
Hello All, I am trying to add my custom shape objects (which create several different shape types), to a different type of container, and I am having some difficulties. From my experience, you can directly add a Shape (flash.display.shape) as children to UIComponents, but you cannot add them to a Canvas Control. When I try to add a Shape to Canvas controls, Flex tries to cast the Object as a UIComponent. My question is, how can I convert my custom shape objects, so that they can be added to Canvas controls? Do I need to wrap my objects into a different type of component (UIComponent). The reason I like Shapes, is because they are so lightweight - but if there is a better way, I'd be very interested in hearing about it. Thank you in advance for all your help on this. Mike
[flexcoders] When can I access the Stage Object?
Hello All, In my main mx:Application I am attempting to add an Event Listener to the Stage Object, after the CreationComplete Event is triggered. Upon application startup, I get that wonderful error dialog stating: Cannot access a property or method of a null object reference. I want to play around with some validate() stuff, in order to speed up my Flex Resizing issues. This is what I have for my code: private function onApplication_CreationComplete( event:FlexEvent ):void { stage.addEventListener( Event.RESIZE, onStage_Resize ); } private function onStage_Resize( event:Event ):void { this.validateNow(); } So the question is, is the Stage Object not yet available? Do I need to place this Event Listener on a Child Object contained within my Application? Any thoughts on this would be greatly appreciated :) Mike
RE: [flexcoders] When can I access the Stage Object?
Excellent - thanks all of you - Your help is most appreciated, Mike -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Friday, April 04, 2008 1:28 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] When can I access the Stage Object? You have instant access to it via systemManager.stage -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Friday, April 04, 2008 11:24 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] When can I access the Stage Object? Application.applicationComplete http://livedocs.adobe.com/flex/2/langref/mx/core/Application.html#eventS ummary Fires right after creationComplete, but the stage property will be available. - Original Message - From: Mike Anderson [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, April 04, 2008 8:13 PM Subject: [flexcoders] When can I access the Stage Object? Hello All, In my main mx:Application I am attempting to add an Event Listener to the Stage Object, after the CreationComplete Event is triggered. Upon application startup, I get that wonderful error dialog stating: Cannot access a property or method of a null object reference. I want to play around with some validate() stuff, in order to speed up my Flex Resizing issues. This is what I have for my code: private function onApplication_CreationComplete( event:FlexEvent ):void { stage.addEventListener( Event.RESIZE, onStage_Resize ); } private function onStage_Resize( event:Event ):void { this.validateNow(); } So the question is, is the Stage Object not yet available? Do I need to place this Event Listener on a Child Object contained within my Application? Any thoughts on this would be greatly appreciated :) Mike -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
RE: [flexcoders] Question on calling multiple Functions in sequence
Thank you Rick - I will take a peek at this, and see if I can integrate this into my app. Again, thank you everybody else - I appreciate it :) Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rick Winscot Sent: Thursday, April 03, 2008 2:55 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Question on calling multiple Functions in sequence You could create an 'event chain' to prevent collisions... I've attached a sample for reference. Rick Winscot From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Wednesday, April 02, 2008 7:54 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question on calling multiple Functions in sequence Hello All, I was wondering how things work, when calling multiple functions in sequence. For example, in this function: private function doThisFunction():void { myFunctionOne(); myFunctionTwo(); myFunctionThree(); } When I execute doThisFunction, does it literally run the 3 functions one-two-three, or does it execute the first function, waits for it to finish, then runs the second function, waits for it to finish, then finally runs the third function. How could doThisFunction possibly know when myFunctionOne even finishes? My end goal, is to create a way for a function (containing more functions within) to stop and wait for each function to run complete, before executing the next one. I know Events are used quite often when things must happen in a sequence, but when it comes to things like Scaling or Sizing a Component, how could I possibly know when something like that finishes? Thanks in advance for any advice you can all throw my way :) Mike
[flexcoders] Question on calling multiple Functions in sequence
Hello All, I was wondering how things work, when calling multiple functions in sequence. For example, in this function: private function doThisFunction():void { myFunctionOne(); myFunctionTwo(); myFunctionThree(); } When I execute doThisFunction, does it literally run the 3 functions one-two-three, or does it execute the first function, waits for it to finish, then runs the second function, waits for it to finish, then finally runs the third function. How could doThisFunction possibly know when myFunctionOne even finishes? My end goal, is to create a way for a function (containing more functions within) to stop and wait for each function to run complete, before executing the next one. I know Events are used quite often when things must happen in a sequence, but when it comes to things like Scaling or Sizing a Component, how could I possibly know when something like that finishes? Thanks in advance for any advice you can all throw my way :) Mike
[flexcoders] PrintJob Class driving me crazy!! - Please Help
Hello All, I have 4-5 Move/Scale functions that must place, the moment the PrintJob.start() command is given. The problem is, these functions are still modifying the Objects to be printed (scaling and moving), while the PrintJob is sending everything to the printer. I tried every which way, to modify all these Objects residing on the page being printed, before calling start(), but all my functions rely on information not available until the PrintJob.start() method gets called (like Page Size and Margin Size). I feed the Page Size into a function that properly scales the page (and specific Objects which reside on that page) being added to the PrintJob. If I use too many callLater functions once the PrintJob.start() method gets called (in hopes of the delay giving the scaling functions a chance to finish), it errors out since the page never gets spooled. How is everybody else dealing with this issue of being forced to call start() in order to gain access to the Page Size information, and hope that their functions all finish in time, by the time the page gets spooled to the printer? Thanks in advance for all your help on this, Mike
RE: [flexcoders] Question on calling multiple Functions in sequence
Thank you Tracy and Eric - this DOES help me a lot - But I need to ask, what facilities are built into the FlashPlayer, that guarantees that Function2 doesn't run until Function1 not only executes, but actually FINISHES? Doing computations is one thing, but when you are doing scaling functions, or anything else that really doesn't provide any feedback one way or another when it's actually finished (scaling an object in this case), how can the containing function really KNOW? I know these may be novice questions, but these types of issues have been nagging me for a long time. The more I can understand what's really going on under the hood, the more effective of a programmer I can be. Thank you again for all your comments - please keep them coming :) Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cancil Sent: Wednesday, April 02, 2008 6:34 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Question on calling multiple Functions in sequence When dealing with things inside the flash player - you need to deal with it as if it was single threaded - because generally, it is. In your example, the functions would be called in order, one after another...not all at the same time as you may think so lets say you had an example like this var myNumber:Number = 0; private function doThisFunction():void{ myFunction1(); myFunction2(); myFunction3(); } if function 1 added 10 to myNumber, function 2 multiplied it by 5, and function 3 subtracted 12 - it would happen in that order exactly - and you can count on that - so your final result would be 38 hope this helps eric On Wed, Apr 2, 2008 at 7:54 PM, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I was wondering how things work, when calling multiple functions in sequence. For example, in this function: private function doThisFunction():void { myFunctionOne(); myFunctionTwo(); myFunctionThree(); } When I execute doThisFunction, does it literally run the 3 functions one-two-three, or does it execute the first function, waits for it to finish, then runs the second function, waits for it to finish, then finally runs the third function. How could doThisFunction possibly know when myFunctionOne even finishes? My end goal, is to create a way for a function (containing more functions within) to stop and wait for each function to run complete, before executing the next one. I know Events are used quite often when things must happen in a sequence, but when it comes to things like Scaling or Sizing a Component, how could I possibly know when something like that finishes? Thanks in advance for any advice you can all throw my way :) Mike
RE: [flexcoders] Question on calling multiple Functions in sequence
See, THAT is what I am talking about - regarding the UI still rendering, while the PrintJob is being sent to the printer. This where I am running into problems - I have an idea on how to get around this - but I need to know which Event to listen for, that directly relates to the Object I am scaling. If I know which Event to listen for, I can set a local flag to 'True' - and if a certain Event fires, with the variable being 'True', then I can dispatch a custom Event, which my Printer Dialog Window listens for. The Custom Component that I am modifying just before the PrintJob runs, extends the UIComponent. I am going to take a wild guess and say that I should listen for the UpdateComplete Event - as that should get triggered if I perform a Resize correct? Thanks for your ideas - Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Wednesday, April 02, 2008 8:54 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Question on calling multiple Functions in sequence Unless you are doing something that is explicitly asynchronous, the single threaded nature of AS processing is reliable. The main function does not know in any sense, but the execution path is linear. Processing simply does not return to the main function until the called function(s) is/are complete. This does not necessarily mean that the UI is done rendering. That stuff is controlled bu the invalidation system. But code processing is linear. If your wife sends you shopping, she has no idea whether you went to the bar while you were gone, but, assuming you have no bugs (or delegate the shopping to someone else), when you return, the shopping is done. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Wednesday, April 02, 2008 10:28 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Question on calling multiple Functions in sequence Thank you Tracy and Eric - this DOES help me a lot - But I need to ask, what facilities are built into the FlashPlayer, that guarantees that Function2 doesn't run until Function1 not only executes, but actually FINISHES? Doing computations is one thing, but when you are doing scaling functions, or anything else that really doesn't provide any feedback one way or another when it's actually finished (scaling an object in this case), how can the containing function really KNOW? I know these may be novice questions, but these types of issues have been nagging me for a long time. The more I can understand what's really going on under the hood, the more effective of a programmer I can be. Thank you again for all your comments - please keep them coming :) Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Eric Cancil Sent: Wednesday, April 02, 2008 6:34 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Question on calling multiple Functions in sequence When dealing with things inside the flash player - you need to deal with it as if it was single threaded - because generally, it is. In your example, the functions would be called in order, one after another...not all at the same time as you may think so lets say you had an example like this var myNumber:Number = 0; private function doThisFunction():void{ myFunction1(); myFunction2(); myFunction3(); } if function 1 added 10 to myNumber, function 2 multiplied it by 5, and function 3 subtracted 12 - it would happen in that order exactly - and you can count on that - so your final result would be 38 hope this helps eric On Wed, Apr 2, 2008 at 7:54 PM, Mike Anderson [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello All, I was wondering how things work, when calling multiple functions in sequence. For example, in this function: private function doThisFunction():void { myFunctionOne(); myFunctionTwo(); myFunctionThree(); } When I execute doThisFunction, does it literally run the 3 functions one-two-three, or does it execute the first function, waits for it to finish, then runs the second function, waits for it to finish, then finally runs the third function. How could doThisFunction possibly know when myFunctionOne even finishes? My end goal, is to create a way for a function (containing more functions within) to stop and wait for each function to run complete, before executing the next one. I know Events are used quite often when things must happen in a sequence, but when it comes to things like Scaling or Sizing a Component, how could I possibly know when something like that finishes? Thanks in advance for any advice you can all throw my way :) Mike
[flexcoders] Component intercepting an event, preventing another control to receive it...
Hello All, I have a floating control, which contains a TextArea. This floating control, is a Child of my main Custom Control - which serves as the root interface for the entire application. On my main Custom Control, I have a MouseWheel event listener/function setup, which handles the scaling of all the content contained within that control. Overall, it works beautifully, but if the mouse cursor happens to be over a TextArea when the user Scrolls the MouseWheel, the Scaling Function attached to the MouseWheel event never triggers. Obviously, the TextArea Control has built-in listeners for MouseEvents - specifically for the MouseWheel, so that the Text can scroll when the user scrolls the MouseWheel. Even when the floating control is Disabled (which I thought disabled all it's children), the MouseWheel Events STILL don't trigger my Scaling Function. I looked at the default behavior of Mouse Events, and Bubbling is true by default. I'm not sure if this issue pertains to Event Bubbling or not, but I am really stuck right now, and could use some help - If any of you could throw some ideas my way, I'd be very appreciative. Thanks in advance, Mike
[flexcoders] Making dragProxyImage snap to mouse cursor when performing doDrag()
Hello All, I have an Icon Bar where users can drag Icons from a floating bar, and create duplicates on the map below. I have my image icons setup in such a way, where they all have an arrow on the upper left-hand corner, which visually indicates to the user, the 0,0 point. The problem I am having, is when the user starts dragging the icon, it starts dragging the icon immediately without any relation to the mouse cursor and it's related dragProxyImage. When the icon gets dropped onto the map, it gets offset - by the same amount of distance, as the mouse cursor distance from the registration point of the dragProxy Image. This could all be alleviated, if I could just force the dragProxyImage to snap it's 0,0 registration point, to the tip of the mouse cursor. This way, the Icon will appear on the map, precisely where the user wants to put it. Does anybody have any suggestions as to how I could accomplish something like this? Thanks in advance for all your help. Mike
[flexcoders] ContextMenu events NOT firing when mouse over certain components
Hello All, I have a Lake Map Application that I am converting from Flash to Flex, and am having some serious issues when it comes to Context Menus. I have a Box Container, which holds a custom MapViewer Component (based on the UIComponent), in addition to a background Canvas (which provides the ability to change the Lake Map's underlying background color). Keeping in mind that maps have an irregular shape - and are not perfect square in nature, as long as the Mouse Cursor is NOT over any Map Shapes, the Functions will trigger. On the other side of the coin, if the Mouse Cursor IS on top of anything Map Related, absolutely nothing happens. No matter where the Mouse Cursor is within the Box Container, the appropriate Context Menu DOES pop up. For the life of me, I can't figure out why my functions are not getting triggered whenever the mouse is over the Map Portions. If anybody could please provide any hints as to why this is happening, I would be absolutely grateful. Thank You in advance for your help, and have a wonderful Christmas :) Mike
RE: [flexcoders] how to pass varible between screens?
No matter WHERE you are in your application, you can traverse the tree by accessing: Application.application.control1. Application.application.control2. etc. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markflex2007 Sent: Friday, December 21, 2007 11:09 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] how to pass varible between screens? Hi, I have some screens under ViewStack like this mx:ViewStack view:Form1View / view:Form2View / view:Form3View / view:ThankyouView / /mx:ViewStack I have a variable in Form1View but how I can get the variable in Form2View. backend language have session variables,I am not sure if Flex also have the same function like session variable. Please help me out.Thanks Thanks Mark -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Help with Printing (relates to Scaling Object, just before sending printjob)
Greetings All! I have a major problem, where I have a function that properly scales an Object *just* before sending it to the printer. The issue is, the Object isn't scaling fast enough, so by the time it gets added to the PrintJob, it still isn't the proper scale - and looks completely wrong on the actual printout. Initially, I figured I could simply scale the Object first (in an entirely different function), then create some intentional pauses in the code (or use callLater in the right places), THEN run my PrintJob function code. BUT, my scaling functions rely on information brought back from the PrintJob - like PageWidth and PageHeight - which means, my Scaling Function must be called from within my PrintJob function. Bottom line, is that everything is happening too quickly, for the PrintJob to capture the properly scaled object. Is there a way for me to insert some intentional pauses, to slow things down, and give the object to be printed, time to properly scale, before getting sent to the PrintJob? Thank you in advance, for any help you can offer. Mike
[flexcoders] Controlling MenuBar Submenus via Code frustrations
Greetings All, I've burned an entire DAY searching the web for examples of how to control sub-menus in a MenuBar control, via code. The main types of things I need to accomplish, is toggling Checkboxes and Radio Buttons, when certain application variables change. My MenuBar has 6 primary menus across the top, and each primary menu, could have any number of additional sub-menus (which have several variations of menu types - Checkboxes, Radio Buttons, etc.) My MenuBar is being populated via an external XML File. Per the docs, each top level menu is considered a 'MenuBarItem', but there is very little helpful information after that. All the help docs focus primarily on listening for MenuBar events and writing functions to respond - but there is NOTHING on how to do the reverse. I consider myself to be a fairly seasoned Flex Programmer, but this MenuBar stuff has got me stumped, and quite frustrated. If anybody has any examples on this topic, I would be VERY grateful. Thanks in advance for any help, Mike
[flexcoders] Getting ColdFusion 7 or 8 to work on Vista?
Hello All, I was wondering if there is any magic, getting ColdFusion 7 or 8 to install correctly on Windows Vista. I am running the 64-bit version, but I don't know if that would affect things or not. The application itself installs just fine, but whenever I try to run the WebServer Connector utility, it doesn't even recognize any IIS Websites being available. With that said, I thought I'd try to install the jrun.dll references manually, but the Vista version of IIS is a TOTALLY new animal, and am not sure where I need to go to make the file extension references (.cfm, .cfc, etc.) Thanks in advance for any information you can throw my way. Mike
[flexcoders] Having compiler ignore certain warnings (at least temporarily)
Hello All, I have a 3rd Party control that is causing some Warning messages to be constantly displayed in my Problems Window. Since they are just Warnings versus Errors, it doesn't adversely affect my application - but I am getting tired of looking at the Warnings all the time. They are just Warnings relating to DataBinding not detecting assignments... When I get some time, I will dissect this particular control, and see if I can engineer a better way to handle these particular variables. Thanks so much for any advice you can throw my way, Mike
RE: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted -
Okay, that helps explain things a tad - If this was yourself in this predicament, how would you go about handling this problem? I am just curious how I can force a Garbage Collection to take place, in order to remove this component from memory (and more important, to make it stop responding to my model changes - as this is happening on a very regular basis) Also, what would be the proper way to create a weak reference to my ApplicationModel, so that the corresponding resources get released, whenever the TitleWindow container gets blown away? Thanks in advance for your help - this is a topic that I've been needing to dive into for quite some time, and this would be a perfect opportunity to address everything. Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Monday, June 04, 2007 12:29 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted - You can't really blow things away in AS3 (or Java). You kill all references to them and they go away when garbage collected. If you are listening to the app model, it means the app model has a reference to the event listener and thus it won't go away. Use weak references or clean up when removed from the display list. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Sunday, June 03, 2007 11:32 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted - Hello All, I have a WEIRD problem, and I am hoping you can all shed some light on this. I have a Popup TitleWindow which serves the purpose of displaying details from a Master Grid. Among all the other controls housed within the TitleWindow, I am using the ObserveValue Component, which monitors a Boolean Value residing in my ApplicationModel. Once the user is finished looking at the Details, they must close the Window. I am using the PopUpManager.removePopUp() method of closing the TitleWindow, which should in essence, blow away the TitleWindow itself, in addition to all the Controls that reside within it. Even know the TitleWindow gets closed, I am still getting Trace Messages outputted to my custom Debug Window (which demonstrates the fact, that my ObserveValue Component is still active functioning). A quick note, I am tracing the output so that I can monitor my variables during development of my app. How is this possible?? I must get to the bottom of this ASAP, as this is causing some problems with the rest of my application. Thanks in advance for any help you can throw my way. Mike
[flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted -
Hello All, I have a WEIRD problem, and I am hoping you can all shed some light on this. I have a Popup TitleWindow which serves the purpose of displaying details from a Master Grid. Among all the other controls housed within the TitleWindow, I am using the ObserveValue Component, which monitors a Boolean Value residing in my ApplicationModel. Once the user is finished looking at the Details, they must close the Window. I am using the PopUpManager.removePopUp() method of closing the TitleWindow, which should in essence, blow away the TitleWindow itself, in addition to all the Controls that reside within it. Even know the TitleWindow gets closed, I am still getting Trace Messages outputted to my custom Debug Window (which demonstrates the fact, that my ObserveValue Component is still active functioning). A quick note, I am tracing the output so that I can monitor my variables during development of my app. How is this possible?? I must get to the bottom of this ASAP, as this is causing some problems with the rest of my application. Thanks in advance for any help you can throw my way. Mike
[flexcoders] Can I use AS3 Classes written for Flex, directly within Flash CS3?
Hello All, I plan on using the Flash Component Kit to generate a .SWC file for use within my Flex Application. There are some tweening classes I presently use within Flex, that I would love to use inside of my Flash CS3 Application. Since the generated Flash binary will be referenced in a Flex Application, I was wondering if I could simply put my Flex Custom Classes Directory into my Flash CS3 ClassPath - and enjoy the benefits of using these tweening classes that I've come to depend on. Thanks in advance for all your help, Mike
[flexcoders] Anyone using the VSS plug-in - I have an important question for you
Hello there, I am desperately trying to find out who on this list is using the org.vss plug-in - which allows you to hook your Flex Source Code into Microsoft's Visual Source Safe database. After installing the Flex Component for Flash CS3, the plug-in no longer wants to load. I tried looking through the error logs, but I am not finding much. Has anybody else seen this problem? Thanks in advance, Mike
[flexcoders] How can I deselect ALL buttons on a ToggleButtonBar?
Hello All, I am trying to figure out a way, to deselect all the Buttons belonging to a ToggleButtonBar Control, and I am hitting a brick wall. I tried looping through the DataProvider using getChildAt(x) and setting each 'Button.selected' equal to 'false' - but all that does, is removes the dark border surrounding the presently selected Button. Technically the button is still selected, and it's all the more obvious in my case, since I have a lot of styles applied to the selected Button. I even tried setting the selectedIndex to '-1' as well as 'null' - in hopes of putting the ToggleButtonBar back into it's first time loaded state, and still nothing works. Could anybody help? Thanks in advance, Mike
[flexcoders] Help! - certain portions of text disappear when printing from Flex App
Hello All, this is one of the most frustrating problems I think I ever had to deal with... Instead of creating an invisible container which properly lays out all my printable elements, I went and created a WYSIWYG mock-up of the final elements to be printed. This way, once the user is satisfied with what he/she sees on the screen, they can be confident that this will be what comes out on the printer. For ease of use, I placed my PrintControl inside of a drag able sizeable TitleWindow - so the user can Pan and Zoom the content around. With that said, I am experiencing some issues with my Text disappearing - specifically at certain Zoom Levels. And it's ALWAYS the last Word in a Sentence. I am not sure why this is happening, and why it only happens at certain Zoom Levels, but it's becoming increasingly frustrating for me and my users. Quick FYI, I am using the mx:Text/ control to display my text. I am considering using a different control, and rendering it all as HTML - so I don't have to create all these unique Styles, due to the text being so different in so many places. Just in case my problems had to do with Fonts, and any related issues that go along with Fonts, I went ahead and embedded all my Fonts as well as turning on the FlashType option. I have my Anti-Aliasing settings set to maximum, and I tried both Pixel and Sub-Pixel settings in hopes of that having a positive effect. In addition to this, I tried playing with all the FlexPrintJobScaleType settings in case that was messing with my text. Still, I get sporadic results - as well as getting different results on *different computers*. Could somebody please offer any words of wisdom as to why this may be happening? Thank you in advance for any help you can offer, Mike
[flexcoders] PNG transparencies no longer work, when printing as Vector
Hello All, When sending my FlexPrintJobs to the printer as a Vector (printAsBitmap=false), any thing that was previously transparent on the image shows up as Black on the printout. This sort of defeats the purpose of Alpha Channels don't ya think?? Although sending the PrintJob as a Bitmap fixes the transparency issues, it degrades the output quality so badly, that printing as a Bitmap no longer has any use to me. Does anybody have any suggestions on how I can address this issue? Thanks in advance for any help offered. Mike
[flexcoders] Questions regarding printAsBitmap - true v.s. false
Hello All, This printer setting seems obvious enough, and have played with the settings pretty extensively - in order to compare my printer outputs side-by-side. The document in particular that I am trying to print, is primarily made up of high-res images, and then in the middle of all that, a DataGrid Control populated with 140 Rows. Now if I try to print the document as Vector, I lose all of my Drop Shadows - and the .png transparency no longer works. Wherever there is a Zero Alpha area on the .png, it shows up as Black on the printout. Furthermore, if I try to print the document as Bitmap, I get my Drop Shadows back as well as the transparencies, BUT the TEXT within the DataGrid is no longer all the sharp crisp. It's not bad, but it's absolutely beautiful when I print it all as Vector. Also, the Images too - are not as sharp as they were when printing as Vector. In fact, the document overall, loses a bit of quality, whenever I send it as a Bitmap. Could somebody shed some light on this topic, and indicate if there is a way for me to either get my .png transparencies to work when sending as a Vector, OR how to get my Fonts to be sharper, when sending as a Bitmap. Thanks in advance for your help, Mike
[flexcoders] Copying/Pasting from MS Word to a Rich Text Editor inside a Flex App
Hello All, Has there been any more headway made, regarding copying and pasting from a Word Document to a RTE within a Flex Application, and have the ability for the Flex App to decode all the MS Word Control Codes on the fly (and finally, having the document show up almost identical in the RTE). I know there are lots of different ways to render text - HTML, Rich Text Control Codes, and then the bulky MS Word Control Codes... This has been the biggest challenge I think, without having some other active control sitting in the middle, which handles all the decoding. I think with Apollo, this will be much more realistic, since it has more direct access to the local PC's system resources, and can potentially use automation. Could anybody please chime in on this thread, and indicate if there are any new solutions out there? Thanks in advance for all your help, Mike
[flexcoders] Question on Ely's SuperImage Component
Hello All, I know there are lots of people using this, so I wanted to ask if this component can perform some functions that the standard Image Component can do. With the standard Flex Image Component, I can move the Content around inside the container, independent of the container itself. I do this quite often, if I have an Image that is quite large - and has a lot of extraneous background stuff that I don't want to be displayed. With the Flex Image, I size place the container where I need it to be - then I move scale the Content around within the container - in order to show only the parts that I want. The SuperImage Component doesn't have a Content Property - so this leads me to believe, that I can't perform the same functions as the Image. Is this the right assumption to make? If so, does anybody have any further ideas, on how I can get more control over the content when using the SuperImage? Thanks in advance, for any information offered on this topic. Mike
RE: [flexcoders] Question on Ely's SuperImage Component
Thanks Ely! My thoughts exactly :) I just wanted to ask you first, before investing time into an alternate solution. That xOffset and yOffset would be a pretty cool addition to your future versions of SuperImage. Either way, you did a WONDERFUL job on this component. Just adding the Border and DropShadow properties, you increased the value of SuperImage versus the standard Image Component, by 10-fold... Thank you for sharing this component with the community, as well as everything else you've put out there. You are a very good programmer - I can tell just by examining your source-code - it's well thought out, clean, easy to read and most important, quite functional. Take care and thank you :) Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ely Greenfield Sent: Thursday, April 26, 2007 10:50 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Question on Ely's SuperImage Component Hi Mike. There is a _content property in the SuperImage, which is essentially the same as the Image.content property. However, the SuperImage actively maintains the size and position of the content, so I don't think you can guarantee that changes you make to its position will stick. So, two options: 1) Grab the source, and make the modifications you need. An 'offset' might be a nice property to add, and something we could integrate back into the main source. 2) Wrap the Super Image in a Canvas. And move the SUperImage around inside the canvas instead. Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Thursday, April 26, 2007 10:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question on Ely's SuperImage Component Hello All, I know there are lots of people using this, so I wanted to ask if this component can perform some functions that the standard Image Component can do. With the standard Flex Image Component, I can move the Content around inside the container, independent of the container itself. I do this quite often, if I have an Image that is quite large - and has a lot of extraneous background stuff that I don't want to be displayed. With the Flex Image, I size place the container where I need it to be - then I move scale the Content around within the container - in order to show only the parts that I want. The SuperImage Component doesn't have a Content Property - so this leads me to believe, that I can't perform the same functions as the Image. Is this the right assumption to make? If so, does anybody have any further ideas, on how I can get more control over the content when using the SuperImage? Thanks in advance, for any information offered on this topic. Mike
[flexcoders] Confused on attaining specific effect using the Blur Component
Hello All, From what I can tell, no matter what settings I change on the Blur Component, the Images that I apply the filter to, end up having the entire thing getting blurred out. This is not what I need to happen. I am looking for a nice soft edge, around the entire border of the image - also known as a Gaussian Blur. It's a popular effect to use inside of Photoshop, and it does wonders on Images where you want the edges of the Image, to slowly melt into the main background. Does anybody know how to create the proper filter, so that I can specify only the edges of the Image, get the effect applied to them? Thanks in advance for any help you all can offer. Mike
[flexcoders] Confusion on Image Component
Hello All, I have an Image Component, which holds an image that is quite large - and I only want a certain region of the image to be shown. What I was hoping to do, is set the Width and Height settings of the Image Component itself, and then set the ScaleX, ScaleY, X and Y Properties of the content. I was assuming that the Image Holder would Clip the Content, since Adobe made available to the Developer, Properties for the Image Control itself, in addition to Properties for the content in which the Control houses. Am I wrong in this thinking? In order to achieve my goals of showing only certain areas of the Image to be displayed, will I be forced to put each of my Images into a Box container? Or some other type of container, that allows for the Content to be Clipped, if the content's size exceeds the constraints of it's parent container? Thank you in advance, for any information offered on this topic. Mike
[flexcoders] Need advice on which Method to Override inside DataGrid...
Hello All, I have a DataGrid in which I can only allow the user to edit ONE Row at a time, until they save the Data. Right now, I am using a Right-Click ContextMenu - so when they hover over a specific record on the DataGrid, they can select the Edit menu option, and they can then edit those Cells. What I need to happen at this point, is lock out any other Rows on the DataGrid, until the user either Saves the changes, or hit a Cancel Button. So my question is this: In my extended DataGrid, which Method must I Override, in order to ignore any other Mouse Clicks or Row Selections, until the User Saves or Cancels out of the Edit Mode? I already understand how to use the itemEditBegin and itemEditEnd Events, in order to pass along Row and Column information. But I am not sure how to modify the actual functionality of the DataGrid, as it relates to Clicking on other Rows (while another Row is presently in Edit Mode) and have the Grid do absolutely nothing visually, until certain criteria's are met. I'd be eternally grateful for any information you could throw my way, as I've been wrestling with this problem for many weeks now. Thank you in advance :) Mike
[flexcoders] HTTP Status Codes available as a Text File, or CSV?
Hello All, My application is going to make extensive use of a particular Class File, that relies heavily on HTTP Status Codes for error reporting. From what I can gather, there is a whole slew of error codes that could possibly pop up. What I would love to find, is a Text or Comma Delimited File that somebody has made available for download, that I could pull into my Flex Application (as a Hash Map). It would hopefully show the Numeric error Codes, and their associated Text Descriptions. Thank you in advance, for anything you can throw my way :) Mike
[flexcoders] Reverting back to an older version of Plug-in inside FlexBuilder?
Hello All, Ever since I updated the ColdFusion FlexBuilder extensions 3 days ago, FlexBuilder crashes periodically. VERY irritating. Anyway, what would be the quickest way to revert back to the previous version of the Plug-in? Thanks in advance for your help, Mike
[flexcoders] Is there a Gaussian Blur filter bundled within FlexBuilder?
Hello All, I am looking for an effect that I can apply to a loaded Image, which creates a feathered effect around the entire border of the image. The technical term for this effect is called a Gaussian Blur. It just creates a nice soft transition for the images border, to a Zero Alpha - having the faded portion of the border take on any color that resides just below it. Does anybody recall something like this? Or possibly a 3rd party component, that can create this effect? Thank you in advance for any information offered. Mike
RE: [flexcoders] Is there a Gaussian Blur filter bundled within FlexBuilder?
Oops - please forgive me for this post - I knew Flash had this filter, but it slipped my mind, that we can access all the flash.* packages from within Flex - I just found what I was looking for :) Thanks again for all your previous help, and sorry again! -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Monday, April 02, 2007 9:57 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Is there a Gaussian Blur filter bundled within FlexBuilder? Hello All, I am looking for an effect that I can apply to a loaded Image, which creates a feathered effect around the entire border of the image. The technical term for this effect is called a Gaussian Blur. It just creates a nice soft transition for the images border, to a Zero Alpha - having the faded portion of the border take on any color that resides just below it. Does anybody recall something like this? Or possibly a 3rd party component, that can create this effect? Thank you in advance for any information offered. Mike -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] DataGrid header question - need help on Styles
Hello All, Is there a style available, that would virtually eliminate the dividing line between each Column Header? Just imagine a multi-column DataGrid, but having just ONE huge rectangle which spans the length of the entire Grid encapsulating the Headers. You can do this on the DataGrid itself, by turning off the Vertical Gridlines - and this is the same look I am trying to attain for the Headers. Thanks in advance, for any information you can throw my way. Mike
[flexcoders] How to DataBind to DateField when Null Values come into play??
Hello All, What is the proper way to bind Data to a DateField? I ask this, because I get an error when I bind a Variable contained within a ValueObject (which contains a Null Value), to a DateField Control. Is it safe to say, that this DateField doesn't act like a TextField? Do I require a regular Variable cast as a Date to serve as a go-between, when transferring the ValueObject data to the DateField? I hope I am properly asking this question :) Thanks in advance for your help, Mike
RE: [flexcoders] Anybody experience Child Objects, exceeding the bounds of it's Parent Container?
This hasn't happened to anybody else, ever??? -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Thursday, March 08, 2007 11:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Anybody experience Child Objects, exceeding the bounds of it's Parent Container? Hello All, I posted about this a couple days ago, with no response whatsoever. Let me simplify the post, and ask once again: Has anybody had a Child Object (in my case, an external SWF 2200x2000 in size), spilling over beyond the extents of it's Parent Container (in this case, a TitleWindow)? Actually, here is the hierarchy of the Controls: TitleWindow Canvas UIComponent (with embedded SWF) I have a TitleWindow, with draggable content that sits within - this content is a Vector Lake Map, in which the user can Pan Zoom. The whole point of this, is that the Window can be moved to a place on the desktop, where it doesn't overlap any other content - but can remain open, as a reference to the user. This doesn't happen all the time, but at certain Zoom Levels. Instead of the Title Window cutting off the Map in the Lower Right-Hand corner (which is the normal behavior of any container), it allows the remainder of the Map to show - thus taking up the remaining lower-right extent of the Application Window. If I manually resize the TitleWindow, it immediately triggers the Content to be clipped - and everything looks fine. Once again, the Map ONLY spills over, from 0,0 of the Title Window and down to the Right. It's as if the TitleWindow isn't aware that the Content is larger than it's own size, and forgets to Clip everything starting at the lower Right-Hand corner, and beyond. Is there anything I can do, to prevent this from happening? Thanks in advance for any help or advice offered. Mike Yahoo! Groups Sponsor ~-- See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/0It09A/bOaOAA/yQLSAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Anybody experience Child Objects, exceeding the bounds of it's Parent Container?
Hello All, I posted about this a couple days ago, with no response whatsoever. Let me simplify the post, and ask once again: Has anybody had a Child Object (in my case, an external SWF 2200x2000 in size), spilling over beyond the extents of it's Parent Container (in this case, a TitleWindow)? Actually, here is the hierarchy of the Controls: TitleWindow Canvas UIComponent (with embedded SWF) I have a TitleWindow, with draggable content that sits within - this content is a Vector Lake Map, in which the user can Pan Zoom. The whole point of this, is that the Window can be moved to a place on the desktop, where it doesn't overlap any other content - but can remain open, as a reference to the user. This doesn't happen all the time, but at certain Zoom Levels. Instead of the Title Window cutting off the Map in the Lower Right-Hand corner (which is the normal behavior of any container), it allows the remainder of the Map to show - thus taking up the remaining lower-right extent of the Application Window. If I manually resize the TitleWindow, it immediately triggers the Content to be clipped - and everything looks fine. Once again, the Map ONLY spills over, from 0,0 of the Title Window and down to the Right. It's as if the TitleWindow isn't aware that the Content is larger than it's own size, and forgets to Clip everything starting at the lower Right-Hand corner, and beyond. Is there anything I can do, to prevent this from happening? Thanks in advance for any help or advice offered. Mike
[flexcoders] Problem with Content spilling over beyond it's container's bounds
Hello All, I have an irritating problem with a draggable TitleWindow, that houses a UIComponent w/embedded SWF. My Custom Class extending a UIComponent embeds an external SWF File, which gives me the ability to wrap it with code. This way I can control the SWF and all the MovieClips it contains, programmatically. Basically, upon the initial Load of the UIComponent, it exceeds the size of the TitleWindow - and instead of the TitleWindow Container masking off the extents of the UIComponent, it literally lets the entire SWF File show through. Now if I trigger a Resize Event by actually sizing the TitleWindow (I have code in place, that allows the user to resize the window), THEN the TitleWindow immediately clips the Content properly. The UIComponent can be controlled by the User, via a Slider Control (which controls the Zoom Level), and the user can also pan the Component around via startDrag() and stopDrag(). Because of all this potential interaction, it's imperative that the Content's Parent Container, properly clips the parts that should not be showing. So with all that said, is there anything I can do differently, to ensure that the TitleWindow always clips the Children that it houses? Thanks in advance for your help, Mike
RE: [flexcoders] Can't we access MovieClips contained in embedded SWF's?
Hello Scott (in particular) :) You mentioned a Proxy - what you do mean by this exactly? Is this supposed to be some custom class that I write? If so, what is supposed to be contained within it? I did read up on the Document Object, and I am now doing my Flash 9 FLA files with a custom Document Class, representing the Root Timeline. I am pretty sure I did it right, since I am getting no compile errors. But my question is, is the AS3 Class File I used for the Document Object, strictly used for the FLA file? Or is this also used inside of Flex Builder, after I bring the external SWF file in? This is where I am getting a little confused. All the articles I find on this topic, covers the Flash side of things - and they never take that next step, and tell you how to reference it inside of Flex. If you have anything else on this topic, I'd really be grateful for your help. Thanks, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of slangeberg Sent: Wednesday, February 14, 2007 10:53 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? If you are using Flash 9, you can use a document class (I believe) at the root level and have Flex reference it by that. Your document class would set up an API, so you don't have to peer into the movie itself. Basically a proxy. Sorry I don't have the implementation in front of me, but I believe it's possible. So, if previous code was correct, could do something like: var platProxy:YourProxy = platObject.getChildByName('instancename') as YourProxy platProxy.hideAll(); platProxy.showByID( {id:'plat_xxx'} ); Just an idea! -Scott On 2/14/07, Mike Anderson [EMAIL PROTECTED] wrote: Oh man, you are kidding me! See, this particular SWF is a Plat Overview of a subdivision - and there are 140 Lots, each individually defined as a unique MovieClip. So, if I need access to each MovieClip programmatically, I will have to define 140 variables? Now that would be a bummer :-( Could you clarify on that? Thank you for the information nevertheless - I was actually going to try the getChild method next, so that saves me some time. Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks Sent: Wednesday, February 14, 2007 10:18 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? You need to get the object as a display object var xxx:MovieClip = platObject.getChildByName('instancename') as MovieClip Matt On 14 Feb 2007, at 16:13, Mike Anderson wrote: Hello all, I have a Flash Player 9, AS3 version of a SWF that I am bringing into Flex, using the SWFLoader Component. Once I bring the SWF in, I am creating a MovieClip variable and assigning to it, the SWFLoader.content. Here is a quick code example: var platObject:MovieClip = mySWFLoader.content; So once that assignment is made, you can execute certain built-in methods available to any Flash Movie - for example: platObject.play (); platObject.loaderIn fo.[etc] And so on... That is all well and good - but what about MovieClips that reside in the Root Timeline? In this particular SWF File, I have a MovieClip called platMovieClip - and I am trying to access it's properties and methods from within Flex. For example, I'd like to toggle the visibility, so I tried this code: platObject.platMovi eClip._visible = false; When I try this command, I get an error that says the property platMovieClip is unknown or something to that effect... If we can't access the assets that reside in SWF Files, then what is the whole point of all this? Or maybe there is something that I am overlooking - but as far as I can tell, the platObject should represent the SWF... Could any of you shed some light on this topic for me? This functionality is VERY important to the success of my website launch. Thanks in advance, Mike -- : : ) Scott
RE: [flexcoders] Can't we access MovieClips contained in embedded SWF's?
Hey guys, Thanks for the initial help on this - I finally got this to work, at 3am this morning! Just a quick note to anybody else reading this: For this FP9, AS3 SWF thing to work properly, you must use the SWFLoader.load Command. I was using a method I saw in a Cairngorm App, where you would bring in all the Assets using the Embed Metatag, and then casting them as a Class. This royally screws things up, and I can only assume that it's because of the Class casting. So after changing my method to Load, instead of setting the Source property to an already embedded Asset, I could finally gain access to my named MovieClips defined within the SWF File. Now my next question: Can I traverse the Document Tree, using the Dot Notation - if there are more MovieClips, embedded within the MovieClips I created variables for (using the getChild? Thanks for the info regarding this, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks Sent: Wednesday, February 14, 2007 11:17 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? Temporarily assigning it would probably be best I guess - especially as its going to loop through 140 each time - Scott's idea is a good one too and should work - might give it a try later on myself to test it - but my gut instinct would b e to create a loop - then you can just use getChildAt(i) to assign the properties ... matt On 14 Feb 2007, at 17:05, Mike Anderson wrote: Well, my goal is this: There will be a ton of interactivity between the Flex variables, and the Subdivision Plat SWF. In fact, how the SWF looks visually, and behaves based on mouse interaction, will all depend on the values brought back from the database. For example, if a Lot has been sold to a customer, I need to change the color of the Lot MovieClip to Red. There are 4 other possible Statuses, that the Lot could have - and each Status is represented by a unique color. After the Plat SWF is brought in, the Flex App will loop through all 140 Lots, and set each corresponding MovieClip color, in addition to any other information I want shown. Luckily, in this particular case, I will have knowledge beforehand based on the database data, as to which Lots will already pre-exist on the SWF. This is where I need to decide, which parts I should code within the Flash 9 SWF, and which parts I should code within Flex. If I had my choice of course, I'd code everything 100% within Flex. Bottom line, I just want to code the bare minimum on the SWF side, so I can programmatically control everything from within Flex. Anyway, moving on, when the mouse hovers over a Lot, I need to have some additional information popup - like a ToolTip. I need the dimensions, total square footage, and the customer information (if the Lot has been sold). In this case, I can just have a custom component popup, and populate it with the corresponding information from my ArrayCollection. I just need to find a way, that when the mouse hovers over a particular Lot on the SWF, to signal Flex which Lot is being hovered over, so I can grab the appropriate data from the ArrayCollection, and fill in all the blanks. So with all that said, is there any other methodology you would use, to accomplish the tasks I mentioned? I suppose I could forego creating 140 variables, and just create a new one on the fly, each time the mouse hovers over a particular lot. Then I can grab the corresponding Child, and temporarily assign it to the Variable - in order to gain access to it's properties and methods. Thanks again for all your help - Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks Sent: Wednesday, February 14, 2007 10:45 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? Mike, what do the clips need to do? Matt On 14 Feb 2007, at 16:36, Mike Anderson wrote: Plat Overview of a subdivision
RE: [flexcoders] Can't we access MovieClips contained in embedded SWF's?
Hey guys, Could you elaborate more on the Document Class, or maybe post some code snippets demonstrating how this all works? I am really not familiar with that whole topic, but it sounds like this is what I am looking for. Thanks in advance for your help, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of slangeberg Sent: Wednesday, February 14, 2007 10:53 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? If you are using Flash 9, you can use a document class (I believe) at the root level and have Flex reference it by that. Your document class would set up an API, so you don't have to peer into the movie itself. Basically a proxy. Sorry I don't have the implementation in front of me, but I believe it's possible. So, if previous code was correct, could do something like: var platProxy:YourProxy = platObject.getChildByName('instancename') as YourProxy platProxy.hideAll(); platProxy.showByID( {id:'plat_xxx'} ); Just an idea! -Scott On 2/14/07, Mike Anderson [EMAIL PROTECTED] wrote: Oh man, you are kidding me! See, this particular SWF is a Plat Overview of a subdivision - and there are 140 Lots, each individually defined as a unique MovieClip. So, if I need access to each MovieClip programmatically, I will have to define 140 variables? Now that would be a bummer :-( Could you clarify on that? Thank you for the information nevertheless - I was actually going to try the getChild method next, so that saves me some time. Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks Sent: Wednesday, February 14, 2007 10:18 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? You need to get the object as a display object var xxx:MovieClip = platObject.getChildByName('instancename') as MovieClip Matt On 14 Feb 2007, at 16:13, Mike Anderson wrote: Hello all, I have a Flash Player 9, AS3 version of a SWF that I am bringing into Flex, using the SWFLoader Component. Once I bring the SWF in, I am creating a MovieClip variable and assigning to it, the SWFLoader.content. Here is a quick code example: var platObject:MovieClip = mySWFLoader.content; So once that assignment is made, you can execute certain built-in methods available to any Flash Movie - for example: platObject.play (); platObject.loaderIn fo.[etc] And so on... That is all well and good - but what about MovieClips that reside in the Root Timeline? In this particular SWF File, I have a MovieClip called platMovieClip - and I am trying to access it's properties and methods from within Flex. For example, I'd like to toggle the visibility, so I tried this code: platObject.platMovi eClip._visible = false; When I try this command, I get an error that says the property platMovieClip is unknown or something to that effect... If we can't access the assets that reside in SWF Files, then what is the whole point of all this? Or maybe there is something that I am overlooking - but as far as I can tell, the platObject should represent the SWF... Could any of you shed some light on this topic for me? This functionality is VERY important to the success of my website launch. Thanks in advance, Mike -- : : ) Scott
RE: [flexcoders] Can't we access MovieClips contained in embedded SWF's?
A, wonderful! Okay, with all that said, if I create a custom class, extending lets say a MovieClip, in any other situation I would have to declare all of my MovieClips contained within the main Movie, as Public Variables if I hoped to control them programmatically correct? You know, just like creating custom classes within Flex, and in order to access the Controls residing in the MXML file, you have to create Public Variables with the same names, and cast them as their proper types (i.e.. Button, Slider, TitleWindow, etc.) If I am wrong on this, could you correct me? :-) And if so, it would be because of all these declared Variables, that would cause them to be exposed allow me to access them from within Flex correct? Since we are using AS3 across the board, will Flex then have native access to all the Objects contained within the SWF File? What I'd love to do, is use Flex Effects and Transitions to control how the MovieClips that reside on the SWF, behave and interact in the main application. In the meantime, I will read up as much as I can on this topic - thanks again for pointing me in the right direction. Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of slangeberg Sent: Thursday, February 15, 2007 11:58 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? Cool new feature of Flash Professional 9 ActionScript 3 Preview: Document Class. Install Flash 9 Preview, create a new document, and in the Properties Panel, you'll see a new field, Document Class. You can enter the name of an AS3 class here, as long as it's in your class path, and it will serve as the main class of your swf. The class you uses must extend MovieClip or Sprite (or something else that extends one of those). src: http://www.bit-101.com/blog/?p=820 also: http://www.google.com/search?q=flash+9+document+classie=utf-8oe=utf-8; rls=org.mozilla:en-US:officialclient=firefox-a Very easy to set up. From Flash 9: New document - File -Publish Settings - Flash (tab) - AS version - Settings (button) - Document Class: Enter full class definition (w package) pointing to your class that extends Sprite or MovieClip (i believe). This class becomes your main interface to movie. -Scott On 2/15/07, Mike Anderson [EMAIL PROTECTED] wrote: Hey guys, Could you elaborate more on the Document Class, or maybe post some code snippets demonstrating how this all works? I am really not familiar with that whole topic, but it sounds like this is what I am looking for. Thanks in advance for your help, Mike From: flexcoders@yahoogroups.com [mailto:flexcoders@ yahoogroups.com http://yahoogroups.com ] On Behalf Of slangeberg Sent: Wednesday, February 14, 2007 10:53 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? If you are using Flash 9, you can use a document class (I believe) at the root level and have Flex reference it by that. Your document class would set up an API, so you don't have to peer into the movie itself. Basically a proxy. Sorry I don't have the implementation in front of me, but I believe it's possible. So, if previous code was correct, could do something like: var platProxy:YourProxy = platObject.getChildByName('instancename') as YourProxy platProxy.hideAll(); platProxy.showByID( {id:'plat_xxx'} ); Just an idea! -Scott On 2/14/07, Mike Anderson [EMAIL PROTECTED] wrote: Oh man, you are kidding me! See, this particular SWF is a Plat Overview of a subdivision - and there are 140 Lots, each individually defined as a unique MovieClip. So, if I need access to each MovieClip programmatically, I will have to define 140 variables? Now that would be a bummer :-( Could you clarify on that? Thank you for the information nevertheless - I was actually going to try the getChild method next, so that saves me some time. Mike From: flexcoders@yahoogroups.com [mailto: flexcoders@ mailto:flexcoders@ yahoogroups.com] On Behalf Of Matt Wicks Sent: Wednesday, February 14, 2007 10:18 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? You need to get the object as a display object
[flexcoders] Can't we access MovieClips contained in embedded SWF's?
Hello all, I have a Flash Player 9, AS3 version of a SWF that I am bringing into Flex, using the SWFLoader Component. Once I bring the SWF in, I am creating a MovieClip variable and assigning to it, the SWFLoader.content. Here is a quick code example: var platObject:MovieClip = mySWFLoader.content; So once that assignment is made, you can execute certain built-in methods available to any Flash Movie - for example: platObject.play(); platObject.loaderInfo.[etc] And so on... That is all well and good - but what about MovieClips that reside in the Root Timeline? In this particular SWF File, I have a MovieClip called platMovieClip - and I am trying to access it's properties and methods from within Flex. For example, I'd like to toggle the visibility, so I tried this code: platObject.platMovieClip._visible = false; When I try this command, I get an error that says the property platMovieClip is unknown or something to that effect... If we can't access the assets that reside in SWF Files, then what is the whole point of all this? Or maybe there is something that I am overlooking - but as far as I can tell, the platObject should represent the SWF... Could any of you shed some light on this topic for me? This functionality is VERY important to the success of my website launch. Thanks in advance, Mike
RE: [flexcoders] Can't we access MovieClips contained in embedded SWF's?
Oh man, you are kidding me! See, this particular SWF is a Plat Overview of a subdivision - and there are 140 Lots, each individually defined as a unique MovieClip. So, if I need access to each MovieClip programmatically, I will have to define 140 variables? Now that would be a bummer :-( Could you clarify on that? Thank you for the information nevertheless - I was actually going to try the getChild method next, so that saves me some time. Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks Sent: Wednesday, February 14, 2007 10:18 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? You need to get the object as a display object var xxx:MovieClip = platObject.getChildByName('instancename') as MovieClip Matt On 14 Feb 2007, at 16:13, Mike Anderson wrote: Hello all, I have a Flash Player 9, AS3 version of a SWF that I am bringing into Flex, using the SWFLoader Component. Once I bring the SWF in, I am creating a MovieClip variable and assigning to it, the SWFLoader.content. Here is a quick code example: var platObject:MovieClip = mySWFLoader.content; So once that assignment is made, you can execute certain built-in methods available to any Flash Movie - for example: platObject.play(); platObject.loaderInfo.[etc] And so on... That is all well and good - but what about MovieClips that reside in the Root Timeline? In this particular SWF File, I have a MovieClip called platMovieClip - and I am trying to access it's properties and methods from within Flex. For example, I'd like to toggle the visibility, so I tried this code: platObject.platMovieClip._visible = false; When I try this command, I get an error that says the property platMovieClip is unknown or something to that effect... If we can't access the assets that reside in SWF Files, then what is the whole point of all this? Or maybe there is something that I am overlooking - but as far as I can tell, the platObject should represent the SWF... Could any of you shed some light on this topic for me? This functionality is VERY important to the success of my website launch. Thanks in advance, Mike
RE: [flexcoders] Can't we access MovieClips contained in embedded SWF's?
Well, my goal is this: There will be a ton of interactivity between the Flex variables, and the Subdivision Plat SWF. In fact, how the SWF looks visually, and behaves based on mouse interaction, will all depend on the values brought back from the database. For example, if a Lot has been sold to a customer, I need to change the color of the Lot MovieClip to Red. There are 4 other possible Statuses, that the Lot could have - and each Status is represented by a unique color. After the Plat SWF is brought in, the Flex App will loop through all 140 Lots, and set each corresponding MovieClip color, in addition to any other information I want shown. Luckily, in this particular case, I will have knowledge beforehand based on the database data, as to which Lots will already pre-exist on the SWF. This is where I need to decide, which parts I should code within the Flash 9 SWF, and which parts I should code within Flex. If I had my choice of course, I'd code everything 100% within Flex. Bottom line, I just want to code the bare minimum on the SWF side, so I can programmatically control everything from within Flex. Anyway, moving on, when the mouse hovers over a Lot, I need to have some additional information popup - like a ToolTip. I need the dimensions, total square footage, and the customer information (if the Lot has been sold). In this case, I can just have a custom component popup, and populate it with the corresponding information from my ArrayCollection. I just need to find a way, that when the mouse hovers over a particular Lot on the SWF, to signal Flex which Lot is being hovered over, so I can grab the appropriate data from the ArrayCollection, and fill in all the blanks. So with all that said, is there any other methodology you would use, to accomplish the tasks I mentioned? I suppose I could forego creating 140 variables, and just create a new one on the fly, each time the mouse hovers over a particular lot. Then I can grab the corresponding Child, and temporarily assign it to the Variable - in order to gain access to it's properties and methods. Thanks again for all your help - Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks Sent: Wednesday, February 14, 2007 10:45 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't we access MovieClips contained in embedded SWF's? Mike, what do the clips need to do? Matt On 14 Feb 2007, at 16:36, Mike Anderson wrote: Plat Overview of a subdivision
[flexcoders] Controlling embedded SWF files, within Flex Application
Hello All, I am presently using SWFLoader, to bring in my Vector Maps, but now the time has come where these compiled SWF Files, will be multi-framed, as well as containing Properties and Methods, visible layers (which can be toggled), etc. - for added functionality. How can I access properties execute functions that are embedded in the SWF Files, from within Flex? I am not trying to remote control these SWF's in another browser window, what I need to do is talk to them directly from within the same application. I've seen the LocalConnection topic come up a few times, as that's the method 1.5 version of Yahoo Maps uses, to allow the API to work from inside of Flex (this will of course, go away when the 2.0 version of the Yahoo Maps API comes out). Must I use the LocalConnection method, in order to simply speak to my Embedded SWF Files? Or is there a more direct approach? Just for a quick example, I was hoping to use something to this effect: mySWFLoader.content.gotoAndPlay(10); Well, you get the idea... Any suggestions, would be greatly appreciated. Mike
RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML
Thanks for the using a Constant tip - as I agree with you. Using a constant, will automatically grab any new values, in case any changes are made in future releases. I was going to make all these changes eventually, but now I think I will speed up that process, as I comb through my source code during my Map Application (Flash-Flex) upgrade. Thanks again for all your input on this topic - believe me, it's helping me a LOT - Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug McCune Sent: Wednesday, February 07, 2007 11:53 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML Nope, I think the second parameter must be a function, trying to pass an array of functions should fail. Also, just a note: it's better practice to not use the string of the event listener like click but rather the variable like MouseEvent.CLICK. They really do the exact same thing in practice, but it's possible that within MouseEvent the click event could be renamed in a future release to something like mouseClick and then your code wouldn't work. Doug Mike Anderson wrote: Hey Doug, Well, that's simple enough. Probably so simple, that I simply overlooked doing it that way. Real quick, would it be possible to also do it this way? Object.addEventListener( click, [funct1, funct2, funct3] ); I know I could just try it, but from a methodology point of view, it would be nice to know if this was a valid way to do it. Thanks! Mike -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of dougmccune Sent: Wednesday, February 07, 2007 10:10 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML You can make as many calls to addEventListener as you want. So you can add 2 or more event listeners that get triggered for the same event. So something like: myButton.addEventListener(MouseEvent.CLICK, myFunction1); myButton.addEventListener(MouseEvent.CLICK, myFunction2); myButton.addEventListener(MouseEvent.CLICK, myFunction3); All three of the above functions would get called when the event triggers. You can remove each of these separately as well by using removeEventListener and specifying the particular function you want removed. Doug --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mike Anderson [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello All, I have a problem, and maybe I am overlooking something here... What I need to do, is attach multiple functions, to an Event for a particular Component. Using inline MXML, this is easy - you just separate out each function, with a semi-colon and list them one after another. BUT, I am trying NOT to put my functions within the MXML - I am using Code-Behind, and I need to add my Event Listeners within the ActionScript - using the Object.addEventListener() method. Thing is, how do I add several functions using this type of methodology? Or can it even be done? Thanks in advance for any help you can offer regarding this, Mike -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] What's the official consensus of using CodeBehind??
Hello All, Could some of you more savvy coders, please take a moment of your valuable time and throw some words of wisdom out there regarding CodeBehind? Since I love using Packages and Classes, it feels very natural for me to use this method. BUT, based on where things are going with Flex, is this considered to be a good programming practice? I would love to know sooner versus later, so that I don't have to back and redo a bunch of coding. I am a REAL stickler when it comes to good coding practices. Thanks in advance for your time on this, Mike
[flexcoders] StartDrag() versus DragManager.doDrag()
Hello All, I am getting confused, as to which method I should use, for simply panning around an Image/SWF file. I did follow Michael's suggestions, and looked at the quick Dragging an Image to Canvas tutorial contained in the help files. My understanding is a little deeper, when it comes to using DragManager - but in my case, I am getting some odd results. For the purposes of strictly panning Objects around, startDrag() is providing me better Visual Results - as it happens in real-time when dragging the mouse around. When using doDrag(), it makes a copy of the Object (I suppose, it's the Proxy being dragged) and then finishes the move, upon the mouse release. Also, for some reason, when using doDrag(), the Object doesn't always move the same distance, when compared to the distance of the mouse drag. Really weird... And it gets worse, the more distance I move the mouse. One last thing too, the ImageProxy appears Outside of the container, when dragging the Image - and in my case, my SWF File is 2,000 x 2,200 - so you can imagine the whole screen filling up with my Image. Since I am not doing any advanced functions, and just want to move the Image around on the Screen, would it be acceptable to use startDrag()? I guess what I REALLY need to find out, is if startDrag() and stopDrag() will eventually be deprecated, or be considered NOT the way to handle dragging Objects around. Could any of you shed some additional light on this topic? Thanks in advance, Mike
[flexcoders] Registration Points and Flex -
Hello All, As all of you Flash People know, whenever you have Assets in your Library, they all have a Registration Point. I know 99% of you already know this, but for those who don't, the Registration Point is the spot on the Object, that is considered to be 0,0. Typically, it's either in the upper-left-hand corner, or smack-dab in the middle. This way, whenever you are Scaling your Object, the sizing will get bigger downwards and to the right, or it will scale evenly from the Center Out. With this said, after embedding all my Graphical Icons (which will serve as WayPoints for my Map Application), how can I control the nature of how these Icons Scale?? Some of my Icons, are drawn in such a way, where they have a little arrow in the upper-left-hand corner. That way, it's obvious to the user, that wherever they drop their WayPoint on the Map, the top of the Pointer on the Icon, IS precisely the spot where the WayPoint coordinates are referring to (and will scale accordingly from that point). Then again, some of my other Icons, are just general in nature, and those need to specifically scale from the CENTER Out. In Flash, I was able to tweak the Registration Points, so that they would automatically Scale the way I needed them to. BUT, in Flex, I don't even know where to start with something like this. Could anybody shed some light on this topic for me? Thanks in advance, Mike
RE: [flexcoders] What's the official consensus of using CodeBehind??
YES, all these points you bring up in your post, are the things flying through my mind. It's like having to maintain twice as many files, just for the purpose of creating a clean separation of the two. This is why I am torn, and wanted to ask everybody else. I was fortunate enough to be introduced to Cairngorm from the very beginning, and as painful as it was, wrapping my head around it while learning Flex too, I am SO happy that I did it. So, I want to make sure I do the same thing with CodeBehind - because it really would mean a huge task of recoding applications. I just need to know for what? Peace of mind? Well, maybe :) Thanks everybody for contributing to this thread - and I know this was just discussed not too long ago, but the end result really didn't lean one way or another. Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Bokelberg Sent: Thursday, February 08, 2007 3:20 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What's the official consensus of using CodeBehind?? What is your reasoning to use code behind? Why would you want to double every class and add an additional inheritance layer just to separate Mxml from ActionScript? Why would you want to declare every component you are using twice, once in AS and the second time in Mxml? Is it to separate presentation from functionality? Generally this is a good idea, but i think it is important where to draw the line between the two. When you think of traditional systems with a template engine as the presentation layer, the templates also contain some code to build the presentation, while the functionality is implemented by plain classes. Now if we translate this thinking to Mxml and ActionScript, we should leave all the code we need to build the presentation inside the Mxml files and factor out the real functionality into classes. So i'd say, there is nothing wrong with ActionScript in Mxml files as long as it is strictly presenation related. Cheers Ralf. On 2/8/07, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, Could some of you more savvy coders, please take a moment of your valuable time and throw some words of wisdom out there regarding CodeBehind? Since I love using Packages and Classes, it feels very natural for me to use this method. BUT, based on where things are going with Flex, is this considered to be a good programming practice? I would love to know sooner versus later, so that I don't have to back and redo a bunch of coding. I am a REAL stickler when it comes to good coding practices. Thanks in advance for your time on this, Mike -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany Phone +49 (0) 221 530 15 35
[flexcoders] Image versus SWFLoader for loading external SWF Files
Hello All, If I want to bring in an external SWF File, and this SWF File doesn't contain anything else other than pure Vector Information making up a map graphic, is there a real need to use SWFLoader? I mean, the true purpose of using SWFLoader to bring in SWF Files, is to gain access to any advanced aspects of the SWF - like Named Assets, Functions, the PlayHead in cases of a multi-framed SWF, etc. If this is the only reason, then using the SWFLoader would be overkill to bring in something that the Image could easily take care of correct? Thanks in advance for your help, Mike
RE: [flexcoders] Yahoo API: Vote for Flex 2 version
You've got my vote! I've been hot to get this new version for a LONG time now, because doing this 1.5 hack is for the birds! Thanks for the link - I will vote immediately, if it will help the cause. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of TJ Downes Sent: Thursday, February 08, 2007 7:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Yahoo API: Vote for Flex 2 version Currently the Yahoo Maps Flex API is limited to Flex 1.5. In order to use Yahoo Maps in Flex 2 applications we are forced to hack it in using the Flash API. This works, but is not the easiest or optimal solution. Yahoo has implemented a suggestion box. Suggestions are rated by the number of votes they receive. Someone posted a suggestion for Flex 2 API for Yahoo Maps. I would love to see more people provide their input on this in hopes of getting a Flex 2 API for Yahoo Maps in a timely fashion. So, show your support and vote for the Flex 2 API! http://suggestions.yahoo.com/detail/?prop=ydnfid=3208 (this is a repost from my blog, so for those of you who have already seen it on my blog I apologize for the redundancy!) -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
RE: [flexcoders] Re: Yahoo API: Vote for Flex 2 version
Oh yeah - that Yahoo Maps API is simply incredible - What really gets me excited, is I think I can take my existing Lake Maps other topographical Land Maps for my commercial website, and overlay the Yahoo Maps information on top of my existing information. Talk about giving the user the power to get incredible amounts of information, for any given area. I am sure Yahoo is only getting warmed up, with what they plan to do with that whole thing. Raw Data is one thing - but to deliver *meaningful* data to the masses, is where the true power of information comes into play. It's a very exciting time to be a programmer right now, you just need to carve out your niche and deliver the best product that you can. Thanks and take care :) Mike -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of TJ Downes Sent: Thursday, February 08, 2007 10:58 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Yahoo API: Vote for Flex 2 version Thanks Mike! Now, I see we have over 5600 members on this group. If we could only get 10% of the group to vote... Already this suggestions has more votes than any other suggestion. --- In flexcoders@yahoogroups.com, Mike Anderson [EMAIL PROTECTED] wrote: You've got my vote! I've been hot to get this new version for a LONG time now, because doing this 1.5 hack is for the birds! Thanks for the link - I will vote immediately, if it will help the cause. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of TJ Downes Sent: Thursday, February 08, 2007 7:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Yahoo API: Vote for Flex 2 version Currently the Yahoo Maps Flex API is limited to Flex 1.5. In order to use Yahoo Maps in Flex 2 applications we are forced to hack it in using the Flash API. This works, but is not the easiest or optimal solution. Yahoo has implemented a suggestion box. Suggestions are rated by the number of votes they receive. Someone posted a suggestion for Flex 2 API for Yahoo Maps. I would love to see more people provide their input on this in hopes of getting a Flex 2 API for Yahoo Maps in a timely fashion. So, show your support and vote for the Flex 2 API! http://suggestions.yahoo.com/detail/?prop=ydnfid=3208 (this is a repost from my blog, so for those of you who have already seen it on my blog I apologize for the redundancy!) -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Object.addEventListener vs.. adding them inline via MXML
Hello All, I have a problem, and maybe I am overlooking something here... What I need to do, is attach multiple functions, to an Event for a particular Component. Using inline MXML, this is easy - you just separate out each function, with a semi-colon and list them one after another. BUT, I am trying NOT to put my functions within the MXML - I am using Code-Behind, and I need to add my Event Listeners within the ActionScript - using the Object.addEventListener() method. Thing is, how do I add several functions using this type of methodology? Or can it even be done? Thanks in advance for any help you can offer regarding this, Mike
RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML
Hey Doug, Well, that's simple enough. Probably so simple, that I simply overlooked doing it that way. Real quick, would it be possible to also do it this way? Object.addEventListener( click, [funct1, funct2, funct3] ); I know I could just try it, but from a methodology point of view, it would be nice to know if this was a valid way to do it. Thanks! Mike -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dougmccune Sent: Wednesday, February 07, 2007 10:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML You can make as many calls to addEventListener as you want. So you can add 2 or more event listeners that get triggered for the same event. So something like: myButton.addEventListener(MouseEvent.CLICK, myFunction1); myButton.addEventListener(MouseEvent.CLICK, myFunction2); myButton.addEventListener(MouseEvent.CLICK, myFunction3); All three of the above functions would get called when the event triggers. You can remove each of these separately as well by using removeEventListener and specifying the particular function you want removed. Doug --- In flexcoders@yahoogroups.com, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I have a problem, and maybe I am overlooking something here... What I need to do, is attach multiple functions, to an Event for a particular Component. Using inline MXML, this is easy - you just separate out each function, with a semi-colon and list them one after another. BUT, I am trying NOT to put my functions within the MXML - I am using Code-Behind, and I need to add my Event Listeners within the ActionScript - using the Object.addEventListener() method. Thing is, how do I add several functions using this type of methodology? Or can it even be done? Thanks in advance for any help you can offer regarding this, Mike -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
RE: [flexcoders] Re: Can drag-able content within a container, update it's Scrollbars?
Yes, this is exactly what I was thinking... The benefits are, it's impossible to drag the content off the screen, as you are ultimately remote controlling the scrollbars to handle the movement of the content. It just looks like you are using the mouse to pan things around. So what you are both saying then, is I should just listen for the Mouse Movements, and have it update the Horizontal Vertical Scrollbars? I don't have much experience, messing around with Scrollbars and their associated values. Is it as simple as listening for the changes in X,Y - and if there are changes in the X axis, then trigger a function to change the Horizontal Scroll? And then in the Y, change the Vertical? This topic is very interesting to me, and I'd love to hear more on how to accomplish something like this. Thanks in advance Doug and Mike :) Mike -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dougmccune Sent: Wednesday, February 07, 2007 6:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Can drag-able content within a container, update it's Scrollbars? If it's really a matter of scrolling a container that has scrollbars by dragging the contents, I would use a mouselistener (as mike suggested) that would update the verticalScrollPosition and horizontalScrollPosition of the parent container. You wouldn't actually be moving the inner stuff at all. You would sort of be faking the dragging. Why do it like this? 1. dragging too far one way or the other wouldn't drag the inner components out of the viewable area, 2. if you actually wanted to use the scrollbars as well then they would still work (and they would update correctly as you're dragging) Just my two cents. Doug --- In flexcoders@yahoogroups.com, Jeff Tapper [EMAIL PROTECTED] wrote: I think i need to respectfully disagree on this. For the type of panning of elements within a container, i think startDrag and stopDrag should suit his needs nicely. At 06:04 AM 2/4/2007, Michael Schmalle wrote: Hi Mike Check out the http://Panel.asPanel.as class for the standard way of dragging things in Flex. Don't use startDrag() and stopDrag(). You will see addEventListener() to the systemManager and stage. in the sm.MOUSE_MOVE is where your actual instance logic goes. As far as your scroll bars question; Put the SWFLoader in a canvas and you should get the desired effect as you pan. but... as I think about this more, there is something missing. Let me know what this info does for you. Peace, Mike On 2/4/07, Mike Anderson mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: Hello All, I have a Box Component, that contains a SWFLoader. When the SWFLoader's Content grows beyond the bounds of the Box Container, I have the Scrollbars automatically appear. This particular content that the SWFLoader houses, is always going to be a Map. Obviously, when viewing Maps, Panning and Zooming are commonplace - and I want to provide the users the ability to drag the Map Content around within the Box Component. Since I come from the Flash World, startDrag() and stopDrag() are very familiar commands to me, and of course those were the first Methods that came to mind, when making my Maps drag-able within my Flex App. Is startDrag() and stopDrag() still the preferred methods of moving content around on the screen, when it comes to Flex Apps? Now, I know there is the DragManager.as Class that comes bundled with Flex - but isn't that more for the purpose of Dragging one Component's Content, into another one? And then keeping track of any Data that should get sent along, whenever the Drop Event takes place? In this particular case, I just want to be able to Pan the Maps around. Will startDrag() and stopDrag() suffice in this instance? Also, is there a way where the Scrollbars on the Box Container, can sense the Content is being moved around, and to update the Scrollbar positions accordingly? How would I go about doing something like that? Thanks in advance, for any help you can offer. Mike -- Teoti Graphix http://www.teotigraphix.comhttp://www.teotigraphix.com Blog - Flex2Components http://www.flex2components.comhttp://www.flex2components.com You can find more by solving the problem then by 'asking the question'. Jeff Tapper Founding Partner Tapper, Nimer and Associates Inc. [EMAIL PROTECTED] (718) 576-1775 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Can drag-able content within a container, update it's Scrollbars?
Hello All, I have a Box Component, that contains a SWFLoader. When the SWFLoader's Content grows beyond the bounds of the Box Container, I have the Scrollbars automatically appear. This particular content that the SWFLoader houses, is always going to be a Map. Obviously, when viewing Maps, Panning and Zooming are commonplace - and I want to provide the users the ability to drag the Map Content around within the Box Component. Since I come from the Flash World, startDrag() and stopDrag() are very familiar commands to me, and of course those were the first Methods that came to mind, when making my Maps drag-able within my Flex App. Is startDrag() and stopDrag() still the preferred methods of moving content around on the screen, when it comes to Flex Apps? Now, I know there is the DragManager.as Class that comes bundled with Flex - but isn't that more for the purpose of Dragging one Component's Content, into another one? And then keeping track of any Data that should get sent along, whenever the Drop Event takes place? In this particular case, I just want to be able to Pan the Maps around. Will startDrag() and stopDrag() suffice in this instance? Also, is there a way where the Scrollbars on the Box Container, can sense the Content is being moved around, and to update the Scrollbar positions accordingly? How would I go about doing something like that? Thanks in advance, for any help you can offer. Mike
RE: [flexcoders] Re: Can Flex directly replace Flash????
Hello Michael! You hit the nail right on the head - this is exactly what I am looking for. In fact, this scenario closely resembles how I wrote my existing version with Flash. I will scour your post a few times over, and research every aspect of it - then hopefully I will be able to put together a game plan in my head, on how to start the conversion process. The cool part too, is that I can port most of my AS 2.0 code over, as it relates to all the GPS Conversion logic, and all other math logic / coordinate conversion functions that I had to slave countless hours over figuring out. Again, thank you Michael - you provided several key pieces of information, and I have a pretty good feel as to what to do next. I may still e-mail you off-list however, with some other questions. Take care, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Michael Schmalle Sent: Saturday, February 03, 2007 8:56 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Can Flex directly replace Flash is how to handle all the Drag/Drop logic with the Icons, Sounds interesting. :) I would make a component, MapViewer extends UIComponent. Composite 2 components into this component. - MapLoader extends SWFLoader - MapAssets extends Canvas MapViewer will be the control into positioning the icons as your drop them INTO the MapAssets aka the map assets instance is position 0,0 with the MapLoader right on top. MapView sizes and positions the MapLoader and MapAssrts instances. Once you have this base set up, set your tool bar - drag off the tool bar, create a dragData object with a new instance of the said icon, - user drops icon onto MapViewer - MapViewer konws how to accept dragDrop, then processes the x,y position converts coords, takes that new instance you created from the tool bar factory and addChild() into the MapAssets component precisely where the user dropped it. Now that the icon is perfectly placed INSIDE the MapAssets instance as the user pans the map around, them icon follows because the MapViewer is positioning the MapLoader along with the MapViewer. May or may not make sense but from what you described I could easily get that scenario going. Peace, Mike On 2/3/07, lostinrecursion [EMAIL PROTECTED] wrote: I agree. AS3 actually has the most incredible drag and drop support and it is also very easy to implement via Flex. In fact, all List based components have this functionality native to them. But adding it to a non list base component isn't awfully hard either. Look in the docs for drag and drop and look for Image to a Canvas examples on drag/drop - I believe that ought to answer many of your questions. Good luck with the app. Sounds heavy. -Kenny -- Teoti Graphix http://www.teotigraphix.com Blog - Flex2Components http://www.flex2components.com You can find more by solving the problem then by 'asking the question'.
RE: [flexcoders] Re: Can Flex directly replace Flash????
Thanks for the reply guys :) Real quick though, could you both clarify what you (Kenny and Cisnky) mean by use AS3? All AS3 means to me, is that it's the next evolution of ActionScript, in which you now use Packages instead of Classes, and some changes/enhancements regarding code syntax methodologies. I am sure there is much more to it than that - I only researched AS3 a little bit. I was just wondering if you guys were referring to the AS3 Version of the Flash IDE available on the Adobe Website - and that I should recode/recompile my existing AS2 Flash Application, with the AS3 methodologies (and then pull that into my Flex App)?? Again, not sure what you both meant exactly, so if you could clarify that whole thing, I would be extremely grateful. I am trying very hard, to see if I can use Flex 100% of the time, and sort of put Flash on the back-burner for a while. Thanks in advance for all your wonderful input, Mike -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lostinrecursion Sent: Saturday, February 03, 2007 7:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Can Flex directly replace Flash I agree. AS3 actually has the most incredible drag and drop support and it is also very easy to implement via Flex. In fact, all List based components have this functionality native to them. But adding it to a non list base component isn't awfully hard either. Look in the docs for drag and drop and look for Image to a Canvas examples on drag/drop - I believe that ought to answer many of your questions. Good luck with the app. Sounds heavy. -Kenny -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Can Flex directly replace Flash????
Hello All, As I dive into converting my commercial Flash Map Application, into a Flex-based Application, I am quickly finding out that Flex may not be able to perform some key functions. This of course, may be attributed to my lack of understanding of Flex - so my main goal of this post, is to get some clarifications from the List Gurus regarding if/how I can do the same things in Flex, as I did in Flash. For a quick overview, I wrote a Commercial Flash Application for my primary client, and it allows their user-base to load Vector-based Lake Maps, from their 10,000+ Lake Map Database. Once the user browses to the desired map, they can immediately start to customize it - by adding Waypoint Icons, Points of Interest, Notes, etc. As they move their mouse cursor around, they get real-time GPS Coordinates in any format they like. On the Flash programming side of things, I used the following methodology: I use CF / Remoting to handle all Database reads/writes. I use the MovieClipLoader Component, to handle all the loading of SWF Maps. I have an Icon Bar at the bottom of the screen, in which the user can drag those Icons directly onto the Map. After they release the Mouse Button, I use attachMovie() to attach a copy of the Icon to the Map SWF File. At the same time, I make a Remoting call, to record the x,y coordinates of the Icon in relation to the Map. When the user wants to come back to their custom map in the future, I simply make another Remoting Call to the CF Server, get the Results, and then Loop through the Result Set. Within the For/Next Loop, I again use attachMovie() to put the Icons back to their original locations when they were first saved. This pretty much covers the logic required, to make my Map Application do it's thing. Now how the heck would I duplicate this functionality inside of Flex??? So far, I've mastered the SWFLoader Component, and can Scale/Zoom the SWF Files, in addition to Panning them around using startDrag() and stopDrag(). This is where things pretty much stop, as I am not sure what to do next. The Remoting stuff is a total no-brainer, and I am well-versed in Cairngorm-based Flex Apps - so I have the Data interaction aspects down cold. What I need the most, is how to handle all the Drag/Drop logic with the Icons, and attaching them to the Map SWF File (so that when I pan the SWFLoader Component around, the Icons go right along with it). Sorry for the lengthy post, but I needed to explain things as clearly as possible to get my problems across. Thanks in advance, for any help you can throw my way, Mike
[flexcoders] SWFLoader Questions - need help from the gurus!
Hello All, I am getting confused, as to when I should be referencing the SWFLoader Component ITSELF, versus the SWFLoader.content - as it relates to modifying it's properties, etc. For example, the SWFLoader has the scaleX and scaleY properties available to the developer. BUT, so does the Content - So, if I wanted to Zoom in/out my SWFLoader Content, what would be the more appropriate command? 1) SWFLoader.scaleX = value; -or- 2) SWFLoader.content.scaleX = value; This is something, that has always confused me. Also, as many Properties and Methods that the SWFLoader SWFLoader.content have in common, there are some that are unique only to themselves. For example, if I want to make the content draggable, the only portion that makes startDrag() and stopDrag() available to the developer, is the SWFLoader - NOT the SWFLoader.content - I guess, what I am asking here, is what's the general rule of thumb - when attempting to Scale, Move, ... the contents of the SWFLoader? The SWFLoader itself? Or the SWFLoader.content? Thanks SO much in advance, for anything you can offer regarding this. Mike
[flexcoders] Problem with SWFLoader repositioning Content to 0,0 upon Resize Event
Hello All, I have a Popup TitleWindow Control which houses a SWFLoader Component. The user has the ability to Drag/Pan the Content around, inside of the TitleWindow. If the Content has been moved by the user, and then they Resize the TitleWindow, the Content gets reset sort of speak. No matter what, the Content always gets reset to 0,0 in relation to the TitleWindow Control. Is there anything I need to set, in order for the Content to be left alone, whenever a Resize event takes place? Thanks in advance for your help, Mike
[flexcoders] Collection_Change type Event for a ValueObject??
Hello all, I am trying to create a Form that can sense when a change in the Data has been made. My Form is comprised mainly of TextInputs, in addition to a few other types of controls. Every single control's DataProvider is tied to the same ValueObject - and I want to trigger a local dataChanged:Boolean variable, so I can prompt the user to save their changes if they want to close the Form before saving. This is easy enough with the ArrayCollection, as the Collection_Change Event takes care of this. But how about a ValueObject? I know I could tie an Event Listener to each TextInput residing on the Control, and broadcast a Change Event there, but that seems a tad overkill. It would seem more logical, to tie some type of Listener to the ValueObject itself, but I don't think there is anything inherently built into this generic class, that provides for this functionality. Any ideas would be greatly appreciated :) Thanks, Mike
RE: [flexcoders] BindingUtils.bindProperty versus mx:Binding
So with that said, is it safe to say that using the bindProperty method in AS, DOES release the memory it uses whenever the control gets destroyed? If this is in fact the case, that would be another huge deciding factor for me - since my Flex App is a HUGE Master/Detail type application, in which PopUp Windows are used extensively to display the extended information to the user. It's in these PopUp Windows, where I have to create all these bindings, so that the ValueObjects which reside in the Model, get properly updated when the user changes the information. This is an interesting subject, and I hope it gets discussed further :) Thanks everybody so far, for all your help and insights. Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Xavi Beumala Sent: Saturday, January 20, 2007 1:29 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] BindingUtils.bindProperty versus mx:Binding On 1/20/07, Alex Uhlmann [EMAIL PROTECTED] wrote: I'd question why you would want to replace all our MXML bindings when it's working like a charm for you? ;) Aren't MXML bindings (curly braces, function bindings, mx:Binding/Observe) easier to write and maintain? AFAIK Not aplicable to curly braces, but yes to mx:Binding/. mx:Binding has some memory issues not freeing the memory when the container instance is removed from stage (even from memory). The binding never gets removed. http://tech.groups.yahoo.com/group/flexcoders/message/55432 Best X.
RE: [flexcoders] BindingUtils.bindProperty versus mx:Binding
Thanks Alex, I will give that a try, and see if that fixes my binding problems... And to answer your question, Libby hit it on the head - I am trying to separate my Code from my Views as much as possible. In fact, all of my Controls use the Code Behind method of programming - and it's really made a cleaner environment for me, since my ActionScript code can get VERY lengthy. Thanks again - Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Uhlmann Sent: Saturday, January 20, 2007 8:20 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] BindingUtils.bindProperty versus mx:Binding Closer to your mx:Binding tag is: BindingUtils.bindProperty( userVO, Name, this, [ nameTextInput, text ] ); but keep in mind that binding of mx.binding.utils using ChangeWatcher and BindingUtils work differently from the mx.binding package (MXML compiler binding). The latter supports much more use cases, i.e. binding to expressions, XML, having functions and Array elements in property chains, etc. BindingUtils i.e. only supports property chains. I'd question why you would want to replace all our MXML bindings when it's working like a charm for you? ;) Aren't MXML bindings (curly braces, function bindings, mx:Binding/Observe) easier to write and maintain? Best, Alex Alex Uhlmann Consultant (Rich Internet Applications) Adobe Consulting Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK p: +44 (0) 131 338 6969 m: +44 (0) 7917 428 951 [EMAIL PROTECTED] http://weblogs.macromedia.com/auhlmann From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: 20 January 2007 05:14 To: flexcoders@yahoogroups.com Subject: [flexcoders] BindingUtils.bindProperty versus mx:Binding Hello All, I am not having much luck, using the bindProperty method of creating bindings. At the moment, I am using the mx:Binding method, and it's working like a charm. But, I am trying to get away from this, so I can put all my binding logic into my ActionScript Code. I was under the impression, that BindingUtils.bindProperty was the ActionScript direct replacement for the mx:Binding tag. A quick example of my usage: BindingUtils.bindProperty( nameTextInput, text, userVO, Name ); Which replaces: mx:Binding source=nameTextInput.text destination=userVO.Name/ I've tried executing the AS code, in the CreationComplete and the Initialize Functions of my Control, without any success. I just don't get any data binding taking place - unless, I am still executing this code too early, and need to listen for another event. Still, I thought CreationComplete or Initialize only fired off, when pretty much everything on the Control was 100% instantiated. Am I properly using the AS Bindings, or is there something else I am missing? Thanks in advance for your help, Mike att1c92c.gif Description: att1c92c.gif
[flexcoders] BindingUtils.bindProperty versus mx:Binding
Hello All, I am not having much luck, using the bindProperty method of creating bindings. At the moment, I am using the mx:Binding method, and it's working like a charm. But, I am trying to get away from this, so I can put all my binding logic into my ActionScript Code. I was under the impression, that BindingUtils.bindProperty was the ActionScript direct replacement for the mx:Binding tag. A quick example of my usage: BindingUtils.bindProperty( nameTextInput, text, userVO, Name ); Which replaces: mx:Binding source=nameTextInput.text destination=userVO.Name/ I've tried executing the AS code, in the CreationComplete and the Initialize Functions of my Control, without any success. I just don't get any data binding taking place - unless, I am still executing this code too early, and need to listen for another event. Still, I thought CreationComplete or Initialize only fired off, when pretty much everything on the Control was 100% instantiated. Am I properly using the AS Bindings, or is there something else I am missing? Thanks in advance for your help, Mike
RE: [flexcoders] Need primer on Events, from the List Gurus -
Thank you Dimitrios! Now it all makes sense to me - the key is using the Getters and Setters as the method for handling all the value assignments. Once you do that, you have all the CollectionEvents at your disposal. So I guess in some odd way, we are still using Event Broadcasting to accomplish my goals, but just not in the way that I envisioned doing it. Very nice :) Again, thanks for the wonderful advice - Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios Gianninas Sent: Sunday, January 14, 2007 11:29 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Need primer on Events, from the List Gurus - Ok here is how I would do it. Say the ArrayCollection held notes as an example. // in command ModelLocator.getInstance().notes.addItem( mynewnote ); // view is binded bla:MYView notes={ModelLocator.getInstance().notes}/ // inside the view public function set notes( values:ArrayCollection ):void { mygrid.dataProvider = values; values.addEventListener( CollectionEvent.COLLECTION_CHANGE, onCollectionChange ); } Now what will happen is the minute you add a new note to your model, the onCollectionChange method will be called and that will allow you to do any added operations you wish, hope that helps. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Friday, January 12, 2007 11:03 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Need primer on Events, from the List Gurus - Hello Dimitrios, I was trying to keep my post as generic as possible - which is why I didn't post specifics. In this particular instance however, I want to broadcast a Custom Event to a DataGrid residing on a Panel Control - to Scroll to the very top, whenever I add a new record to an ArrayCollection (residing in the ModelLocater). This can happen ONLY when I add a new record - and this is why I want to create a Custom Event for this. I am pushing for a Custom Event, because I don't think there is a built-in Event native to the DataGrid, that I can count on 100% of the time, to fire off ONLY when New Records are being added. The catch is, I can't dispatch the Event until I get my onResult response from the ColdFusion Server - indicating that the Database Insert was in fact successful, and that it's now okay to update the Model's ArrayCollection with the new ValueObject. Since the onResult logic resides in a Cairngorm Command Class, this is where I need to dispatch the Event from. Or at least initiate the command to dispatch the Event, which can reside in the ModelLocater - and dispatch it from there. Since all of my primary Views containing the Model-bound Controls, have a reference to the ModelLocater, I am thinking that there must be a way to dispatch these Events from the Model - and have a way for these Views to respond accordingly. If you could help me out in this regard, I really would be truly grateful. My application development, has literally come to a screeching HALT, because of me not knowing how to handle all these issues. I am tracking down every Event Broadcaster and Listener Tutorial I can get my hands on, so that I can learn more about how all this works. But in all of the examples I download and dissect, they ALL have a common View, that centralizes the code - in which it's quite easy to tie everything together. In my case, I have Views and Controls scattered all over the place - and they can be instantiated (or not be for that matter) at any given moment. I just don't know how to write code to broadcast Events in such a manner, so that each component has no prior knowledge of any other component. I hope I'm explaining all this properly... Thanks in advance, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios Gianninas Sent: Friday, January 12, 2007 3:01 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Need primer on Events, from the List Gurus - what other thing do u want to do? give an example and we can take it from there. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Friday, January 12, 2007 1:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Need primer on Events, from the List Gurus - Hello All, This thread, directly relates to all the other ones I've posted recently - as I think one of my root problems, is truly understanding on how Events get propagated within an application. They say the Event model is so great, due to all the components being so loosely coupled. So either I am missing something really rudimentary here, or the Event model doesn't work the way I thought
RE: [flexcoders] Re: ObserveValue, and how to reference within AS3 Class File
Thanks Alex! With the help of Dimitrios, I was able to accomplish what I needed to. Still, using your cool little utility Class, it makes it really easy for somebody to listen for very particular changes in a variable. Since I am using Cairngorm, and the nature of Cairngorm centralizes everything in the Model, I was trying to Dispatch Custom Events, from my Commands (and failing miserably). Using the method I just learned (getters, setters, and events), this way is much cleaner. Again, thanks for your reply - Mike -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Uhlmann Sent: Tuesday, January 16, 2007 11:52 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ObserveValue, and how to reference within AS3 Class File Hi Mike, Observe and ObserveValue have been designed to work with MXML binding only. The curly braces in the source and handler properties are being treated differently by the MXML compiler than just simple ActionScript assingments as you do in your example. Therefore, the current implementation relies on the MXML compiler and cannot be used in ActionScript. However, I'd be intersted in why you want to use data binding in an ActionScript environment (for your ActionScript model or utility classes). In my experience, using a pure EventDispatcher is easier to write and most importantly to read (especially for other developer, potentially coming from other technologies). Just let your class dispatch a custom event when something important happens. Or if you cannot do that easily, listen to the propertyChange event of Bindable properties. Best, Alex --- In flexcoders@yahoogroups.com, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I am trying to figure out how to use the ObserveValue Component, when I use it inside of a Class File. In all the examples I've seen, they all utilize the Class File as a MXML Component - and when I use it in this manner, it works just fine. BUT, I really need to use this inside my Class Files - and as far as I can tell, I should be able to import the Class File, and create a new variable - casting it as an ObserveValue() - but when I use it this way, nothing happens. Per the examples, here is the proper use of the file: ac:ObserveValue id=valueObserver source={ model.myVarToBeWatched } handler=valueObserverHandler value=true/ Now, I'd like to use it using pure ActionScript - and here's what I got so far: (keep in mind, the AS Class File below, is extending the Control in which it belongs to - and rest assured, that I am placing all the appropriate code within all the proper Event Listeners, like onCreationComplete, etc.) I am just keeping it simple, for this particular post. package { import com.adobe.ac.*; class myClass extends Panel { private var myObserve:ObserveValue = new ObserveValue(); [Bindable] public var model:ApplicationModel = ApplicationModel.getInstance(); public function myClass():void { initObservers(); } private function initObservers():void { myObserve.source = model.myVarToBeWatched; myObserve.handler = valueObserverHandler; myObserve.value = true; } private function valueObserverHandler( event:Event ):void { trace( it worked ); } } } In my real code, I wait for the Creation Complete Event, before I initialize all of my Event Listeners, etc. So you can assume that my real code, is properly setup. My real question here is, when creating component written purely in AS3, can they be used either way - like as an inline Component in MXML, or if you choose, referenced within an AS3 Package? I don't see why not, since MXML Controls are all just Class Files anyway... So I just wanted to know if somebody could shed some light on what I'm doing wrong, or if the ObserveValue Class just wasn't designed to be used in this manner. Thanks in advance for all your help, Mike -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] ObserveValue, and how to reference within AS3 Class File
Hello All, I am trying to figure out how to use the ObserveValue Component, when I use it inside of a Class File. In all the examples I've seen, they all utilize the Class File as a MXML Component - and when I use it in this manner, it works just fine. BUT, I really need to use this inside my Class Files - and as far as I can tell, I should be able to import the Class File, and create a new variable - casting it as an ObserveValue() - but when I use it this way, nothing happens. Per the examples, here is the proper use of the file: ac:ObserveValue id=valueObserver source={ model.myVarToBeWatched } handler=valueObserverHandler value=true/ Now, I'd like to use it using pure ActionScript - and here's what I got so far: (keep in mind, the AS Class File below, is extending the Control in which it belongs to - and rest assured, that I am placing all the appropriate code within all the proper Event Listeners, like onCreationComplete, etc.) I am just keeping it simple, for this particular post. package { import com.adobe.ac.*; class myClass extends Panel { private var myObserve:ObserveValue = new ObserveValue(); [Bindable] public var model:ApplicationModel = ApplicationModel.getInstance(); public function myClass():void { initObservers(); } private function initObservers():void { myObserve.source = model.myVarToBeWatched; myObserve.handler = valueObserverHandler; myObserve.value = true; } private function valueObserverHandler( event:Event ):void { trace( it worked ); } } } In my real code, I wait for the Creation Complete Event, before I initialize all of my Event Listeners, etc. So you can assume that my real code, is properly setup. My real question here is, when creating component written purely in AS3, can they be used either way - like as an inline Component in MXML, or if you choose, referenced within an AS3 Package? I don't see why not, since MXML Controls are all just Class Files anyway... So I just wanted to know if somebody could shed some light on what I'm doing wrong, or if the ObserveValue Class just wasn't designed to be used in this manner. Thanks in advance for all your help, Mike
[flexcoders] Need primer on Events, from the List Gurus -
Hello All, This thread, directly relates to all the other ones I've posted recently - as I think one of my root problems, is truly understanding on how Events get propagated within an application. They say the Event model is so great, due to all the components being so loosely coupled. So either I am missing something really rudimentary here, or the Event model doesn't work the way I thought it did. In every example I've seen, for an Event Listener and Broadcaster setup to work properly, there must be a common link (like a container) between the 2 components - and then, there are the 3 key things which must be in place: The Event Listener, the Broadcaster, and the Function that gets run whenever the Event gets triggered. But what about the times, where I won't know for sure beforehand, which component I will be using at the time? Especially in a Cairngorm Application, where the Commands (which is where I desperately need to broadcast my Custom Events from) literally NEVER know where their Result Events are going to be sent. Of course, this is where the true power of Cairngorm-based Applications comes into play. All the Commands do really, is update the ModelLocater with their updated results - and because of Data Binding, the Components in the Application show the updated results. For me unfortunately, there is always much more that needs to be done, after a Result is brought back - and I need to find a way to tell my Application Components, to perform their next task (based on a Custom Event, that I broadcast). Can anybody show me how to Broadcast Events in such a manner, that they get disseminated Application-wide??? This way, I don't need to know beforehand, which Components will be Receiving the Events. This is the final thing on my plate that I must figure out, then I can FINALLY finish my app and find some peace in my life Thanks in advance, Mike
RE: [flexcoders] Need primer on Events, from the List Gurus -
Hello Dimitrios, I was trying to keep my post as generic as possible - which is why I didn't post specifics. In this particular instance however, I want to broadcast a Custom Event to a DataGrid residing on a Panel Control - to Scroll to the very top, whenever I add a new record to an ArrayCollection (residing in the ModelLocater). This can happen ONLY when I add a new record - and this is why I want to create a Custom Event for this. I am pushing for a Custom Event, because I don't think there is a built-in Event native to the DataGrid, that I can count on 100% of the time, to fire off ONLY when New Records are being added. The catch is, I can't dispatch the Event until I get my onResult response from the ColdFusion Server - indicating that the Database Insert was in fact successful, and that it's now okay to update the Model's ArrayCollection with the new ValueObject. Since the onResult logic resides in a Cairngorm Command Class, this is where I need to dispatch the Event from. Or at least initiate the command to dispatch the Event, which can reside in the ModelLocater - and dispatch it from there. Since all of my primary Views containing the Model-bound Controls, have a reference to the ModelLocater, I am thinking that there must be a way to dispatch these Events from the Model - and have a way for these Views to respond accordingly. If you could help me out in this regard, I really would be truly grateful. My application development, has literally come to a screeching HALT, because of me not knowing how to handle all these issues. I am tracking down every Event Broadcaster and Listener Tutorial I can get my hands on, so that I can learn more about how all this works. But in all of the examples I download and dissect, they ALL have a common View, that centralizes the code - in which it's quite easy to tie everything together. In my case, I have Views and Controls scattered all over the place - and they can be instantiated (or not be for that matter) at any given moment. I just don't know how to write code to broadcast Events in such a manner, so that each component has no prior knowledge of any other component. I hope I'm explaining all this properly... Thanks in advance, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios Gianninas Sent: Friday, January 12, 2007 3:01 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Need primer on Events, from the List Gurus - what other thing do u want to do? give an example and we can take it from there. Dimitrios Gianninas RIA Developer Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Friday, January 12, 2007 1:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Need primer on Events, from the List Gurus - Hello All, This thread, directly relates to all the other ones I've posted recently - as I think one of my root problems, is truly understanding on how Events get propagated within an application. They say the Event model is so great, due to all the components being so loosely coupled. So either I am missing something really rudimentary here, or the Event model doesn't work the way I thought it did. In every example I've seen, for an Event Listener and Broadcaster setup to work properly, there must be a common link (like a container) between the 2 components - and then, there are the 3 key things which must be in place: The Event Listener, the Broadcaster, and the Function that gets run whenever the Event gets triggered. But what about the times, where I won't know for sure beforehand, which component I will be using at the time? Especially in a Cairngorm Application, where the Commands (which is where I desperately need to broadcast my Custom Events from) literally NEVER know where their Result Events are going to be sent. Of course, this is where the true power of Cairngorm-based Applications comes into play. All the Commands do really, is update the ModelLocater with their updated results - and because of Data Binding, the Components in the Application show the updated results. For me unfortunately, there is always much more that needs to be done, after a Result is brought back - and I need to find a way to tell my Application Components, to perform their next task (based on a Custom Event, that I broadcast). Can anybody show me how to Broadcast Events in such a manner, that they get disseminated Application-wide??? This way, I don't need to know beforehand, which Components will be Receiving the Events. This is the final thing on my plate that I must figure out, then I can FINALLY finish my app and find some peace in my life Thanks in advance, Mike AVIS IMPORTANT WARNING Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement
RE: [flexcoders] Need primer on Events, from the List Gurus -
be executed when that event is triggered. The component must know about the event structure. The component that dispatches the event must also know the event structure. The event becomes an API, so to speak. Any component can listen or dispatch to that api. In other words, the event itself is communication between the two components and both components must know how to speak and listen to the event. --- On Fri, 12 Jan 2007 12:53:14 -0600, Mike Anderson wrote: Hello All, This thread, directly relates to all the other ones I've posted recently - as I think one of my root problems, is truly understanding on how Events get propagated within an application. They say the Event model is so great, due to all the components being so loosely coupled. So either I am missing something really rudimentary here, or the Event model doesn't work the way I thought it did. In every example I've seen, for an Event Listener and Broadcaster setup to work properly, there must be a common link (like a container) between the 2 components - and then, there are the 3 key things which must be in place: The Event Listener, the Broadcaster, and the Function that gets run whenever the Event gets triggered. But what about the times, where I won't know for sure beforehand, which component I will be using at the time? Especially in a Cairngorm Application, where the Commands (which is where I desperately need to broadcast my Custom Events from) literally NEVER know where their Result Events are going to be sent. Of course, this is where the true power of Cairngorm-based Applications comes into play. All the Commands do really, is update the ModelLocater with their updated results - and because of Data Binding, the Components in the Application show the updated results. For me unfortunately, there is always much more that needs to be done, after a Result is brought back - and I need to find a way to tell my Application Components, to perform their next task (based on a Custom Event, that I broadcast). Can anybody show me how to Broadcast Events in such a manner, that they get disseminated Application-wide??? This way, I don't need to know beforehand, which Components will be Receiving the Events. This is the final thing on my plate that I must figure out, then I can FINALLY finish my app and find some peace in my life Thanks in advance, Mike -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Need advice on which Event I should be using -
Hello All, I have a Cairngorm application containing a DataGrid, in which the Grid's dataProvider is bound to an ArrayCollection (comprised of ValueObjects) located in the ApplicationModel. Whenever I want to add a new record to the dataProvider, I first create a new ValueObject instance, then populate it using a Details Form. Of course, being a Cairngorm-based app, I dispatch a Cairngorm Event containing the ValueObject (which causes it to be sent off to the server), and then wait for the onResult response from the server. Obviously, I can't go blindly adding the new Record to the dataProvider, until I know for sure that I get a valid onResult response from the server. Now assuming that I DO get my onResult event, what I do then is add the ValueObject to the model's ArrayCollection using the addItemAt() method, inserting the ValueObject at Index Zero so it gets pushed to the top. This way, all newly created records appear at the top of the DataGrid (which is exactly what I want to happen). This is where things get fuzzy... Which Event should I have the DataGrid listen to, so that it gets scrolled to the very top, *ONLY* when a new record gets added to it's dataProvider? This is a case, where I'd actually prefer dispatching a Custom Event, so that I can manually dispatch it from the same Cairngorm Command Class handling the onResult Event - but I don't know if that is possible. I don't know yet, if I can dispatch events which get broadcasted across multiple controls. This is where I have a lot to learn, regarding the Event Model... If any of you could help me with this, I'd be very grateful for your help. Thanks in advance for everything, Mike
[flexcoders] Dispatching an Event from a Class
Hello All, I am attempting to dispatch an Event from a generic Class File, and I guess I'm not doing it correctly. I was hoping, that I could simply do this: import mx.events.IEventDispatcher And then in my function, I could simply dispatch the event like this: IEventDispatcher.dispatchEvent( event ); But it doesn't allow me to do this. In the meantime, I extended my Class to use the UIComponent, which automatically pulls in all the EventDispatcher stuff. Of course, it's silly for me to do this, since I really don't have a need to extend the UIComponent class. There must be a way, to import the proper Class, in order to simply dispatch events. Any advice? Thanks in advance for your help, Mike
RE: [flexcoders] Dispatching an Event from a Class
Yes, I understand this - But what about a generic class, that does NOT extend any other classes (which have the IEventDispatcher as part of their makeup) In my generic class (in this case, my ModelLocater which is part of a Cairngorm-based application), it doesn't natively have anything in there which includes the EventDispatcher stuff. So, I wanted to see what the bare minimum requirements would be, in order to Dispatch an Event from a Class File that doesn't extend or implement anything else. Also, I DO have the [Bindable] Metatag on this class, and even know I don't get any code-hinting whenever I type any dispatchEvent type code, I don't get any Compiler Errors either... That struck me as odd, but with what Tracy just mentioned, it does answer a few questions... So I guess, the [Bindable] Metatag is a quick way to add this functionality, but I am just curious if I wanted to accomplish this via some other means. Thanks for the info on this topic :) Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sergey Kovalyov Sent: Tuesday, January 09, 2007 1:28 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Dispatching an Event from a Class Just call dispatchEvent() (e. g. dispatchEvent(new Event(Event.CHANGE))) in any class that implements IEventDispatcher (e. g. all the EventDispatcher successors). Note, that UIComponent and all its successors implement IEventDispatcher, so dispatchEvent() could be called in any subclass of Box, ComboBox, Label, TextArea, HSlider, etc: package { import mx.controls.HSlider; public class MyHSlider extends HSlider { public function MyHSlider() { super(); dispatchEvent(new Event(instanceConstructed)); } } } On 1/9/07, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I am attempting to dispatch an Event from a generic Class File, and I guess I'm not doing it correctly. I was hoping, that I could simply do this: import mx.events.IEventDispatcher And then in my function, I could simply dispatch the event like this: IEventDispatcher.dispatchEvent( event ); But it doesn't allow me to do this. In the meantime, I extended my Class to use the UIComponent, which automatically pulls in all the EventDispatcher stuff. Of course, it's silly for me to do this, since I really don't have a need to extend the UIComponent class. There must be a way, to import the proper Class, in order to simply dispatch events. Any advice? Thanks in advance for your help, Mike
RE: [flexcoders] Dispatching an Event from a Class
Yes, I'd be happy to share :) #1) I just want to know how to do it, to put my mind at ease that I can do this if I DO ever have the need #2) The reason it's in my modelLocater is because, my debugText variable is held here - and I have a floating Debug Window which stays open during the development phase of my application. In my Debug Popup Window, I simply have a TextArea Control, in which I bind the model.debugText variable to. Then whenever I want to perform a trace, I just run my model.updateDebug() function, which in turn, appends any new Debug Information, to the model.debugText variable. And voila! my Debug Window gets updated with the debugText. #3) Any time Text is added to a TextArea control, and the text size exceeds the currently displayed limit, ScrollBars appear - and any additional text added, gets placed below the visible area. With the nature of the Text being debugging information, I am most interested in ONLY the latest text being added - so I need to automatically scroll my TextArea all the way to the bottom. I want within my grasp, the ability to manually dispatch the event, which causes my TextInput Control to scroll all the way to the bottom. #4) I know that I could simply create an event listener for the TextArea residing in my DebugWindow, that any time a change event occurs, to run a function that causes the ScrollBars to move all the way to the bottom. So with all that said, I guess bottom line, I am asking this: How can I write BOTH, and Event listener to listen for events, and ALSO an Event Dispatcher to dispatch the event, whereas I can ANYWHERE inside of my application, trigger this to happen any time I like?? I was under the impression, that Events get broadcasted Application Wide - and that anything with an active listener running, will capture and respond to the event. I guess I was sadly mistaken, because I am hitting a MAJOR brick with all of this. I would love to hear more input on this topic :) Thanks, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sam Shrefler Sent: Tuesday, January 09, 2007 7:19 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Dispatching an Event from a Class Mike, I'm interested in why you would dispatch an Event from your modelLocator? Could you please share? Also, could this be a case where the Observe tag could help you? http://weblogs.macromedia.com/paulw/archives/2006/05/the_worlds_smal.cfm Thanks Sam On 1/9/07, Mike Anderson [EMAIL PROTECTED] wrote: Yes, I understand this - But what about a generic class, that does NOT extend any other classes (which have the IEventDispatcher as part of their makeup) In my generic class (in this case, my ModelLocater which is part of a Cairngorm-based application), it doesn't natively have anything in there which includes the EventDispatcher stuff. So, I wanted to see what the bare minimum requirements would be, in order to Dispatch an Event from a Class File that doesn't extend or implement anything else. Also, I DO have the [Bindable] Metatag on this class, and even know I don't get any code-hinting whenever I type any dispatchEvent type code, I don't get any Compiler Errors either... That struck me as odd, but with what Tracy just mentioned, it does answer a few questions... So I guess, the [Bindable] Metatag is a quick way to add this functionality, but I am just curious if I wanted to accomplish this via some other means. Thanks for the info on this topic :) Mike From: flexcoders@yahoogroups.com http://ups.com/ [mailto: flexcoders@ mailto:flexcoders@ yahoogroups.com] On Behalf Of Sergey Kovalyov Sent: Tuesday, January 09, 2007 1:28 PM To: [EMAIL PROTECTED] ups.com http://ups.com/ Subject: Re: [flexcoders] Dispatching an Event from a Class Just call dispatchEvent() (e. g. dispatchEvent(new Event(Event.CHANGE))) in any class that implements IEventDispatcher (e. g. all the EventDispatcher successors). Note, that UIComponent and all its successors implement IEventDispatcher, so dispatchEvent() could be called in any subclass of Box, ComboBox, Label, TextArea, HSlider, etc: package { import mx.controls.HSlider; public class MyHSlider extends HSlider { public function MyHSlider() { super(); dispatchEvent(new Event(instanceConstructed)); } } } On 1/9/07, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I am attempting to dispatch an Event from a generic Class File, and I guess I'm not doing it correctly. I
RE: [flexcoders] Need some direction from the Pros, on Event Dispatching, and Scoping issues
Thanks Clint, for those links - The first link, has a section which explains the invalidation stuff - which was really informative. I love reading stuff like this, as it really gives better insight into how things work, as well as what's going through the minds of the Flex engineers, while designing their control's structure. Also, I wasn't aware of the 2nd link - flexsearch.org - and I will start using this on a regular basis, when searching for solutions to problems. Have a good night and weekend Clint :) Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Modien Sent: Saturday, January 06, 2007 8:24 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Need some direction from the Pros, on Event Dispatching, and Scoping issues Not to quash your hopes of getting to play with Adobe's really pretty eventing but... traceArea.vPosition = traceArea.maxVPosition; http://www.mail-archive.com/flexcoders@yahoogroups.com/msg19784.html http://www.mail-archive.com/flexcoders@yahoogroups.com/msg19784.html http://www.flexsearch.org/index.shtml?cx=017079146949617508304%3Ama9avcq 0-ngq=textarea+scroll+sa=Searchcof=FORID%3A9#768 http://www.flexsearch.org/index.shtml?cx=017079146949617508304%3Ama9avc q0-ngq=textarea+scroll+sa=Searchcof=FORID%3A9#768 On 1/5/07, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, As long as I've been coding Flex Apps (since 1.0 Beta), I've not had the need to Dispatch Events manually, in addition to having the Controls that receive the dispatched Events, reside on a different control (or in a Remote Window)... Could somebody really quick point me in the right direction, for a crash course in Event Dispatching - as well as handling Scoping issues? My present problem I'm trying to tackle is this: I have a draggle Popup TitleWindow which displays Debugging information while my application runs. Using Cairngorm, I keep my Debug Messages in a Text Variable (which obviously resides in my Model). My debug TitleWindow's TextArea control, has it's Text Property bound to the model.debugMessages variable. This works beautifully - since when my function kicks off, it appends the new debug information (plus a carriage return) to the TextArea. The problem is, the TextArea doesn't auto scroll to the bottom whenever new text is added to the control. Being a programmer interested in debug messages, I am primarily interested in the LATEST debug information. With that said, I am trying to dispatch an Event, to have the TextArea auto scroll to the very bottom, anytime there is new Text added. I know the Property name that I must change, but I need to find out how to make the Dispatched Event, get disseminated across the application, to the Debug Window control. I know I could simple listen for the change event locally to the DebugWindow Control, but I need to find out how to trigger this manually. Could any of you help me out regarding this? Thanks in advance for any help you can offer, Mike
RE: [flexcoders] Need some direction from the Pros, on Event Dispatching, and Scoping issues
Too funny Clint - you read my mind on BOTH instances. I first said to myself, that was Flash 8 Flex 1.5 Syntax (as I found the Flex 2.0 syntax, since my original post last night) And secondly, I also came to the conclusion, that dispatching an Event manually may be overkill, since using a built-in Event and attaching a function to it, will be all I really need for this particular application. Per another post, it was mentioned that I should use the UpdateComplete event to cause the text to scroll to the bottom - but I am finding out that this event gets triggered MUCH more often then people may realize. Especially the resize event, in which I use quite a bit with this TitleWindow... For now I am using Change, and this should hopefully be all I need in order to keep the most recently added text, visible in the control. Again, Thanks for all your help - in addition to everybody else on this list. Take Care, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Modien Sent: Saturday, January 06, 2007 8:47 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Need some direction from the Pros, on Event Dispatching, and Scoping issues Oops that was Flex 1.5 syntax... should be. traceArea.verticalScrollPosition = traceArea.maxVerticalScrollPosition; It may even be possible to bind it. mx:TextArea id=traceArea verticalScrollPosition={ traceArea.maxVerticalScrollPosition} / I understand you want to dispatch a custom event here but it seems like a bit overkill. On 1/6/07, Clint Modien [EMAIL PROTECTED] wrote: Not to quash your hopes of getting to play with Adobe's really pretty eventing but... traceArea.vPosition = traceArea.maxVPosition; http://www.mail-archive.com/flexcoders@yahoogroups.com/msg19784.html http://www.mail-archive.com/flexcoders@yahoogroups.com/msg19784.html http://www.flexsearch.org/index.shtml?cx=017079146949617508304%3Ama9avcq 0-ngq=textarea+scroll+sa=Searchcof=FORID%3A9#768 http://www.flexsearch.org/index.shtml?cx=017079146949617508304%3Ama9avc q0-ngq=textarea+scroll+sa=Searchcof=FORID%3A9#768 On 1/5/07, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, As long as I've been coding Flex Apps (since 1.0 Beta), I've not had the need to Dispatch Events manually, in addition to having the Controls that receive the dispatched Events, reside on a different control (or in a Remote Window)... Could somebody really quick point me in the right direction, for a crash course in Event Dispatching - as well as handling Scoping issues? My present problem I'm trying to tackle is this: I have a draggle Popup TitleWindow which displays Debugging information while my application runs. Using Cairngorm, I keep my Debug Messages in a Text Variable (which obviously resides in my Model). My debug TitleWindow's TextArea control, has it's Text Property bound to the model.debugMessages variable. This works beautifully - since when my function kicks off, it appends the new debug information (plus a carriage return) to the TextArea. The problem is, the TextArea doesn't auto scroll to the bottom whenever new text is added to the control. Being a programmer interested in debug messages, I am primarily interested in the LATEST debug information. With that said, I am trying to dispatch an Event, to have the TextArea auto scroll to the very bottom, anytime there is new Text added. I know the Property name that I must change, but I need to find out how to make the Dispatched Event, get disseminated across the application, to the Debug Window control. I know I could simple listen for the change event locally to the DebugWindow Control, but I need to find out how to trigger this manually. Could any of you help me out regarding this? Thanks in advance for any help you can offer, Mike
RE: [flexcoders] Re: Can controls be placed in the Title Area on TitleWindows and Panels??
Naw, you have a pretty good idea of what I mean. The thing is though, I am not complaining about the (lets say in this case) grey area which comprises the title bar going across the entire way. See, I want to keep that portion, as well as the height of it - but I just want to be able to put controls in there - as it gives the user the impression that the control is part of a different area on the screen. Sort of a background for the control - which sets it apart even more. I guess I could do what you mentioned, and create a container that mimics the exact look as the title bar, and place it directly beneath it - giving the illusion that the entire thing is one contiguous piece of real-estate. Still, I just wanted to know if Adobe provided any built-in methods, for doing something like this. Sort of like a TitleBar Renderer, or Skin perhaps - that can be dropped in using standard coding techniques. Now that I explained it further, hopefully that clarifies things where more people can jump in and provide extra input. Thanks for everything so far though - I really appreciate it. Mike -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of superstella_uk Sent: Friday, January 05, 2007 7:03 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Can controls be placed in the Title Area on TitleWindows and Panels?? --- In flexcoders@yahoogroups.com, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, I have an extreme need, to place some simple controls - where the Title normally appears within a Panel or TitleWindow. Adjust the headerheight of the panel. You can then substitute the header with a container of your own, where things can be displayed. Hopefully I didnt misunderstand your requirements :-) -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Need some direction from the Pros, on Event Dispatching, and Scoping issues
Hello All, As long as I've been coding Flex Apps (since 1.0 Beta), I've not had the need to Dispatch Events manually, in addition to having the Controls that receive the dispatched Events, reside on a different control (or in a Remote Window)... Could somebody really quick point me in the right direction, for a crash course in Event Dispatching - as well as handling Scoping issues? My present problem I'm trying to tackle is this: I have a draggle Popup TitleWindow which displays Debugging information while my application runs. Using Cairngorm, I keep my Debug Messages in a Text Variable (which obviously resides in my Model). My debug TitleWindow's TextArea control, has it's Text Property bound to the model.debugMessages variable. This works beautifully - since when my function kicks off, it appends the new debug information (plus a carriage return) to the TextArea. The problem is, the TextArea doesn't auto scroll to the bottom whenever new text is added to the control. Being a programmer interested in debug messages, I am primarily interested in the LATEST debug information. With that said, I am trying to dispatch an Event, to have the TextArea auto scroll to the very bottom, anytime there is new Text added. I know the Property name that I must change, but I need to find out how to make the Dispatched Event, get disseminated across the application, to the Debug Window control. I know I could simple listen for the change event locally to the DebugWindow Control, but I need to find out how to trigger this manually. Could any of you help me out regarding this? Thanks in advance for any help you can offer, Mike
[flexcoders] What happened to mx.utils.Delegate?
Is this now gone? I am trying to add an EventListener to a Control that doesn't reside locally to the main application. With that said, I need to use the Delegate Class in order to specify the proper scope. In Flex 1.5 as well as Flash, I would have coded my function similar to this: private function addEventListener():void { myControl.addEventListener(change, mx.utils.Delegate.create(this, onControlChange)); } private function onControlChange( event:Event ):void { // Change code goes here } Of course, the compiler knows nothing of the Delegate class and I get a compile error - This question also relates to my previous post, and I am hitting a major brick wall with this scoping stuff. I had this down to a science with all the Flash Applications I wrote in the past... I am getting a tad frustrated, trying to port all my AS 2.0 code, to the new Flex environment. Even Flex 1.5 had the Delegate Class - so Flex 2.0 must have done away with it??? If so, how am I supposed to scope my functions??? Thanks in advance for all your help, Mike
RE: [flexcoders] What happened to mx.utils.Delegate?
Thanks Greg! I actually just found this myself a few minutes before your reply, but thanks for your effort nevertheless. The Flex way is much easier and better to use, than Flash - it just takes a little getting used to. My deepest thank you's to everybody on this list, that continually help me out :) Regards, Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of greg h Sent: Saturday, January 06, 2007 1:10 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What happened to mx.utils.Delegate? Mike, I can not say for certain if the following will be of assistance. However, based on your very concise description, it appears to corroborate what you have observed. The following is from page 16 in the PDF document Migrating Applications to Flex 2: Step 4: Update events The Event model changed in Flex 2. However, you can migrate most event handlers with minimal effort. This section describes the most popular changes that you must make to your event handling code. ... Remove delegates You are no longer required to wrap a listener function with a Delegate to maintain application scope. You can remove the Delegate from the following line: b1.addEventListener(click, mx.utils.Delegate.create(this,myListener)); So the line appears as follows: b1.addEventListener(MouseEvent.CLICK, myListener); I personally have found portions of the Migrating Applications to Flex 2 critically important. For reasons I do not know, this critical doc is available as PDF only. Personally I would like to see this doc included in the HTML browsable versions of the documents, and especially up on LiveDocs where search engines could index it. That all said, the direct link for downloading the PDF version is: http://www.adobe.com/go/flex2_migrating_pdf I just pulled the download link from the main Flex 2 Documentation page at: http://www.adobe.com/support/documentation/en/flex/ hth, g On 1/5/07, Mike Anderson [EMAIL PROTECTED] wrote: Is this now gone? I am trying to add an EventListener to a Control that doesn't reside locally to the main application. With that said, I need to use the Delegate Class in order to specify the proper scope. In Flex 1.5 as well as Flash, I would have coded my function similar to this: private function addEventListener():void { myControl.addEventListener(change, mx.utils.Delegate.create (this, onControlChange)); } private function onControlChange( event:Event ):void { // Change code goes here } Of course, the compiler knows nothing of the Delegate class and I get a compile error - This question also relates to my previous post, and I am hitting a major brick wall with this scoping stuff. I had this down to a science with all the Flash Applications I wrote in the past... I am getting a tad frustrated, trying to port all my AS 2.0 code, to the new Flex environment. Even Flex 1.5 had the Delegate Class - so Flex 2.0 must have done away with it??? If so, how am I supposed to scope my functions??? Thanks in advance for all your help, Mike
[flexcoders] Automatically scrolling a TextArea to the very bottom?
Hello All, I am trying to find the common methods, when comparing the TextArea from Flash 8 to the TextArea from Flex 2.0 - In my Flash App, whenever I wanted to scroll my TextArea all the way to the bottom, I used the following code: myTextArea.vPosition = myTextArea.maxVPosition; I am trying to sift through the Properties and Methods of the Flex version, and I am not entirely sure how to accomplish this. Could any of you point me in the right direction? Thanks in advance for all your help, Mike
[flexcoders] Can controls be placed in the Title Area on TitleWindows and Panels??
Hello All, I have an extreme need, to place some simple controls - where the Title normally appears within a Panel or TitleWindow. To further clarify, the top area where the x would appear, if you had the close button visible (in the case of a TitleWindow). I know that these are containers, and all the controls they contain, typically would appear within the display area - but when space is super tight, it's a terrible waste to not use that beautiful blank space that appears all the way across the top. And in some cases, it would actually look more appropriate - like in my particular case, a DataGrid appearing in the main display area - and a Search TextInput, in the blank space above (that I am referring to in this post). Is this possible? Thanks in advance for any information offered on this topic, Mike