[Flashcoders] Need help with Keyboard events
Hello All, Could any of you help me with the logic, required to capture a combination? I am coming back from writing Flex Apps, to writing some Flash Apps. In Flex, this is a total piece of cake - but with Flash, it's not as easy to capture Control-Key combinations. Does anybody have any sample code, that demonstrates how to capture keystroke combinations? Thanks in advance for your help, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Help with ClassFile, referencing functions within an imported ClassFile
Hello All, I am using Robert Penners updated AS 2.0 ClassFile, which is being brought in via an "import" statement, into my own Extended MovieClip ClassFile. I have a list of Icons that are dynamically being brought in (through a SQL Remoting Call), and each Icon has it's own Shape and Size. Since Flash STILL DOES NOT have it's own Dynamic Registration that developers have been begging for, I had to use a 3rd party solution. These Icons must scale from the Center Out, so a solution like this is absolutely required. If I try to access the new properties (some of those being _x2 and _y2) from within my ClassFile, they are unknown to the Class. If I try to access the properties from OUTSIDE of the Class, I am able to do so. Is there anything I need to do, in order to access these newly created Properties and Methods from within the ClassFile that imported the Dynamic Registration ClassFile?? Thanks in advance for any information you can offer, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flash SWF Loading fine, but Remoting hangs...
Yes, it's the SAME 5% of the users - So there must be something in common with all these people. Please keep those comments coming :) I need all the help I can get right now! Many thanks! Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, June 09, 2006 11:22 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] Flash SWF Loading fine, but Remoting hangs... Do the 5% have the same http: browsing capabilities as the 95%? I had a similar issue and found out because I was new here, and even though I could browse to most web sites, unknown to me my http access was somewhat restricted until I was granted full, regular access. Are there any possible http access restrictions on these users for some reason? >>JavaScript "document.write" method to write out the Flash Object tags - That shouldn't have anything to do with it since you said the application starts - so they are past the Javascript at that point. It sounds like the Remoting call is failing for those users for some reason. And is it always the same 5% or is it 5% of random users? If it's random, I have also had problems with network blips because someone else was working on an application at the time or whatever. If it's always the same 5% then it seems to be due to something specific to their configuration and not a network blip. Anyway, things to think about. Jason Merrill Bank of America Learning Technology Solutions >>-Original Message- >>From: [EMAIL PROTECTED] [mailto:flashcoders- >>[EMAIL PROTECTED] On Behalf Of Mike Anderson >>Sent: Friday, June 09, 2006 11:57 AM >>To: Flashcoders mailing list >>Subject: [Flashcoders] Flash SWF Loading fine, but Remoting hangs... >> >>Hello All, >> >>I have a very intense problem, that must be addressed ASAP - our users >>are getting really angry :( >> >>We have a typical AS 2.0 Flash Application to view maps - and we are >>using Remoting w/ColdFusion in order to send our data back and forth. >> >>For only like 5% of the users, the application starts and loads >>completely with all it's related controls. BUT when the time comes for >>the initial Remoting call to the server (which populates all the >>dropdowns, etc.) it just hangs indefinitely - and we just can't figure >>out what is going on. >> >>The other 95% of the user base is working perfect! We have had comments >>regarding security settings, etc. so I know some users may have problems >>there, and some have Corporate Firewall problems - but that type of >>issue has to be addressed with the Admin person. We are using the >>JavaScript "document.write" method to write out the Flash Object tags - >>in order to circumvent the "Click to Activate this control" problem. >> >>What issues are we not seeing, or taking into consideration, which would >>affect this 5% of the user base? >> >>Also, a quick note, we are running ColdFusion on Port 80 - so there are >>no other port issues that I am aware of (in case some users were >>blocking port 8500). I was confident that if we ran everything on Port >>80, that this app would be friendly to all Firewalls. >> >>Thanks in advance, for any advice you can throw my way. >> >>Mike >>___ >>Flashcoders@chattyfig.figleaf.com >>To change your subscription options or search the archive: >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >>Brought to you by Fig Leaf Software >>Premier Authorized Adobe Consulting and Training >>http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Validating Zip Code for Tax Purposes
And better yet, find 2-3 unique Web Service providers - That way, in case one website is down, you can write code that will retrieve data from the 2nd provider, in case the 1st provider times out. I like doing things myself too, and having total control over everything - but in cases like this, it usually is better to let a web service handle the work. Just make sure and cover the bases, with multiple web service providers. Hope that little tidbit of info helps :) Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Coning Sent: Friday, June 09, 2006 10:50 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] Validating Zip Code for Tax Purposes Never done it before, but have you considered finding a Web Service provider that does it for you and all you have to do is pass it the variables? Here's one I found quickly doing a google search: http://www.strikeiron.com/ProductDetail.aspx?p=105 By using a web service provider to manage this for you, then you don't have to worry about tax codes and law changes. No liability! Doug Coning Senior Web Development Programmer FORUM Solutions, LLC > -Original Message- > From: [EMAIL PROTECTED] [mailto:flashcoders- > [EMAIL PROTECTED] On Behalf Of Digital Rust > Sent: Friday, June 09, 2006 11:42 AM > To: Flashcoders mailing list > Subject: [Flashcoders] Validating Zip Code for Tax Purposes > > Hi, everyone > > I'm building an ecommerce site and need to calculate state tax for > California based upon user input in a zip code field. > > Has anyone done this before? Would you possibly have some example code > or point me in the right direction? > > Thanks, > Dave > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com This e-mail and any attachment(s) are intended for the specified recipient(s) only and are legally protected. If you have received this communication in error, please "reply to" sender's e-mail address with notification of the error and then destroy this message in all electronic and physical forms. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Flash SWF Loading fine, but Remoting hangs...
Hello All, I have a very intense problem, that must be addressed ASAP - our users are getting really angry :( We have a typical AS 2.0 Flash Application to view maps - and we are using Remoting w/ColdFusion in order to send our data back and forth. For only like 5% of the users, the application starts and loads completely with all it's related controls. BUT when the time comes for the initial Remoting call to the server (which populates all the dropdowns, etc.) it just hangs indefinitely - and we just can't figure out what is going on. The other 95% of the user base is working perfect! We have had comments regarding security settings, etc. so I know some users may have problems there, and some have Corporate Firewall problems - but that type of issue has to be addressed with the Admin person. We are using the JavaScript "document.write" method to write out the Flash Object tags - in order to circumvent the "Click to Activate this control" problem. What issues are we not seeing, or taking into consideration, which would affect this 5% of the user base? Also, a quick note, we are running ColdFusion on Port 80 - so there are no other port issues that I am aware of (in case some users were blocking port 8500). I was confident that if we ran everything on Port 80, that this app would be friendly to all Firewalls. Thanks in advance, for any advice you can throw my way. Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] How do URL-Encoded Vars get perceived by the Flash Movie??
Hello All, I am a huge advocate of declaring all my Vars, and 99% of all my Applications, are comprised of ClassFiles extending MovieClips - this way, I can use the AS 2.0 methods of programming, and keep my Apps as clean as possible. Now in my Root Timeline, I initialize all my MovieClips there, and get the initial ball rolling, based on Variables that have been passed in the URL. I am embedding my Vars directly inside the tags (i.e. myMovie.swf?varName=value) It's my understanding, that these Vars are immediately available to the Movie, once it starts up. In the Root Timeline, how are these Vars viewed by the application? Right this moment, I am using "this.varName" and it seems to be working fine that way. I still feel that I need a better understanding of this topic, to avoid any future problems that come up (in case, my movie doesn't behave the way it should) What would happen, if I declared these Vars in my startup code? Is this still considered a good practice, only in the case of Vars passed via the URL? These Vars are accessible regardless of me formally declaring them or not - but I want to Cast them properly. Some Vars that I pass in, are Strings, some Numeric, and some Boolean. Could any of you explain to me, the overall topic of Vars that get passed in via the URL? How do they get created inside the movie? Should I still declare them? - or by declaring them, am I jeopardizing the creation process? If I cast them using the Var statement, will that ensure they will get cast as THAT TYPE, when they are passed in via the URL? I would love to hear how all this works, and also, when they technically become available - so that I can start loading other MovieClips (knowing for sure, that they are fully initialized - and not "undefined" when I try to access their values). Thanks again everybody!! Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] How to hide SWF Assets from Internet users
Thanks everybody, I shall go through all the suggestions, and try to implement something that will work for all parties concerned. I guess it is truly a balance between security and usability. That Player 9 solution sounds wonderful! - That's how we deliver some of our Jpegs (in a Binary data Stream, directly from a Database field) - and always loved that type of solution. Overall, it's faster and less overhead, simply using databases to contain the pointer reference, for where the actual file is located. BUT, for ultimate security, I'd love the ability to store all the binary data in a database, and then "create it" on the fly. Take care everyone, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Wednesday, June 07, 2006 12:54 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] How to hide SWF Assets from Internet users This is a problematic area for sure. It's technically impossible to completely protect the data in a swf from being cached and decompiled. If you do use the _url property, it is entirely possible for someone to decompile and rewrite the "viewer" swf to send back whatever they want instead of the _url property. With regard to the PHP script that was mentioned earlier: scripts like these that prevent caching may not work the same across different browsers and OS's. Also, they can be defeated with other tools. Essentially, if the bytes can get to your machine, they can be captured. You have to understand the level of risk involved and decide what lengths you wish to go in order to protect your data. It may be appropriate to use one of the methods suggested already, or it may be that something more robust is in order. Since we're talking about maps, I would think that you wouldn't need to go to great lengths to protect them (unless they are maps to buried treasure!). That said, Flash Player 9 will have the ability to load a swf over a socket into a ByteArray and then display it with Loader.loadBytes. This would be a pretty bullet-proof way to prevent the swf from being cached, and make it much more difficult to capture. But, you may not want to wait for Player 9. Present day, you could look at rendering the maps using the Drawing API - then you'd just be passing coordinates instead of whole swfs. But, that would take significant effort, and it sounds like it's pretty late in the game. -tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bieniasz, Myles Sent: Wednesday, June 07, 2006 1:09 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] How to hide SWF Assets from Internet users One way is to use the _url property, which will point to the .swf's location on the file system, then just have each map check if it's residing at the proper url. If it is allow the map to be view and if not don't display anything. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Wednesday, June 07, 2006 12:51 PM To: Flashcoders mailing list Subject: [Flashcoders] How to hide SWF Assets from Internet users Hello All, I have an intense situation right now, and I must come up with an answer ASAP. I wrote a map viewer application for my client, in which my viewer can load .swf Vector Maps from a predetermined directory on the server. >From within my viewer, the users can perform drill-down queries, by selecting contents of multiple dropdown boxes - State, Region, then Lake Name. Paid subscribers, have full access to their maps - but it's imperative that they can ONLY view these maps from within the viewer app. Since the Flash Map Viewer, needs to retrieve these maps from the server using a public URL (unless I am overlooking something), how can I hide these maps from the world - if the outside users are able to figure out which path to type into their browser, and snatch up maps? I know that server-side scripts, can access local resources - like "D:\Documents", etc. - but once the Map Viewer is running from a Remote Browser, how can I bury these maps under some type of file system that is not directly accessible by the outside world (but only through the Map Viewer app)??? Also, once the user views a particular map, how can I prevent the map.swf file from being Cached on their hard drive? If any of you could help me out regarding this, I'd be very appreciative. Thanks, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com MLB.com: Where Baseball is Always On __
[Flashcoders] How to hide SWF Assets from Internet users
Hello All, I have an intense situation right now, and I must come up with an answer ASAP. I wrote a map viewer application for my client, in which my viewer can load .swf Vector Maps from a predetermined directory on the server. >From within my viewer, the users can perform drill-down queries, by selecting contents of multiple dropdown boxes - State, Region, then Lake Name. Paid subscribers, have full access to their maps - but it's imperative that they can ONLY view these maps from within the viewer app. Since the Flash Map Viewer, needs to retrieve these maps from the server using a public URL (unless I am overlooking something), how can I hide these maps from the world - if the outside users are able to figure out which path to type into their browser, and snatch up maps? I know that server-side scripts, can access local resources - like "D:\Documents", etc. - but once the Map Viewer is running from a Remote Browser, how can I bury these maps under some type of file system that is not directly accessible by the outside world (but only through the Map Viewer app)??? Also, once the user views a particular map, how can I prevent the map.swf file from being Cached on their hard drive? If any of you could help me out regarding this, I'd be very appreciative. Thanks, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Can Variables have listeners?
Hello All, I have a ton of components scattered throughout my application, and most of them react to changes of a specific variable. It's getting really old, having to manually write code - that updates all these controls with the new value of a specific variable, when a specific variable changes. It would be nice to just have ONE function, that propagates all the changes to all my controls, and then have an active listener applied to a variable which automatically triggers that specific function. Am I overlooking something, or is there a better way to do something like this? Thank you all in advance, for any suggestions you can throw my way. Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Duplicating a MovieClip that contains Sub-Clips
Hello All, If you duplicate a MovieClip that happens to contain children sub-clips, does the newly created MovieClip also contain all the identical sub-clips? If this is not the case, how would one go about doing that? Duplicate the MovieClip, but then loop through all the sub-clips that the original MovieClip originally contained? If any of you could clarify this topic, I'd greatly appreciate it. Thanks, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Using EventDispatcher to update Controls and other Variables?
Hello There! As long as we are on the topic of EventDispatcher, I have another question that could really help me out. If I have multiple Controls (and variables) throughout my application, that were all tied to a SINGLE variable (that changes several times per second), could I use an EventDispatcher method - to dispatch an event whenever this specific variable changes, and have ALL those controls subscribed to that Event, update themselves with this new value? Right now, I have a Mouse position function (which runs every time the mouse moves), that updates a TON of TextFields scattered throughout my application with the mouse coordinates. In my function, I have to go through Each and Every TextField instance, and update the .text properties. Is there a better way to accomplish this, like using the Event system? Or is this considered such a simple process, that manually setting the .text properties for a ton of controls is just the easiest way, rather than dispatching events? (keep in mind, this variable gets updated many times per second) This topic has been on my mind for a LONG time now - and I would love a definitive answer on how to do this. Thanks in advance! Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Reusing MovieClipLoader Listeners
Are you sure it just doesn't "appear that way", but in reality, it's just happening so fast - that it looks like it's not working at all? I just ask, because I have a Map Application that I wrote - and it downloads quite large SWF files - in which a progress bar gets updated based on the loader progress. It works great, when I load the map for the first time, but subsequent accesses makes the progress bar appear and disappear, without the scrolling behavior. It occurred to me afterwards, that after the initial load, it was grabbing the file from my cache locally. When I jumped to a different PC (with an empty cache) it worked great once again - of course until the time when I loaded it the 2nd time. So just make sure that your problem isn't because you are loading something that you technically already have (sitting in your cache). Just something to consider, before investing too much time into this problem. Also, YES I reuse MY Loader over and over, for different SWF files, and it does work just fine. You don't have to do anything differently - so I am not sure what else may be happening, if it doesn't end up being what I mentioned above. Hth, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of lincoln Sent: Wednesday, April 12, 2006 10:39 PM To: Flashcoders mailing list Subject: [Flashcoders] Reusing MovieClipLoader Listeners I have a function that I'm using to preload images into a container clip using the MovieClipLoader class. The preloader works fine on the initial image but on successive calls to the function, the onLoadProgress seemingly never fires (in order to update the percentage in a textfield). However, the onLoadInit does fire and the preloader fades away. The manual says to use onLoadComplete for repeated usages of listeners, but it doesn't seem to allow me to continuously reuse the listener to load in another image. How do I set this up to allow multiple calls to the function and have the preloader fire from 0%->100%? function preloadImage(img:String,target:MovieClip):Void{ var mclListener:Object = new Object(); var image_mcl:MovieClipLoader = new MovieClipLoader(); image_mcl.addListener(mclListener); mclListener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number):Void { // should I remove the listener here and delete the obj? } /* this function never fires properly after the first call! */ mclListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { photoLoaded = Math.round(100/bytesTotal*bytesLoaded); MainLoader.load_text.LoadPer1.text = "Loading "+photoLoaded+"%"; } mclListener.onLoadInit = function(target_mc:MovieClip) { preloadFadeOut(); }; image_mcl.loadClip(img, target); }; preloadImage("images/5.2.1a.jpg", image_mc); // this one preloads great! preloadImage("images/5.2.2a.jpg", image_mc); // this does not have onLoadProgress but fires onLoadInit any ideas? thanks! -l ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Need help understanding EventDispatcher
Hey - no prob! Actually, what the 2 other guys contributed, helped ME out quite a bit too. That's what I love about this list - you can learn so much about so many things - and because there are so many different people here, each person explains things in their own way. You picked the BEST Flash list - hands down - so you are fortunate. It's not always easy to find the best list, when you are searching around for a mailing list to join. Sometimes, hearing the same answer, explained from different people, really helps you understand in a much better way. So I'd like to say Thank You too - as you all helped me solidify my understanding of this topic as well. Take Care everybody! Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Cardenas Sent: Wednesday, April 12, 2006 9:27 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Need help understanding EventDispatcher Thanks Mike, That does help. I get scope - although admittedly I should pay a little more attention to it... :-) And I wasn't familiar with the Delegate class - clearly something I need to read about. -dc --- [EMAIL PROTECTED] 917-750-6398 AIM: dcardena --- On Apr 12, 2006, at 9:45 PM, Mike Anderson wrote: > Yes, sorry I should have mentioned that too - (about getting rid of > extending the MovieClip). > > I assumed you were purposely extending the MovieClip, but I should > have helped more and told you to get rid of that portion, and just > make a plain vanilla class file. It would have made all the other > stuff you were putting in there, much more pertinent - since you would > no longer have any functionality inherited from another class, you > would have to build all the Event Broadcasting in manually.. > > For the Delegate question, the reason for that, is if you have a > MovieClip or "whatever it is" deeply nested within the movie, and you > start dispatching Events, sometimes Flash gets confused as to where to > send the events. That's what they refer to as "Scope". > > As you can already see, with the _level0, etc. you can have lots of > levels in a Movie - it keeps things organized, and creates kind of a > stacking order - and it even affects things visually - like something > visually appearing beneath something else, if it resides on a lower > level. > > The Delegate stuff, ensures that the Event you are broadcasting, > actually gets to the Object that's supposed to be receiving it - and > not somewhere else. That was a really great thing, when they came out > with it a couple years ago. I am pretty rusty right now with writing > code, etc. but at the time it really fixed a lot of problems with > scope. > > With AS3, I guess that's all fixed - so you can dispatch events to > your hearts content, and Flash takes care of the rest, without having > to use the Delegate stuff. > > I am just a mediocre coder, so I am sure lots of other people will > help with answering this question for you. > > Hope this help a little bit, and good luck :) > > Mike > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Johannes Nel > Sent: Wednesday, April 12, 2006 7:57 PM > To: Flashcoders mailing list > Subject: Re: [Flashcoders] Need help understanding EventDispatcher > > you add and use delegate to solve scoping issues. > > On 4/12/06, Johannes Nel <[EMAIL PROTECTED]> wrote: >> >> ok sorry, you are extending movieclip. i thought for soem reason you >> were not. there is no reason for you to be extending movieclip, so >> don't >> >> once you have gotten rid of the inheritance then it should work. the >> reason the onPress function works is due to the fact that you are >> extending movieclip, and then you assign a different refrence for >> that > function. >> >> anyway i hope you understand what i am tryimg to say >> >> > > > -- > j:pn > http://www.lennel.org > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Softwa
RE: [Flashcoders] Need help understanding EventDispatcher
Yes, sorry I should have mentioned that too - (about getting rid of extending the MovieClip). I assumed you were purposely extending the MovieClip, but I should have helped more and told you to get rid of that portion, and just make a plain vanilla class file. It would have made all the other stuff you were putting in there, much more pertinent - since you would no longer have any functionality inherited from another class, you would have to build all the Event Broadcasting in manually.. For the Delegate question, the reason for that, is if you have a MovieClip or "whatever it is" deeply nested within the movie, and you start dispatching Events, sometimes Flash gets confused as to where to send the events. That's what they refer to as "Scope". As you can already see, with the _level0, etc. you can have lots of levels in a Movie - it keeps things organized, and creates kind of a stacking order - and it even affects things visually - like something visually appearing beneath something else, if it resides on a lower level. The Delegate stuff, ensures that the Event you are broadcasting, actually gets to the Object that's supposed to be receiving it - and not somewhere else. That was a really great thing, when they came out with it a couple years ago. I am pretty rusty right now with writing code, etc. but at the time it really fixed a lot of problems with scope. With AS3, I guess that's all fixed - so you can dispatch events to your hearts content, and Flash takes care of the rest, without having to use the Delegate stuff. I am just a mediocre coder, so I am sure lots of other people will help with answering this question for you. Hope this help a little bit, and good luck :) Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel Sent: Wednesday, April 12, 2006 7:57 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Need help understanding EventDispatcher you add and use delegate to solve scoping issues. On 4/12/06, Johannes Nel <[EMAIL PROTECTED]> wrote: > > ok sorry, you are extending movieclip. i thought for soem reason you > were not. there is no reason for you to be extending movieclip, so > don't > > once you have gotten rid of the inheritance then it should work. the > reason the onPress function works is due to the fact that you are > extending movieclip, and then you assign a different refrence for that function. > > anyway i hope you understand what i am tryimg to say > > -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Need help understanding EventDispatcher
If you are extending a MovieClip - doesn't the MovieClip already have all those things "you are trying to recreate" at your disposal? That is the whole point of extending a MovieClip - so you DON'T have to go through all the stuff you are going through right now. I am no guru at this stuff, but I write Class Files on a daily basis, and I NEVER have to deal with stuff like this. I create custom listeners, and dispatch events on a regular basis - and it works just beautifully. It just seems like you are reinventing the wheel, and defeating the whole purpose of why things were created this way in the first place. This is just my initial reaction to what I've seen, and I am sure some more experienced people will chime in on this thread. Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Cardenas Sent: Wednesday, April 12, 2006 7:10 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Need help understanding EventDispatcher Hi, I'm trying to learn event handling using the EventDispatcher class and am having a hard time getting a test to work. I'm also fairly new to OOP, so I'm having a hard time finding the problem in my code. I've created a simple "Ball" class that creates an empty MC and then draws a circle in it. I've defined some event methods in the class and contained them within a "declareEventMethods" method. I don't know if that's the right way to do it or not - I modeled this test on various tutorials I've found online, but it's not working. What I'm trying to do is create a new instance of the "Ball" class called "myBall", then notify an event handler of events dispatched by myBall. The handler should then execute a trace command. The "Ball" class assigns the name "testBall" to the MC it creates, and I can trigger the event handler if I define a method directly on the MC that's created, ie: testBall.onPress = function () {myEventHandler(testBall);} but that's not what I'm trying to accomplish. I've pasted the code below - any help would be greatly appreciated. Thanks, Daniel Cardenas -- Ball Class -- class Ball extends MovieClip { public var addEventListener:Function; public var removeEventListener:Function; private var dispatchEvent:Function; public function Ball () { // initialize EventDispatcher mx.events.EventDispatcher.initialize(this); // create a ball MC var aBall:MovieClip = _level0.createEmptyMovieClip('testBall', getNextHighestDepth()); // draw ball aBall._x = 100; aBall._y = 100; aBall.lineStyle(20, 0xff, 100); aBall.lineTo(0,.2); } public function declareEventMethods():Void { onMouseDown = function() { dispatchEvent( {type: "mouseDown", target: this} ); } onMouseUp = function() { dispatchEvent( {type: "mouseUp", target: this} ); } onPress = function() { dispatchEvent( {type: "press", target: this} ); } onRelease = function() { dispatchEvent( {type: "release", target: this} ); } } } -- Timeline Code -- /* create object --*/ var myBall:Ball = new Ball(); myBall.declareEventMethods(); /* add listener --*/ myBall.addEventListener("mouseDown", myEventHandler); myBall.addEventListener("mouseUp", myEventHandler); myBall.addEventListener("press", myEventHandler); myBall.addEventListener("release", myEventHandler); /* define handler --*/ function myEventHandler(evt:Object):Void { trace('A ' + evt.type + ' event was dispatched by ' + evt.target); } // this works - but it's not what I'm trying to do... // testBall.onPress = function () {myEventHandler(testBall);} --- [EMAIL PROTECTED] 917-750-6398 AIM: dcardena --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Clarification if Remoting is included with Flex 2.0
Okay, well thank you nevertheless for your time - and I will try to get something off the FlexCoders list. Take Care, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Dowdell Sent: Wednesday, April 12, 2006 5:53 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Clarification if Remoting is included with Flex 2.0 Mike Anderson wrote: > In the core version of Flex 2.0 - is Remoting included with the basic > package? OR is it not?? > Thanks in advance, for any 100% accurate information you can throw my > way. I don't know if I can be 100%, because Flex 2.0 hasn't shipped yet... I didn't see this answered in a quick scan of the Flex 2.0 FAQ, which is where I'd expect to see any such pre-release guidance: http://www.macromedia.com/software/flex/productinfo/faq/flex2_faq.html If you absolutely need a commitment today, then I'd recommend the FlexCoders list (which draws more eyeballs of those staffers who may be involved in such decisions) or on the sales line (but with a sales person, be sure to get promises in writing). jd -- John Dowdell . Adobe Developer Support . San Francisco CA USA Weblog: http://weblogs.macromedia.com/jd Aggregator: http://weblogs.macromedia.com/mxna Technotes: http://www.macromedia.com/support/ Spam killed my private email -- public record is best, thanks. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Quick setSize() question
Yep, it's the same thing except no setting of a variable first... Okay, I just wanted to make sure I couldn't simply pass a Null to it, in hopes of it not changing the existing value of the Nulled place. Thanks! Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Wednesday, April 12, 2006 6:18 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Quick setSize() question yourDataGrid.setSize ( yourDataGrid.width, 400); - Original Message ----- From: "Mike Anderson" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Wednesday, April 12, 2006 7:07 PM Subject: [Flashcoders] Quick setSize() question Hello all, If I am interested in only sizing a component using the setSize method - but if I only wanted to set a single parameter (width or height), how do I properly pass the variables? Can I simply do this, if I only wanted to set a single parameter? componentInstance.setSize( null, 20 ); Or am I forced to pass it valid numbers for both values? I know I could feed the function the component's existing value like this: var tempVar:Number = componentInstance._width; componentInstance.setSize( tempVar, 20 ); But that seems silly. Could anybody clarify that for me? Thanks, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Quick setSize() question
Hello all, If I am interested in only sizing a component using the setSize method - but if I only wanted to set a single parameter (width or height), how do I properly pass the variables? Can I simply do this, if I only wanted to set a single parameter? componentInstance.setSize( null, 20 ); Or am I forced to pass it valid numbers for both values? I know I could feed the function the component's existing value like this: var tempVar:Number = componentInstance._width; componentInstance.setSize( tempVar, 20 ); But that seems silly. Could anybody clarify that for me? Thanks, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Manually triggering the Screens "onResize" event
Oh man, that works out BEAUTIFULLY!!! I never even thought about doing something like that. Thanks for that excellent information :) Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Matsikas Sent: Wednesday, April 12, 2006 3:47 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Manually triggering the Screens "onResize" event Mike, I'm a single frame flasher to.. its all I do.. you don't have to create empty frames in your fla. You can do something as simple as: this.onLoad = function():Void { var c:Number = 0; this.onEnterFrame = function() { if (c >= 5) { // you pick a number that works... delete this.onEnterFrame; stageSizeListener.onResize(); } c++; } } On 4/12/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > Oh yes, I absolutely understand that. > > I only use the visibility toggle, for extremely used "Dialog Boxes" - > there is no point in instantiating them, and then killing them, over > and over again - if I know for a fact that it will be used often. > > For like a Forms Based application (like a Masters Grid, and Details > Window) I will actually delete the MovieClip when I am finished - due > to the large amounts of Code contained inside it, in addition to the > large collection of Controls that make up the Details form. > > What makes this all possible, is the init() portion of the Class Files > - where you can pass all your parameter data to the MovieClip FIRST > before it's instantiated, so it's all ready to rock before the > controls get generated. > > It's taken me a long time, to figure out how to properly write these > kinds of apps, using Flash. This was all such a piece of cake in > VB.NET and C# - but Flash was a different story. > > As soon as I master Flex, I am moving over to that, and will never > look back (unless I need to write a Widget, which I think Flash is > better suited for). > > Thanks for the extra input though - > > Mike > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Steven > Sacks > Sent: Wednesday, April 12, 2006 3:18 PM > To: Flashcoders mailing list > Subject: RE: [Flashcoders] Manually triggering the Screens "onResize" > event > > You do realize that toggling _visible does not release any memory, > right? Flash still tracks the movieclip in memory, it just doesn't > draw it. If you're building RIAs, you should open up your task > manager and watch your memory usage over time to make sure you're not > using too much. I have no problem with frame-based RIAs, but then > again, I tend to use all the tools Flash makes available to me, not just Actionscript. > > -Steven > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Mike > > Anderson > > Sent: Wednesday, April 12, 2006 12:09 PM > > To: Flashcoders mailing list > > Subject: RE: [Flashcoders] Manually triggering the Screens "onResize" > > event > > > > I am really sorry Ryan - > > > > I put some more thought into what you had to say, and I got it to > > work. > > Tunnel vision is dangerous sometimes, and when you code a certain > > way for so long, it's hard to break out of your normal coding methods. > > > > So with that said, I simply inserted 5 blank frames - but made sure > > that all the layers containing components, extended out to the 5th > > frame. > > That way, they never get erased when moving to the next Frame. As > > you > > > can probably guess, I am not a typical Flash programmer who does > > animation, etc. I write ONLY applications. > > > > I still have my main Include file on Frame 1 (which contains all my > > code for the entire app), but I created a Key Frame on Frame 5 - > > which > > > calls the "onResize" event for the Stage Listener. Now I understand > > what you were trying to say - give the movie more time to > > initialize, and THEN call the "onResize" method. > > > > Now the movie comes up with all the controls positioned properly. > > > > THANK YOU - and I will make sure that I listen with "more open ears" > > next time I get some good advice ;-) > > > > Thanks and take care, > > > > Mike > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Mike > > Anderson > > Sent: Wednesday, April 12, 2006 1:46 PM > > To: Flashcoders mailing l
RE: [Flashcoders] Manually triggering the Screens "onResize" event
Oh yes, I absolutely understand that. I only use the visibility toggle, for extremely used "Dialog Boxes" - there is no point in instantiating them, and then killing them, over and over again - if I know for a fact that it will be used often. For like a Forms Based application (like a Masters Grid, and Details Window) I will actually delete the MovieClip when I am finished - due to the large amounts of Code contained inside it, in addition to the large collection of Controls that make up the Details form. What makes this all possible, is the init() portion of the Class Files - where you can pass all your parameter data to the MovieClip FIRST before it's instantiated, so it's all ready to rock before the controls get generated. It's taken me a long time, to figure out how to properly write these kinds of apps, using Flash. This was all such a piece of cake in VB.NET and C# - but Flash was a different story. As soon as I master Flex, I am moving over to that, and will never look back (unless I need to write a Widget, which I think Flash is better suited for). Thanks for the extra input though - Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks Sent: Wednesday, April 12, 2006 3:18 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Manually triggering the Screens "onResize" event You do realize that toggling _visible does not release any memory, right? Flash still tracks the movieclip in memory, it just doesn't draw it. If you're building RIAs, you should open up your task manager and watch your memory usage over time to make sure you're not using too much. I have no problem with frame-based RIAs, but then again, I tend to use all the tools Flash makes available to me, not just Actionscript. -Steven > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mike > Anderson > Sent: Wednesday, April 12, 2006 12:09 PM > To: Flashcoders mailing list > Subject: RE: [Flashcoders] Manually triggering the Screens "onResize" > event > > I am really sorry Ryan - > > I put some more thought into what you had to say, and I got it to > work. > Tunnel vision is dangerous sometimes, and when you code a certain way > for so long, it's hard to break out of your normal coding methods. > > So with that said, I simply inserted 5 blank frames - but made sure > that all the layers containing components, extended out to the 5th > frame. > That way, they never get erased when moving to the next Frame. As you > can probably guess, I am not a typical Flash programmer who does > animation, etc. I write ONLY applications. > > I still have my main Include file on Frame 1 (which contains all my > code for the entire app), but I created a Key Frame on Frame 5 - which > calls the "onResize" event for the Stage Listener. Now I understand > what you were trying to say - give the movie more time to initialize, > and THEN call the "onResize" method. > > Now the movie comes up with all the controls positioned properly. > > THANK YOU - and I will make sure that I listen with "more open ears" > next time I get some good advice ;-) > > Thanks and take care, > > Mike > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mike > Anderson > Sent: Wednesday, April 12, 2006 1:46 PM > To: Flashcoders mailing list > Subject: RE: [Flashcoders] Manually triggering the Screens "onResize" > event > > The only problem is, it's a "Single Frame" application. > > I avoid multi-frame apps like the plague - because I have so many > coding issues, and can't have controls residing on multiple frames > (they must exist at all times, because they intercommunicate with each > other, throughout the lifetime of the application). > > This app is considered to be an "RIA", and resides ALL on a single > frame. All my MovieClips have Class Files attached to them, and I > truly run this Movie like an Application. > Multiple Windows, toggling visibility, remoting calls, etc. > all tied together by listening to Events. > > It's a wonderfully reliable application - which I plan on migrating to > Flex as soon as I can. But in the meantime, Flash is my only > solution. > > With that said, is there anything else I can do - to force the > "onResize" event to kick off, just milliseconds after the application > gets fully initialized? I have a feeling this may fix the problem. > > Maybe some kind of Timer that only runs once? Once things are > positioned properly upon the initial load, it's all well and good - >
[Flashcoders] Clarification if Remoting is included with Flex 2.0
Okay, I've heard 2 different stories now - and I need to find out which one is true. In the core version of Flex 2.0 - is Remoting included with the basic package? OR is it not?? I need to find out now, if I am forced to lay out a bunch more cash, in order to simply talk to our ColdFusion server to perform some basic Database queries. Thanks in advance, for any 100% accurate information you can throw my way. Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Accordion Sizing Weirdness
Oh no, I have not tried that method yet - In Flash, there are too many ways to skin a cat sometimes, and you get accustom to using certain methods of doing things. I was aware of that method, but never used it before. Using V2 Components, is using the setSize() Function, the preferred way to set the size?? And yes, once I got the Accordion to size properly, the plan was to implement code inside of each Child MovieClip - to resize themselves accordingly. Which does raise another question, in which I am sure you can answer: On which events should I listen for, in order to trigger the Resize Functions contained within each Child MovieClip (not to mention, WHERE should that code reside)? Since the Accordion Contents can change based on a multitude of variables, I really can't code my Resize Events for the Children, within my main Code Block residing in Root. I need each MovieClip Child, to contain their own logic - independent from the main app. I am using Class Files for each of my MovieClips - and it's in the Class File itself, where I want to listen for the Resize Events of the Accordion, so I can properly move things around inside the Accordion Children. Could you clarify all those things for me? Thanks Eric :) Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eric dolecki Sent: Wednesday, April 12, 2006 2:43 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Accordion Sizing Weirdness in your onResize - have you tried setSize( w, h ) yet? also - I am using an accordion right now - some children contain listboxes, datagrids, etc. One cool thing I am doing is when the accordion is resizing, i am resizing the contents inside the children too - nice and tight. On 4/12/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > Hello All, > > I am confused about the Accordion Control, and how it's reacting to > Resize Events. > > For example, a MenuBar Component - also a V2 Control, when I issue a > Resize Event and give it new _width parameters, the control widens > appropriately without any Menu Items distorting. > > Controls widening or shrinking (and NOT scaling) is by design when > things are setup correctly. That's what xscale and yscale are > reserved for correct? > > So with that said, when writing an application that has Stage.align = > "TL" and Stage.scaleMode = "noScale", and I have code that moves (or > sizes) components based on browser size, what must I do to have the > Accordion reveal "more or less area", versus "scaling larger or > smaller"? > > This is not the behavior I expected from the Accordion - since it's a > Container, and a V2 Component. > > I understand I may need to have additional sizing code, within the > MovieClips that make up the Accordion Children, but this initial > behavior of scaling is something that should not be happening right? > > Could any of you shed more light on this problem? > > Thanks, > > Mike > > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Accordion Sizing Weirdness
Hello All, I am confused about the Accordion Control, and how it's reacting to Resize Events. For example, a MenuBar Component - also a V2 Control, when I issue a Resize Event and give it new _width parameters, the control widens appropriately without any Menu Items distorting. Controls widening or shrinking (and NOT scaling) is by design when things are setup correctly. That's what xscale and yscale are reserved for correct? So with that said, when writing an application that has Stage.align = "TL" and Stage.scaleMode = "noScale", and I have code that moves (or sizes) components based on browser size, what must I do to have the Accordion reveal "more or less area", versus "scaling larger or smaller"? This is not the behavior I expected from the Accordion - since it's a Container, and a V2 Component. I understand I may need to have additional sizing code, within the MovieClips that make up the Accordion Children, but this initial behavior of scaling is something that should not be happening right? Could any of you shed more light on this problem? Thanks, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Manually triggering the Screens "onResize" event
I am really sorry Ryan - I put some more thought into what you had to say, and I got it to work. Tunnel vision is dangerous sometimes, and when you code a certain way for so long, it's hard to break out of your normal coding methods. So with that said, I simply inserted 5 blank frames - but made sure that all the layers containing components, extended out to the 5th frame. That way, they never get erased when moving to the next Frame. As you can probably guess, I am not a typical Flash programmer who does animation, etc. I write ONLY applications. I still have my main Include file on Frame 1 (which contains all my code for the entire app), but I created a Key Frame on Frame 5 - which calls the "onResize" event for the Stage Listener. Now I understand what you were trying to say - give the movie more time to initialize, and THEN call the "onResize" method. Now the movie comes up with all the controls positioned properly. THANK YOU - and I will make sure that I listen with "more open ears" next time I get some good advice ;-) Thanks and take care, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Wednesday, April 12, 2006 1:46 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Manually triggering the Screens "onResize" event The only problem is, it's a "Single Frame" application. I avoid multi-frame apps like the plague - because I have so many coding issues, and can't have controls residing on multiple frames (they must exist at all times, because they intercommunicate with each other, throughout the lifetime of the application). This app is considered to be an "RIA", and resides ALL on a single frame. All my MovieClips have Class Files attached to them, and I truly run this Movie like an Application. Multiple Windows, toggling visibility, remoting calls, etc. all tied together by listening to Events. It's a wonderfully reliable application - which I plan on migrating to Flex as soon as I can. But in the meantime, Flash is my only solution. With that said, is there anything else I can do - to force the "onResize" event to kick off, just milliseconds after the application gets fully initialized? I have a feeling this may fix the problem. Maybe some kind of Timer that only runs once? Once things are positioned properly upon the initial load, it's all well and good - the StageListener coupled with the manual browser resizes, takes care of everything after that. Thanks for anything else you can throw my way :) Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Matsikas Sent: Wednesday, April 12, 2006 12:41 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Manually triggering the Screens "onResize" event I'm guessing yer having these issues in IE? Try waiting an extra frame or 2.. On 4/12/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > Hello, > > Thanks for the suggestion, but I tried in that in the meantime. > > 2 very undesired things happen: > > 1) The movie components are still in the exact same spots. > > 2) The bottom StatusBar actually is 1-inch shorter - >this not even reaching to the other side of the >stage > > It's almost as if (especially in case #2) that the StatusBar is basing > it's _width property on mis-information. If I didn't know better, > it's as if there are timing problems going on. > > I thought that the "onLoad" event fixes problems like that - since it > waits until all components are instantiated and initialized, before > Dispatching the "I am all finished" signal. > > What I have is this (in root): > > = > > var stageSizeListener:Object = new Object(); > > stageSizeListener.onResize = function():Void { > var stageHeight:Number = Stage.height; > var stageWidth:Number = Stage.width; > > // Main Menu > mainMenu._width = stageWidth; > mainMenu.updateDisplay(true); > > // Map Status Bar > mapStatusBar._width = stageWidth; > > etc > } > > this.onLoad = function():Void > { > stageSizeListener.onResize(); > } > > Stage.addListener( stageSizeListener ); > > = > > All this resize code works beautifully, but only AFTER the movie is > completely loaded, and the user MANUALLY resizes the browser. > > Am I missing something here? I was hoping the onLoad function would > alleviate any timing issues, but not only does it NOT work, it's > actually causing my StatusBar (which resides at the
RE: [Flashcoders] Manually triggering the Screens "onResize" event
The only problem is, it's a "Single Frame" application. I avoid multi-frame apps like the plague - because I have so many coding issues, and can't have controls residing on multiple frames (they must exist at all times, because they intercommunicate with each other, throughout the lifetime of the application). This app is considered to be an "RIA", and resides ALL on a single frame. All my MovieClips have Class Files attached to them, and I truly run this Movie like an Application. Multiple Windows, toggling visibility, remoting calls, etc. all tied together by listening to Events. It's a wonderfully reliable application - which I plan on migrating to Flex as soon as I can. But in the meantime, Flash is my only solution. With that said, is there anything else I can do - to force the "onResize" event to kick off, just milliseconds after the application gets fully initialized? I have a feeling this may fix the problem. Maybe some kind of Timer that only runs once? Once things are positioned properly upon the initial load, it's all well and good - the StageListener coupled with the manual browser resizes, takes care of everything after that. Thanks for anything else you can throw my way :) Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Matsikas Sent: Wednesday, April 12, 2006 12:41 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Manually triggering the Screens "onResize" event I'm guessing yer having these issues in IE? Try waiting an extra frame or 2.. On 4/12/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > Hello, > > Thanks for the suggestion, but I tried in that in the meantime. > > 2 very undesired things happen: > > 1) The movie components are still in the exact same spots. > > 2) The bottom StatusBar actually is 1-inch shorter - >this not even reaching to the other side of the >stage > > It's almost as if (especially in case #2) that the StatusBar is basing > it's _width property on mis-information. If I didn't know better, > it's as if there are timing problems going on. > > I thought that the "onLoad" event fixes problems like that - since it > waits until all components are instantiated and initialized, before > Dispatching the "I am all finished" signal. > > What I have is this (in root): > > = > > var stageSizeListener:Object = new Object(); > > stageSizeListener.onResize = function():Void { > var stageHeight:Number = Stage.height; > var stageWidth:Number = Stage.width; > > // Main Menu > mainMenu._width = stageWidth; > mainMenu.updateDisplay(true); > > // Map Status Bar > mapStatusBar._width = stageWidth; > > etc > } > > this.onLoad = function():Void > { > stageSizeListener.onResize(); > } > > Stage.addListener( stageSizeListener ); > > = > > All this resize code works beautifully, but only AFTER the movie is > completely loaded, and the user MANUALLY resizes the browser. > > Am I missing something here? I was hoping the onLoad function would > alleviate any timing issues, but not only does it NOT work, it's > actually causing my StatusBar (which resides at the bottom) to have a > lesser width size. > > If I remove the onLoad code, then eveything paints fine - but things > are not positioned correctly. > > Any more ideas? > > Thanks, > > Mike > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Ryan > Matsikas > Sent: Wednesday, April 12, 2006 12:02 PM > To: Flashcoders mailing list > Subject: Re: [Flashcoders] Manually triggering the Screens "onResize" > event > > manually call your onResize method in your main Mc's onLoad. > > On 4/12/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > > > Hello All, > > > > I have a Flash App, that uses a "Non-Scaling" type setup - in which > > upon browser resize, the controls simply reposition themselves > > around, > > > creating more usable area for content. It's works beautifully, but > > with a catch. > > > > The problem is, my application insists on starting out at it's > > Published Size - so if the browser is larger than the application, > > there is a bunch of white-space along the Right and Bottom. Of > > course, I designed the app to take up the entire browser window. > > > > The moment the user resizes the browser,
RE: [Flashcoders] Manually triggering the Screens "onResize" event
Hello, Thanks for the suggestion, but I tried in that in the meantime. 2 very undesired things happen: 1) The movie components are still in the exact same spots. 2) The bottom StatusBar actually is 1-inch shorter - this not even reaching to the other side of the stage It's almost as if (especially in case #2) that the StatusBar is basing it's _width property on mis-information. If I didn't know better, it's as if there are timing problems going on. I thought that the "onLoad" event fixes problems like that - since it waits until all components are instantiated and initialized, before Dispatching the "I am all finished" signal. What I have is this (in root): = var stageSizeListener:Object = new Object(); stageSizeListener.onResize = function():Void { var stageHeight:Number = Stage.height; var stageWidth:Number = Stage.width; // Main Menu mainMenu._width = stageWidth; mainMenu.updateDisplay(true); // Map Status Bar mapStatusBar._width = stageWidth; etc } this.onLoad = function():Void { stageSizeListener.onResize(); } Stage.addListener( stageSizeListener ); = All this resize code works beautifully, but only AFTER the movie is completely loaded, and the user MANUALLY resizes the browser. Am I missing something here? I was hoping the onLoad function would alleviate any timing issues, but not only does it NOT work, it's actually causing my StatusBar (which resides at the bottom) to have a lesser width size. If I remove the onLoad code, then eveything paints fine - but things are not positioned correctly. Any more ideas? Thanks, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Matsikas Sent: Wednesday, April 12, 2006 12:02 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Manually triggering the Screens "onResize" event manually call your onResize method in your main Mc's onLoad. On 4/12/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > Hello All, > > I have a Flash App, that uses a "Non-Scaling" type setup - in which > upon browser resize, the controls simply reposition themselves around, > creating more usable area for content. It's works beautifully, but > with a catch. > > The problem is, my application insists on starting out at it's > Published Size - so if the browser is larger than the application, > there is a bunch of white-space along the Right and Bottom. Of > course, I designed the app to take up the entire browser window. > > The moment the user resizes the browser, the application immediately > snaps into place taking up 100% of the browser area - and everything > is well. > > How can I trigger this event, the moment the application is loaded in > the browser??? > > Thanks in advance for your help, > > Mike > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Manually triggering the Screens "onResize" event
Hello All, I have a Flash App, that uses a "Non-Scaling" type setup - in which upon browser resize, the controls simply reposition themselves around, creating more usable area for content. It's works beautifully, but with a catch. The problem is, my application insists on starting out at it's Published Size - so if the browser is larger than the application, there is a bunch of white-space along the Right and Bottom. Of course, I designed the app to take up the entire browser window. The moment the user resizes the browser, the application immediately snaps into place taking up 100% of the browser area - and everything is well. How can I trigger this event, the moment the application is loaded in the browser??? Thanks in advance for your help, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Split Pane component??
Thanks for the reply Scott - Actually, I work very little using the Flash IDE - just long enough to position some of my visual controls - but the rest is 100% Class Files external to Flash. So, if you have something that you could throw my way that could help out, I'd be very grateful. I am no stranger to code - in fact, I make a point of doing everything in code whenever possible. Thanks again - and if you want to post back to the list, or directly to me, I'd greatly appreciate it. Take Care, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Hyndman Sent: Wednesday, April 05, 2006 9:45 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Split Pane component?? ActionStep has one...but it probably isn't usable from your prespective, since you won't be able to use it from within the Flash IDE like you would be familiar. Code only. :) If you (or anyone else reading this thread) would like to see it in action, here is something I'm writing that uses it. It even supports more interesting things (like collapsing). http://scottyh.is-a-geek.net/actionstep/ASExplorer.swf (it's big so give it a second to load) Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: April 5, 2006 10:17 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Split Pane component?? Yes, this is the one I was talking about in my initial post. It looks as if it's really mature, and has LOTS of great comments regarding it. But when you have certain animated controls within each Pane (i.e. accordion) it flips out. I should e-mail the person who wrote the app, but I know there is a slight language barrier. I was just hoping that I could track down another control, written by another developer. I am amazed though, that this is the ONLY control of this type floating around. Especially since this is such a unique and beneficial control - usually only found inside of Flex or other advanced programming environments (VB, Java, Delphi, etc.) If anybody knows of another one, please let me know - Thanks!! Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ing. Mario Falomir Sent: Wednesday, April 05, 2006 7:16 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Split Pane component?? here is a good one: http://www.joangarnet.com/blog/archives/2005/07/release_v2_fram_1.php On 4/5/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > Hello All, > > I am trying like crazy, to find a Split Pane Component that works as > well as Flex's version. > > I found one (and only ONE) somewhere on the Flash Exchange, but the > docs are mostly in another language, and it's really buggy. The one I > found is actually free, and has a high rating level - but I am just > not having good luck with it. > > Thanks for all your help on this, > > Mike > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Split Pane component??
Yes, this is the one I was talking about in my initial post. It looks as if it's really mature, and has LOTS of great comments regarding it. But when you have certain animated controls within each Pane (i.e. accordion) it flips out. I should e-mail the person who wrote the app, but I know there is a slight language barrier. I was just hoping that I could track down another control, written by another developer. I am amazed though, that this is the ONLY control of this type floating around. Especially since this is such a unique and beneficial control - usually only found inside of Flex or other advanced programming environments (VB, Java, Delphi, etc.) If anybody knows of another one, please let me know - Thanks!! Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ing. Mario Falomir Sent: Wednesday, April 05, 2006 7:16 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Split Pane component?? here is a good one: http://www.joangarnet.com/blog/archives/2005/07/release_v2_fram_1.php On 4/5/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > Hello All, > > I am trying like crazy, to find a Split Pane Component that works as > well as Flex's version. > > I found one (and only ONE) somewhere on the Flash Exchange, but the > docs are mostly in another language, and it's really buggy. The one I > found is actually free, and has a high rating level - but I am just > not having good luck with it. > > Thanks for all your help on this, > > Mike > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flex Apps versus Flash Projector apps
Wow - so when you say AMF - this is the same as Remoting correct? As far as I know, these 2 terms are/were interchangeable. With that said, if I have a ColdFusion Server running, I can immediately start writing highly functional apps using Flex 2.0 Beta and make Remoting calls?? Thanks Mike and everybody else contributing to this thread. Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Chambers Sent: Wednesday, April 05, 2006 4:35 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Flex Apps versus Flash Projector apps No. This is not correct. The Player and Framework support sending and receiving data to the server in a number of ways: HTTP Binary and XML Sockets AMF On top of this player support, the Flex framework provides: HTTPService - makes HTTP calls a little easier SOAP and XML-RPC based web services This is all in the player and the framework, and is available (and free) to everyone. mike chambers [EMAIL PROTECTED] Mike Anderson wrote: > Wow that is great! > If I hear you correctly then, there is NO Data functionality built > into the BASIC Flex 2.0 Architecture? > > For a SWF file to have the ability to Send/Receive Data to a Server > (whichever flavor that may be), a type of "connector" must be > purchased beforehand, in order for that functionality to be enabled? > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Split Pane component??
Hello All, I am trying like crazy, to find a Split Pane Component that works as well as Flex's version. I found one (and only ONE) somewhere on the Flash Exchange, but the docs are mostly in another language, and it's really buggy. The one I found is actually free, and has a high rating level - but I am just not having good luck with it. Thanks for all your help on this, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] RE: Flex Apps versus Flash Projector apps
Hey guys, Thanks SO much for this excellent information - you are all painting a nice picture for me, as to where Flex stands at present, and where it's going to be down the road. If possible, I'd like to keep this thread pumping for as long as possible - as it could benefit a great many considering making the switch. I know there is a Flex list - but these 2 products are so closely related, and we are talking about what makes each unique - and their proper place in the world. Thanks, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike B Baker Sent: Wednesday, April 05, 2006 3:18 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] RE: Flex Apps versus Flash Projector apps Flex is really a framework for building web applications the current Flex 2.0 Beta looks very promising and I would hope to be making deployments using it sometime later this year. The main purpose for me using it is to provide desktop functionality and a rich client thru a web browser, it is also capable of working offline but not in the same sense as a typical desktop application. I have built a number of desktop applications using Zinc but am moving more towards Screenweaver, I have found that most of the external libraries available with Zinc had limitations that I was not happy with, as we became more comfortable with what we could achieve using Flash (shared objects, external interfaces) we became less reliant on the bits built into Zinc. We basically use zinc for creating an installable setup file, which we can now also do using Screenweaver. I have believed for a long time that Central was the proper home for desktop applications built using flash but it did not seem to be widely used. I really liked the way Central dealt with application deployment, online/offline modes and synchronization. It was well thought out and probably a bit ahead of its time. Adobe are now working on a project codename 'Apollo' which I believe will be the way forward for desktop and mobile applications. Keep an eye on the Adobe blogs for more information over the next while. Mike B. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flex Apps versus Flash Projector apps
Wow that is great! So basically, the method in which clients retrieve their SWF files are the same as getting a plain old SWF file created using Flash? So the Flex SWF (which gets compiled on the developers machine) simply gets copied to the Web Server hosting the application. That is great! I hated the fact that there was this elaborate ADDITIONAL server component, that was required to hand out .mxml files (which of course, end up being swf files in their final form). If I hear you correctly then, there is NO Data functionality built into the BASIC Flex 2.0 Architecture? For a SWF file to have the ability to Send/Receive Data to a Server (whichever flavor that may be), a type of "connector" must be purchased beforehand, in order for that functionality to be enabled? Does the developer have "crippled versions" of these connectors available to them, so that they can write the apps and actually test them? Or do they have to fork out right away for these connectors, in order to give their Flex Apps the ability to exchange data with servers? THIS is the part that I need clarified in a major way, so that I can get a handle on my software costs for the year. I just hope I can afford all this stuff, so that I can simply write functional Flex Apps to tease my clients with. You know, it's really the developers that sell your products for you - getting their clients excited and showing "what can be possible", but if it's so cost prohibitive where the developer can't even afford it, it's kind of a moot point. Can you shed more light on that topic? Thanks again for everything :) Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts Sent: Wednesday, April 05, 2006 12:44 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Flex Apps versus Flash Projector apps > Other than Flex 2.0 being more advanced than 1.5, what are the major > differences between the 2? By default, compilation is done on the developer's workstation, not on a server. By default, you can build Flex 2 applications without any server component; they can talk to a server using web services, etc. By default, you can distribute Flex 2 applications just like you would any other sort of SWF. There are server-side components to Flex - Flex Data Services and the CF-Flex connector. Flex Data Services allows you to push data to Flex clients, among other things. The CF-Flex connector allows you to more easily exchange data between ColdFusion and Flex. If you use those server-side components, you'll have to (a) purchase them and (b) deploy them on the production servers where you use them. Personally, I think the biggest difference between Flex 2 and previous versions is the performance of the 8.5 player - applications load faster, run faster, and can handle larger data sets in my limited experience. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flex Apps versus Flash Projector apps
Thanks Dave - With that said, if I plan on doing "Remoting" (which could be construed as a broad term I guess), what would I require in order to do that? Of course in Flash, you just use the Remoting Classes, etc. and you are all set. You just have to make your choice between ColdFusion or .NET for the backend (or whatever else is out there). Are there "built-in" advantages for the developer/clients if they use Flex 2.0 along with ColdFusion? I've always seen MM "put more icing on the cake" for people that wanted to use MM products across the board. As much as I wanted .NET, I moved all my code to ColdFusion - because Remoting was already bundled with it. I understand that I personally need to take time and research this all out, but the information you provide right now will help my radically understand how "things now work" with 2.0 - and help me arrive at a solution much quicker. I want to master Flex very badly - because it's simply amazing what it can do. Thanks again, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts Sent: Wednesday, April 05, 2006 12:27 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Flex Apps versus Flash Projector apps > Early on though, I thought there some "legalities" > surrounding the "pre-compiling" of SWF's via Flex, and then > distributing them in their singular state. Things have changed quite a bit between Flex 1.x and Flex 2 (which is of course still in beta). With Flex 2, you can distribute Flex-generated SWFs however you like. There is no required server component for applications developed with just the Flex 2 compiler. There are optional server components, which will likely be quite useful, since most Flex 2 applications will probably fetch data from a server of some sort anyway, but they are not required by the Flex 2 compiler alone. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Flex Apps versus Flash Projector apps
Wow thanks for that information - And Yes, if you are able to explain some things in greater depth, you would be helping me in a HUGE way since I have to make some decisions regarding my "programming future". Other than Flex 2.0 being more advanced than 1.5, what are the major differences between the 2? Do I still need a JRun Server (or some other type server) setup on one of my machines, in order to compile my Flex Applications? The way it worked before, was that you write out all your .mxml files, and they would compile the first time they are accessed. Thereafter, the only time they would recompile (causing a slight pause on the client side) is when the .mxml file is changed/updated. Is this still the same method being used? I downloaded portions of the 2.0 Beta kit, but I could use some major clarifications regarding what I actually need (as a developer) to write and run Flex Applications. In addition to that, I would love to know what the clients actually USING the Flex Apps would require - regarding servers and additional software that would have to be purchased. With Flex 1.5, I had a LOT of hang-ups regarding pricing structure, etc. especially once it went into production on the client side of things. I still have high hopes with Flex 2.0 - I just hope it all stays reasonable. Thanks again!! Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Wednesday, April 05, 2006 12:23 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Flex Apps versus Flash Projector apps Nope, just confusion on the license terms. Adobe will work with you, but most people couldn't afford Flex 1.5 anyway, so license discussions were pointless. Macromedia Central, for example, accessed SWF's like this and it was perfectly legal. Most Flex developers deploy SWF's to their server, and only use mxmlc for development. Having the Flex server merely reside on the server, and only compile once you deploy is far more efficient from a server point of view since a SWF is just a binary file served to the client. I can shed a lot of light, but "the whole thing" is a large topic. Anything in particular? ----- Original Message - From: "Mike Anderson" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Wednesday, April 05, 2006 1:16 PM Subject: RE: [Flashcoders] Flex Apps versus Flash Projector apps Early on though, I thought there some "legalities" surrounding the "pre-compiling" of SWF's via Flex, and then distributing them in their singular state. I thought that Flex had to stay within the entire workflow, including final viewing/use of the application. I guess I need to do some more homework on this topic. I was totally into Flex when it first came out, but I heard there were tons of changes down the road, so I sort of backed off from the whole thing. Could you shed some more light on that whole thing? Thanks for all your help, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Wednesday, April 05, 2006 12:05 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Flex Apps versus Flash Projector apps Nope. http://dev.jessewarden.com/captivate/flexonthedesktop/ The only reason Flex 2 isn't realistic for creating desktop applications currently is: - it's in beta - mProjector, SWFStudio, Zinc, and Screenweaver haven't made a wrapper for Flash Player 8.5 yet Keep in mind, Flex 2 will create Flash Player 8.5 SWF's; you'll have to wait almost another year before Flash 9 is released so you can do so. Granted, an alpha will be out soon, but people generally do not deliver applications to clients using alpha software. - Original Message - From: "Mike Anderson" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Wednesday, April 05, 2006 12:54 PM Subject: [Flashcoders] Flex Apps versus Flash Projector apps Hey Everybody, Is it safe to say that, because Flex requires a server in the middle (to process the .mxml files), that Flex is simply an unrealistic solution if your end goal is to deliver "portable applications" that can be self contained? In addition to that statement: Is this why Flash (versus Flex) will have a much longer shelf-life now, because Flash combined with Zinc (or some other projector packager) is still the only way to allow users to use your Flash applications in a "standalone manner", without requiring an HTML container? I would love to hear your thoughts on this topic. Thanks in advance, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http
RE: [Flashcoders] Flex Apps versus Flash Projector apps
Early on though, I thought there some "legalities" surrounding the "pre-compiling" of SWF's via Flex, and then distributing them in their singular state. I thought that Flex had to stay within the entire workflow, including final viewing/use of the application. I guess I need to do some more homework on this topic. I was totally into Flex when it first came out, but I heard there were tons of changes down the road, so I sort of backed off from the whole thing. Could you shed some more light on that whole thing? Thanks for all your help, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Wednesday, April 05, 2006 12:05 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Flex Apps versus Flash Projector apps Nope. http://dev.jessewarden.com/captivate/flexonthedesktop/ The only reason Flex 2 isn't realistic for creating desktop applications currently is: - it's in beta - mProjector, SWFStudio, Zinc, and Screenweaver haven't made a wrapper for Flash Player 8.5 yet Keep in mind, Flex 2 will create Flash Player 8.5 SWF's; you'll have to wait almost another year before Flash 9 is released so you can do so. Granted, an alpha will be out soon, but people generally do not deliver applications to clients using alpha software. - Original Message - From: "Mike Anderson" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Wednesday, April 05, 2006 12:54 PM Subject: [Flashcoders] Flex Apps versus Flash Projector apps Hey Everybody, Is it safe to say that, because Flex requires a server in the middle (to process the .mxml files), that Flex is simply an unrealistic solution if your end goal is to deliver "portable applications" that can be self contained? In addition to that statement: Is this why Flash (versus Flex) will have a much longer shelf-life now, because Flash combined with Zinc (or some other projector packager) is still the only way to allow users to use your Flash applications in a "standalone manner", without requiring an HTML container? I would love to hear your thoughts on this topic. Thanks in advance, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Resizing Stage w/Components not scaling Examples
Hello All, I have an application with a MenuBar on top, status bar on bottom, and Accordion Control on the right side. Sitting within all the Controls, I have a stage area where Maps that the user can load, take up the entire remaining portion of the apps viewable space. The Maps can be panned, zoomed, etc. My main goal is to have people with higher resolutions, enjoy a larger "Stage Size" so they can see more of the Maps they are loading - versus simply "scaling up" the entire application, when they resize their browser. Inside of Flex, this is such a piece of cake - but with Flash, it's always been a challenge for me, to create applications that have components that "RESIZE larger and smaller" (in the proper proportions) in relation to the browser size, but NOT "SCALE larger and smaller". The main focus of this application, revolves around the Map - so if I can give the user more viewable space (minus the space taken up by the necessary controls), then I am truly accomplishing my goal. Could any of you point me in the right direction, that shows clearly how to write an application that behaves in this manner? I am truly seeing the beauty behind Flex, when it comes to writing applications of this nature. Thanks again for all your help, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Flex Apps versus Flash Projector apps
Hey Everybody, Is it safe to say that, because Flex requires a server in the middle (to process the .mxml files), that Flex is simply an unrealistic solution if your end goal is to deliver "portable applications" that can be self contained? In addition to that statement: Is this why Flash (versus Flex) will have a much longer shelf-life now, because Flash combined with Zinc (or some other projector packager) is still the only way to allow users to use your Flash applications in a "standalone manner", without requiring an HTML container? I would love to hear your thoughts on this topic. Thanks in advance, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Controlling Accordion using ActionScript
Sorry guys, I am totally brain dead today - It's so weird, how you get accustom to specific syntax for some V2 controls, and when working with a different one, you expect some type of consistency - and you get so focused looking for something, that you flat out overlook the answer. Sorry to post these questions to the list - if I read the Help Docs without having my blinders on, I would have found the answer. In fact, I did find the answers on my own, shortly after posting my last reply to the list. I must say though, after reading every single thread regarding the Accordion Control, it has plenty of limitations, and has caused many people lots of headaches. Thank you again everybody, I am always grateful for your advice. Mike :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lanny McNie Sent: Wednesday, March 29, 2006 3:54 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Controlling Accordion using ActionScript var mc = accordionInstance.getChildAt( index ) ? On 3/29/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > Okay, I am an idiot :) > > selectedIndex - duh! > > For some reason, I was looking for something specific, therefore > overlooking the obvious. > > Still, how to address a MovieClip that has been instantiated by the > Accordion Control continues to evade me. It must be some type of > "child" property, but I am still skimming the help docs for the answer. > > If anybody has a quick answer on this, I'd greatly appreciate it. > > Thanks! > > Mike > > > -Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mike > Anderson > Sent: Wednesday, March 29, 2006 2:42 PM > To: Flashcoders mailing list > Subject: [Flashcoders] Controlling Accordion using ActionScript > > Hello All, > > I literally read ALL the posts in the Archives regarding the Accordion > component, and there was no mention of what I need. > > It seems as if the Accordion is only setup to broadcast certain > events, when the Accordion itself is actually clicked on. > > My goal is to remotely control my Accordion control, so that there are > multiple ways to cause the Sliding Animation. I have a top MenuBar, > in which I want options available, to cause the Accordion Control to > animate to the proper Child. > > Am I missing something, or is the Accordion simply not designed for > this? > > Also, how can I communicate with MovieClips contained within the > Accordion Children? It seems as if the Accordion Control is acting as > a Container - so must I first create a variable that refers to the > Contents of the Accordion, before I can communicate with the > Children's components? There is no reference to this topic either. > > Kind of like the Window Control - myWindow.content.controls? > > Thanks in advance for all your help, > > Mike > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > -- - Lanny McNie ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Controlling Accordion using ActionScript
Okay, I am an idiot :) selectedIndex - duh! For some reason, I was looking for something specific, therefore overlooking the obvious. Still, how to address a MovieClip that has been instantiated by the Accordion Control continues to evade me. It must be some type of "child" property, but I am still skimming the help docs for the answer. If anybody has a quick answer on this, I'd greatly appreciate it. Thanks! Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Wednesday, March 29, 2006 2:42 PM To: Flashcoders mailing list Subject: [Flashcoders] Controlling Accordion using ActionScript Hello All, I literally read ALL the posts in the Archives regarding the Accordion component, and there was no mention of what I need. It seems as if the Accordion is only setup to broadcast certain events, when the Accordion itself is actually clicked on. My goal is to remotely control my Accordion control, so that there are multiple ways to cause the Sliding Animation. I have a top MenuBar, in which I want options available, to cause the Accordion Control to animate to the proper Child. Am I missing something, or is the Accordion simply not designed for this? Also, how can I communicate with MovieClips contained within the Accordion Children? It seems as if the Accordion Control is acting as a Container - so must I first create a variable that refers to the Contents of the Accordion, before I can communicate with the Children's components? There is no reference to this topic either. Kind of like the Window Control - myWindow.content.controls? Thanks in advance for all your help, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Controlling Accordion using ActionScript
Hello All, I literally read ALL the posts in the Archives regarding the Accordion component, and there was no mention of what I need. It seems as if the Accordion is only setup to broadcast certain events, when the Accordion itself is actually clicked on. My goal is to remotely control my Accordion control, so that there are multiple ways to cause the Sliding Animation. I have a top MenuBar, in which I want options available, to cause the Accordion Control to animate to the proper Child. Am I missing something, or is the Accordion simply not designed for this? Also, how can I communicate with MovieClips contained within the Accordion Children? It seems as if the Accordion Control is acting as a Container - so must I first create a variable that refers to the Contents of the Accordion, before I can communicate with the Children's components? There is no reference to this topic either. Kind of like the Window Control - myWindow.content.controls? Thanks in advance for all your help, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Using onRollOver and onRollOut inside a Class File??
Hello All - thanks for the interesting input. For those who DO want to enable the RollOver and RollOut functionality, I did finally get it working - and all using code that already existed within the SimpleButton.as file. If you open up the file, and scroll way to the bottom, there are in fact "onRollOver" and "onRollOut" functions defined - but only for the purpose of broadcasting the signal to turn the Halo Effect on and off when hovering the mouse over. All I added was the actual lines of code to "DispatchEvent". What I overlooked first time around, was that I had "buttonRollOver" and "buttonRollOut" in order to stay consistent with the other functions within the Class File. So after I changed the code in MY Class File containing the Button reference, to broadcast "buttonRollOver" and "buttonRollOut", it started to magically work. So, that's all you gotta do - is add two lines of code (one for each function) in the SimpleButton.as file, and you are good to go!! Thanks again for your help on this - Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Hyndman Sent: Tuesday, March 28, 2006 6:35 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Using onRollOver and onRollOut inside a Class File?? It's not really up to the component developer to decide what may or may not be done with any control. Of course there are limits to this, but I would expect that with any visual component a roll over event is a reasonable thing to expect. Swing (MouseMoveListener), Cocoa (tracking rects), and the .NET framework (the MouseEnter event) all have support for this functionality. I'm not coming down on V2. It's a basic framework for basic needs...I'm just saying. Scott -Original Message- From: [EMAIL PROTECTED] on behalf of Charles Parcell Sent: Tue 3/28/2006 5:54 PM To: Flashcoders mailing list Cc: Subject:Re: [Flashcoders] Using onRollOver and onRollOut inside a Class File?? My question to you would be, why would you expect a button to broadcast that it being rolled over? There is no standard UI reason for it. The only real action that a standard button is good for is clicking. Charles P. On 3/28/06, Mike Anderson <[EMAIL PROTECTED]> wrote: > > Hello Michael - thanks for the reply - > > I guess my real question is, why isn't "onRollOver" and "onRollOut" > natively part of the Events that the Button Components can broadcast? > > In the help docs, there is only 1 mentioned Event - which is "click" - > > It just seems odd, that I have to use one method of adding an Event > Listener for Click, and a totally different type of "Add Event Listener" > method for adding other types of events. > > Do you know why that is? > > Is it for the purpose of not reinventing the wheel, and borrowing > events that already exist in other components, and applying it to > others? I know that all the components in Flash are reduced to their > lowest common denominators - and that they import their core functions > from other core classes - again, for the purpose of not having any > redundant code & not reinventing the wheel. > > Thanks for your help on this, and to help me further understand how > this all works. > > Mike :) > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Michael Bedar > Sent: Tuesday, March 28, 2006 2:32 PM > To: Flashcoders mailing list > Subject: Re: [Flashcoders] Using onRollOver and onRollOut inside a > Class File?? > > Whats wrong with this? > > myButton.onPress=function(){ > // > } > > Alternatively, use delegate to call a function from the correct scope. > > myButton.onPress=Delegate.create(this, myButton_Click) > > > On Mar 28, 2006, at 1:06 PM, Mike Anderson wrote: > > > Hello All, > > > > I am getting very confused here, on how to get the "onRollOver" and > > "onRollOut" events to be broadcasted whenever the mouse moves over a > > Flash Component, contained within a MovieClip using a Class File. > > > > The component in this particular instance, is the Push Button. When > > reading the documentation, the only "events" that are mentioned is > > the > > > "click" event. To my knowledge, when using a Class File attached to > > a > > > MovieClip containing a Push Button component, there is only one type > > of syntax that can be used for adding listeners. > > > > For example: > > > > myButton.addEventListener( "click", myButton_Click ); > > > > And you usually place this stat
RE: [Flashcoders] Using onRollOver and onRollOut inside a Class File??
Hello Michael - thanks for the reply - I guess my real question is, why isn't "onRollOver" and "onRollOut" natively part of the Events that the Button Components can broadcast? In the help docs, there is only 1 mentioned Event - which is "click" - It just seems odd, that I have to use one method of adding an Event Listener for Click, and a totally different type of "Add Event Listener" method for adding other types of events. Do you know why that is? Is it for the purpose of not reinventing the wheel, and borrowing events that already exist in other components, and applying it to others? I know that all the components in Flash are reduced to their lowest common denominators - and that they import their core functions from other core classes - again, for the purpose of not having any redundant code & not reinventing the wheel. Thanks for your help on this, and to help me further understand how this all works. Mike :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Bedar Sent: Tuesday, March 28, 2006 2:32 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Using onRollOver and onRollOut inside a Class File?? Whats wrong with this? myButton.onPress=function(){ // } Alternatively, use delegate to call a function from the correct scope. myButton.onPress=Delegate.create(this, myButton_Click) On Mar 28, 2006, at 1:06 PM, Mike Anderson wrote: > Hello All, > > I am getting very confused here, on how to get the "onRollOver" and > "onRollOut" events to be broadcasted whenever the mouse moves over a > Flash Component, contained within a MovieClip using a Class File. > > The component in this particular instance, is the Push Button. When > reading the documentation, the only "events" that are mentioned is the > "click" event. To my knowledge, when using a Class File attached to a > MovieClip containing a Push Button component, there is only one type > of syntax that can be used for adding listeners. > > For example: > > myButton.addEventListener( "click", myButton_Click ); > > And you usually place this statement inside of the onLoad function of > the MovieClip class itself. > > Then the function that handles the event, conforms to the method of > how functions must be written inside of a Class File: > > private function myButton_Click( evtObj:Object ):Void > { > //code here... > } > > Since you can't use a listener object (like you would if you were > simply putting functions in the root of the movie itself), and then > have a statement of listenerObject.onRollOver = function() within a > Class File, I am wondering how I can force the onRollOver and > onRollOut events to get properly broadcasted. > > Please keep in mind, I am trying to keep 100% of my code inside of my > Class Files. I know a simple solution could be simply highlighting > the actual Push Button within the MovieClip, and then directly apply > an "on(event)" function to temporarily accomplish my goals - but this > totally defeats the purpose of creating a separation between Flash App > and Source Code. > > I also looked at the SimpleButton.as Class File in which the Button.as > Class is based on. Oddly enough, there are "onRollOver" and > "onRollOut" > functions in there, but it doesn't Dispatch Events - it simply > activates the "highlight" option when the user rolls over the button. > I thought that was pretty weird... I manually edited the Class File, > so that a Dispatch Event of "onRollOver" and "onRollOut" would be > broadcasted, but still no dice... > > Could any of you point me in the right direction, on how to accomplish > this using only Class Files? Since V2 components, AS 2.0, and Class > Files are being pushed so hard as the preferred way of doing things, > it simply baffles me why these other events wouldn't be available to > the developer. Sorry, but "click" just isn't doing it for me - I need > more events out of my components. > > Thanks in advance, > > Mike > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoder
[Flashcoders] Using onRollOver and onRollOut inside a Class File??
Hello All, I am getting very confused here, on how to get the "onRollOver" and "onRollOut" events to be broadcasted whenever the mouse moves over a Flash Component, contained within a MovieClip using a Class File. The component in this particular instance, is the Push Button. When reading the documentation, the only "events" that are mentioned is the "click" event. To my knowledge, when using a Class File attached to a MovieClip containing a Push Button component, there is only one type of syntax that can be used for adding listeners. For example: myButton.addEventListener( "click", myButton_Click ); And you usually place this statement inside of the onLoad function of the MovieClip class itself. Then the function that handles the event, conforms to the method of how functions must be written inside of a Class File: private function myButton_Click( evtObj:Object ):Void { //code here... } Since you can't use a listener object (like you would if you were simply putting functions in the root of the movie itself), and then have a statement of listenerObject.onRollOver = function() within a Class File, I am wondering how I can force the onRollOver and onRollOut events to get properly broadcasted. Please keep in mind, I am trying to keep 100% of my code inside of my Class Files. I know a simple solution could be simply highlighting the actual Push Button within the MovieClip, and then directly apply an "on(event)" function to temporarily accomplish my goals - but this totally defeats the purpose of creating a separation between Flash App and Source Code. I also looked at the SimpleButton.as Class File in which the Button.as Class is based on. Oddly enough, there are "onRollOver" and "onRollOut" functions in there, but it doesn't Dispatch Events - it simply activates the "highlight" option when the user rolls over the button. I thought that was pretty weird... I manually edited the Class File, so that a Dispatch Event of "onRollOver" and "onRollOut" would be broadcasted, but still no dice... Could any of you point me in the right direction, on how to accomplish this using only Class Files? Since V2 components, AS 2.0, and Class Files are being pushed so hard as the preferred way of doing things, it simply baffles me why these other events wouldn't be available to the developer. Sorry, but "click" just isn't doing it for me - I need more events out of my components. Thanks in advance, Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com