ActionScript 2.0 :: Detecting Bandwidth In Flash??
Apr 19, 2007detecting bandwidth in flash?
View 4 Repliesdetecting bandwidth in flash?
View 4 RepliesI'm trying to detect a user's bandwidth from my swf however, I have never used classes before so I'm all messed up. In the help file it says to do the following and when I do it gives an error of:
Quote:
1131: Classes must not be nested.
After reading the help file on Classes I don't understand why this below doesn't work when I put it in my fla. I have tried to put this in a separate file and save it as an .as and import it in but it didn't work.
ActionScript Code:
class Client {
public function onBWCheck(... rest):Number {
return 0;
[Code].....
We have an application that is using FMS to share slides (swf,jpg, etc) with another client. We added a video as an option. We would like to verify as often as possible the bandwidth quality between communications in order to suggest the user to close video if we notice bandwidth is not optimal.
We've been experimenting doing a bandwidth detection every 60 seconds, but I am wondering if there are specific guidelines to do this for live video, like how many times one should verify bandwidth? Is it ok to take one reading or should we take a few readings and then average out?
Is there a way for flash to detect a user's bandwidth, and depending the size of bandwidth, stop loading, or continue with the load? Now that I'm thinking about it, this would probably be a javascript detection script and if the bandwidth is high, load .swf, if not load a .jpg?
View 3 RepliesWe are having a little problem implementing bandwidth detection with FMS, for some reason when enable it, bandwidth consumption spikes significantly I am wondering why? and if there a white paper somewhere that would talk about how properly implement this feature.
View 4 RepliesI need a meter that shows the current bandwidth rate as a percentage. For example: The maximum bandwidth rate is 4mbps, the current bandwidth is 3mbps, so the bar would be 75% full. This bar would change dynamically as the bandwidth rate changes.
Is there anything out there that already exists like this?
I am trying to get the "bwcheck" application to work on FMS 4 on Amazon EC2, in order to detect my upload speed to the server and provide the best quality stream for my upload speed.The tutorial I follow is this:{URL}Both are almost identical. However when I compile the .fla to .swf (having changed the URL for my server and application), and after I load the server-side code, I get the following error in my server-side log:Method not found (recData) understand that apparently it is not finding the method, but I tried getting it off the function in the global scope, tried attaching it to the client, etc. but nothing worked. The original code of the server-side script is:
for ( i = 0; i < 1000; i++ ) {
data += "S->C";
}
[code].....
I'm trying to debbug my code on Client side (Action Script 3) that works with Flash Media Server 4 on localhost. Everything seems fine up to that point.However, when I'm trying to test my player with other remote streaming servers, I notice bugs because of lower bandwith transmission between the server and the player.Is there a simple way to simulate lower bandwith with FMS4 on localhost (by config, application.xml, programmation...) ?
View 2 RepliesCan anybody tell me if it is possible to limit the bandwidth or screen refresh rate that a flash movie uses? I have a large number of virtual desktops which use RDP and flash performance is terrible.
If I look at a site in IE that use lots of flash, my RDP session can even hang sometimes or more likely become completely unusable.
Quick question - I have the following setup:
(1) An ec2 instance with an SWF on it - this SWF plays streaming video - i.e. is a video player like JWPlayer
(2) A streaming video distribution set up via Cloudfront
If I stream the the video via RTMP from Cloudfront to the SWF (which is on ec2) - would I incur charges for data transfer into the server (i.e. for data being read by the SWF) and out of the server (i.e. for data being displayed by the SWF to the user) on account of streaming the video to users (assuming that data transfer into and out for the server is being charged for)?
I'm trying to debbug my actionscript (AS3) code on Client side that works with Flash Media Server 4 on localhost. Everything seems fine up to that point.
However, when I'm trying to test my player with other remote streaming servers, I notice bugs because of lower bandwith transmission between the server and the player.
Is there a simple way to simulate lower bandwith with FMS4 on localhost ?
by config, application.xml, etc.?
by programmation (main.asc) ?
both ?
I'm working on a Flash CS5/AS3 pre loader, and the bandwidth profiler is telling me that my frame 1 size is massive - about 850kb. Frame 2 is 128kb. This results in a white screen during the bulk of loading, followed by the brief and now-unecessary preloader, and then the rest of the swf.
I have a setup of two frames, the first being the preloader with the following code:
stop();
addEventListener(Event.ENTER_FRAME, preLoad)
function preLoad(event:Event):void{
var bytestoLoad:Number = loaderInfo.bytesTotal;
[Code].....
The .as file associated with the fla has tons of other information, a full game.
I've already gone through my library and on all the symbols with Linkage, unchecked the "Export in Frame 1". Also the pre-loader is small, only a text box and a shape.
How can I get more detail of it's loading in frame 1 so that I can move it to frame 2?
Is it posible to convert a live stream into a flash format to save on bandwidth? If so, what player could be adapted to use it, and how could I convert it to begin with? If not, what is the best format to use for a live stream to get good quality without using too much bandwidth?
View 1 Repliesis it possible to detect if flash is installed using PHP. My aim is, that if it is installed it will play a flv file, and if not it will use another player eg; quicktime?
View 5 RepliesI made a document preloader thanks to kieth bit101. However i cannot test it.
View 5 RepliesI have tried searching for a solution on the net but to now joy.I can detect millisecondes in flash (getTimer()) but what I would like to do is detect microseconds.
View 1 RepliesIs there a way to detect end of Flash movie (OOTB, without using some sort of flash callback). Alternatively, is there a way to know the length of the movie? Update: IsPlaying() looked promising (periodically checking it), but as it turns out, nobody is creating straight forward swfs any more; now, the content is embedded in main layer and while the content plays, the main movie is stopped and IsPlaying is always false...
View 3 RepliesI'm trying to create a air-hockey game, in flash using AS3.At the moment, I am using an enter frame function to check the positioning of the 3 objects, 2 paddles and a ball, then it checks to see if they are in contact, if they are it then initiates a detect collision function.However it's checking every time the frame is loaded, and at 25 fps, this is quite a lot and the app lags.
View 3 RepliesI'm creating a website with Flash embedded into it. I understand that iPads do not support flash. I also have a non-flash version ready only to be used for iPad users. How do I detect the end user's device and redirect them to the version directly ?
View 1 RepliesI am bumping into a very strange behaviour on Flash.If you on the Flash IDE create a shape with a mask associated to it, save it and then export it as a swf, you cannotprogramatically know there is a mask (displayObject.mask is null)
Here's a simple test script to prove that:
//executed on enter_frame with the root object
function test(d:DisplayObject) : Void
[code]....
I'm making the simplest swf for a friend who has real problems remembering the actions of a Left and Right click with the mouse. So I would like to show text when "Right" click is detected and the same for a Left click. This at first seemed an easy project but the right mouse detection has got me baffled.
View 4 RepliesI am making the flash bit of a kiosk. The swf will be running in a exe shell. Is there a way to have the swf see what is containing it (browser, exe shell, my hand, your hand...) and if it is contained by the exe shell it will call fscommands, otherwise it wont? The exe isn't finished yet, and I'd like to test my swf without it giving me security errors. I'd also like to be able to show my boss the swf in as few clicks as possible
[Code]...
I have created some flash banner ads for a client to put into his own website, which he can edit himself using a third party piece of software (is it Blue Martini??... or something like that). I have published my banners for player 8, and normally this is fine when used within a dreamweaver html page, in that if someone doesn't have the right version of player, they are prompted to download the latest version using javascript. Thing is, this isn't happening with the site my banners are going into, and people with version 7 player are missing elements of the banner!! I'm thinking its because of the way the swf is placed into the site??? Is there a way I can control the detection and direct to a download within my flash file only? with actionscript??
View 3 RepliesIs ActionScript 3 capable of detecting pen pressure on, for example, a Wacom tablet? I was looking at TouchEvent but it doesn't appear to work.
View 2 RepliesI just noticed a workaround something that's been annoying me for a long time. Occasionally my projects vertically line up funny if clip y-coords or heights are based on frame 1 stageHeight. I always thought it was a load-time duration or something like that, but it turns out to be bandwidth profiler (CS4 authoring). Try this on frame 1 of a new, empty project:
this.addEventListener(Event.ENTER_FRAME, this.entf); function entf(evt:Event):void{ trace(this.stage.stageHeight); }
When bandwidth profiler is on, the first frame reports -100 the real stageHeight. Now to avoid the problem I just turn off bandwidth profiler. Is it just a bug?
I'm testing HLS and HDS right now and i'm wondering how to limit users and bandwidth per virtualhost. I mean in rtmp mode there is the vhost.xml tag far max users and the Application.xml tag for Bandwidth limit, but for http connections (either live or on vod) where can i limit connections or bandwidth?
View 3 RepliesI was trying to find a bandwidth profiler in flex like there used to be one in Flash but couldn't really find one. Is there a way, that I can do bandwidth profiling of my local swf?I'm using Flex Bulider with a AS3 project.
View 2 RepliesI am developing a Flash application which should initially (before launching the main application) identify the internet bandwidth available on users system and display low or high bandwidth content accordingly.If the user has dialup concetion then I need to display only images else if it is broadband concetion then I need to display swf's along with the audio.
View 1 RepliesDoes anyone know if there are any classes that expose information about bandwidth usage? For example, I would like to know when my Flash file is really pushing the bandwidth by loading a bunch of stuff (like images), versus when its basically sitting idle.
Now I know I can get stuff like progress events from an individual load but thats not what I mean here. I want to be able to get a current level of activity for my entire movie which is currently running....not information about a particular item which is being loaded.
My video player has a problem performing under bad bandwidth conditions.
When i disconnect from my network halfway through playback this triggers a netstatus event with an info of "NetStream.Buffer.Empty"..
If I reconnect my network, it doesn't start streaming again..If I call netStream.resume() that triggers a "NetStream.Unpause.Notify" but the buffer never fills up and the video never plays again.
Seems like once netstream runs out of internet juice and triggers a "NetStream.Buffer.Empty" there is nothing i can do to get playback to resume again.