Re: [Flashcoders] AS3 Sound = wtf

2007-09-14 Thread Robert Brisita
Yeah sound was a bit of code, test, re-read documentation, trail, and error process. I ended up creating an internal class called tSound (light class with 2 members) that contained a Sound and a SoundChannel that is used in a SoundManager for individual sounds. I used the SoundMixer to

Re: [Flashcoders] Animating Character Movement

2007-05-04 Thread Robert Brisita
Try the State Pattern. I have successfully used this in a line of games I did for a client. The Quick and Dirty explanation: Each state knows what it needs to do. On a change state the old state exits and the new state enters. On an update (onEnterFrame) the state is handled (it does what

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

2007-05-03 Thread Robert Brisita
I associate my AS2 classes to my library symbols through Object.registerClass(LibraryID, ClassName). Where: LibraryID is an identifier in the FLA of a movie clip. ClassName is a class that eventually extends a Movieclip. I have a RegisterClasses singleton that is the first thing that is called

Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread Robert Brisita
You could do something like this: class Something { method1(); method2(a_number:Number); } Somewhere else: var method_str:String = method1; var sm:Something = new Something(); sm[method_str](); // Will call method1 class method sm[method2](0x09F911029D74E35BD84156C5635688C0); // Also

Re: [Flashcoders] Any good XML api out there?

2007-05-03 Thread Robert Brisita
Ever tried XML2Object? Check it out: http://www.sephiroth.it/file_detail.php?id=129 The only draw back is if there is only one element it won't put it into an array but an object. To resolve this I throw it into an array to unify use: if(!object.xml_element.length) { object.xml_element =

Re: [Flashcoders] Flash / Java Communication with ExternalInterface

2007-05-03 Thread Robert Brisita
I'm not sure if this will help you but on my current project I have a Oracle / Java back end and I created some servlets to process and return XML to the Flash client for processing. Although for this project I am using AS3, what I use is equivalent to LoadVars. Servlets execute within the

Re: [Flashcoders] Implications of using GPL'ed libraries?

2007-05-02 Thread Robert Brisita
It has always been the FSF's position that dynamically linking applications to libraries creates a single work derived from both the library code and the application code. The GPL requires that all derivative works be licensed under the GPL, an effect which can be described as hereditary. So,

Re: [Flashcoders] Implications of using GPL'ed libraries?

2007-05-02 Thread Robert Brisita
Yeah for this instance (Action Script) if you extend a class in the licensed library then that extension must be available to all who ask for it. Robert Sanders wrote: GPL means you have to release source to your game. LGPL - well since it was written or C type langs. there is some (heated)

Re: [Flashcoders] Implications of using GPL'ed libraries?

2007-05-02 Thread Robert Brisita
as an extra SWF to be on the safe side I see it the same way. R. Mark Winterhalder wrote: On 5/2/07, Robert Brisita [EMAIL PROTECTED] wrote: If you have to go the GPL route, you can tell your employers that all the code is in the SWF anyway, making it available just takes away an extra step from

Re: [Flashcoders] Implications of using GPL'ed libraries?

2007-05-02 Thread Robert Brisita
rules all though, right? Obviously, I'm going to make sure he gets credit and there's a clear line between our work and his etc etc... Thanks again, h. On 02/05/07, Mark Winterhalder [EMAIL PROTECTED] wrote: On 5/2/07, Robert Brisita [EMAIL PROTECTED] wrote: If you have to go the GPL route

Re: [Flashcoders] Forms between JSP and Flash

2007-05-02 Thread Robert Brisita
If memory serves me right try this: ? $xml = success; print xml=$xml; ? $xml is a variable that holds the data and xml will be the member of the LoadVars instance in flash when the onLoad event is triggered. Quick Example: class Test { var lv:LoadVars = new some method {

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

2007-05-01 Thread Robert Brisita
If it is a movie clip you want to instantiate then you have to use: _root.attachMovie(libraryID, instanceName, depth); The class associated with it will construct and the onLoad event will trigger if it is being listened to. Ciao, Rob. sebastian chedal wrote: Hello Flashcoders, Sorry to

Re: [Flashcoders] CrossDomain and Forms

2007-05-01 Thread Robert Brisita
Search for an example of a crossdomain.xml, which would sit on the root directory of your website. Hope this helps, Rob. Helmut Granda wrote: Is there anyway to go around the crossdomain for testing purposes besides testing locally (from flash IDE)? final files will be at Form:

Re: [Flashcoders] CrossDomain and Forms

2007-05-01 Thread Robert Brisita
The crossdomain.xml has to be on the server with the data you want to access. You could also you LocalConnection to get around it. Helmut Granda wrote: but the crossdomain.xml has to be in the client's machine not on my testing server. is that correct? On 5/1/07, Robert Brisita [EMAIL

Re: [Flashcoders] Wave effect

2007-04-27 Thread Robert Brisita
This is MAC only. :) That's funny. Michael Stuhr wrote: Parvaiz Patel schrieb: Hi, Anybody knows how to create the wave effect shown in (http://www.mandchou.com/) at the bottom for dynamically loaded images. Pls let me know. Thanks regards, PP This is MAC only. micha *sorry

Re: [Flashcoders] Pile of Objects Physics

2007-04-26 Thread Robert Brisita
Cheers for the site: http://lab.polygonal.de/ It has some great topics. I'm sure I'll refer to this site over and over again. Ciao, Rob. Joe Cutting wrote: Tom, Robert, Thanks for this. I've seen Fisix but was put off by the rather nebulous we can negotiate licensing terms for

Re: [Flashcoders] Clear Set Interval Q:

2007-04-25 Thread Robert Brisita
Don't know if this helps you but I'll mention it for the sake of knowledge. You could also use: _global.setTimeout(scope, function_str, milliseconds) Works like setInterval and it will return an ID but it will only run once then kill itself. Ciao, Rob. Danny Kodicek wrote: Is a new

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

2007-04-24 Thread Robert Brisita
One way: In the same directory as your SWF. Have a main class with a static function that takes in a movie clip. In your FLA put code in Frame 1 like: MainClass.main(this); The this is the root movie clip. The static function main will pass it around to who ever needs it in your

Re: [Flashcoders] Finding the height and width of the VISIBLE area of a masked SWF

2007-04-19 Thread Robert Brisita
With your second explanation, the problem you are having is clearer. About a year ago, I developed an application where I had a container that loaded SWFs from other developers. I contacted all the developers with the dimensions and the FPS the SWF container is being built on and sent them

Re: [Flashcoders] Compiler chokes when using a class method as event handler

2007-04-19 Thread Robert Brisita
The compiler says: **Error** Deck.as: There is no method with the name 'setDepthTo'. this.setDepthTo(DepthManager.kTop); And from your code I don't see it either: this.setDepthTo or this.filters. When you say it works do you mean it compiles ok or that onPress the card acts the way