Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Gerry Beauregard
I think that if a SWF is loaded by another SWF (e.g. using SWFLoader), 'stage' will be null. -Gerry On 2012-02-16 , at 04:07 , wrote: Hi, Can you check if the parent exists, and is there a way to determine if this is the document/main class? Glen Sent from my

Re: [Flashcoders] Getting at SampleDataEvent bytes before full Chunk is reported.

2011-12-21 Thread Gerry Beauregard
Hi Anthony, On every platform I've tried, when using the microphone input each SampleDataEvent gives 2048 samples. Up until now, I really didn't care about things like latency, as I was merely attempting to learn algorithms for post processing related tasks; yet, now that I have become

Re: [Flashcoders] can't get

2011-10-08 Thread Gerry Beauregard
How do I trouble-shoot this? I suggest adding a trace() to see what the requested URL is, and to check that it's well formed. Change this… var req:URLRequest = new URLRequest(siteUrl + store/ + id + pkg= + pkgID); …to this: var url:String = siteUrl +

[Flashcoders] SWF size reduction

2011-09-17 Thread Gerry Beauregard
I'm currently working on a project for which the customer requires the SWF to be very small, so I've been investigating how to reduce SWF sizes. Flash Builder's compiler is smart enough to not include code for unreferenced classes, but it seems to miss some other seemingly obvious opportunities

Re: [Flashcoders] SWF size reduction

2011-09-17 Thread Gerry Beauregard
Thanks for the quick feedback. Is there any way to tell the compiler that the SWF won't be loaded by another SWF, and that it's therefore safe to strip out unreferenced features? On 2011-09-17 , at 17:28 , Henrik Andersson wrote: The issue here is that the compiler does not know that they

Re: [Flashcoders] array problem,loop.plot

2011-08-22 Thread Gerry Beauregard
On 2011-08-22 , at 16:06 , nasim h wrote: for( var i:Number= -1 ;i1;i+=.001) { arr[i]=new object() arr[i].x=i arr[i].y=5*Math.sin(20*i); functiononlinedraw() } Perhaps the problem is simply that you're trying to plot too many points. If you're stepping from -1 to +1 in

[Flashcoders] Calling native code from Flash

2011-07-19 Thread Gerry Beauregard
Hi folks, Does anyone know whether there's a way to call native code from a Flash SWF or AIR app, for example to call functions in a DLL? Something like Java's JNI but for Flash? I realize it's possible to read and write local data files from a SWF (using FileReference) or from an AIR app

Re: [Flashcoders] Calling native code from Flash

2011-07-19 Thread Gerry Beauregard
, the SWF (or AIR app) would use the native signal processing functions implemented in it, otherwise it would rely on a simplified lower-quality implementation coded in AS3. -Gerry On 2011-07-19 , at 15:25 , Paul Andrews wrote: On 19/07/2011 08:15, Gerry Beauregard wrote: Hi folks, Does

Re: [Flashcoders] Calling native code from Flash

2011-07-19 Thread Gerry Beauregard
Thank you Paul and Karl for your responses! Interesting discussion! On 2011-07-19 , at 17:36 , Paul Andrews wrote: On 19/07/2011 10:27, Karl DeSaulniers wrote: Hi Paul, Gerry, Are these runtime calls, or calls to set up runtime? How is the swf published? Local? Server? If Local, you could

Re: [Flashcoders] Calling native code from Flash

2011-07-19 Thread Gerry Beauregard
On 2011-07-19 , at 18:07 , Leandro Ferreira wrote: Have you tried Alchemy? * * * @leandroferreira* * 55 61 91151257* Yes. Alchemy still runs on the ActionScript Virtual Machine, though, so it's not particularly fast. Nowhere near as fast

Re: [Flashcoders] Calling native code from Flash

2011-07-19 Thread Gerry Beauregard
be useful to help do some AS3 inlining to the Alchemy memory operations. I think the way to use it, is to make sure your bytearrays are stored in the Alchemy memory. Then you can access that from AS3 without the memcopy overhead. Kevin N. On 7/19/11 7:35 AM, Gerry Beauregard wrote

[Flashcoders] Alchemy still prerelease?

2011-07-19 Thread Gerry Beauregard
optimizations. They look like good reads. Hope they are along the lines of what your looking for. Best, Karl On Jul 19, 2011, at 10:42 PM, Gerry Beauregard wrote: Hi Kevin

Re: [Flashcoders] is there a dsp lib with analysis using zero crossing in as3

2011-05-12 Thread Gerry Beauregard
on a commercial project? If so, I'd be happy to do some consulting/contracting work! ;-) Cheers, Gerry Beauregard On 2011-05-12 , at 04:12 , Anthony Pace wrote: Hello list, I have been doing some experiments, but although my stuff is working, it isn't optimized at all, and I

[Flashcoders] AIR apps on iPhone - any good shipping examples?

2011-04-24 Thread Gerry Beauregard
Does anyone know of some really good apps on the iPhone app store that were written as AIR apps? It's certainly possible to make iPhone apps from AIR apps. Adobe's got a summary of the workflow here: I'm

Re: [Flashcoders] tascam us-144 is detected, but no sound

2011-03-07 Thread Gerry Beauregard
Is it possible that the signal is on the right channel of your Tascam audio box? If you're using the FP 10.1 Microphone class SampleDataEvent feature, it's only able to capture mono audio, as far as I can tell. If you've got a stereo audio interface, that mono channel is actually the left

Re: [Flashcoders] flash.filesystem not in Flash?

2011-02-23 Thread Gerry Beauregard
In Flash Player 10 (without using AIR), it's possible to read from and write to a local files on the user's hard drive, provided the user chooses the paths to the files using a FileReference. See:

Re: [Flashcoders] Help with code

2011-02-12 Thread Gerry Beauregard
Hi Renata, TypeError: Error # 2007: Parameter hitTestObject must not be null. The argument to hitTestObject() is 'mouse'. You get the error because the 'mouse' argument to hitTestObject() is null. Since mouse is constructed in function iniciarJogo(), my guess is that iniciarJogo() never

Re: [Flashcoders] Problems when converting to Number

2010-12-19 Thread Gerry Beauregard
You're getting to the limits of the precision of a Number. In ActionScript 3, the Number type is stored in binary, in 64-bit double-precision IEEE floating point format: It uses 52 bits for the mantissa (fractional part) which gives it an effective

Re: [Flashcoders] AIR 2 / 10.1 + Microphone

2010-10-02 Thread Gerry Beauregard
You might want to check out my real-time spectrum analyzer here: It uses the microphone input and an FFT that I wrote. All the code is freely available for download. -Gerry On 2010-10-02 , at 17:55 , Karim

[Flashcoders] Date.monthUTC uses 0 for January

2010-08-27 Thread Gerry Beauregard
This is not a question, just a little observation that might save other folks a few minutes of gnashing of teeth and hair pulling. I need some code that will give me the current date in ISO 8601 format, e.g. 2010-08-27. I figured the Date class would be a good place to start, but I was really

Re: [Flashcoders] A fast FFT in Flash?

2010-08-03 Thread Gerry Beauregard
/ Might help a little... do you have some test code lying about so we can compare / optimise? Best - karim On 3 Aug 2010, at 04:40, Gerry Beauregard wrote: On 2010-08-03 , at 06:07 , Patrick Matte wrote: Maybe check this Hey

Re: [Flashcoders] A fast FFT in Flash?

