RE: [Flashcoders] +Infinite Loop -Dignity
This will happen if elements.length is undefined. i will never equal undefined. Use i elements.length P -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of daniel Sent: Tuesday, July 10, 2007 11:52 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] +Infinite Loop -Dignity I feel really stupid right now. No, not that stupid. I mean really stupid. Take the highest level of stupid you can imagine and double that. Yes, now you've got it! I have a class named Game. Game.start() calls setInterval(this, update, 1000). Game.update() calls _gameScene.update(). _gameScene.update() has the following loop inside of it: for (var i:Number = 0; i != elements.length; i++) { elements[i].animation.update(); } That FOR loop puts my humble PC into a coma. The variable 'elements' is not undefined, and when I call trace(elements.length) I get '2'. I tried clearing ASO cache (whatever that's worth right now) as a silly precaution. Excuse me whilst I hang myself. ___ 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] Buggy results with textfield.restrict attribute
I needed a text field which only accepts letters, digits, spaces, or a dollar sign or underbar, so I set the restriction attribute as: textfield.restrict = A-Za-z0-9 _$ OK, then I needed to add accented characters, so I added: textfield.restrict = A-Za-z0-9 _$\u00C0-\u00d6 Now, the text field admits any of the following punctuation: ;:[]=^@ I worked around with an exclusion: textfield.restrict = A-Za-z0-9 _$\u00C0-\u00d6^:[EMAIL PROTECTED] So, everything works now, but this is one of those things that rubs my fur the wrong way. Any insight? P. ___ 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] copying text to clipboard?
System.setClipboard() -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Corban Baxter Sent: Monday, June 25, 2007 10:16 AM To: Flashcoders mailing list Subject: [Flashcoders] copying text to clipboard? Hey guys a client is wanting me to create a combobox that has a button below it that can copy text to the clipboard. Can flash access the clipboard? -- Corban Baxter http://www.projectx4.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] onChanged and carriage return
Are you testing this within the IDE? Just a guess, but perhaps you need to ControlDisable Keyboard Shortcuts -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Danny Kodicek Sent: Thursday, June 21, 2007 7:11 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] onChanged and carriage return I've got a text field that is listening for onChanged events. For some reason, it's not getting some of these events when they're carriage returns: a : get the event return : no event a: another event return : no event return : get the event a : get the event return : no event That is: it misses the first carriage return after text, but gets events for subsequent returns (until other text is written in) Anyone else seen this behaviour before? I tried it in a vanilla movie and the same doesn't happen, so it's got to be something I'm doing, but I can't think what it could be. The textField is part of a complicated structure and has a number of other events it's listening to, but surely onChanged is onChanged? Danny ___ 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] Does FLEX have web services?
Does FLEX include a SOAP-based web services component? Does it work better than the buggy MX component (i.e. huge memory leak)? We have shied away from Flash Remoting for the time being; I'm simply looking to determine if there is support for SOAP web services. Pete Miller ___ 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] Class structure
Sounds like the second class should be the base class. Extend the larger from the smaller. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Monday, May 07, 2007 4:10 PM To: Flashcoders mailing list Subject: [Flashcoders] Class structure I'm trying to figure out the best approach for my class structure. I have form valildation class that checks for different items (about 20 items), then I needed some items of the same class for a smaller form (only 4 items). I could extend the first class and use it with my smaller form but there other 16 methods that I dont need to load into the smalle form. What would be a good approach? I know I could create a class for each method and then instiatiate each one as needed, but is that the best method? I was wondering if there was a way to tell flash only to get the methods needed and forget the rest. ___ 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] Datagrid sorting
Is dataProvider.sortOn a proper method? Do you want dataProvider.sortItemsBy instead? P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, March 15, 2007 1:16 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Datagrid sorting Need some help on sorting a datagrid by a particular collumn. Right now, it's sorting alphabetically by data in the second collumn instead of the first. I tried sorting the dataprovider first with the array sort methods, but they didn't work and the help docs indicate those array sorting methods don't work on associative arrays. I have tried: lobAdmins_dg.dataProvider.sortOn(lob, Array.DESCENDING); and also with the DataSetIterator: lobAdmins_dg.dataProvider.addSort(lobSort, lob, DataSetIterator.Descending); and: lobAdmins_dg.dataProvider.addSort(lobSort, [lob], DataSetIterator.Descending); and then setting the dataprovider to the datagrid. (lob is the name of the datagrid collumn and also the property/field in the dataprovider I want to sort on alphabetically. Also searched help docs, Adobe and Google but no luck. Any ideas? Jason Merrill Bank of America Global Technology Operations Learning Leadership Development eTools Multimedia Team ___ 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] Adding a function to the String prototype
I thought this was as easy as: String.prototype.traceFoo = function():Void { trace(foo); } var s:String = new String(); s.traceFoo(); But that results in an error, There is no method with the name 'traceFoo'. Well, duh, traceFoo doesn't exist until the code executes, but how do you tell the compiler that? How does one add a function to String? P. ___ 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] Adding a function to the String prototype
I see, thanx to all. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of eka Sent: Tuesday, February 13, 2007 2:21 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Adding a function to the String prototype Hello :) If you use the strict typing with var s:String you use the AS2 class interpretor and you must override the String.as file in the en/firstRun/classes/FP8 directory in your flash install path. The intrinsic of the String core class must be changed by default in AS2. The String class isn't dynamic ! For me if you want overrides your Core Objects in think you can use Core2 : http://code.google.com/p/core2/ This library implement all ECMAScript methods in the core class (Array, String, etc...). In the AS2 version you can use the custom intrinsic class of Core2 for example to compare the Adobe class and the Core2 class. eKA+ :) 2007/2/13, Pete Miller [EMAIL PROTECTED]: I thought this was as easy as: String.prototype.traceFoo = function():Void { trace(foo); } var s:String = new String(); s.traceFoo(); But that results in an error, There is no method with the name 'traceFoo'. Well, duh, traceFoo doesn't exist until the code executes, but how do you tell the compiler that? How does one add a function to String? P. ___ 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] Coding Standards: Use of Get/Set
Just to fuel your query, how does it affect the user to know whether they are 'get'-ing from a variable or a function call, encapsulation considered? P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Holth, Daniel C. Sent: Tuesday, February 13, 2007 3:32 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Coding Standards: Use of Get/Set I was wondering what people's thoughts were on the use of get and set functions. I personally have felt that creating functions such as: public function get theLetterA(){ return a; } so the user can simply call someObject.theLetterA are confusing because the user doesn't know if they are doing a function call or accessing a public variable. I prefer writing functions such as: public function getTheLetterA(){ return a; } So the user needs to explicitly call the function someObject.getTheLetterA(). Are there advantages to using get and set that I'm not seeing? I ask because I was always use getVariable() functions and started reading ActionScript 3 with Design Patterns and the authors (as well as many others I've read) are using get and set functions. Daniel Holth I.S. Programmer This e-mail and its attachments are intended only for the use of the addressee(s) and may contain privileged, confidential or proprietary information. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, displaying, copying, or use of this information is strictly prohibited. If you have received this communication in error, please inform the sender immediately and delete and destroy any record of this message. Thank you. ___ 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] XRay freezes controls?
I'm publishing to AS2.0, running the most recent connector version (I just downloaded it), and I'm not using the Flex UI. As far as clicking on the stage, all the components are instantiated at runtime, so there is nothing on the stage (I assume by 'stage' you refer to the IDE stage). P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Karina Steffens Sent: Friday, February 02, 2007 8:06 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XRay freezes controls? Perhaps a little less obvious, clicking on a control in the Xray UI, or rolling over it, gives you the same effect as clicking/rolling over the control on the stage. So the question is, what happens when you click the control on the stage? Karina -Original Message- From: Pete Miller [mailto:[EMAIL PROTECTED] Sent: 02 February 2007 20:26 To: Flashcoders mailing list Subject: [Flashcoders] XRay freezes controls? I'm trying out XRay for the first time, and it seems that after taking a snapshot, when I click on an item in the UI to examine its properties, that control becomes disabled (no longer responds to mouse events) anymore. If I examine the properties of an mc containing controls, the entire mc is disabled. Is this the expected behavior? Doesn't seem very useful. What am I doing wrong? Pete M. ___ 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] XRay freezes controls?
Therein is my problem. Once I click on an item in the treeview, the corresponding item in the movie becomes locked up; it no longer responds to the mouse. If I click on a movie clip name in the treeview, the entire window (all components in that clip) are frozen. Furthermore, I don't understand what you mean that clicking on the control in either place generates a similar response. Clicking on an item name in Xray displays its properties. Clicking on an item in the movie does not cause anything to happen in Xray. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Karina Steffens Sent: Monday, February 05, 2007 12:26 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XRay freezes controls? Hi Pete, Nope, by the stage I mean clicking on a control within the Flash movie. So that clicking on a control in the Xray treeview generates a similar response as clicking on it in real. K. -Original Message- From: Pete Miller [mailto:[EMAIL PROTECTED] Sent: 05 February 2007 16:38 To: Flashcoders mailing list Subject: RE: [Flashcoders] XRay freezes controls? I'm publishing to AS2.0, running the most recent connector version (I just downloaded it), and I'm not using the Flex UI. As far as clicking on the stage, all the components are instantiated at runtime, so there is nothing on the stage (I assume by 'stage' you refer to the IDE stage). P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Karina Steffens Sent: Friday, February 02, 2007 8:06 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XRay freezes controls? Perhaps a little less obvious, clicking on a control in the Xray UI, or rolling over it, gives you the same effect as clicking/rolling over the control on the stage. So the question is, what happens when you click the control on the stage? Karina -Original Message- From: Pete Miller [mailto:[EMAIL PROTECTED] Sent: 02 February 2007 20:26 To: Flashcoders mailing list Subject: [Flashcoders] XRay freezes controls? I'm trying out XRay for the first time, and it seems that after taking a snapshot, when I click on an item in the UI to examine its properties, that control becomes disabled (no longer responds to mouse events) anymore. If I examine the properties of an mc containing controls, the entire mc is disabled. Is this the expected behavior? Doesn't seem very useful. What am I doing wrong? Pete M. ___ 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] XRay freezes controls?
I don't see any obvious feedback as you are describing, although in my case there aren't any rollover effects. In trying to figure out what you were describing I figured perhaps you were describing the Flex2 UI, whereas I was using the older UI, so I tried the Flex2 interface. That eliminated the original problem, so I guess everything else it moot at this point. Thanks for helping. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Karina Steffens Sent: Monday, February 05, 2007 12:55 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XRay freezes controls? For example, if you have a tooltip that activates on rolling over a button, the tooltip gets activated when you roll over that button in the treeview. (But not the other way around - rolling over the button won't suddenly show you a tooltip in Xray). I'm not sure if this happens all the time or only in certain situations, but what I'm saying is that there is a direct feedback between Xray and your flash movie. I remember at some point I was X-raying an dragdrop application, and elements in the treeview kept changing their depths when clicked. So a clicking an element in the treeview will generate some kind of response in your application - which is all I'm trying to say... And what you need to figure out now is why this response happens to be locking up your movie in your case. K. -Original Message- From: Pete Miller [mailto:[EMAIL PROTECTED] Sent: 05 February 2007 17:39 To: Flashcoders mailing list Subject: RE: [Flashcoders] XRay freezes controls? Therein is my problem. Once I click on an item in the treeview, the corresponding item in the movie becomes locked up; it no longer responds to the mouse. If I click on a movie clip name in the treeview, the entire window (all components in that clip) are frozen. Furthermore, I don't understand what you mean that clicking on the control in either place generates a similar response. Clicking on an item name in Xray displays its properties. Clicking on an item in the movie does not cause anything to happen in Xray. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Karina Steffens Sent: Monday, February 05, 2007 12:26 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XRay freezes controls? Hi Pete, Nope, by the stage I mean clicking on a control within the Flash movie. So that clicking on a control in the Xray treeview generates a similar response as clicking on it in real. K. -Original Message- From: Pete Miller [mailto:[EMAIL PROTECTED] Sent: 05 February 2007 16:38 To: Flashcoders mailing list Subject: RE: [Flashcoders] XRay freezes controls? I'm publishing to AS2.0, running the most recent connector version (I just downloaded it), and I'm not using the Flex UI. As far as clicking on the stage, all the components are instantiated at runtime, so there is nothing on the stage (I assume by 'stage' you refer to the IDE stage). P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Karina Steffens Sent: Friday, February 02, 2007 8:06 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XRay freezes controls? Perhaps a little less obvious, clicking on a control in the Xray UI, or rolling over it, gives you the same effect as clicking/rolling over the control on the stage. So the question is, what happens when you click the control on the stage? Karina -Original Message- From: Pete Miller [mailto:[EMAIL PROTECTED] Sent: 02 February 2007 20:26 To: Flashcoders mailing list Subject: [Flashcoders] XRay freezes controls? I'm trying out XRay for the first time, and it seems that after taking a snapshot, when I click on an item in the UI to examine its properties, that control becomes disabled (no longer responds to mouse events) anymore. If I examine the properties of an mc containing controls, the entire mc is disabled. Is this the expected behavior? Doesn't seem very useful. What am I doing wrong? Pete M. ___ 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
[Flashcoders] XRay freezes controls?
I'm trying out XRay for the first time, and it seems that after taking a snapshot, when I click on an item in the UI to examine its properties, that control becomes disabled (no longer responds to mouse events) anymore. If I examine the properties of an mc containing controls, the entire mc is disabled. Is this the expected behavior? Doesn't seem very useful. What am I doing wrong? Pete M. ___ 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: Re: [Flashcoders] Area of a triangle using perimiter values only
Without looking up the source of that formula (i.e., just based on what you wrote), I determine this: that in order for the result of multiplication to be negative, one of the terms containing subtraction must be negative. In order for that to occur, one side of your triangle is longer than the sum of the other two. That is impossible. Check your parameters. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Jordan Snyder Sent: Thursday, December 14, 2006 11:36 AM To: Flashcoders mailing list Subject: Re: Re: [Flashcoders] Area of a triangle using perimiter values only I recind half of what I said after actually thinking about it, but maybe it's a different perspective ;) On 12/14/06, Jordan Snyder [EMAIL PROTECTED] wrote: To dodge your question, couldn't you just use the simple distance forumula to determine the base even when it's not horizontal? I dont' know much about your application or if you'll have the points where the triangle's points lie, but that's just an idea. Oh, but I just thought of something from my old rusty brain. I looked at the formula on the mathworld page; would that not indicate a distributive method of multiplication? Again, rusty, but a thought. Let us know what you figure out!! Cheers On 12/14/06, Merrill, Jason [EMAIL PROTECTED] wrote: I'm trying to figure the area of a triangle in Actionscript using the perimeter values only, not the traditional simple formula: area = (height/2)*base because figuring the height is tricky given the triangle will be drawn in odd ways (i.e. a not horizontally alinged base), so I am exploring other triangle area forumulas that only take in the perimiter values (a,b,c), like Heron's formula or this one, which I like: given a,b,c are the length of the sides of the triangle, then the formula is: squareRoot of: (a+b+c)(b+c-a)(c+a-b)(a+b-c) ___ 4 So in trying to translate that to actionscript, I wrote: public static function areaOfTriangle(a:Number, b:Number, c:Number):Number{ return (Math.sqrt((a+b+c)*(b+c-a)*(c+a-b)*(a+b- c)))/4; } But the problem is (a+b+c)*(b+c-a)*(c+a-b)*(a+b-c) results in a negative number, and this the square root cannot be taken. Or perhaps I am interpreting the forumula incorrectly: http://mathworld.wolfram.com/TriangleArea.html What am I doing wrong here? Thanks. Jason Merrill Bank of America Learning Organizational Effectiveness ___ 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 -- Jordan Snyder jordansnyder.com Applications Developer Image Action LLC http://www.imageaction.com -- Jordan Snyder Applications Developer Image Action LLC http://www.imageaction.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] AS2 OOP Class Structure for simple pong type game
Another possible strategy is for the ball to fire off an event every time it crosses certain vertical location thresholds. The target objects could then listen for the event which matches their vertical location to test for a collision. For example, when the ball descends to the row containing the paddle, it fires that event, and the paddle, receiving it, tests for collision. When the ball ascends to the first row of bricks, those bricks each test for collsion. This might be a performance improvement over testing every object in the system all the time. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Holth, Daniel C. Sent: Wednesday, December 13, 2006 9:43 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] AS2 OOP Class Structure for simple pong type game That would be one way. Although it is rather limiting. I'm assuming that the ball will bounce whenever it hits an object. Perhaps create an array of bounceObjects[]; function addBounceObject(obj:Object):Number{ return bounceObjects.push(obj); } Then you could create your hit tracker. function checkCollisions(){ var len:Number = bounceObjects.length; // Loop through and check all objects hitting the ball for(var i:Number = 0; i len; i++){ // Check each object hit ball if(this.hitTest(bounceObjects[i])){ this.bounce(); // Bounce the ball bounceObject[i].onHitByBall(); } } } Have your onEnterFrame functions run checkCollisions every time. That way you check for hits against the paddle, bricks etc. The bounceObject[i].onHitByBall() would execute a function in that objects code that would say what to do when it was hit by a ball. In the instance of a paddele do nothing, a brick - destory it! -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul Steven Sent: Wednesday, December 13, 2006 8:26 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] AS2 OOP Class Structure for simple pong type game Thanks for the reply Dan Not quite sure how the Ball references the Paddle or alternatively the CollisionController references the ball and paddle. My Game class creates the Ball and Paddle as follows: mcPaddle = new Paddle(mcReference, paddle_mc, 50, 100, 289); var vBall_Object = new Ball(mcReference, ball_mc, 100, 160, 240); arrBallObjects.push(vBall_Object); If I wanted to give the Ball a reference to the paddle, would I do something like this? (see last parameter) var vBall_Object = new Ball(mcReference, ball_mc, 100, 160, 240, mcPaddle); Thanks Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Holth, Daniel C. Sent: 13 December 2006 14:14 To: Flashcoders mailing list Subject: RE: [Flashcoders] AS2 OOP Class Structure for simple pong type game I would make the ball responsible for checking if it collides with the paddle because the ball's behavior/state will change - not the paddle's, nor does the state of the 'game' really change. An alternative would be to create a CollissionControler.as that does all your hit testing for you. This may become useful when you add the bricks or other objects that need to check for collisions. -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul Steven Sent: Wednesday, December 13, 2006 8:02 AM To: 'Flashcoders mailing list' Subject: [Flashcoders] AS2 OOP Class Structure for simple pong type game I am creating a simple pong / breakout / arkanoid game in AS2 and not sure how best to deal with the classes. So far I have a Game.as class, a Paddle.as class and a Ball.as class. I need to detect when the ball (or balls) collide with the Paddle. My question is, which class should check for this collision? Should the Game class do this or should I pass a reference to the Paddle into the Ball class so the Ball is able to check this collision itself? If it is the Game class, then I guess it is a case of giving both the Paddle and Ball classes a method to return their current position and then letting the Game class compare these positions to determine if a collision has occurred? If the Ball class needs to have a reference to the Paddle passed to it, I am not sure how this is done. So I would appreciate any advice on this. I appreciate there are probably a lot of different solutions to this, but I am trying to get off on the right footing with this OOP programming. Many thanks Paul ___ 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
RE: [Flashcoders] AS2 OOP Class Structure for simple pong type game
I don't program games (so add that factor as a consideration), it was just my first thought that if I were doing this, I wouldn't want to test every object for a collision all the time. If there is a latency issue such as you describe, a homebrewed Event class might eliminate it. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of slangeberg Sent: Wednesday, December 13, 2006 11:13 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] AS2 OOP Class Structure for simple pong type game Have you actually implemented an event system like this in games? It seems like a good idea, but for some reason I always thought this approach would introduce unnecessary latency, but now I'm not sure why! -Scott On 12/13/06, Pete Miller [EMAIL PROTECTED] wrote: Another possible strategy is for the ball to fire off an event every time it crosses certain vertical location thresholds. The target objects could then listen for the event which matches their vertical location to test for a collision. For example, when the ball descends to the row containing the paddle, it fires that event, and the paddle, receiving it, tests for collision. When the ball ascends to the first row of bricks, those bricks each test for collsion. This might be a performance improvement over testing every object in the system all the time. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Holth, Daniel C. Sent: Wednesday, December 13, 2006 9:43 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] AS2 OOP Class Structure for simple pong type game That would be one way. Although it is rather limiting. I'm assuming that the ball will bounce whenever it hits an object. Perhaps create an array of bounceObjects[]; function addBounceObject(obj:Object):Number{ return bounceObjects.push(obj); } Then you could create your hit tracker. function checkCollisions(){ var len:Number = bounceObjects.length; // Loop through and check all objects hitting the ball for(var i:Number = 0; i len; i++){ // Check each object hit ball if(this.hitTest(bounceObjects[i])){ this.bounce(); // Bounce the ball bounceObject[i].onHitByBall(); } } } Have your onEnterFrame functions run checkCollisions every time. That way you check for hits against the paddle, bricks etc. The bounceObject[i].onHitByBall() would execute a function in that objects code that would say what to do when it was hit by a ball. In the instance of a paddele do nothing, a brick - destory it! -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul Steven Sent: Wednesday, December 13, 2006 8:26 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] AS2 OOP Class Structure for simple pong type game Thanks for the reply Dan Not quite sure how the Ball references the Paddle or alternatively the CollisionController references the ball and paddle. My Game class creates the Ball and Paddle as follows: mcPaddle = new Paddle(mcReference, paddle_mc, 50, 100, 289); var vBall_Object = new Ball(mcReference, ball_mc, 100, 160, 240); arrBallObjects.push(vBall_Object); If I wanted to give the Ball a reference to the paddle, would I do something like this? (see last parameter) var vBall_Object = new Ball(mcReference, ball_mc, 100, 160, 240, mcPaddle); Thanks Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Holth, Daniel C. Sent: 13 December 2006 14:14 To: Flashcoders mailing list Subject: RE: [Flashcoders] AS2 OOP Class Structure for simple pong type game I would make the ball responsible for checking if it collides with the paddle because the ball's behavior/state will change - not the paddle's, nor does the state of the 'game' really change. An alternative would be to create a CollissionControler.as that does all your hit testing for you. This may become useful when you add the bricks or other objects that need to check for collisions. -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul Steven Sent: Wednesday, December 13, 2006 8:02 AM To: 'Flashcoders mailing list' Subject: [Flashcoders] AS2 OOP Class Structure for simple pong type game I am creating a simple pong / breakout / arkanoid game in AS2 and not sure how best to deal with the classes. So far I have a Game.as class, a Paddle.as class and a Ball.as class. I need to detect when the ball
RE: [Flashcoders] problems with dataGrid.selectedIndex
Are you by any chance trying to set the selectedIndex before the dataProvider array has been filled? Presumably myTrack_Pos is known immediately via the URL query-string, but the datagrid needs time to become populated (via XML?). -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Carl Welch Sent: Wednesday, November 15, 2006 3:18 PM To: Flashcoders mailing list Subject: [Flashcoders] problems with dataGrid.selectedIndex Oi! I have built a mp3 player using xml to give me all of my links to files, data, etc... The data loads into a datgrid. One of the requirements I needed to meet was to be able use a url query-string to directly link to a mp3 to play on load: exampe: http://mysite/audio.php?titleid=10trackid=71 This works fine. But I also need to hilite the correct row in the datagrid when I use the query-string when the swf loads. Here's what I'm using: songList_lb.selectedIndex = myTrack_Pos; songList_lb.dispatchEvent({type:change, target:songList_lb}); It seems like selectedIndex will only work if the user has already clicked on the datagrid. But I want a row to be selected when the swf loads before the user has had a chance to select anything... I hope I am making sense. Thanks. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ 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 from PHP coder
Thanx to everyone for the input. It was the $HTTP_RAW_POST_DATA item that I was unaware of. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Chester McLaughlin Sent: Thursday, November 09, 2006 8:27 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Need help from PHP coder Here's a very simple example I got working 1) create php file called saveXML.php 2) create xml file called myxml.xml 3) make sure php can write to myxml.xml file // START ACTIONSCRIPT var null_xml:XML = new XML(); var my_xml:XML = new XML(nodechildchester/child/node); my_xml.contentType = text/xml; // Send to a specific HTML window (_blank, _self, _top, etc); //my_xml.send(saveXML.php,_self); // Send in the background my_xml.sendAndLoad(saveXML.php,null_xml); // END ACTIONSCRIPT ! -- START PHP -- ? $fp=fopen(myxml.xml,w); fwrite($fp,$HTTP_RAW_POST_DATA); fclose($fp); ? ! -- END PHP -- On Nov 9, 2006, at 2:49 PM, Pete Miller wrote: Learn PHP is still on my to-do list, and now I'm fumbling my way through a few simple PHP scripts. I simply want to send an XML object to a PHP script that will write it to the server. What PHP function will catch the end result of a XML.send() function? No need for too many details, I'll read up on it, but if someone could name the proper function? Thanx, P. ___ 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 email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee you should not disseminate, distribute or copy this e-mail Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Any other use, retention, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. Finally, the recipient should check this e-mail and any attachments for the presence of viruses. Lambesis accepts no liability for any damage caused by any virus transmitted by this email. ___ 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] Best way to detect an idle user?
My application starts with a user login/authentication. I want to implement an idle user process that logs the user out after X amount of time of no activity. The most obvious way I can think to do this is to start an interval timer, and keep reseting it any time a widget is used. That means adding a reset-function call to every component event handler, plus adding event handlers for many components that otherwise don't have relevant events. Does anyone have a more clever way of handling this? ___ 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] Noob, basic questions on actionscript, with methodology suggestions
Additionally, the reason you must create a function is because, as you put it, it is something that one will use again and again. Not in the way you understand it however. The XML class definition knows that there is (should be) a function called onLoad() that it must call when it successfully loads an XML file. It doesn't exist until you write it, but the class nevertheless expects one to exist. So, when I say that it is used again and again, I mean that the XML class, when instantiated by any user, calls onLoad(). The reason you can't do it procedurally is because the load process is asynchronous. When you call external_xml.load(example1.xml), you haven't loaded the entire file, you have merely *started* the load. When it is finished (depending on the file size, the speed of the hard drive, the bandwidth of the connection, etc.), then the object calls onLoad(). I use to trip over this one, calling xml.load() then immediately trying to use data from the load, forgetting that I needed to wait for the onLoad() to tell me that it was done. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Glen Pike Sent: Thursday, November 09, 2006 4:51 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Noob, basic questions on actionscript,with methodology suggestions Hi, You will need to move external_xml.load call below the onLoad function because your file will probably be loaded before the handler is defined (locally). with trace(myXML) you have defined myXML inside the function - this means it is not in scope outside the function. Try: var external_xml:XML = new XML(); //trace if loaded, or not external_xml.onLoad = function(success:Boolean) { if (success) { trace(xml loaded successfully.); //Do something with the XML in here. } else { trace(xml failed to load.); } }; //variable loads external XML file afterwards external_xml.load(example1.xml); trace(external_xml); Scott Haneda wrote: Hi, downloaded Flash, 1st post! w00t! need to work out a small project. I have experience in programming, not specifically OOP, and actionscript seems to be very OOP. I few questions: I am loading up some XML per an example: //ignore whitespace XML.prototype.ignoreWhite = true; //create variable and new XML Object var external_xml:XML = new XML(); //variable loads external XML file external_xml.load(example1.xml); //trace if loaded, or not external_xml.onLoad = function(success:Boolean) { if (success) { trace(xml loaded successfully.); var myXML = external_xml; } else { trace(xml failed to load.); } }; trace(myXML); What I don't get, it why this needs to be in a function, my experice tells me you use functions for things you may otherwise need to use again, either putting the in a file elsewhere, whatever. It makes no sense to me to functionize the reading in of XML, why not just approach it procedurally? And, as you can see, my trace(myXML); does not work, so how would I access the XML data outside the function, is there a local keyword I am not finding? Finally, As for details on what I need to do, to start, as a way to learn this, I want to get a trace of something to happen: Load in this XML file: camps sport=Tennis state name=California cc=3 url=a/ state name=Oregon cc=13 url=b/ state name=Washington cc=2 url=c/ /camps I have that much working, I can not figure out how to access each item as of yet, but did have a plan. Of course, there will be 50 items in that XML file. Each item eventually needs to be hooked up to a map, so each state can some coloring based on the cc value, and if there is a value for a, I can take them to that url. I was going to iterate the XML, and create an assoc array, in which I could then simply call out each state name, and hopefully get to its parameters. I can then learn how to hook those up to each state on the graphic file. I wonder, do I even need the assoc array idea at all? So, right now, I need to get myself in a case, where I can do something like this: trace(xml.state.california[2]) and have it give me a back. Assuming 0 based lists in ActionScript? I know my trace statement above is making you laugh, but as you know, I am hour 1 into this. Thanks for any handholding. ___ 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
RE: [Flashcoders] Noob, basic questions on actionscript, withmethodology suggestions
You tripped, exactly the way I described earlier, by accessing external_xml right after calling Load(). Wait until onLoad() is called before doing anything with external_xml. You should trace the XML object inside the onLoad function: external_xml.onLoad = function(success:Boolean) { if (success) { trace(this); //Do something with the XML in here. } else { trace(xml failed to load.); } The result will probably be [Object object] or something equally obscure, as the Flash trace routine doesn't break down complex objects into viewable text. In general, you can put a flag inside the onLoad() routine that indicates that the XML object is safe to use. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Scott Haneda Sent: Thursday, November 09, 2006 5:14 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Noob, basic questions on actionscript, withmethodology suggestions Hi, You will need to move external_xml.load call below the onLoad function because your file will probably be loaded before the handler is defined (locally). with trace(myXML) you have defined myXML inside the function - this means it is not in scope outside the function. Try: var external_xml:XML = new XML(); //trace if loaded, or not external_xml.onLoad = function(success:Boolean) { if (success) { trace(xml loaded successfully.); //Do something with the XML in here. } else { trace(xml failed to load.); } }; //variable loads external XML file afterwards external_xml.load(example1.xml); trace(external_xml); I get nothing at all on the final trace, not null, not undefined, just blank. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. ___ 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] Need help from PHP coder
Learn PHP is still on my to-do list, and now I'm fumbling my way through a few simple PHP scripts. I simply want to send an XML object to a PHP script that will write it to the server. What PHP function will catch the end result of a XML.send() function? No need for too many details, I'll read up on it, but if someone could name the proper function? Thanx, P. ___ 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] Noob, basic questions on actionscript, with methodology suggestions
I wuz a noob once. I cured it by hanging out with non-noobs. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, November 09, 2006 5:36 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Noob, basic questions on actionscript,with methodology suggestions There is Flashnewbies, but any Actionscript question is supposed to be welcome here. Don't listen, they're just grumpy. :) Jason Merrill Bank of America Learning Organizational Effectiveness -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Scott Haneda Sent: Thursday, November 09, 2006 5:16 PM To: Flashcoders mailing list; Mike Keesey Subject: Re: [Flashcoders] Noob, basic questions on actionscript, with methodology suggestions You have to use a function because the loading is asynchronous. It doesn't stop program flow while it's loading; it continues with the program and calls a handler (onLoad) once the load is complete. Thanks, I understand that part now. I'm not sure this is the proper forum for n00b questions If I am in the wrong forum, please point me to the correct one, Its called Flashcoders mailing list, so I thought that was what this was about. If I just jump into a general flash mailing list, I don't know what help I will get, this is pure actionscript more or less. At any rate, point me to the correct mail list and I will be there, thanks again. -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. ___ 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] Best way to detect an idle user?
Thanx, I'll give that a try! P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Chester McLaughlin Sent: Thursday, November 09, 2006 5:39 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Best way to detect an idle user? Here's a working class I whipped up. It uses onMouseMove to monitor their activity. // BEGIN CLASS // ActivityMonitor // Created by Chester McLaughlin on 2006-11-09. import mx.utils.Delegate; import mx.events.EventDispatcher; class ActivityMonitor { var nLatestActivity:Number; var nMaxIdleTime:Number; var nIntervalID:Number; var onMaxIdleTimeExceeded:Function; private var broadcastMessage:Function; public var addListener:Function; function ActivityMonitor(nMaxIdleTime:Number) { AsBroadcaster.initialize(this); Mouse.addListener(this); this.onMouseMove(); this.nMaxIdleTime = nMaxIdleTime; this.nIntervalID = setInterval(Delegate.create (this,checkForActivity),5000); } function checkForActivity(){ var nNow = getTimer(); var nDiff = (nNow - this.nLatestActivity)/1000; if (nDiff = this.nMaxIdleTime){ this.broadcastMessage(maxIdleTimeExceeded,nDiff); this.onMaxIdleTimeExceeded(nDiff); } } function onMouseMove() { this.nLatestActivity = getTimer(); } }; // END CLASS // BEGIN USAGE /* import ActivityMonitor; // This creates an instance of Activity Monitor that requires the user // to move their mouse at least once every 5 seconds var myActivityMonitor:ActivityMonitor = new ActivityMonitor(5); // Method #1 myActivityMonitor.onMaxIdleTimeExceeded = function(nDiff:Number){ //var nDiff:Number = arguments[0]; trace(Method 1: You've been idle for +nDiff+ seconds. Get Moving!!!); } // Method #2 myActivityMonitor.addListener(this); function maxIdleTimeExceeded(nDiff:Number){ trace(Method 2: You've been idle for +nDiff+ seconds. Get Moving!!!); } */ // END USAGE On Nov 9, 2006, at 1:45 PM, Pete Miller wrote: My application starts with a user login/authentication. I want to implement an idle user process that logs the user out after X amount of time of no activity. The most obvious way I can think to do this is to start an interval timer, and keep reseting it any time a widget is used. That means adding a reset-function call to every component event handler, plus adding event handlers for many components that otherwise don't have relevant events. Does anyone have a more clever way of handling this? ___ 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 email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee you should not disseminate, distribute or copy this e-mail Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. Any other use, retention, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. Finally, the recipient should check this e-mail and any attachments for the presence of viruses. Lambesis accepts no liability for any damage caused by any virus transmitted by this email. ___ 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] Complex data type in webservice call
My backend server is changing its web service component from an RPC/encoded binding to document/literal, and Flash is producing an odd result when sending complex objects. The short story is this: the object that I'm sending as a parameter is complex; it contains an array of objects. It works fine with the RPC/encoded binding, but when the document/literal binding is used, Flash replaces the array of objects with [Object object],[Object object],[Object object]. This is not from a trace, it is the actual SOAP packet, captured with a TCP sniffer. In detail, the object I try to send (a 'Group') is complex; it contains an array of sub-objects ('User'). The WSDL description for Groups/Users looks (under RPC) like: complexType name=Group sequence element name=name nillable=true type=xsd:string/ element name=description nillable=true type=xsd:string/ element name=users nillable=true type=impl:ArrayOf_tns1_User/ /sequence /complexType complexType name=ArrayOf_tns1_User complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=tns1:User[]/ /restriction /complexContent /complexType complexType name=User sequence element name=firstName nillable=true type=xsd:string/ element name=lastName nillable=true type=xsd:string/ /sequence /complexType In a document/literal version the WSDL description looks like: complexType name=Group sequence element name= name nillable=true type=string/ element name=description nillable=true type= string/ element maxOccurs=unbounded minOccurs=0 name=users nillable=true type=tns:User/ /sequence /complexType complexType name=User sequence element name=firstName nillable=true type= string/ element name=lastName nillable=true type=string/ /sequence /complexType I've directed the web service traffic through a TCP port sniffer to observe the SOAP packets, and what I see is: For the RPC binding the SOAP object generated by Flash looks (predictably) like: in0 xsi:type=ns2:Group description xsi:type=xsd:stringbb/description name xsi:type=xsd:string/name users xsi:type=soapenc:Array soapenc:arrayType=ns2:User[3] item xsi:type=ns2:User firstName xsi:type=xsd:stringJeff/firstName lastName xsi:type=xsd:stringSomeone/lastName /item item xsi:type=ns2:User firstName xsi:type=xsd:stringEric/firstName lastName xsi:type=xsd:stringSomeoneelse/lastName /item item xsi:type=ns2:User firstName xsi:type=xsd:stringGreg/firstName lastName xsi:type=xsd:stringNobody/lastName /item /users /in0 Now, the object generated with the document/literal binding looks like: Group_1 name/label descriptionbb/description users[object Object],[object Object]/users /Group _1 Anyone ever see this before? Pete Knowledge Vector requires me to tell you that: This message and any attachments contain information from Knowledge Vector Inc., which may be confidential and/or privileged and is intended for use only by the addressee (s) named on this transmission. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are notified that any review, copying, distribution or use of this transmission is strictly prohibited. If you have received this transmission in error, please (I) notify the sender immediately by e-mail or by telephone and (II) destroy all copies of this message. And I WILL test you by sending you a message in error to see if you read this. ___ 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] EventDispatcher and Delegate - where am I goingwrong...
Pressing your button causes the code to create the delegate function, not execute it. You want the result of Delegate() to be stored as the onRelease function. Do this: this.mcButton.onRelease = Delegate.create(this.objRef, onClick) P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Jon Bennett Sent: Thursday, October 26, 2006 10:32 AM To: Flashcoders mailing list Subject: [Flashcoders] EventDispatcher and Delegate - where am I goingwrong... Hi, I'm knocking up some simple tests to get EventDispatcher and Delegate working, but I can't seem to get my rather simple example to work: // MyButton.as // EventDispatcher import mx.events.EventDispatcher; // Delegate import mx.utils.Delegate; class MyButton { public var dispatchEvent:Function; public var addEventListener:Function; public var removeEventListener:Function; public var dispatchQueue:Function; private var mcButton:MovieClip; function MyButton (mcButton) { EventDispatcher.initialize (this); this.mcButton = mcButton; this.init (); } function init () { this.mcButton.objRef = this; this.mcButton.onRelease = function () { Delegate.create(this.objRef, onClick) } // clearInterval(timeInt); } function onClick () { dispatchEvent ({type:'click', target:this, message:'Hey dude the button was clicked'}); } }; // ButtonListener.as // EventDispatcher import mx.events.EventDispatcher; // Delegate import mx.utils.Delegate; class ButtonListener { public var dispatchEvent:Function; public var addEventListener:Function; public var removeEventListener:Function; public var dispatchQueue:Function; private var myButton:MyButton; function ButtonListener () { myButton = new MyButton(_root.mcButton); myButton.addEventListener('click', Delegate.create(this, onClick)); } function onClick (eventObj) { trace(eventObj.target); trace(eventObj.type); trace(eventObj.message); trace(eventObj.time); } }; // Timeline import MyButton; import ButtonListener; var myButtonListener = new ButtonListener(); I'm sure it's something blindingly obvious, but how do I get my ButtonListener class to hear the 'click' event ? Thanks, Jon -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Q:Elementary Trig part 2
Check your algebra, Since sin(a) = y/r, then y = r sin(a), etc. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Jayson K Hanes Sent: Sunday, October 22, 2006 7:42 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Q:Elementary Trig part 2 Been awhile since I've explained this to anyone.. lets see how this goes! SOHCAHTOA (so-ca-toa) Sin(a) = opposite/hypotenuse Cos(a) = adjacent/hypotenuse Tan(a) = opposite/adjacent a = angle in RADIANS *not* degrees.. you'll have to convert degrees to radians with knowing: ..there are PI (3.14159..) radians in 180 degrees (a fundamental), thus: a = A*(PI/180), thus: a = 45*(3.14159/180) = .785 (roughly) Given r and angle=A degrees converted to a radians, r is the same as the length of a basic triangles' hypotenuse in this -- we're looking for x,y .. moving on: A=45 degrees but converted to a=.785 radians (approx).. we know that: r=10, and should know that: r=sqrt(x^2+y^2) (per Pythagoras theorem) so we're going to reverse format the SOH and CAH parts since we know the length of the hypotenuse and need to find out x and y (the opposite and adjacent sides' lengths) one at a time based on angle, a in radians: sin(a)=y/r, and, cos(a)=x/r, which translates to: y=sin(a)/r, and x=cos(a)/r, however: y=sin(a)/10, and x=cos(a)/10, thus: y=sin(.785)/10, and x=cos(.785)/10, thus: y=0.707/10 = 7.07 (roughly) x=0.707/10 = 7.07 (roughly) I think that should set you on you on track! Hope that helps :) -Jayson -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Sunday, October 22, 2006 3:11 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Q:Elementary Trig part 2 Another way of stating my problem: Given an initial angle, and a circle with radius r, how do you determine the x,y coordinates of the point p1 on the circumference of this circle...assuming the circle's center is at 0,0.? [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ___ 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] incrementing a target?
Get rid of the extra period _root.mainMC.auto.subMC.[textField+i].text = ^ ^ _root.mainMC.auto.subMC[textField+i].text = -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Bill Pelon Sent: Thursday, October 19, 2006 5:33 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] incrementing a target? Seems to jumble me up a bit, I get this error. Expected a field name after '.' operator. _root.mainMC.auto.subMC.[textField+i].text = turbo.attributes.name; thanks though... - Original Message - From: Glen Pike [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, October 19, 2006 3:16 PM Subject: Re: [Flashcoders] incrementing a target? Erm, I think you might want to try _root.mainMC.auto.subMC[textField + i].text Not sure. Bill Pelon wrote: Hello, I'm having problems figuring out how to grab an array value and use that when targeting. This is my fucntion below. What I am wanting to do is take the [i]value and be able to use that when trying to write to my textfields / /// function ExpandData(turbo){ var turboItem = turbo.firstChild.childNodes; for (var i = 0; i turboItem.length; i++){ but = eval(but+i); var turbo = turboItem[i]; _root.mainMC.auto.subMC.txtField+i.text = turbo.attributes.name; } } / // Thanks, Bill ___ 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] Alternative IDE for Flash Devel
I'm having the same problem and I don't think it was answered. How do I tell FlashDevelop/MTASC what/where my packages are? If my class path is MyDirectory, and I import components.* from MyDirectory/components, how do I add this to the setup? I've tried several combinations, but haven't hit it yet. P. But now need to get the following errors in the compiler Warning : package com.Data not found Warning : package com.UserInterface not found Warning : package com.Utils not found ___ 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] Alternative IDE for Flash Devel
Thanx. I got it working...I entered the .fla instead of the .swf into the place that wanted it. No thanks to the limited information available for this tool. The Help button points to a URL that has no information on FLASC. But, since it is little more than a wrapper around MTASC, I guess the real thing to do is learn how that works. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Hans Wichman Sent: Friday, October 13, 2006 11:17 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Alternative IDE for Flash Devel Hi Pete, check out the project page for flasc, there are video's available that demo it. In addition as mentioned before, FlashDevelop wraps around mtasc too. greetz JC On 10/13/06, Pete Miller [EMAIL PROTECTED] wrote: This looks great, but I can't figure out how to create a project in FLASC. Specifically, it asks me to create a batch file first. What batch file? What it is looking for? P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ Sent: Thursday, October 12, 2006 6:57 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Alternative IDE for Flash Devel Why can't you use MTASC? If you're serious about Flash development, you should be using it. I have a Flash application that literally takes 30 seconds to compile in the IDE and less than a second with MTASC. If you don't want to have to write out that long command line compile script (and who does) you should check out FLASC, which is a great GUI for MTASC which runs as a panel in the Flash IDE. http://www.osflash.org/flasc ___ 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] Alternative IDE for Flash Devel
This looks great, but I can't figure out how to create a project in FLASC. Specifically, it asks me to create a batch file first. What batch file? What it is looking for? P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ Sent: Thursday, October 12, 2006 6:57 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Alternative IDE for Flash Devel Why can't you use MTASC? If you're serious about Flash development, you should be using it. I have a Flash application that literally takes 30 seconds to compile in the IDE and less than a second with MTASC. If you don't want to have to write out that long command line compile script (and who does) you should check out FLASC, which is a great GUI for MTASC which runs as a panel in the Flash IDE. http://www.osflash.org/flasc ___ 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] Class Problem + Bad attitudes
RTFM has been an obligatory response since the day we started using the Internet to ask questions. Its not just programmers. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of slangeberg Sent: Friday, October 06, 2006 1:11 PM To: Flashcoders mailing list Cc: [EMAIL PROTECTED] Subject: Re: [Flashcoders] Class Problem + Bad attitudes Unfortunately the condescending attitudes have been pretty thick her on the list lately. I've noticed the same thing here and on a local Flash list. Not sure if it's because the programmers who're drawn to Flash tend to be tender young bas+ards, or is it just that programmers in general are condescending punks? That said, most of you could stand to learn a lot from myself. Scott On 10/6/06, Merrill, Jason [EMAIL PROTECTED] wrote: AS2 101. Try http://www.amazon.com/Essential-ActionScript-2-0-Colin- Moock/dp/0596006527/s r=8-1/qid=1160106358/ref=sr_1_1/104-8535662-7712736?ie=UTF8s=books Unfortunately the condescending attitudes have been pretty thick her on the list lately. Victor, pay no mind to the attitude, your question was perfectly legit here- it's often hard quickly to find the answer to a specific question in books or web sites, just do as he suggested - something like this will work (may not be the best way, but how I would do it - you can alternatively use getter/setter methods as well): //MyClassB.as class MyClassB{ public var ClassBArray:Array; public function MyClassB(){ ClassBArray = new Array(1,2,3,4); } } //MyClassA.as import MyClassB; class MyClassA{ private var theArray:Array; public function MyClassA(classb:MyClassB){ theArray = classb.ClassBArray trace(theArray) } } //.fla import MyClassB; import MyClassA; myClassBInstance:MyClassB = new MyClassB() myClassAInstance:MyClassA = new MyClassA(myClassBInstance); Hope that helps, Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ 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 -- : : ) Scott ___ 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] How to create a preloader that plays in full
A preloader by definition is a short, small movie that loops endlessly until the swf is completely loaded; the load-end stops the movie. You're describing a movie that wants to end when it reaches its last frame. What does it have to do with the load process? You cannot guarantee which will end first, the movie or the load, so you need to know what you want to happen in either case depending on which event happens first. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Aaron Roberson Sent: Thursday, October 05, 2006 12:40 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How to create a preloader that plays in full Thanks for the sarcasm but I am not just trying to create a simple preloader that plays until the movie has loaded. Rather, I want to create a preloader that has two functions: 1) to preload the movie (of coarse) and 2) to play the entire preloader's timeline even if the movie has already been preloaded. It's the second part that I am having trouble with. A traditional preloader plays until the movie has been loaded. Instead, I want the preloader to play in entirely even if the movie has already been loaded. This way, the preloader is not just a progress bar but an element of the movie. I hope that makes sense. On 10/5/06, Michael Stuhr [EMAIL PROTECTED] wrote: Aaron Roberson schrieb: I want to create a preloader that plays through even if the rest of the timeline has been loaded. I saw a tutorial on this some time back but can't find it now. Forgive me if this is a common request or something but I have searched and searched but can't find it. The problem is probably that I'm not sure what keywords to use for a good search. you cannot find *anything* about how a *preloader* is made in flash ? is the list archive down ? is flashkit down ? is google down ? micha ___ 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] How to create a preloader that plays in full
And a preloader for the preloader's preloader...does Zeno's Paradox apply here? -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Aaron Roberson Sent: Thursday, October 05, 2006 1:57 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How to create a preloader that plays in full Yeah, I think that is essentially what Pete and Marc said. Thanks On 10/5/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: You're going to need a preloader for your preloader... ___ 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] Array problem
If someIndex != 0 then you have to foo[someIndex] = new Object(); foo[someIndex].typ = B; P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of eric dolecki Sent: Thursday, September 28, 2006 1:26 PM To: Flashcoders mailing list Subject: [Flashcoders] Array problem I have an array of objects like this: var foo:Array = new Array(); foo[0] = {typ:A, label:foobar}; and some time later, I'd like to change the value of typ like so: foo[someIndex].typ = B; However thats not working, the value isn't being set. I think I am missing something pretty simple here. - e. ___ 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] Help debug a webservice issue
Try putting a saveResultObj.onFault() handler in your code to see if you're getting a failure response. Note that if your server responds with a 505 HTTP header, your fault handler won't see it, as the Flash player filters these out. You need a TCP snoop utility to monitor the messages passed between your client and server to see if this is the case or whether the response is intermittently failing to be sent or intermittently failing to be processed. P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Monday, September 25, 2006 7:19 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] Help debug a webservice issue Even if someone just wants to take a guess that would be fine. Thanks! -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, September 22, 2006 4:01 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Help debug a webservice issue Nobody? -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, September 22, 2006 11:17 AM To: Flashcoders mailing list Subject: [Flashcoders] Help debug a webservice issue I've got a webservice which is acting up and I'm trying to figure out if it's a .NET server issue, a c# script issue, a Flash Webservice component issue, or something else. The problem is the onResult listener gets fired sometimes, sometimes not. It had been working fine until yesterday. My Actionscript (snippet) is as follows: (theObject is an object I format in Flash - it remains unchanged in tests) saveResultObj = new Object(); saveResultObj = myWS.SaveProject(theObject); saveResultObj.targetMC = someMovieClip_mc; saveResultObj.onResult = function(result){ //this function only gets fired intermittently! trace(result received); this.targetMC.doSomething(); } The SaveProject()method in c# takes an object as it's parameter. The object and its properties/values are unchanged every time I test, so I don't see how it could be the c# script. The onResult event fire intermittently - and on the occasions it doesn't fire, the SaveProject() method still ran just fine (one of the things SaveProject does is create XML, and I see the XML gets updated correctly), but the result doesn't get fired back all the time. I can't seem to find any correlation, so it seems to be some kind of connection issue with the webservice? Or could it be some kind of bug with the Webservice component's onResult event? If it's a .NET server issue, what could it be? Ideas? Thanks Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ 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] Label -- null
I think you probably want parenthesis around your typecast, as var label:Label = (Label)(owner.attachMovie(Label.symbolName, instanceName, depth, initObj)); P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Lieven Cardoen Sent: Monday, September 25, 2006 8:53 AM To: Flashcoders mailing list Cc: Bert Vandamme; Christophe Herreman Subject: [Flashcoders] Label -- null import mx.controls.Label; public function createLabel(owner:MovieClip, instanceName:String, depth:Number, initObj:Object):Label{ var label = owner.attachMovie(Label.symbolName, instanceName, depth, initObj); logger.debug(label : + label); label.autoSize = left; applyStyle(label); return label; } -- logs a Label ...view0.view1.component12 If I type the label : public function createLabel(owner:MovieClip, instanceName:String, depth:Number, initObj:Object):Label{ var label:Label = Label(owner.attachMovie(Label.symbolName, instanceName, depth, initObj)); logger.debug(label : + label); label.autoSize = left; applyStyle(label); return label; } -- logs 'null' Why the f**k is this??? ___ 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] ComboBox,Depth, Draw API - Bug?
Try tracing the value that you get from getNextHighestDepth(). If the result is 1048575, you are incorporating v2.0 components, which causes getNextHighestDepth() to be less than useful. Use DepthManager instead. This pointer isn't entirely related, but might help explaining why: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19435 P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, September 06, 2006 3:31 PM To: Flashcoders mailing list Subject: [Flashcoders] ComboBox,Depth, Draw API - Bug? Is this a bug? Try the sample code out below - Why is it that if you specify an explicit depth for a movie clip (SEE LINE 2 OF THE FIRST SET OF CODE BELOW) and draw on it with the draw API, and a comboBox made later with a depth of getNextHighestDepth() will have a drop down which displays over the drawn portion of the movie clip AS EXPECTED, but when you use getNextHighestDepth() on the movie clip (SEE LINE 2 OF THE SECOND SET OF CODE BELOW), the comboBox's dropdown is BEHIND the drawn portions of the clip, even though the depth of the clip is greater??? So in other words, this: //CODE SAMPLE #1 import mx.controls.ComboBox; mc = this.createEmptyMovieClip(triangle, 1); mc.beginFill(0x00aaFF, 100); mc.lineStyle(4, 0xFF, 100); mc.moveTo(0, 0); mc.lineTo(100, 100); mc.lineTo(0, 100); mc.lineTo(0, 0); this.createClassObject(mx.controls.ComboBox, my_cb, this.getNextHighestDepth()); for (i = 0; i 7; i++) { my_cb.addItem({label:i}); } trace(mc depth: +mc.getDepth()); trace(my_cb. depth: +my_cb.getDepth()); //cb depth is higher than mc as expected Vs. this: //CODE SAMPLE #2 (only diff. from CODE 1 is line 2) import mx.controls.ComboBox; mc = this.createEmptyMovieClip(triangle, this.getNextHighestDepth()); mc.beginFill(0x00aaFF, 100); mc.lineStyle(4, 0xFF, 100); mc.moveTo(0, 0); mc.lineTo(100, 100); mc.lineTo(0, 100); mc.lineTo(0, 0); this.createClassObject(mx.controls.ComboBox, my_cb, this.getNextHighestDepth()); for (i = 0; i 7; i++) { my_cb.addItem({label:i}); } trace(mc depth: +mc.getDepth()); trace(my_cb. depth: +my_cb.getDepth()); //cb depth is higher than mc as expected, //yet drop down is drawn BEHIND mc! Is this a bug with ComboBox? Is there any way to get the comboBox's dropdown in front of drawn content on mc while using getNextHighestDepth() for mc? Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ 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] (no subject)
I picked this book up after thumbing through it and deciding that one or two chapters would solve a problem I had. Later, when I read the entire book, I realized that the XML layout framework described by the author is quite useful. I am currently using it in a next-gen version of a project that recently finished up. I was originally looking for details on writing my own components, and it still came up a bit shy (although it beat all the other choices of books), but it contains enough insight that I was able to muddle through what I needed to do. As I said, the application framework (which is freely available for download) is quite useful. P. any experience of this tome? AdvancED ActionScript Components: Mastering the Flash Component Architecture http://www.amazon.com/AdvancED-ActionScript-Components-Component-Architecture/dp/1590595939/ref=sr_11_1/103-9985048-8171815?ie=UTF8 James ___ 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