Re: [Flashcoders] Query String + Loader odd issue

2009-06-25 Thread Ktu
I have an idea, not much of one, but worth checking?

Publish everything and test it live.
You never know, sometimes stuff like that happens.
(supposing you haven't already tried that)

Ktu


On Thu, Jun 18, 2009 at 6:45 PM, Steve Mathews  wrote:

> Using Flash CS3 pro, trying to load a Flex based swf into a non-Flex swf
> and
> pass a query string to the Flex application. Simple enough in theory, using
> a Loader just point at the file and load. Add the loader to the stage and
> all is good.
> Now for the query string. Add it to the path ..
> var request:URLRequest = new URLRequest(path+"?data=true");
>
> and launch. Error #2035: URL Not Found. Ok, well lets launch this in debug
> mode... wait, that works? Yep, launching with the debugger and my file
> loads, gets the data and all is good.
>
> Just to add to this, I have a Captivate widget that basically does exactly
> this and it also works fine running in a published Captivate project. It
> has
> the same code with the query string and all. Note that I also tried using
> URLVariables instead of the string with no change.
>
> Anyone have any ideas what is going on here?
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] strange TypeError: Error #1034:

2009-06-25 Thread jonathan howe
Hi, Preston,

What does the AboutLandingButton class extend in the class definition? And
what do you have set for the two values in Linkage in the library symbol?

If all else fails, blame Nat Harris.

-jonathan


On Thu, Jun 25, 2009 at 2:08 PM, Preston Parris wrote:

> Hey all,
>
> I have three buttons set up that are tweening in on the timeline, they each
> are movieclips with the same associated class, two of the buttons work and
> have no problems, the other one give me:
>
> TypeError: Error #1034: Type Coercion failed: cannot convert
> flash.display::moviec...@3b70b431 to
> com.mellowmushroom.ui.about.AboutLandingButton.
>
> I have made sure that the instance names and movieclip are the same through
> out the animation, I even tried creating an entirely new clip and not
> animating at all, I still get the same thing.
>
> The other wierd thing is that the button still works even though it gives
> me
> an error, like the properties that are set in the AboutLandingButton class
> still apply and work for that button.
>
> This is driving me crazy, any help in the right direction would be very
> awesome. Thank you!
>
>
>
>
>
> --
> Preston Parris
> ppar...@modevisual.com
> cell: 704.450.9299
> www.modevisual.com
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
-jonathan howe
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] strange TypeError: Error #1034:

2009-06-25 Thread Preston Parris
Hey all,

I have three buttons set up that are tweening in on the timeline, they each
are movieclips with the same associated class, two of the buttons work and
have no problems, the other one give me:

TypeError: Error #1034: Type Coercion failed: cannot convert
flash.display::moviec...@3b70b431 to
com.mellowmushroom.ui.about.AboutLandingButton.

I have made sure that the instance names and movieclip are the same through
out the animation, I even tried creating an entirely new clip and not
animating at all, I still get the same thing.

The other wierd thing is that the button still works even though it gives me
an error, like the properties that are set in the AboutLandingButton class
still apply and work for that button.

This is driving me crazy, any help in the right direction would be very
awesome. Thank you!





-- 
Preston Parris
ppar...@modevisual.com
cell: 704.450.9299
www.modevisual.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Sound.extract

2009-06-25 Thread Gregory Boland
Ben,

Your going to want to perform an FFT (Fast Fourier Transform) and move from
the time domain to the frequency domain.

And to be more specific I believe you are gonna want to perform a Discrete
Fourier Transform.

I know a lot of work has been done on this in C and perhaps you could find
something and port it over to Actionscript.

There could be a problem computing all of that in real time though.

best of luck

greg

On Wed, Jun 24, 2009 at 9:19 PM, Juan Pablo Califano <
califa010.flashcod...@gmail.com> wrote:

> Hi
>
> 1) From the docs:
>
>
> http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/media/Sound.html#extract()
>  The audio data is always exposed as 44100 Hz Stereo. The sample type is a
> 32-bit floating-point value, which can be converted to a Number using
> ByteArray.readFloat().
> So, each sample is 32 bits, that is 4 bytes. If you read less than four
> bytes, you're discarding part of the data; if you read more, you're mixing
> samples. This could also happen if your reads are not 4 bytes aligned.
>
> 2) Not sure if I misunderstood what you meant, but the number of samples
> extracted is calculated here:
>
> var extract:Number = Math.floor ((sound.length/1000)*44100);
>
> And is not a power of 2. It seems like the total samples, rounded down.
> (seconds of audio data * samples per second).
>
> 3) I'm by no means an audio programming expert, but I think that should be
> possible. Don't how performant it would be doing it in AS, in real time,
> though. Neither I know algorithms for it, but look up audio frequency
> analisys, you might find some pointers. By the way, I don't your imaging is
> wrong. Digital audio data is a finite/discrete representation of a sound
> wave.
>
>
> Cheers
> Juan Pablo Califano
>
>
> 2009/6/24 ben gomez farrell 
>
> > Hey guys,
> > I'm just digging into the Sound.extract feature in FP10.  I've been using
> > code found at http://www.bytearray.org/?p=329 to learn from, but have a
> > few questions.  I'm able to create a waveform and draw to the stage, but
> > want to take it beyond that.
> >
> > Basically the code I have is this:
> >
> >   var samples:ByteArray = new ByteArray();
> >   var extract:Number = Math.floor
> ((_sound.length/1000)*44100);
> > _sound.extract(samples, extract);
> > var step:int = samples.length/4096;
> >   do step-- while ( step % 4 );
> >
> >   samples.position = 0;
> > for (var c:int = 0; c < 4096; c++) {
> >   left = samples.readFloat();
> >   right = samples.readFloat();
> >   samples.position = c*step;
> >   }
> >
> > My questions are:
> >
> >   1.  I understand incrementing the byteArray read position by a step
> > amount.  What I don't understand is why the step amount needs to be a
> > multiple of four?  I get some very wacky results from my readFloat() if I
> > don't do this.
> >
> >   2.  Anybody know why the number of samples we're taking is a power of
> > two?  Is this important, maybe just for graphic performance?
> >
> >   3.  Here's the big one - is it possible to isolate amplitude at certain
> > frequencies - to get something like you'd get from computeSpectrum?  I
> guess
> > I'm overly confused by the data I'm getting back from the byte array and
> how
> > to dig deep with it.  The way I imagine this byteArray in my head is that
> > each position in the byteArray, one by one, would be a composite
> amplitude
> > of all frequencies at a small point in time.  I think I must be imagining
> > this data wrong - and you'll probably cringe at my composite amplitude
> > remark cause it'll probably make no sense.
> >
> > Thanks - and again, I really think I have some huge knowledge gap in how
> > sound data is used and read.  Can anyone help?
> > ben
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] gzipped xml receiving with flash

2009-06-25 Thread Jiri

Hello list,

Would it be possible to have a apache server return a gzipped version of 
xml (using the mod_deflate) and then uncompress the gzipped file in as3.


I guess that the BrowserMatch inside the httpd.conf would need to be set 
to a HTTP request comming from the flash player.


Would it possible for the flash player to mimick a call made directly 
from a browser? So that the apache returns an actuall gzipped version.


If it could be possible, how would this then be handled inside flash. I 
reckon the loader would need to load the file as a BINARY and then a 
gzip parser would deal with it?


I know AMF would work for what i want, or have the server preprocess the 
 files into a .zip. But i was just wondering and curious.


As my questions probably reveal, i am not an expert in this area, so 
excuse me if my questions are really naive.


Jiri

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders