Flash - SampleDataEvent.data.writeFloat() - Why Call It Twice

Jun 3, 2010

Below is a snippet from the Adobe Live Docs SampleDataEvent class. It demonstrates how to create an audible sine wave by pushing samples into a ByteArray. The part that I am hung up on is why you need to push the same value into the writeFloat() method twice?

var mySound:Sound = new Sound();
function sineWaveGenerator(event:SampleDataEvent):void
{
for ( var c:int=0; c<8192; c++ ) {

[code]....

As a test, I removed one of the calls to writeFloat() and increased the buffer to 16384 samples ( twice the current ). This created an audible gap and click in the the audio, but didn't enlighten me much as to why.

View 1 Replies


Similar Posts:


Flex :: Flash - SampleDataEvent.SAMPLE_DATA Never Fires?

Jul 28, 2010

microphone.addEventListener(SampleDataEvent.SAMPLE_DATA, gotMicData); the event gotMicData is never fired.. however i tried using dispatchEvent but that will return null byteArray.. However similar code works fine in Flashcs5...

import flash.events.SampleDataEvent;
import flash.media.Microphone;
import flash.media.Sound;

[Code]....

View 2 Replies

Flash - Modify Sound In Real-time With SampleDataEvent For Audio Within NetStream?

Jan 27, 2011

I'm streaming audio using NetConnection and NetStream. I know that you can modify sample data in real-time with the Sound object, however I cannot find the SampleDataEvent for audio playing with the NetStream object. Is there a way to pass the audio from the NetStream object to a Sound object and modify the sound at that object instead?

View 2 Replies

Data Integration :: Use Flash To Dynamically Load XML Data Via A FlashVars Call In The HTML?

Jul 18, 2007

Im new to placing external data into Flash. I just got CS3 and Im trying to use Flash to dynamically load XML data via a FlashVars call in the HTML.

The problem is I have followed the very straight forward AS2 Help files for using FlashVars and URL variables.I have placed the code directly from the Help file into the Html between
<noscript> <noscript>and i keep getting undefined.I have tried saving the file as flash 8 and i am publish flash 8.

View 1 Replies

ActionScript 3.0 :: Record Mic Using SampleDataEvent Works Only On Some Computers?

May 30, 2010

I made a swf that records your mic and allows you to play it back.  I load the soundBytes into a float and play the float back.  It works fine on the computer I developed it on (in IE, Chrome and Firefox) .  It does not work on my second laptop.  And a few people in some forums have said it is not working either.

[Code]...

View 1 Replies

ActionScript 3.0 :: Verify Error With SampleDataEvent In Browser

Dec 16, 2011

[AS3]
import flash.events.SampleDataEvent;
var data:SampleDataEvent = new SampleDataEvent(SampleDataEvent.SAMPLE_DATA);
[/AS3]

compile it with Flex 3.6 and run local works, then run in browser, works. compile it with Flex 4.5.1 and run local works, then run in browser, throws exception:

[Code]....

View 7 Replies

ActionScript 2.0 :: Use Flash To Call Data From Xls / Csv?

Mar 31, 2010

I need to create a flash file which can retrieve data from either a .xls or a .csv file. Does anybody know how to build one ?

View 0 Replies

ActionScript 2.0 :: Call Xml Data From Flash?

Apr 5, 2004

how to call this xml data from flash. I usually use this:

[Code]....

View 8 Replies

Actionscript 3 :: FLEX Data Manipulation Separating Data For Bargraph Display From A PHP Call

May 25, 2011

I want to separate the data from the PHP call to Different CollectionArrays So that I can use the data for a bar-graph;

I created a static version of the bar-graph and separated the Collection array manually I don't want this done manually I need to do it dynamically. So what I am trying to understand is where to put the event-listener how to add to a collectionArray then once the collection array(s) are built. use that information to build the bar graphs...

/*
*
36, > 2 years, Compliance
6, 0-90 Days, Compliance

[Code].....

View 2 Replies

Adobe Flash Builder Http Data Service Call Fails Only After Export?

Dec 8, 2011

I wrote an app using adobe flash builder that makes an http data service call to a website.

When I build and launch the app it loads in my browser (the address in the broswer is C:Userspath omyapp.html) and works perfectly. However, when I upload the app to my website or even launch it from outside the project build directory, the HTTP service call fails with the popup

Security error accessing url
Destination: DefaultHTTP

Of course I googled this error and realized it may have something to do with a 'crossdomain.xml' in my web root directory. I tried this and it continued to fail.
Below was my crossite domain file

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="www.my_domain_for_http_service.com" />
</cross-domain-policy>

I'm using the free trial version of Adobe flash builder, but I do not see anything indicating that this has to do with the error.

Data from http service call is in xml format.

View 1 Replies

Actionscript 3 :: Call Data From Website?

Jul 9, 2011

I can call data from a website in action script/flash e.g a RSS feed or a news piece , mainly to put on a mobile device. i ran it on my desktop and it asks for permission then nothing happened?

View 1 Replies

ActionScript 3.0 :: Receiving Data From Call Method

Sep 28, 2008

I have a problem with my code that I've realized to read data from txt file. My problem consist to receive data by call a method I've try a lot of ways but I'm not to be able to resolve it. I attach my code. This code is a class.

View 8 Replies

Actionscript 3 :: Using ComputeSpectrum() Call On Arbitrary Data?

Mar 28, 2011

i have some arbitrary signal data which i'd like to get a frequency analysis of. it's not audio data. is there a way to coerce AS3's computeSpectrum() call into doing this work for me ?

View 1 Replies

ActionScript 2.0 :: Track Data Changes And Then Call A Function

Jul 25, 2005

I want to be able to track data changes and then call a function.

[Code]...

View 2 Replies

ActionScript 3.0 :: Call Up Data When A Certain Number Is Entered

Aug 18, 2009

I want to have data called up when a certain number is entered, like a html page with text and pictures. If the correct item # is entered, the information is pulled up. Is this a good application for flash and actionscript? or for something like javascript and ajax? I'm brand new to both, but i'm very willing to learn.

View 4 Replies

ActionScript 3.0 :: Call Function And Receive Data From Child Swf

Aug 20, 2011

I have a child swf loaded that needs to receive an array that the parent creates in a function. The child swf must be the one to call that function.

View 3 Replies

ActionScript 2.0 :: Feeding Array Data Into A Function Call

Jun 26, 2009

if you look at the code:: barn is an instance of an MC on stage. I have a few buttons stored in an array which i want to attach scripts with a for loop. Why does adding an item from the array not work when placed inside the function call?

[Code]...

View 2 Replies

Flash :: Call Anonymous Function From ExternalInterface.call() Method?

Nov 4, 2010

I need to get a javascript var in my Flash application. I like to be able to just set a variable in the javascript (client constraints) rather than define a function.

Can this be done? I am trying to use the ExternalInterface.call()

AS:

ExternalInterface.call("function(){return window.someVar}", null);

JS:

var someVar = "Test";

This does not work and I suspect it is because the ExternalInterface.call() does not like the anonymous function.

View 2 Replies

Flash - Externalinterface.call Won't Call The JavaScript Function - Firefox 3.6

Feb 10, 2011

I have a function defined in JavaScript like so:

function fadeBack() {
alert("fadeBack called");
};

I call that function from my Flash file like so:

import flash.external.*;
flash.external.ExternalInterface.call("fadeBack");

This works in both Safari and Chrome, but for some reason Firefox won't ever call the function. Still, I can't figure this out. How can I fix it?

View 2 Replies

Javascript :: Reference The Html Object That Made The Call To SomeFunction Directly Using The ExternalInterface.call Call?

Jun 28, 2011

i have some actionscript that makes a

ExternalInterface.call('someFunction');

call.is it possible to reference the html object that made the call to someFunction directly using the ExternalInterface.call call?

Assume that the object that makes the call also has some Callbacks (via ExternalInterface.addCallback) that are accessible via javascript.

Currently:

Actionscript source
ExternalInterface.call("someFunction");
ExternalInterface.addCallback("someCallback",someASfunction);

[code]....

View 1 Replies

Flex :: Remote Call To Save Data And Wait For Answer

Jul 8, 2009

My Flex application does a remote call to weborb to save some data from Flex. When this data is saved, a service is called on another server. All this time Flex is waiting for an answer. Is it possible to call this service (on the other server) and not wait for an answer. I have tried to call the service asynchronous but all this does is calling the service in a different thread. Flex still has to wait for both threads to be finished... So when the data is saved, flex should get its answer. (while the thread handling the service is still running).

View 2 Replies

Actionscript 3 :: Duplicate Dynamic Html Content Box And Call Different Data?

Dec 8, 2010

I'm working in Flash CS5 w/ActionScripting 3.0. I have a content box w/scroller that calls dynamic html on one page/part of my project's timeline.

I want to duplicate the exact same content box w/scroller, but need it to contain different data (call a different .htm doc), for another part of my site.

View 1 Replies

ActionScript 2.0 :: Call A Function Which Parses The Xml Data And Puts It Into An Array?

Jun 30, 2004

i've got a scenario that i'm working thru on paper first and wanted to run it by everyone to see if i'm doing it correctly and most importantly, efficiently so, here goes...the situation | an instance of the DateChooser component reads an xml file which houses info for homework assignments and their due dates. if there is a due date, make sure that date is highlighted on the DateChooser component. from what i've been told, the xml file stores urls which will tell if there is s/thing due on a particular date.

[code]...

What needs to happen as soon as the xml file is loaded? i.e. do i call a function which parses the xml data and puts it into an array? then the DateChooser component iterates thru the array looking for boolean values noting if there is an activity or not and if so, on which day. if it finds one, it sets its highlight property to true for that particular day.

View 11 Replies

Flash :: Replace A URLLoader Call With ExternalInterface Call?

Feb 10, 2011

We have been given some code that does a URLRequest call which is really slow to respond, so I was looking to make it pull the data from the page, as it is already on the page.[code]I have tried to replace it with this (actionscript is definitely not my forte):[code]I am using addCallBack as that is what the editor suggested via autocomplete, unfortunately it doesn't seem to work. Unfortunately I cannot go back to the developer at this time.The error message is:Call to a possibly undefined method addCallback through a reference with static type flash.external:ExternalInterface

View 3 Replies

Actionscript :: Call A Url From Code With Additional Data - Catch That On The Java Side?

Apr 12, 2010

I'm working on a flash game written in pure actionscript 3.0 in Flex. I've just finished implementing replays for the game, but want to store the top 10 hiscores' replay data on my google-app-engine'd website. I'm using Java for the app-engine stuff in Eclipse in java but I have no idea how to deal with communicating to my java code from my actionscript code. I'll need to both read and write from actionscript -> java -> datastore. Does anyone have any experience with this?

For note, I'm horribly noob with anything to do with web development. I hear you can pass arguments to a URL when calling it, comparable to command-line arguments on a desktop executable and if so then sending all the data as a large string would be doable... The question then would be how to call a url from AS3 code with additional data and then how to catch that on the java side.

View 1 Replies

Flex - Barcode Scanner Cannot Connect To The Application To Call The Data From The Database

Nov 11, 2010

I am currently working on software for student attendance. I use the flex / flash and php to create the software but I faced a problem barcode scanner, can not connect to the application to call the data from the database when students scan the barcode printed on their student card.

View 1 Replies

ActionScript 3 :: Parse The XML Object Into An Array Of Objects To Call Rather Than Using E4X With The Stock Data?

Nov 12, 2010

i've been reading that XML/E4X is very slow with AVM2 / ActionScript 3.when supplying an application with XML data, is it always generally a better idea to parse the XML object into an array of objects to call rather than using E4X with the stock XML data?

View 2 Replies

ActionScript 3.0 :: Barcode Scanner Can Not Connect To The Application To Call The Data From The Database

Nov 27, 2010

I am currently working on software for student attendance. I use the flex / flash and php to create the software but I faced a problem barcode scanner (Motorola-type barcode scanner Symbol LS2208 Laser Barcode Scanner USB), can not connect to the application to call the data from the database when students scan the barcode printed on their student card. make the script so that it can run on flex / flash and php. it makes me crazy for a week to seek a way out. (I have not mastered the java script)

[Code]...

View 4 Replies

ActionScript 2.0 :: Can Object.watch Call A Function When Say A Dynamic Textfield's Data Is Changed

Sep 3, 2003

I am making a Scrollbar component and I want a script to call a calculation function for resizing the scrollbar when a new data is loaded.I was experimenting with Object.watch but it's use is beyond me. I don't understand if its the thing I need.Can Object.watch call a function when say a dynamic textfield's data is changed?

View 13 Replies

Data Integration :: Variable URL In "flashobject&quot - Call Different Movies On Same Page With Different Parameters?

Sep 7, 2006

This would be the code to call a movie:

var fo = new FlashObject( "Movie1_controller.swf",
"Movie1_controller.swf", "591", "480", "7", "#FFFFFF", false,
"best" );
--------------------------

Is there a way to modify that call (maybe using ASP Javascript) so you can call different movies calling the same page with different parameters?. I haven't been able to get this
working. It seems to be that the "FlashObject" call cannot have any variables on it.This is the way I'm trying it:

1. The call to the page would be: http:[url]....

2. Add javascript to get value passed:[code]....

It just doesn't work. The FlashObject.js doesn't seem to like that call.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved