ActionScript :: Ratio And Frequency - Even Dispersion
Sep 2, 2011
I have the following:
package {
import flash.display.MovieClip;
public class Ratio extends MovieClip {
private var counter:Number;
private var frequency:Number;
private var ratio:String;
[Code] .....
This outputs something like:
0: true
1: true
2: false
3: false
But what I would actually like is:
0: true
1: false
2: true
3: false
i.e. more even dispersion (alternation)...is there a way to do this?
View 1 Replies
Similar Posts:
Sep 2, 2010
This is what i'm trying to do , get the Ratio 4:3 9:16 etc from an mp4 movie (h264) so when ill open it in fullscreen using a flash player / action script 3 it will still keep the ratio.
View 2 Replies
Jan 26, 2010
Does anybody know a purely PHP based way to alter the frequency of an MP3 file?
A client's website is utilizing a Flash based MP3 player to play some audio.The client is producing the audio herself.
The trouble is that the tools that she is producing it with, and is familiar with, automatically produces MP3 files with a frequency of 48000hz, while some versions of Flash have trouble playing anything with a frequency differing from 44100khz.
View 1 Replies
Jun 8, 2008
I have an array with duplicate values (strings) in it. I would like to have a function that i can call with the string-parameter and returns how many times this string is in the array.
View 7 Replies
Feb 7, 2011
Recently I asked this question: How to get the fundamental frequency from FFT? (you don't actually need to read it) My doubt right now it: how to use the cepstral algorithm? I just don't know how to use it because the only language that I know is ActionScript 3, and for this reason I have few references about the native functions found in C, Java and so on, and how I should implement them on AS. Most articles are about these languages) The articles I found about cepstral to find the fundamental frequency of a FFT result told me that I should do this:
[Code]...
View 3 Replies
Aug 18, 2011
I need to create an audio file (sine wave) of a particular frequency. I need to do this in actionscript 2.0.
View 0 Replies
Apr 11, 2007
how to remove duplicates from an array. But now I need to know how many times each unique item is in an array.
Example:
a,a,a,b,b,c,a
a:4
b:2
c:1
View 4 Replies
Jan 13, 2009
I am action script developer in a company. I want to render my freequency spectrum while loading sound.I tried it different way.please suggest any way to do it
View 0 Replies
Sep 28, 2011
Can I figure out somehow sound's frequency (primarily .mp3s) and if it is mono or stereo?
View 4 Replies
Jun 17, 2009
I'm writing a Comet-like app using Flex on the client and my own hand-written server.
I need to be able to send short bursts of data from the client at quite a high frequency (e.g. of the order of 10ms between sends).
I also need the server to push short bursts of data at a similarly high frequency.
I'm using NetConnection.call() to send the data to the server, and URLStream (with chunked encoding) to push the data from the server to the client.
What I've found is that the data isn't being sent/received as soon as it's available. For example, in IE, it seems the data is sent every 200ms rather than as soon as NetConnection.call() is called. Similarly, URLStream isn't making the data available as soon as the server is sending it.
Judging by the difference in behaviour between the browsers, it seems as though the Flash Player (version 10) is relying on the host browser to do all the comms. Can anyone confirm this? Update: This is very likely as only the host browser would know about the proxy settings that might be set.
I've tried using the Socket class and there's no problem with speed there: it works perfectly. However, I'd like to be able to use HTTP-based (port 80) connections so that my app can run in heavily fire-walled environments (I tried using a Socket over port 80, but that has its problems).
Incidentally, all development/testing has been done on an internal LAN, so bandwidth/latency is not an issue.
Update: The data being sent/received is in small packets and doesn't need to be in any particular format. For example, I might need to send a short array of Numbers, and this could either be encoded in AMF (e.g. via NetConnection.call()) or could be put into GET parameters (e.g. using sendToURL()). The main point of my question is really to see whether anyone else has experienced the same problem in calling NetConnection/URLStream frequently, and whether there is a workaround (it's also possible that the fault lies with my server code of course, rather than Flash).
View 2 Replies
Nov 30, 2011
Keeping it simple for now but assuming i have a ByteArray full of sample data is it possible to calculate the average frequency (thus a pitch) from the entire recording? Is this along the right lines? p = 69 + 12 x log2(f/440hz) ...
View 1 Replies
Nov 26, 2009
How can I calculate Frequency & Amplitude in As3 with FP9. I got the all raw byte using
[Code]....
View 1 Replies
Jul 9, 2009
I'm developing a flash application that capture an input sound using the microphone object. Unfortunately in this way there's no possibility to get the sound frequency or the bands of the source. How to make Sound Visulizer on the basis sound frequency
View 3 Replies
Jan 17, 2012
I have an as3 app that loads SWF's with various movie clips inside with a size of 1280 width and 720 height. I would like to fit these SWFs into a content box of height 885 width by 500 height. The SWF must keep a ratio of 1.77. This would be easy if as3 recognised the SWF being 1280 height by 720 width. It doesn't however, and takes the size of the movie clips inside the swf which varies (as long as it's within the original size boundaries). how I can make the SWF's fit into the content box even if the movie clip sizes and therefore the original SWF sizes vary?
View 1 Replies
Jan 23, 2012
I want to produce a small movie using flash that i can pass onto someone else for inclusion in a presentation
They have asked for the final movie to be a quicktime .mov using the H.264 codec and that the aspect ratio should be 16:9
So my question is, how do i set up a flash project to ensure the final outputted movie will be in the correct aspect ratio? do i need to know the correct pixel dimensions?
View 6 Replies
Jan 17, 2008
I want to build a gallery that is full screen all the time and make it scaleable. The gallery is easy but I want image to maintain ratio but once reaching a 800 by 600 stop scaling .
View 9 Replies
Feb 9, 2009
i'd like to use one flv player .swf to play both 16:9 and 4:3 videos without stretching the 4:3. how to detect the aspect ratio of the flv file being loaded?
View 0 Replies
Sep 5, 2009
way to lock the width and height ratio? I'm trying to set the width of the mc equal to the stage but have the height keep in relation to the original ratio also. So the wider I open my stage the taller the mc gets also.
sizeXListener = new Object();
sizeXListener.onResize = resizerX;
Stage.addListener(sizeXListener);
[Code]....
View 0 Replies
Sep 3, 2009
I found a thread in actionscript.com that resizes a bg image beautifully (without any pixelation whatsoever), except that there is a minor glitch in the script that doesn't load properly. What does the solution mean: "try waiting until after the image is loaded. call your setBackground(); function from the onLoadInit"
Here is the script:
import flash.display.*;
// this tells Flash NOT to allow the assets to be scaled
Stage.scaleMode = "noScale";
Stage.align = "TL";
[code]....
View 2 Replies
Jan 29, 2012
I have developed a couple of websites before in Flash, the problem is, the resolution of the site is good on my platform. i.e. 1024 x 800. However, when I get to view the site in 1366 x 788 the whole site looks sad. Badly oriented and sometimes I have to scroll through my page up and down - you know what I mean.
how to solve the problem so that my site looks good, centre oriented, doesn't matter at which resolution the user is viewing it.
View 3 Replies
Apr 2, 2009
I am new to Flash and trying to create a vertical slider bar that will return a ratio between 0 and 1, change color while doing so, and display the resulting ratio on the side of the slider as you drag. Everything works except for the dynamic text box displaying the "ratio." I want the text box to be invisible until you drag, then display at about 70% alpha when you drag, and go back to invisible when you release (because of the 70% alpha I have decided not to use the "visible" property).
I have attempted to use the _alpha command to accomplish the above, but the actionscript appears to ignore and just display the text box at 100% alpha. I have put the dynamic textbox in a movie clip, but still can't make it work. Could I accomplish this with a rollover button covering the entire slider?
I have posted the .fla file here for your review; can anyone let me know where I'm going wrong?[URL]..
View 2 Replies
Oct 14, 2009
I have my object which is supposed to re size keeping the original ratio of width/height.. I am using a listener since the stage is set to "noScale".
My object is resizing but I don't know how I can make it keep the original ratio?
View 2 Replies
Mar 5, 2011
I have set my stage at 1920 x 1440 with a background bitmap that matches that size. The aspect ratio of my stage/bitmap is 4:3. When I run my Flash website on a legacy 4:3 monitor set at 1024x768, the top and bottom portions of the stage image are truncated. The remaining part of the displayed picture has an exact aspect ratio of 16:9.
[Code]...
View 2 Replies
Sep 21, 2011
I have made a resizeable box that you can resize using handles on all four cornersI have tl (top left handle), tr (top right handle), bl (bottom left handle) and br (bottom right handle)Its rather difficult to explain. See the picture attached, the blue arrows are where the mouse could move and the green arrows are where the boxes should goor now let's concentrate on moving the tl handle so that when it is moved left or downwards it gets smaller, towards the br handle
I've have tried this:
tl.y = tl.x
tl.x = tl.y
[code].....
View 7 Replies
Feb 21, 2011
How can I make an application with the same ratio width/height? I have an application with width = 800 height = 600. Its width = 1.33*height and when I change the width to 1024 I want the height to change to 768 automatically.
View 1 Replies
May 9, 2011
I have created a flash video player using as3 (videoObject) but when I play the video the video is streched how to tell flash using as3 to maintain aspect ratio.
View 2 Replies
Nov 16, 2009
I have 30 seconds spot that I need to convert it into DVD with 4:3 aspect ratio. Does Flash has ability to do it or do I have to burn it using third party software and on the third party software does it has the option to make the aspect ratio to 4:3? I think is 720X480 in pixel right? It has to be NTSC format.
View 9 Replies
Jun 8, 2010
I want to know how can i make something like if any one scale browser my site will scale in aspect ratio without cropping
something like jimcarrey website [URL]
View 2 Replies
Jul 2, 2010
how to make a video player and I was wondering if there is a way for me to receive the aspect ratio of a loaded flv or get native dimensions of the video so I know how to scale my video properly according to the loaded flv.
View 1 Replies
Oct 7, 2006
Is it possible to keep the aspect ratio of a picture loaded with loadMovie, or is there another way to accomplish the same?
View 4 Replies