Video :: Overhead Of Using EventListener Versus Polling?

Jun 30, 2011

So I have streaming video coming in, and I want to know when it is buffering. This is fundamentally not that hard, just adding an EventListener for some type of buffering event, but I was wondering if this is necessarily the "best" way to do it.

My other thought was setting up a timer that polls the video feed every X milliseconds asking it if the video isBuffering(), or somesuch. While I could, in the worst case, wait the full X milliseconds before querying the video stream, I've decided that this doesn't actually matter to me; I can work around it, and indeed do so quite naturally already.

So I'm asking: is there substantial overhead involved in having an EventListener (assuming I already have quite a few), or is the advantage of catching the buffering event right away sufficiently appealing?

View 1 Replies


Similar Posts:


IDE :: Video Fps Versus Project Pfs?

Feb 4, 2010

A Video-loop at 25fps imported to flash, embedded, plays fine if the project fps also is 25fps.But i also want to add a 3D Carousel menu, but at the projects 25 fps it goes a little bit choppy when rotating quick.So I try to change the projects fps to 50, and voila, the menu looks good but the video plays to fast.The video should alternate between clips randomly, and the clips has to be preloaded, thus its embedded in the swf (...or could this be done with flvs?)5-10 clips.

View 2 Replies

Media Server :: 2.0.5 - Video Image Quality Versus Bandwidth?

Jul 8, 2009

Does anyone know if Flash Media Server can be configured to reduce the image quality of a publish stream if available bandwidth goes down or there are delays in the connection?
 
When I (locally) play back videos recorded on poorer/intermittent connections, video frames are dropped, so the image freezes up.

View 6 Replies

ActionScript 3.0 :: Preloader (multiple Swf) Versus External Video On The First Frame?

Dec 16, 2009

I have a preloader and 10 swf that needs to be cache. My problem was that when the preloader started, it was not only caching the swf, but a lot of .flv and a lot of the same player skin (flvplayback component). I don't need and don't want to preload or cache those .flv. They need to be load only when someone is on the page not before (in real time, not preload).

But the problem is that the videos (flv) are on the first frame of every swf cause I need the video to start when they enter the page. So when the preloader start, it starts to preload the videos too (since they are on the first frame).Is there a solution to change the behavior of the preloader or restrict what he can load ?Is there a better way to make my video start on enter frame without putting it on the first frame ? Something that would not be preload and cache but that would start when the user enter the page ?

View 1 Replies

ActionScript 3.0 :: EventListener - Loading Video Into Flash

Nov 16, 2010

ActionScript Code:
var AniLoader:Loader = new Loader();
var AniRequest:URLRequest = new URLRequest("Animation.swf");
AniLoader.load(AniRequest);
AniLoader.x = 0;
AniLoader.y = 0;
[Code] .....

I'm trying to load a video into my flash, what code can I use in the eventListener that listen to an event where the movie is finish playing? The code below just doesn't work
AniLoader.addEventListener (Event.Complete, removeAni);

View 8 Replies

ActionScript 3.0 :: ProgressEvent EventListener Won't Run If Video Already Loaded?

Feb 25, 2012

The purpose of the code below is to keep a video from playing until it's completely loaded. The first time the page loads everything works perfectly. The problem is that until the browser is closed and reopened, it won't play again. It other words if I hit the browsers refresh button, it won't play.

I believe this is because the video is then already loaded in temp storage, and because of that, on subsequent attempts the ProgressEvent EventListener does nothing, and never goes to the Function ProgressHandler.

//---------------------------------------------------------------------------
import fl.video.*;
import flash.display.*;
import flash.events.Event;

[code]....

View 5 Replies

Flash :: Long Polling With URLStream?

Jun 27, 2010

I'm trying to open a connection to a URL that will periodically send over a JSON object. I know that I need to use URLStream and some event callbacks, but I'm in the dark when it comes to knowing how streams of data "work," or the general flow of operations. Assume I know how to open the connection and send the correct request headers. First, some relevant code:

[Code]...

View 1 Replies

Actionscript 3 :: Understanding An AMF Polling Call

Sep 19, 2011

One of my testers is asking me about an AMF polling that we do in our app:[code]They are seeing values of 0 and 5.

View 1 Replies

ActionScript 2.0 :: Polling UI GoTo Different Frames?

Dec 23, 2009

