ActionScript 2.0 :: Display The Bytes (or Kilobytes) Per Second In Flash?
Apr 16, 2003is there any way to display the bytes (or kilobytes) per second in flash. (for use in a preloader)
View 7 Repliesis there any way to display the bytes (or kilobytes) per second in flash. (for use in a preloader)
View 7 RepliesWhat I'm trying to do is get the total bytes of all the files I want to load and display the percentage loaded of total bytes and bytes loaded of all the files. Its a slideshow so i want all the files loaded and then it will play. I've looked at bulk-loader but it wasn't what I needed. The image are loaded from an xml file. I think I would need to create an Array and then find out the total bytes but I don't know how to reference the loader in the progress.
[Code]....
Okay, my preloader has some code in it to display the percentage of a 6 MB movie and I want to display the proper file size such as 6.53MB instead of 6987362892 Bytes. Here is what i have so far and it's not working. [AS]percent.text = Math.round((getBytesLoaded()/getBytesTotal()) * 100) + '% of ' + Math.round(getBytesTotal())/1024 + 'kb';[/AS] The red code is where I'm having my problems.
View 2 RepliesMy preloader has some code in it to display the percentage of a 6 MB movie and I want to display the proper file size such as 6.53MB instead of 6987362892 Bytes. Here is what i have so far and it's not working.[code]...
View 2 Replieshow can I get the bytes loaded and bytes total, from a JPG i'm loading using loadMovie? the point it's making a loadbar
Code:
image.loadMovie("pic.jpg");
I want to send data of bytes from .net server to flash client. i have created a simple .net tcp server but what code would i need to create the flash tcp client in order to receive bytes NOT string or xml, just bytes?
View 1 RepliesHow can I get the size of a ByteArray in bytes? I want to know, to see the difference in data transferred before and after the compression of a string (via ByteArray).
View 1 RepliesI am currently having a problem with Flash CS5. I am trying to link a sound file to my Flash game without having to put it on the stage. It would play when my character got hit by an enemy. The problem is is that when I go to edit the properties, all of the options except to play the sample are all blanked out. This is currently driving me insane as I have done everything I could think of to get around this.
View 1 RepliesAny way to send bytes via bluetooth between two identical laptops in flash as3?
View 1 RepliesI have a legacy file format that contains sounds embedded in it (in various encodings). I would like to be able to play these sounds in Flash (Air?) by reading the sound bytes out of the file and instantiating a Sound object with them.
If the sound is unencoded (e.g., raw pcm), I've found that I can use the new flex 4 SampleDataEvent.SAMPLE_DATA event to play the sound.
However, if the sound is encoded (e.g., mp3), then I'm at a loss. The sound expected by SampleDataEvent.SAMPLE_DATA has to be raw pcm. From what I've seen, encoded Sounds can only be instantiated by [Embed]ing them, or by using a URLRequest with Sound.load().
Hi guys I get this coercion error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Shape@41754601 to flash.display.
When I create an instance of a MovieClip from my library:
var childmc:ChipEasy = new ChipEasy(); Canvas.Map.Tiles.addChild(childmc);
When I try to access all the children like: for (var i:int=0; i<Canvas.Map.Tiles.numChildren-1; i++){
var mc:MovieClip = Canvas.Map.Tiles.getChildAt(i);
}
I'm currently working on editing the pages on my website but for some reason these errors are apearing. Also some of the text that should be on the .swf disapears. Any help will be apreciated
This is error I am getting:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::SimpleButton@40692fa1 to flash.display.MovieClip.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
[code].....
I would like to know is there any limitations in flash textarea like the number of lines it can have or the number of bytes it can have. iam opening a text file using php in textarea, where all the contents of the files are not getting loaded in the textarea. If it is there then how to increase its size, is it same thing in flex?
View 1 Repliesi have a Tweener question....here is the lib..so here is the error i get?
## [Tweener] Error: [object Loader] raised an error while executing the 'onComplete'handler.
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Loader@2035d1c1 to flash.display.MovieClip.[code].....
and here is why:
Code:
import caurina.transitions.*;[code]....
i tryed to use just the loaders...not working..its just for mcs i think...
When using Loader class to load display objects (bitmaps, SWFs...) from remote URLs, is there any way for them to be instantiated (referenced as we know, by Loader::content property) as some user specified valid subclass? For example if I had a class that extended a Bitmap, is there any way for the loaded object to be of this class?
View 9 RepliesI have tried to fix this error but I just cant get it to work.
View 2 RepliesIs there any way to display flash objects which are outside the display area when flash is embeded in HTML
The reason i ask is my current project has a rotating + enlarging effect which is largely dynamic so sometimes an object may clip the edge of the stage areathis looks messy but i dont want to increase the stage area to cover the largest possible area any object could enter because most of the time the objects are at the center and small so i would end up with a lot of white space
I have a list containing display objects from throughout the application (insertion order). I want to process the list either top-down (parent, child) or bottom up (child, parent). The only requirement is that either a parent is processed before any child or vice versa a child before its parent. What is a good approach? This question is not about sorting a list. It's about retrieving the depth of a particular display object.
Example
Display list:
A (root)
B1
C1
C2
D1
B2
......
My list:
list = [E1, F4, A, B2, B1, C3, ..., N9, N8]
Bottom-up:
N9, N8, F4, E1, C3, B2, B1, A
Top-down:
A, B2, B1, C3, E1, F4, N9, N8
Does not matter if N9 before N8 or N8 before N9. Important is that any N is before M (first run) or any M before its children N* (second run).
I am streaming flv file trough vlc media player running as http streaming server. So I am able to get the bytes but how to decode them?
Shoud I take float from the URLStream with readFloat() or plain bytes with readBytes()?
so i've tried a few different preloaders but it seems that the only one that works with what i'm doing is a preloader in a seperate scene.
my question: Is there a way to grab the bytes loaded and total from the main scene and show them in the preloader scene?
Is it possible in flash using as3 that we read first few bytes from a file and calculate MD5 of it ?
View 4 RepliesI have very large pngs (20000x20000) that have sprites of an animation.
I cant load the whole file as a bitmap because it exceeds the maximum image size that flash allows.
Is there a way to load the file as bytes, and then parse it into several small bitmapdatas that each contain one sprite of the animation?
i have attached the fla and xml file. i need to display the html embeded in the xml and display in the flash.
View 0 RepliesI need to get the density and units from loaded images, both jpg and png. I am able to get the data, but the bytes do not seem to be where they should, according to [URL]..rchange_Format units, xDensity and yDensity should be proceed one another, but I get an unknown value between units and xDensity. Am I reading the JFIF specs wrong or am I doing somthing wrong with the byteArray? Same with pHYs data in pngs, I can get the data but it's not where I expect it according to
[Code]...
Edit: Forgot to add, I am reading the first 100 bytes of the loaderInfo, picked this number arbitrarily. Any suggestions on a safe length, long enough to ensure I can retrieve the metadata but short enough to keep it quick.
I was wondering if there is any way to get the sound bytes froma microphone and apply it to lee brimelow's tutorial on sond spectrum?[url]...
View 4 RepliesMy script does not show total bytes, I do not know where did i mistake[code]...
View 1 RepliesI have a utility function that will display a filesize in an appropriate form like Windows Explorer does, i.e; convert it to nearest KB, MB, GB etc. I wanted to know if the code that i wrote is correct, and if it can be made simpler.The function that i wrote is as follows :
public static function formatFileSize(bytes:int):String
{
if(bytes < 1024)
[code].....
I want to count how many bytes the text in a textfield are. Similar to the lenB in asp.net. I'm trying:
userText.text.ByteArray.length
It isn't working, perhaps I using it wrong. The reason I want it is so that multi byte characters will return as 3 bytes but spaces and numbers will still be 1 byte.
I get: 1119: Access of possibly undefined property ByteArray through a reference with static type flash.text:TextField.
I have: import flash.utils.ByteArray;
I have a program that load a lot of images, but when there too much loading going on, it freezes and jerks the hell out of my program. I have tried a lot of tracing from beginning to the end of the loading process, which things looks fine and behaves as I expected. However, every time the program jerks it outputs couple hundreds of these "[SWF] - xxx bytes after decompression" message in my console (almost all at once), and it came out of nowhere, when I tried to bracket my image loading progress with trace statements like putting a starting trace and a ending trace, these messages does not appear inside, its just appears randomly. So, my question is : does anybody know how and when does this messages occurs exactly?
View 0 Repliesso i have created a preloader to load pictures... and i created a button to stop the preloader if the user changed his mind and wanted to change the picturethe problem is that each time i click a picture and cancel it, the bytes remain in memory, so if I click on another picture very fast both the first picture's bytes and second picture's bytes get accumulated and load together, which means much much slower loadingso how can i delete the bytes loaded of the image if i click the cancel button?
ActionScript Code:
function onclsLdrclick(e:MouseEvent):void {
l.contentLoaderInfo.removeEventListener(Event.COMPLETE, onImgComp);
[code].....