RE: [Flashcoders] central up to date data

2007-10-20 Thread David Ngo
You may want to look into using a Singleton or static class, depending on how you have things implemented and what the desired functionality is. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Huynen Sent: Friday, October 19, 2007 5:41 AM To: flashcod

RE: [Flashcoders] Intro to OOP using ActionScript

2007-08-21 Thread David Ngo
What kind of argument is that? I've never learned to ski and I was able to pick up snowboarding. One is not dependant upon the other. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Winterhalder Sent: Tuesday, August 21, 2007 4:41 PM To: flashcoders

RE: [Flashcoders] Intro to OOP using ActionScript

2007-08-20 Thread David Ngo
I'm with Steven on this one. I, too, started way back in the days of procedural programming (Turbo Pascal, anyone?) and all of that taught me to understand the basic how's and why's of programming. I see a lot of new developers today who take what they read verbatim and apply it only because everyo

RE: [Flashcoders] Classes 101 [was: Version control and Flash ]

2007-08-10 Thread David Ngo
extend MovieClip (in fact, most shouldn't, and some would argue none should). class tld.domain.project.utils.Algorithms { public static function someCalc(n:Number):Number { // do some calculations on n return n; } } David Ngo wrote: > I'm not going t

RE: [Flashcoders] Classes 101 [was: Version control and Flash ]

2007-08-10 Thread David Ngo
D] [mailto:[EMAIL PROTECTED] On Behalf Of Hans Wichman Sent: Friday, August 10, 2007 4:45 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Classes 101 [was: Version control and Flash ] use Math. :))) your turn :) On 8/10/07, David Ngo <[EMAIL PROTECTED]> wrote: > >

RE: [Flashcoders] Classes 101 [was: Version control and Flash ]