2010-08-02 Thread Gerry Beauregard
On 2010-08-03 , at 06:07 , Patrick Matte wrote: Maybe check this Hey Patrick, thanks for the link (to Eugene Zatepyakin's Fast Fourier Transform for Flash). It looks like an interesting implementation, but it uses Alchemy. I've been reading up more on Alchemy,

[Flashcoders] A fast FFT in Flash?

2010-08-01 Thread Gerry Beauregard
of Numbers :-( I've come across a few blogs where people discuss the possibility of doing FFTs with PixelBender, but I haven't found any implementations yet. -Gerry Beauregard ___ Flashcoders mailing list http

Re: [Flashcoders] 1046 Error

2010-07-26 Thread Gerry Beauregard
Maybe just a missing import statement? import*; On 2010-07-26 , at 22:20 , John Singleton wrote: 1046: Type was not found or was not a compile-time constant: Event.� [for RotateGearsLoaded(e:Event)] ___ Flashcoders mailing list

Re: [Flashcoders] Flex generative art???

2010-06-10 Thread Gerry Beauregard
Hi Jim, I see no reason why Flex can't be used for interactive artwork. The Canvas component in Flex is derived from Sprite, so anything that you would do in a Sprite can be done in a Canvas. We've been using FlexBuilder 3 for development of everything at (I haven't

Re: [Flashcoders] RE: Passing Var value to loaded swf

2010-06-07 Thread Gerry Beauregard
I don't have a whole lot of experience with the Loader class, but I suspect that rather than calling addChild() immediately after calling load(), you'd need to listen for a load complete event (Event.COMPLETE), and call addChild() in the handler for that event. -Gerry

Re: [Flashcoders] Sound

2010-05-10 Thread Gerry Beauregard
any glitching. Andre Michelle's blog has some great examples of how to use the FP 10 audio API, for example: -Gerry Beauregard Lead Software Architect On 2010-05-11 , at 03:45 , Glen Pike wrote: Hi, The Sound

Re: [Flashcoders] One Video, multiple Audio tracks?

2010-05-06 Thread Gerry Beauregard
Hi Matt, You could probably put the 8 other languages into mp3 files, which you can play back using the Sound class. has an optional startTime argument, so you can start playback at any position in the mp3. Suppose the user is playing back the FLV in English, then switches to

Re: [Flashcoders] Producing a random list with no repeats

2010-05-05 Thread Gerry Beauregard
It's probably best just to create an Array or Vector containing numbers 1 to 40. (Vectors are only available in AS3, not sure about Array). Shuffle the array, then choose the first 10 elements. A reasonably effective way to shuffle an array is to step through the array, and for each element

[Flashcoders] Library of vector math functions for Flash

2010-02-04 Thread Gerry Beauregard
Does anyone know of a good, fast, well-documented library of AS3 vector math operations? I'm thinking specifically of a good FFT, as well as more basic functions to add, multiply vectors, convert to/from polar coordinates, etc. In my C++ DSP programming work on Windows, I've often made use of

[Flashcoders] Creating MXP with Flex Builder?

2009-05-11 Thread Gerry Beauregard
I'm development a library of interactive sound effects in Action Script 3 using Flex Builder. I've got loads of experience with audio coding on various platforms in various languages (especially C++). However, I'm relatively new to Flash development, so I have some (perhaps naive)

[Flashcoders] Re: Creating MXP with Flex Builder?

2009-05-11 Thread Gerry Beauregard
Transfer Connector version=1.0.0 type=flashcomponentswc requires-restart = false author name=Gerry Beauregard - / products product name=Flash version=8 primary=true required=true/ /products description ![CDATA[Description of what the heck

[Flashcoders] Flash Player 10 code in SWC

2009-05-08 Thread Gerry Beauregard
Just want to share some things I've learned while using Flex Builder 3 to create Flash Player 10 dependent code... If you're using Flex Builder 3, and you want to use a Flash Player 10 specific language feature (e.g. the Vector class), you need to set the Require Flash Player version to

Re: [Flashcoders] Recommendation for AS3 decompiler?

2009-05-06 Thread Gerry Beauregard
. Gerry Beauregard wrote: Does anyone have a recommendation for a good tool for decompiling SWFs (and if possible SWCs) written in ActionScript 3? Must run on MacOS 10.5. I was considering buying the SoThink SWF Decompiler for Mac, but unfortunately it often crashes when I select an SWF I just

[Flashcoders] Recommendation for AS3 decompiler?

2009-05-05 Thread Gerry Beauregard
Does anyone have a recommendation for a good tool for decompiling SWFs (and if possible SWCs) written in ActionScript 3? Must run on MacOS 10.5. I was considering buying the SoThink SWF Decompiler for Mac, but unfortunately it often crashes when I select an SWF I just built with Flex