This is one of those rich media interactive ads, that have the ability to launch another SWF using _root.myPR.openPanel(1); The user has 3 choices identified as option1, option2, option3. I would like to not just openPanel on pr_submitBtn.onRelease, but to have the panel open & advance to a particular frame depending on which option the user chooses in the poll. I have the following launching the panel but not going to different frame labels in the panel launched. All 3 options simply stop on frame "one".

Code:
if (option1 = true) {_root.myPR.openPanel(1, "one");
}
if (option2 = true) {_root.myPR.openPanel(1, "two");

[code].....

View 3 Replies

Flex :: Flash - Low Overhead Dynamic Tab / ViewStack?

Dec 17, 2009

Suppose I have a ViewStack like this:

<mx:ViewStack id="s" left="5" right="5" bottom="5" top="0" width="100%" height="100%" creationPolicy="all" minHeight="0">
<mx:Repeater id="repeater" dataProvider="{dp}" height="100%" width="100%" minHeight="0">
<mx:Box id="bx" label="{repeater.currentItem.label}" width="100%" height="100%" minHeight="0">
<mx:Label minHeight="0" width="100%" height="100%" label="bob" />
</mx:Box></mx:Repeater></mx:ViewStack>

With a large number of items in the stack (each having a large number of panels, databinding, etc), this gets extremely slow. The Repeater seems to trigger creation of all children regardless of the creationPolicy of the viewStack itself.

View 2 Replies

ActionScript 2.0 :: Make An Overhead Shooter Game?.

May 18, 2011

Im attempting to make an overhead shooter game. Ive got the basic movement down already, and rotation towards mouse. For when he shoots, ive set it to duplicate a bullet movie clip, but i only understand how to set it towards one graphical direction(ex: x +, y -)

The code i know ive gotta fix is

onClipEvent (enterFrame) {
this._x += laserMoveSpeed;
if (this._x>1000) {
this.removeMovieClip();
}
}

The little x + part has to be fixed, but i have no idea what to substitute in order to make it shoot from the front.

View 3 Replies

Actionscript 3 :: Memory Leak In Server Polling Presentation App?

Feb 22, 2010

I'm building a remote presentation tool in AS3. In a nutshell, one user (the presenter) has access to a "table of contents" HTML page with links for each slide in the presentation, and an arbitrary number of viewers can watch the presentation on another page, which in turn is in the form of a SWF that polls the server every second to ensure that it's on the right slide. Whenever the admin clicks a slide link in the TOC, the database gets updated, and on its next request the presentation swf compares the label of the slide it's currently displaying to the response it got from the server. If the response differs from the current label, the swf scrubs through the timeline until it finds the right frame label; otherwise, it does nothing and waits for the next poll result (a second later).

Each slide consists of a movieclip with its own nested timeline that loops as long as the slide is displayed. There's no actionscript controlling any of the nested movieclips, nor is there any actionscript on the main timeline except the stop();s on each keyframe (each of which is a slide in the presentation).

Everything is built and working perfectly. The only thing that's troubling is that if the presentation swf is open for long enough (say, 20 minutes), the polling starts to have a noticeable effect on the framerate of the movieclips animating on any given slide. That is, every second, there's a noticeable drop in the framerate of the animations that lasts about three-tenths of a second, which is quite noticeable (and hence is a deal-breaker for the whole presentation suite!).

I know that AS3 has issues with memory management, and I've tried to be diligent in my re-use of objects and event listeners. The code itself is dead simple; there's a Timer instance that fires every second, which triggers a new URLRequest to be loaded by a URLLoader. The URLLoader is reused from call to call, while the URLRequest is not (it needs to be initialized with a new cache-killing value each time, retrieved from a call to new Date().time). The only objects instantiated in the entire class are the Timer, the URLLoader, the various URLRequests (which should be garbage-collected), and the only event listeners are on the Timer (added once), the URLLoader (added once), and on the routines that scrub backwards and forwards in the timeline to find the right slide (and they're removed once the correct slide is found).

I've been using mr doob's stats package to monitor memory usage, which definitely grows over time, so there's gotta be a leak somewhere (it grows from ~30 MB initially to > 200 MB after some scrubbing and about 25 minutes of uptime).

View 2 Replies

Actionscript 3 :: Make A Racing Game With An Overhead View Looking Down?

May 17, 2010

I am trying to make a racing game with an overhead view looking down. There will be a separate mc for the ground and another separate mc for the players car. How can I do this? O ya and just in case i am thinking the way I did: I tried to "rotate" the ground but when the car moves down the ground it moves away from the registration point, so therefore it rotates non relative to the car i want to make this game in as3.

View 2 Replies

ActionScript 3.0 :: Polling With URLLoader Gives Sporadic IoError #2032?

Jul 8, 2008

I have a flex app that polls a php script every 1-2 seconds and returns new data. The polling is done with a URLLoader.load call;the requests are HTTP GETs. The app listens for Event.COMPLETE, handles the incoming data, waits for 1 second, then makes another URLLoader.load call.

This process works perfectly for any duration from 4 to 20 minutes. Eventually, a URLLoader.load call fails to return Event.COMPLETE. Instead it hangs for 60 to 180 seconds (depending on which local network I'm using for internet access) and finally returns an ioErrorEvent.IO_ERROR with the message "Error #2032: Stream Error. URL: <mysite.com/foo.php". The app tries to make another URLLoader.load call, but from this point onward, none of the loads return Event.COMPLETE. Also, none of these post-error HTTP GETs appear in the access.log file of my apache (2.0.55) webserver. The app will not work again until I close and reopen the browser.

I've spent several days trying to figure this out! The time until the app crashes appears to be completely random. The problem occurs in both Firefox (2.0.0.15) and IE (7.0.5730.11). I've read that sometimes 2032 errors can be related to caching, but there's no directives (in .htaccess file or httpd.conf file) that sets the Pragma or Cache-Control response header to "no-cache".

I can't tell if the problem is on client or server end. Based on the adobe language references and the forum posts I've read, this seems to be an appropriate use of URLLoader. (In case you're wondering I want the app to respond to events in near real-time. I originally used xmlsocket to push data to app from server. However, this communication is blocked by corporate firewalls, so I need an alternative method)

Here is (cleaned up) code:

[Code]...

View 1 Replies

Actionscript :: Flex Long Polling (server Push) Without BlazeDS?

Oct 19, 2009

Apart from using BlazeDS, are there any pre-existing libraries that implement long polling (or server push) in Flex?I've read I like to implement Flex to Server comet / long polling for games, but he's only asking if it's possible to implement... Not if implementations exist.

View 2 Replies

ActionScript 2.0 :: Articles That Explains The Overhead Added To A Flash Program When Using The Math Functions

Feb 18, 2009

I would like to ask if there are any articles that explains the overhead added to a flash program when using the Math functions in AS2.0?

View 0 Replies

View Video With "Play" Versus "Test Movie"?

Sep 23, 2009

I have imported a flv to as "import video" and placed it on the stage. I have added other layers each on frame one. I want to drop stills out as others enter but I cannot run the video on the timeline to determine at what frame I want something to change. I could of course time it out at 15 fps but is there not a friendlier way to pick a point where one object exits and another enters? The video is a flvplayback instance. I have not made it a movieclip or named it.

View 4 Replies

Actionscript :: Much "overhead" To Various Types Of Screen Elements?

Oct 29, 2009

I've been developing Flash applications for several years, and here's something I've always wondered about.

I try to be as careful as possible about minimizing the amount of "overhead" that my application uses. (By overhead, I generally mean RAM, cpu processing effort, downloaded data, etc.) My goal is to consume as little of the user's PC resources as possible.

[Code]...

I circumstances matter - a few KB of "page weight" on Amazon.com or Twitter.com matter a lot more than on a site that gets a few hundred visitors a month. But in general, are there good tools to measure this type of thing?

View 1 Replies

ActionScript 3.0 :: Overhead Of "unlistened" Events?

Dec 17, 2009

I'm wanting to override most properties (at least the display ones such as x, y, z, scale,alpha etc) of a class. Whenever one of those values changes, they will dispatch a custom event.Especially with hundreds of items at once, this is likely to affect performance,especially on items that are constantly moving.Will Events that are never listened to affect the performance anything? Is it mainly all the different listener functions that are what slow down?Would this make any difference performance wise? (Mainly referring to the "hasEventListener" check)

Code:
public override function set x(new_x:Number)
{

[code]......

View 1 Replies

Actionscript 2.0 :: FLV Fps Versus Flash Fps

Jul 14, 2011

-FPS between FLV and Flash file.If I load an external FLV file (24fps) into Flash file(30fps), then the FLV file will be played by 24fps or 30fps?

View 6 Replies

ActionScript 2.0 :: Colors Web: Mac Versus Pc?

Feb 5, 2006

I'm working on a Mac. Now I made a site and when I compare colors on pc I get a huge difference:s. My green grey looks like it's black. How do you manage to get the colors wright on both platforms? The calibration of my screen is perfect for print.

View 1 Replies

ActionScript 3.0 :: Flash FPS Lag In MAC Versus PC?

Oct 27, 2011

I'm working on a new portfolio, full flash website for myself and so far I've been working on my Macbook Pro almost entirely. The website is somewhat heavy in graphics/animation however nothing too big, all pages are around 500kb or less. Running the website on my MAC in any browser it looks perfect, the animation runs smooth, everything goes great. However, when I try to run the same website on my PC which is pretty good, the whole website feels a little bit choppy and laggy and I'm not sure why. It feels like it chokes for 1/4th of a second every like 2-3 seconds, lower FPS basically.

View 11 Replies

Media Server :: FMS 2.0 Versus FMSS 3.0?

Jun 22, 2009

I have an application that I support but did not create.  I need to test it on FMSS 3.0 but the developer version has both Streaming and Interactive Server enabled.  Is there any way to disable the Interactive Server in the Developer Edition so I can confirm the application works on Streaming Server without influence from Interactive Server?  The application works on the development server but when I move it to the production Streaming Server, it does not respond the same.

View 10 Replies

Flex :: Robotlegs Versus Parsley?

Jun 9, 2010

I am planning to start a new project in as3 and I want Dependency Injection in the project. I found that parsley and Robotlegs are two popular frameworks for implementing DI in AS3. Which is the best one among these two?

My main requirements are

lightweight
minimal learning
extensive documentation and active helping community

View 4 Replies

Flex :: DTO / VO Versus Presentation Model

May 5, 2011

In Flex world, is DTO / VO same as Presentation Model?

View 2 Replies

ActionScript 2.0 :: Delegate Versus Instance?

Aug 14, 2007

when i'm coding directly on the timeline, i usually create a var like this:

Code:
var home:MovieClip = this;

so i always have something to reference the main timeline's scope. how could i do this in a class? delegate.create gets a little confusing.

i tried a few things like the following:

Code:
class com.myClass
{
public var className:String = "myClass";
public static var version:String = "0.0.1";

[code]...

of course this is redundant because it'll scope just fine as parseNews();, but i'm just wondering why it's letting me scope it like this here and not in the onLoad declaration?

View 6 Replies

ActionScript 3.0 :: FPS Versus Choppy Animation?

Mar 15, 2009

I'm animating various squares that needs to move "smoothly" on the screen.I've tried with the basic Tween and with TweenLite at 30 and 60 fps and the animation still choppy while at 90 fps looks better.

View 4 Replies

ActionScript 3.0 :: DefaultTextFormat Versus SetTextFormat?

Jun 29, 2009

Sometimes one works while the other doesn't, and vice versa.

View 2 Replies

ActionScript 2.0 :: SWF Versus HTML Scrollbar?

Jun 15, 2010

I have an AS2 .swf file called �sample.swf� This �sample.swf� contains a proportionally resizable background image. An external .swf file �content.swf� loads on top of it. The size of �content.swf� is 900x600 px and it is positioned to the absolute center (x and y) of the stage at all times.

So basically you open the page in a browser and resize it, the background image resizes as well and keeps its proportions and the content always stays in the absolute center regardless of the size of the browser. Here�s my problem, when I resize my browser to smaller than the content size (900x600), the content gets cut off. So what I want is to activate the scrollbars whenever the browser size goes under 900x600 in either directions (x,y) You tell me if it�s possible. I am open to other solutions as well.

Here�s my html code.

HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7" />

[code]....

View 1 Replies

ActionScript 3.0 :: Cookies Versus SharedObject

Dec 15, 2010

So I'm working on a as3 site that allows for users to signup/login, and I'm torn between using cookies vs SharedObjects to remember login info, I've been googling about it and I find a lot of people are super paranoid about LSOs, so maybe I should just go the regular cookie route?

View 10 Replies







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