2007-08-10 Thread David Ngo
Uh, and what if I just need to do some mathematical calculations that have nothing to do with MovieClips or visual elements? :) Not all classes need to be associated with MovieClips (either by inheritance or composition/aggregation). Classes are nothing more than Objects that can have methods (a

RE: [Flashcoders] Version control and Flash

2007-08-10 Thread David Ngo
"Anyone found guilty of using AS includes, is killed, revived and killed again :)" LOL. I say the same thing about people using onEnterFrame's for almost everything, like XML loading/parsing. ___ Flashcoders@chattyfig.figleaf.com To change your subsc

RE: [Flashcoders] Dang IE...

2007-08-09 Thread David Ngo
ID's for HTML DOM objects should always be unique. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Mennenoh Sent: Thursday, August 09, 2007 10:05 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Dang IE... >>It's a problem with Ex

RE: [Flashcoders] BlendModes & MovieClipLoader

2007-08-07 Thread David Ngo
MovieClipLoader works much in the same way as loadMovie. As soon as your file loads, it will destroy any current properties for the MovieClip it's loaded into and set them all back to default. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gilles Roquefe

RE: [Flashcoders] Coding a circular preloader

2007-08-06 Thread David Ngo
I'm not sure what you mean. What don't you have? The pseudo code I posted is fairly easy to implement. If you're using the drawing API to render your circle or partial circle, just tap into the Tween class' onMotionChanged event to update your vector shape. -Original Message- From: [EMAI

RE: [Flashcoders] Lines in textArea

2007-08-06 Thread David Ngo
Look into TextFormat.getTextExtent() as well. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan MacDougall Sent: Monday, August 06, 2007 4:41 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Lines in textArea Volker Scarpatetti - Ad

RE: [Flashcoders] Coding a circular preloader

2007-08-06 Thread David Ngo
Uh, you could implement easing but I'm of the same opinion as Steve here where it wouldn't make any sense to kill an ant with a sledgehammer. At any rate, the easing would be based off a timer instead of frames. Pseudo code AS2 using the Tween class would be: var interval:Number = setInterval(th

RE: Re[2]: [Flashcoders] public variable tracing inside class only..

2007-08-05 Thread David Ngo
What he means is, your arrays will not populate until after the XML is fully loaded and parsed. So if you're trying to trace or access those arrays, they're going to be null/empty. You'd be better served to either fire an event once the XML has been parsed, or fire a callback and pass along a refer

RE: [Flashcoders] Q:optimizing a Calendar app

2007-07-28 Thread David Ngo
Using getTime() isn't ideal since that's creating a timestamp based on milliseconds, which would be unique. The first option is probably the safer bet to be able to index things by a specific date (as opposed to a time). If you're using AS3, then I'd say use a Dictionary object (same as a hash, exc

RE: [Flashcoders] object Arrays

2007-07-26 Thread David Ngo
Are you declaring your properties public or have public getters to access them within your class? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ilteris kaplan Sent: Thursday, July 26, 2007 3:18 PM To: Flash Lists Subject: [Flashcoders] object Arrays H

RE: [Flashcoders] AS3 instantiating a new class object from a stringvalue

2007-07-26 Thread David Ngo
Look at getDefinitionByName. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jake Prime Sent: Thursday, July 26, 2007 9:27 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] AS3 instantiating a new class object from a stringvalue I'm no

RE: [Flashcoders] Returning a String fails

2007-07-24 Thread David Ngo
I'd probably still put it in some sort of util function you can call anywhere. function eliminateSpaces(phrase:String):String { return phrase.split(' ').join(''); } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rákos Attila Sent: Tuesday, July

RE: [Flashcoders] CDATA Html Text not working

2007-07-24 Thread David Ngo
p; Leadership Development eTools & Multimedia Team >>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of David Ngo >>Sent: Tuesday, July 24, 2007 1:55 PM >>To: flashcoders@chattyfig.figleaf.com >>Subject: RE: [Fl

RE: [Flashcoders] CDATA Html Text not working

2007-07-24 Thread David Ngo
If you're using Flash 8, XPath was already integrated into its library/API. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris W. Paterson Sent: Tuesday, July 24, 2007 1:44 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] CDATA Html

RE: [Flashcoders] Slightly OT: Flex vs. Flex Builder

2007-07-23 Thread David Ngo
Actually, FlexBuilder comes in two flavors: 1 is an Eclipse plug-in to use with an existing Eclipse installation. The other is a stand-alone IDE (essentially the same as Eclipse 3.1 with some modifications for Flex-specific functionality) billed as FlexBuilder. -Original Message- From: [E

RE: [Flashcoders] AS2 Shared Fonts and dynamically created textFields

2007-07-22 Thread David Ngo
Also, make sure you're setting your TextFormat after you set the text. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: Sunday, July 22, 2007 10:19 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] AS2 Shared Fonts and dy

RE: RE: [Flashcoders] Casting to Array

2007-07-20 Thread David Ngo
That is correct. If you need the reference to the actual array, then I would consider using a class to help cast your data as suggested by others. But if you just need the data and not the actual reference (meaning you don't need to persist that data anywhere else), then my solution should be fine.

RE: [Flashcoders] Casting to Array

2007-07-20 Thread David Ngo
Try this: if (a instanceof Array) { var n:Array = a.slice(); doMyArrayFunction(n); } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Danny Kodicek Sent: Friday, July 20, 2007 9:04 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashco

RE: [Flashcoders] Backend compiled Java or scripted PHP?

2007-07-19 Thread David Ngo
ers@chattyfig.figleaf.com Subject: Re: [Flashcoders] Backend compiled Java or scripted PHP? Eclipse, Spring, Hibernate, AXIS and Java is a pretty nice toolkit. Ron David Ngo wrote: > Well, in my opinion, Java is much more OOP. PHP is really nothing more than > just scripts. It will eventual

RE: [Flashcoders] Backend compiled Java or scripted PHP?

2007-07-19 Thread David Ngo
Well, in my opinion, Java is much more OOP. PHP is really nothing more than just scripts. It will eventually hit a ceiling and be limited in what it can do. Java, on the other hand, is much more robust, which is why the majority of large corporations still use Java as their application backbone. Bu

RE: [Flashcoders] XML File doesn't load on Flash Player9 in IE6, IE7

2007-07-19 Thread David Ngo
An HTTP code of 200 usually means success. Do you have any sample code you can show? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sascha Sent: Thursday, July 19, 2007 8:04 AM To: flashcoders Subject: [Flashcoders] XML File doesn't load on Flash Player9

RE: [Flashcoders] Font in Library problems

2007-07-17 Thread David Ngo
CTED] On Behalf Of David Ngo Sent: 17 July 2007 15:29 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Font in Library problems Not sure where your error is, but can I ask why you're instantiating your Font instance twice? David -Original Message- From: [EMAIL PROTE

RE: [Flashcoders] Font in Library problems

2007-07-17 Thread David Ngo
Not sure where your error is, but can I ask why you're instantiating your Font instance twice? David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Trim Sent: Tuesday, July 17, 2007 10:12 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flash

RE: [Flashcoders] Using createEmptyMovieClip to create MovieClipswithin MovieClips

2007-07-16 Thread David Ngo
private var ItemContainer:MovieClip; private var CContainer:MovieClip; ItemContainer = this.createEmptyMovieClip("ItemContainer", this.getNextHighestDepth()); CContainer = ItemContainer.createEmptyMovieClip("CContainer", ItemContainer.getNextHighestDepth()); -Original Message- From: [EM

RE: [Flashcoders] +Infinite Loop -Dignity

2007-07-10 Thread David Ngo
Why do you have so many hoops to jump through? Try changing your for loop to this: for (var i:Number = 0; i < elements.length; i++) David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of daniel Sent: Tuesday, July 10, 2007 11:52 PM To: flashcoders@chatt

RE: [Flashcoders] Re: Handle Leaks in Flash, anyone can help?

2007-07-10 Thread David Ngo
Removing the MovieClips or objects does not remove the listeners to that object. You would have to explicitly remove the listeners first then remove your MovieClip/object. Otherwise, the reference to the listener will still exist, thus not get picked up by garbage collection. This could be another

RE: [Flashcoders] Multiline Issue

2007-07-06 Thread David Ngo
Have you tried setting wordWrap/autoSize to true? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Kemp Sent: Friday, July 06, 2007 1:29 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Multiline Issue Anyone ever have an issue using m

RE: [Flashcoders] Skewing text

2007-07-02 Thread David Ngo
Couldn't you just stick a TextField inside of a MovieClip then use a transformation matrix to screw the MovieClip? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zeh Fernando Sent: Monday, July 02, 2007 2:17 PM To: flashcoders@chattyfig.figleaf.com Subj

RE: [Flashcoders] Clashing Class Names

2007-06-22 Thread David Ngo
You can not have the same classpath/class combinations. So if you were importing inside SWFA & SWFB: com.this.is.my.class.path.Class But on the file system, SWFA points to: myproject1/com/this/is/my/class/path/Class.as And SWFB points to: myproject2/com/this/is/my/class/path/Class.as You will

RE: [Flashcoders] how to get CDATA into an XML object

2007-06-19 Thread David Ngo
AS2 will not support CDATA nodes. You should load in a schema that has a CDATA node first, then use that schema to write your text nodes to the CDATA node and pass the instance of the schema w/ the CDATA intact. I've had to use this work-around for another project I worked on a year ago. -Or

RE: [Flashcoders] AS3 root

2007-06-19 Thread David Ngo
Does _lockroot still apply to AS3? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Palmer, Jim Sent: Tuesday, June 19, 2007 4:14 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] AS3 root Check out the MovieClip._lockroot parameter l

RE: [Flashcoders] (no subject)

2007-06-18 Thread David Ngo
stavo On Jun 18, 2007, at 7:04 PM, David Ngo wrote: > You need to add the 'var' keyword for your iterator in the for > loop. You > also need to change your comparison evaluator to '<' and not '>'. > For your > second error, SimpleButton d

RE: [Flashcoders] (no subject)

2007-06-18 Thread David Ngo
You need to add the 'var' keyword for your iterator in the for loop. You also need to change your comparison evaluator to '<' and not '>'. For your second error, SimpleButton doesn't have a text property you can set. See: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Simp

RE: [Flashcoders] Loading a swf from another swf

2007-06-18 Thread David Ngo
I believe he's using AS3's Loader. Cary, I believe the url's would be relative to the container SWF or HTML. So if your SWFs are sitting in a folder called 'swf' and your HTML is in the root, then all of your files must have a url of 'swf/'. David -Original Message- From: [EMAIL PROTEC

RE: [Flashcoders] help with a thread in cs3

2007-06-16 Thread David Ngo
You need to add an event listener for when the image load is complete. package { import flash.display*; import flash.events.*; import flash.net.*; import flash.geom.*; public class WholeImage extends Sprite { private var back

RE: [Flashcoders] html in XML

2007-06-09 Thread David Ngo
You won't be able to put special characters within attribute elements of a node. Instead, place it within a CDATA node: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of promo+biboune.net Sent: Saturday, June 09, 2007

RE: [Flashcoders] Composition access

2007-06-08 Thread David Ngo
quot;); > > } > > > > it wont fire but it will fire the init method from the Original Class > > (which by the way seem very similar to inheritance :) ) any ideas why > > this could be happening? > > > > Thanks again... > > > > On 6/8

RE: [Flashcoders] Composition access

2007-06-08 Thread David Ngo
You'd basically create a 'wrapper' method: class CopyClass { private var original:OriginalClass; private var mc:MovieClip; public function CopyClass(mc:MovieClip) { this.mc = mc; original = new OriginalClass(mc); }

RE: [Flashcoders] as3 Loader.content.name error

2007-06-07 Thread David Ngo
Couldn't you just set a variable and pass that to whichever class/method needs to access the child by name? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Matte|BLITZ Sent: Thursday, June 07, 2007 1:40 PM To: flashcoders@chattyfig.figleaf.com Sub

RE: [Flashcoders] Flash CS3 Prof copy: missing Tree component.

2007-06-06 Thread David Ngo
There's a F8/AS2 version of Papervision, though I'd probably suggest going the F9/AS3 route. As far as Remoting/WebServices, I'm pretty sure they'll come out with an add-on package like they did with the previous versions. On top of that, if you wanted to build a Flash App, why not just use Flex?

RE: [Flashcoders] [OT] desktop file searching utility

2007-05-28 Thread David Ngo
Okay, excuse my last email if this is the type of functionality you're looking for. Perhaps I misread what was written. If what you're looking for is a 'class browser' of sorts, then download and install Eclipse w/ either ASDT or FDT (probably FDT) and import a new Flash project, point it to the fo

RE: [Flashcoders] [OT] desktop file searching utility

2007-05-28 Thread David Ngo
ts of .as files. On 5/28/07, David Ngo <[EMAIL PROTECTED]> wrote: > You can use a text editing program such as TextPad to search and/or replace > within text files specific strings and case-sensitivity. > > > -Original Message- > From: [EMAIL PROTECTED] > [mailt

RE: [Flashcoders] [OT] desktop file searching utility

2007-05-28 Thread David Ngo
You can use a text editing program such as TextPad to search and/or replace within text files specific strings and case-sensitivity. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hairy Dog Digital Sent: Monday, May 28, 2007 1:57 PM To: flashcoders@chatt

RE: [Flashcoders] Where can I find the list component assets?

2007-05-25 Thread David Ngo
If you're from the US, it's also known as Memorial Day, a day where we commemorate fallen US soldiers. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alistair Colling Sent: Friday, May 25, 2007 11:04 AM To: flashcoders@chattyfig.figleaf.com Subject: Re:

RE: [Flashcoders] textArea doesn't scroll far enough

2007-05-24 Thread David Ngo
I've run into this issue before as well. My (hackish) work-around was to create an empty MovieClip right after the text, set its alpha to 0, set its height to like, 50 or some arbitrary number to force the scrollbars to scroll beyond the text. Very hackish and not the best solution, but I had to ge

RE: [Flashcoders] dispatchEvent within another event handler

2007-05-23 Thread David Ngo
You're listening for an event from your view class that's being fired from your service class, that's why. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam Sent: Wednesday, May 23, 2007 7:46 AM To: Flashcoders mailing list Subject: [Flashcoders] dispat

RE: [Flashcoders] problem creating multiple instances

2007-05-23 Thread David Ngo
, vQuality, hQuality); I'm not able to post the class inside the e-mail anymore, it exceeds the maximum file size allowed by flashcoders. If you need the class file again I will create a link to all of the files. Thanks for your response! On May 23, 2007, at 4:03 PM, David Ngo wrote:

RE: [Flashcoders] problem creating multiple instances

2007-05-22 Thread David Ngo
xAxisStart:-20, yAxisStart:20, vQuality:3, hQuality:3 } var my3Dplane2:Simple3DPlane = new Simple3DPlane(myCreationSettings2); my3Dplane2.mouseReactive(true, 30, 20, true); On May 23, 2007, at 3:20 PM, David Ngo wrote: > Looks like you're attaching your plane

RE: [Flashcoders] problem creating multiple instances

2007-05-22 Thread David Ngo
Looks like you're attaching your plane to the same MovieClip instance, thus destroying any/all objects that was previously on that MovieClip instance. Depends on how you're instantiating your creationObject. BTW, just a comment on your implementation: I would use a custom class to set properties fo

RE: [Flashcoders] How to set button event listeners within a class

2007-05-18 Thread David Ngo
You would only use super() if you're extending. It sounds like he was using composition, but thinking of inheritance. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, May 18, 2007 11:48 AM To: flashcoders@chattyfig.figleaf.com

RE: [Flashcoders] flash and xpath

2007-05-17 Thread David Ngo
Make sure that your file is saved as the encoding type you specified for the XML. For instance, if you have UTF-8 specified, ensure that the file type saved is also UTF-8. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Law Sent: Thursday, May 17,

RE: [Flashcoders] AS3 continuous loop on mouse down

2007-05-13 Thread David Ngo
If this is for AS3, then I would say use the Timer class: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/Timer. html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Boski Sent: Sunday, May 13, 2007 1:17 PM To: flashcoders@c

RE: [Flashcoders] RE: Smooth movement for dynamic text

2007-05-11 Thread David Ngo
Look here: http://livedocs.adobe.com/flash/8/main/2733.html and http://livedocs.adobe.com/flash/8/main/2822.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of pedr browne Sent: Friday, May 11, 2007 9:40 PM To: flashcoders@chattyfig.figleaf.c

RE: [Flashcoders] Re: AS2: Design Pattern: event based or pointer? frommodel or controller?

2007-05-04 Thread David Ngo
IMO, EventDispatcher will work well in most cases. If you need a more flexible or scalable way to handle events, then I'd suggest writing your own event framework based on the Observer pattern as there are some limitations to EventDispatcher. -Original Message- From: [EMAIL PROTECTED] [m

RE: [Flashcoders] Re: Blur effect via action scripting

2007-05-03 Thread David Ngo
Loops would be instantaneous. You would need to control the duration of the effect via some sort of timer or interval. Tweens essentially package up this timer functionality with a set of equations to handle property changes. It's all just math, really, but I don't think using loops would be as eff

RE: [Flashcoders] Detecting referrer in Flash

2007-05-03 Thread David Ngo
If you'd rather have something more secure, then I'd suggest calling a backend to pass it to you. This gets a lot more complicated as you'd now have to tack on session management. The other option is to use JavaScript/AJAX to pull data from a request or response. Are you putting your SWF on an HTML

RE: [Flashcoders] Missing fl.* AS3 Packages in Flash CS3

2007-05-03 Thread David Ngo
I believe the video classes are sitting under flash.media.*. A quick look at livedocs should give you all the packages: http://livedocs.adobe.com/flex/201/langref/index.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Chang Sent: Thursday, May

RE: [Flashcoders] Detecting referrer in Flash

2007-05-03 Thread David Ngo
You can use FlashVars to pass it into your SWF via the HTML embed. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Mudge Sent: Thursday, May 03, 2007 7:57 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Detecting referrer in Flash

RE: [Flashcoders] Flash / Java Communication with ExternalInterface

2007-05-03 Thread David Ngo
If it's a desktop app, then I would probably suggest using Apollo. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Thursday, May 03, 2007 7:19 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Flash / Java Communication with

RE: [Flashcoders] Flash / Java Communication with ExternalInterface

2007-05-03 Thread David Ngo
To expand on this, on the Flash side it would be done using Remoting. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Ngo Sent: Thursday, May 03, 2007 6:24 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Flash / Java

RE: [Flashcoders] Flash / Java Communication with ExternalInterface

2007-05-03 Thread David Ngo
If you're looking for best/fastest communication between Flash and Java to send complex data, I would suggest using an AMF protocol such as OpenAMF. The other two options are XML or WebServices. AMF is faster because it's all binary and you use Java VO's (converted to Flash Objects with the same da

RE: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread David Ngo
Couldn't you just use call() or apply()? http://livedocs.adobe.com/flash/8/main/2234.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Brisita Sent: Thursday, May 03, 2007 11:05 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashc

RE: [Flashcoders] AS2: generating new instances dynamically?

2007-05-02 Thread David Ngo
MyClass(mc); myClass.init(args); BLITZ | Patrick Matte - 310-551-0200 x214 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Ngo Sent: Wednesday, May 02, 2007 6:17 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] AS2: generating new instances d

RE: [Flashcoders] AS2: generating new instances dynamically?

2007-05-02 Thread David Ngo
Another way to do this is to have an init() method that you call in-line to your attachMovie(). class MyClass extends MovieClip { public function MyClass() {} public function init(args):MyClass { // do your constructor type stuff here return

RE: [Flashcoders] Class for movie - best practice question

2007-04-24 Thread David Ngo
Why would you extend MovieClip and composition a MovieClip as well? Seems a bit redundant, no? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Matte | BLITZ Sent: Tuesday, April 24, 2007 7:09 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [

RE: [Flashcoders] setInterval woes

2007-04-23 Thread David Ngo
ing to figure out is why Steven says to clearInterval first > clearInterval can not be run without an argument, so I'm saying that > if you haven't assigned setInterval to something, what are you going > to call clearInterval on? And why would you call it before it's even > as

RE: [Flashcoders] setInterval woes

2007-04-20 Thread David Ngo
2007 3:02 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] setInterval woes No, I mean that he is only calling setInterval once and has no apparent need to even assign it to a variable for use with clearInterval later. On 4/20/07, David Ngo <[EMAIL PROTECTED]> wrote: >

RE: [Flashcoders] setInterval woes

2007-04-20 Thread David Ngo
An interval is fired at each interval. What you're talking about is a setTimeout which is fired only once after a delay (timeout). An interval is fired an infinite number of times until clearInterval is called. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

RE: [Flashcoders] setInterval woes

2007-04-20 Thread David Ngo
What I would highly recommend is externalizing your interval and data loading into a class. This way, you have the class handle its own state and data, fire an event once it's loaded or reloaded data and have your movie listen for that event. The class can then be instantiated just once at the begi

RE: [Flashcoders] How is it done? coca-cola creator

2007-04-13 Thread David Ngo
Sounds like the exact same implementation I did for Warner Bros' Toonify engine. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Walters Sent: Friday, April 13, 2007 5:27 PM To: [EMAIL PROTECTED] Subject: Re: [Flashcoders] How is it done? coca-cola c

RE: [Flashcoders] XPath online

2007-04-09 Thread David Ngo
Try this: http://download.macromedia.com/pub/documentation/en/flash/fl8/XpathAPI.pdf -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hairy Dog Digital Sent: Monday, April 09, 2007 12:07 PM To: flashcoders@chattyfig.figleaf.com; [EMAIL PROTECTED] Subject:

RE: [Flashcoders] would this bother you?

2007-04-09 Thread David Ngo
AFAIK, any instances will remain in memory if there is a reference to it anywhere. Even if you call the remove methods, they just remove them from the Stage/screen but not from the memory stack. You will have to remove any references in any instances in order to garbage collect them properly. ---

RE: [Flashcoders] Accessing the instance of a class

2007-04-08 Thread David Ngo
What instance are you trying to access? Your 'whatever' class? If so, you'll need to use a Delegate to force scope: import mx.utils.Delegate; class whatever { public var triggered:Boolean; public var foo:XMLSocket; public function whatever() {

RE: [Flashcoders] Constructors in AS2 SWFs not being calledwhenloaded by AS3

2007-04-07 Thread David Ngo
AS2 code will not work directly with AS3. You'll have to use LocalConnection to get the two pieces of code to communicate with each other (very ugly). At this point, you might want to go with one or the other and not both. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTE

RE: [Flashcoders] attaching an event to a movie clip

2007-04-06 Thread David Ngo
Personally, I find onEnterFrames bad practice to use unless you absolutely have to (if your logic is frame-based, etc). I would suggest the nested clip and/or use MovieClipLoader to handle your image loading. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf O

RE: [Flashcoders] attaching an event to a movie clip

2007-04-06 Thread David Ngo
What you can also do is create a nested MovieClip and load your image on that. That way, you set your handlers on the parent clip and don't have to worry about when it loads. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, Apr

RE: [Flashcoders] Enumerating properties from outside an instance.

2007-04-05 Thread David Ngo
If you're looking to iterate through a nested object(s), then you have to create a nested loop: function loopMe(target:Object):Void { trace('-- looping through: ' + target + '--'); for (var s:String in target) { trace(s + ': ' + target[s]); f

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread David Ngo
@chattyfig.figleaf.com Subject: Re: [Flashcoders] Events for custom classes? Thanks for this sample David, Just a small correction: public function ListenerClass(eventClass:MyEventClass) should be public function ListenerClass(eventClass:EventClass); Correct? -h On 4/3/07, David Ngo <[EMAIL PROTEC

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread David Ngo
Ick. I totally forgot to initialize EventDispatcher. Constructor for EventClass should be: public function EventClass() { EventDispatcher.initialize(this); } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Ngo Sent: Tuesday, April 03, 2007

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread David Ngo
You'll need a reference of the dispatching class in your listener class to receive events: // broadcasting class import mx.events.EventDispatcher; class EventClass { // EventDispatcher methods public var addEventListener:Function; public var removeEventListener:Function;

RE: [Flashcoders] Delegate Scope Class Issues

2007-04-02 Thread David Ngo
Sorry, that should be: var myClass:MyClass = new MyClass(target) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Ngo Sent: Monday, April 02, 2007 6:52 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Delegate Scope Class Issues

RE: [Flashcoders] Delegate Scope Class Issues

2007-04-02 Thread David Ngo
6 levels of recursion were exceeded Thanks again for your help. On 4/2/07, David Ngo <[EMAIL PROTECTED]> wrote: > > You're calling it incorrectly. Delegate returns a Function that is invoked > on the object you specify. Here's the correct syntax: > > class Mo

RE: [Flashcoders] Delegate Scope Class Issues

2007-04-02 Thread David Ngo
You're calling it incorrectly. Delegate returns a Function that is invoked on the object you specify. Here's the correct syntax: class Mover { var button_btn : MovieClip; function Mover() { _level0.button_btn._alpha = 0; init(); } function init() { var myTwe

RE: [Flashcoders] Actionscript 3.0 help w/ simple HelloWorld

2007-03-22 Thread David Ngo
Hey Jason, If I remember correctly, I believe you also have to attach your HelloWorld class to the stage (or was it display list?) via addChild. Instantiating it via the constructor will only create it in memory and not automatically attach to the display. I don't have the exact syntax, but I'm su

RE: [Flashcoders] disabling carriage returns in multiline input textfields

2007-03-21 Thread David Ngo
I would say your best bet is to make it initially a single-line textfield, listen for the onChanged handler and do some metrics on it (getTextExtent), if it passes a certain width, set autoSize and multiline. You could possibly also try listening for a Key event and ignore the one for ENTER. Not su

RE: [Flashcoders] .aso cache frustration

2007-03-20 Thread David Ngo
I'd probably say recompile both SWF's. What could be happening is the classes inside swf A imports one or more class that swf B has. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Tuesday, March 20, 2007 11:08 AM To: flashcoders@cha