Bytes Used By Actionscript
Does anybody know how much size (as in bits and bytes) is taken up by actionscript? Is it the same as generic text, which I think is something like a character is 8 bits(1 byte)? Thanks
FlashKit > Flash Help > Flash General Help
Posted on: 08-02-2004, 06:45 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
ActionScript 2.0 Classes Bytes
My SWF is unusually large, so I've done a size report - but notice there are rather a lot of bytes attributed to "Actionscript 2.0 Classes". How can I reduce this?
Code:
ActionScript Bytes Location
------------------ --------
246760 ActionScript 2.0 Classes
Never seen this before!
Get Bytes Loaded And Bytes Total When Loading A JPG From A Different Domain
im probably better posting this here...
I have a online photo album but im likely to run out of server space for my images so i load pictures from different servers.
When ever i load in an image i have a progress bar that shows the bytes loaded and bytes total properties of that image.
Now if i load in an image that exists on the same server as the photo album swf then my progress bar works fine and it gets the bytes loaded and bytes total of that image, but if i load an image that is on a different server than the album then it doesnt get the bytes loaded or total, even though the image does load.
Is this part of macromedias security issues, what are macromedias security issues on this topic?
Any ideas round this?
I also found that the onData event for a movie clip doesnt work when your loading an image from a different server, but it does if you load an image from the same server as the swf. I got round this by checking if the height of the MC where the image was loading had changed, if it had then the image had loaded in.
cheers
Can You Limit How Many Bytes A Movie Loads With Actionscript?
Hello i have just finished creating a flash faq that im going to use on eBay on my soon to list eBay listings in a couple of days. Now this movie is 309k. i have put two scenes in the movie the first which just stops the movie at frame 1 and displays a background and a button to go to the faq section which is in scene 2.
now can some one tell me if when you initially load this swf the web page will proceed to just load the entire file or will it only load say 20k which i think is all the information contained in frame 1 until i attempt to view the rest of the movie which will then make the page load the rest of it.????????
I basically want the listing to only load what is necessary to display the the first frame and then when the user clicks on the button to view the rest of it then the movie will load the bulk of the file.
i have put a pre loader in at the beginning of the second scene but im not sure if it is just loading all the content at first or if it is waiting to go to the second scene to start loading the bulk of the data.
If im doing this wrong is there a way to make the flash movie only load what it needs for frame one and then when you click to go on then it will proceed to load all the rest of the data.
Please view the swf here and tell me if it loads the data at first or waits until going to the second scene.
http://www.intense.uk.com/ebay/virtualebay.htm
thanks alot
Get Bytes Loaded And Bytes Total When Loading A JP
I have a online photo album but im likely to run out of server space for my images so i load pictures from different servers.
When ever i load in an image i have a progress bar that shows the bytes loaded and bytes total properties of that image.
Now if i load in an image that exists on the same server as the photo album swf then my progress bar works fine and it gets the bytes loaded and bytes total of that image, but if i load an image that is on a different server than the album then it doesnt get the bytes loaded or total, even though the image does load.
Is this part of macromedias security issues, what are macromedias security issues on this topic?
Any ideas round this?
I also found that the onData event for a movie clip doesnt work when your loading an image from a different server, but it does if you load an image from the same server as the swf. I got round this by checking if the height of the MC where the image was loading had changed, if it had then the image had loaded in.
cheers
Bytes
could anybody give me some code for displaying the total bytes of a movie and the loaded bytes of a movie in two variables?
myvar1?
myvar2?
Help With Converting Bytes To KB's
Hey guys,
Does anyone know how I convert the following, so it gives me an output of Kilobytes with no decimals?
cache = _root.getBytesLoaded()+" Bytes";
I have tried:
cache = _root.getBytesLoaded()/1024 +" KB";
but it adds a bunch of decimals as well.
Thanks in advance,
:: ampdeck
BYTES LOADED
_root.getBytesLoaded()
you all know this is usually used for preloaders
but the thing is i want to set up preloaded, but the thing i want to do is i want it to be set like
_root.getBytesLoaded()= 355000
like this is 350 kb so that it goes on after that amount of bytes loade....so how to do that??
Bytes Per Frame
how can I determine the number of bytes a specific frame has? I know how to get the total bytes for a movie, but that won't help me since I will need to determine the bytes for a certain range of frames ( i.e. 1-100 only)..
I also need to know how to determine the number of bytes that exist in an external movie... I would like to PRELOAD some external movies, but also like to display the percnt loaded, based on the bytes.....
TIA
Bytes Loaded
Because my intro loaded too slow I wanted to make a preloader.
Not a bar preloader but a summary of the bytes loaded. I want to have the following details:
Bytes loaded: ...
Kilobytes loaded: ...
Total kilobytes: ...
Percentage loaded: ...
Can someone help me out, or tell me which code I needed?
Kind regards,
Philippe
Lose Bytes Now Ask Me How
Wanna to optimize your swf content ? Get rid of unnecessary swf elements that wont effect the quality.
Find the Flash Optimizer here:www.show-kit.com/flash-optimizer
Music Bytes
Where can one find music bytes to use with Flash?
Thanks
Ecinele
Preloader With Bytes
Hi,
Is there any way to make a preloader in Flash4, that shows bytes, as in version 5?
Thanks,
Marcelo
Round Bytes
Post Preview:
for a preloader how do you round the bytes loaded to the nearest thousanth. my works, but for example displays 34.445453(to forever) when i want it to show 34.445
the code im using is
onClipEvent (load) {
_root.stop();
}
onClipEvent (enterFrame) {
var totalk = _root.getBytesTotal()/550;
var loadedk = _root.getBytesLoaded()/550;
var percent = Math.round((loadedk/totalk)*100);
if (loadedk<550) {
_parent.btxt = totalk;
}
if (loadedk<550) {
_parent.btxt = loadedk add "k";
}
if (percent<100) {
_parent.ptxt = percent add "%";
} else {
_root.play();
}
}
Get Bytes Loaded
Hi guys:
I'm making a preloader and I want to show the bytes or KB loaded of a movie. I found a MC method ._getBytesloaded, but it works apparently only with a MC or a movie loaded in different level than 0 or root.
I want to show the bytes or kb loaded of the complete swf file (_root, I say).
Any scripts for getting this?
Any suggestions or ideas.
I'll appreciate your feedback.
...
Bytes Per Second Preloader
Searched FK, couldnt find a thread on how to make a preloader that calculates bytes per second & how many seconds till done preloading.
Does anyone have any code for this?
All Bytes Loaded ?
hi,
simple question (i guess):
When I use getBytesLoaded and getBytesTotal:
Are all bytes of the complete movie loaded (all scenes), or just the bytes from the scene whith the AS in it?
Thankyou,
Maaike
Determining Bytes
I want to import a jpg through:
loadMovie("video1.jpg", "_root.mymovie");
Is it possible to determine the byte size of the jpg before loading it??
Many Bytes In First Frame
Hi all,
I have a swf that has about 70k of actionscript bytes in
the first frame. This means that if I put a preloader in
the first frame it won't show up att all until about
80% is done. How can i "move" the actionscript code
(classes mostly i suppose take the space) to the second
frame or at least make the preloader work?
(Also I cannot use a "wrapper" movie that loads the movie
in a movieclip because i need to catch rightclicks and
attach context menues which won't work with nestled movieclips)
There must be a common solution to this since a LOT of VERY
flashy movies on the web must contain lots of actionscript and
still their preloaders start at 1% as should be.
Anyone?
/ Thanks
Get Bytes Per Frame?
Does anyone know if it's possible to monitor the download process frame by frame? Like getBytesLoaded but per frame?
Reading In Bytes... Um I Think
Is there anyway way of reading a web page and displaying it in flash... like read a page full of stats and then display only some of em
thanks
Get Total Bytes
I am trying to get a movie to advance to scene 2 once the MC on scene 1 has finished playing any ideas?
I thought I could try using get total bytes but to be honest I am a relative beginner so all attempts at getting this to work have failed miserably.
Thanking you in advance.
Bytes To Image
Here is my question.
Is it possible to convert a byte[] to image in actionscript 3 ???
I've done this already in other languages (like C#) but i don't know if it's possible.
I'm working in adobe flex 3 right now
Thx for your help
Bytes Loaded
Hi,
I have a part in my site with a hudge amount kb's so I don't want to load it all in one part, is use this code. How can I change it to "bytes_total" to a framenumber.
bytes_loaded = Math.round(_root.getBytesLoaded()/1000);
bytes_total = Math.round(_root.getBytesTotal()/1000);
_root.loadBar._width = bytes_loaded/bytes_total*405;
if (bytes_loaded == bytes_total) {
gotoAndPlay(14);
delete bytes_loaded;
delete bytes_total;
}
Thanx
Getting Bytes From Loaded MCs
am wondering if it is possible to have the framework of a preloader in the _root level.
if a movieclip is loaded (let's say an external MC) can the preloader (on _root) display progress/percentage of the MC currently being loaded? or does the preloader have to exist IN the loaded movie?
hope this makes sense. It is driving me crazy, but then there is always someone better than me....at actionscript.
cheers.
Get Bytes From 2nd Scene Even Possible?
hi,
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?
If Bytes Loaded.
I´m doind I small slideshow.
The pictures will be loaded apart, and will have a preloader.
I want to make the slideshow to play only after all the movieclip (pictures) are fully loaded on to the main movie.
How do I do that?
thanks
Getting The Bytes Loaded
I want to load a movie in to another movie. In the host movie, I need to have a preloader.
How can I get the total bytes loaded using getByesloaded() command? I want to get the total bytes loaded including the host movie & the loading movie.
Please help.
Get Bytes Loaded
I have this code but the getbytesloaded doesnt work.
Do you have any ideas?
Here is the code
_root.activate.linksbut.onRelease = function () {
_root.links.gotoAndPlay (4);
_root.empty.createEmptyMovieClip("target_mc", 1);
_root.empty.target_mc.loadMovie("links.swf");
_root.prel.gotoAndPlay (2);
_root.prel.transferIndicator.gotoAndStop("on");
}
this.onEnterFrame = function(){
percent = (_root.empty.target_mc.getBytesLoaded()/_root.empty.target_mc.getBytesTotal())*100;
_root.prel.bytesLoaded = _root.empty.target_mc.getBytesLoaded();
_root.prel.bytesTotal = _root.empty.target_mc.getBytesTotal();
if(percent == 100){
_root.prel.transferIndicator.gotoAndStop("off");
this.onEnterFrame = undefined;
}
}
function preload(theClip) {
if (_root.prel.transferIndicator._currentframe != 2) {
_root.prel.transferIndicator.gotoAndStop("on");
}
if (theClip.getBytesTotal() > 0 && theClip.getBytesLoaded() == theClip.getBytesTotal()) {
_root.prel.transferIndicator.gotoAndStop("off");
}
_root.prel.bytesLoaded = theClip.getBytesLoaded();
_root.prel.bytesTotal = theClip.getBytesTotal();
}
Thanks
Preloaders Using Bytes (flash4)
How am I meant to make a preloader that uses how much bytes the person has downloaded instead of frames?
I only have flash 4, so I have no idea how to do it.
Getting The Bytes Over Just A MC Not The Compleet Flashmovie
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes/1000);
totalkbytes = Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
ok ok this is only getting the bytes over de compleet flashmovie but how do i get it just over a movieclip I did this :
loadedbytes = _root.intro.getBytesLoaded();
totalbytes = _root.intro.getBytesTotal();
but it doesn't work so please help me
Getting The Bytes Loaded For A Movieclip
I have a main movie that loads various other movieclips that are one frame and contain a single picture. These picture/movieclips are loaded into a target location. I'm trying to create a progress indicator when loading these separate pictures but it doesn't seem to return the bytes loaded information until the entire picture is loaded.
Anyone have any similar problems? Solutions?
Bytes Loaded From Loadmovie 2
This is the pre-loader routine:
if (_root.holder.getBytesLoaded()<_root.holder.getByt esTotal()) {
_root.progress = Math.round ( ((_root.holder.getBytesLoaded()/_root.holder.getBytesTotal())*100));
if (_root.progress >= 100) {
_root.progress = "00";
}
gotoAndPlay (_currentframe -1);
} else {
gotoAndStop ("idle");
}
When I place this in a movieclip that is loaded by another movieclip, it works fine and the variable 'progress' advances normally. However, when I place this EXACT routine in a loop on the _root timeline, the progress variable remains at 0 until the clip is completely loaded, then it returns 100. It appears to be a limitation within Flash 5. Does anyone know of a solution that will allow this routine to reside in the _root movieclip and retrieve the bytesloaded properly from a loading movieclip?
Bytes Loaded PRELOADER?
Hi all,
I have created a preloader using the ifFramesLoaded method. however some of the MC's that are on the frames that are being checked aren't being loaded yet and the movie is proceding and it is delaying. I was told that i should check the bytes are loaded instead. sounds good to me, but i dont know the exact script to do that. is it ifBytesLoaded???
Please help.
Thanks in advance.
dwyermm7
Variable Help If Bytes Loaded...
why does this not work
--------------------------------------------------------
onClipEvent (load) {
kb = " ";
}
onClipEvent (enterFrame) {
kb = _root.getBytesLoaded()/1000+" "+"Kb";
total = _root.getBytesTotal()/1000+" "+"Kb";
if (kb = total) {
gotoAndPlay (2);
}
}
--------------------------------------------------------
i want the code to work so if the text box (dynamic) kb is equaled to total (which is also dynamic) to make the main movie goto frame 2
why wont it???
--DarkFireball
Preload Half My Bytes
I would like to play my movie after half of my bytes have been loaded. Can anyone think of why this script won't work?
onClipEvent (enterFrame) {
gotoAndStop (int(_parent.getBytesLoaded()*100/(_parent.getBytesTotal()/2)));
if (_parent.getBytesTotal()/2 == _parent.getBytesLoaded()) {
_parent.gotoAndPlay(2);
}
}
Bytes Loaded Preloader
how do i make a preloader that says byte loaded?
like the one at http://www.geneticshoes.com
thanks for the help
-largefry
Image Pre Loader/Bytes?
Hi every one and thanx for your help
I am working on a photogallery and need to have a pre loader that displays the status of the load when the image loads into the blank movie clip in flash. I have done this in flash 5, fine when loading in a nother swf file using getBytesLoaded and getBytesTotal and that is how I have been trying to do it with a jpg file that I am loading in but it only seams to return the bytes of the blank movie clip that I am loading the image into and not the bytes of the jpg file. any sugestions would be great.
thanx dave
[Edited by daj on 08-21-2002 at 02:55 PM]
Too Many Bytes For Simple Actions
hy to everyone.
i'm doing a percentage preloader.i've looked at some examples from "flashkit movies" but the problem is that every one of them are having like 20-30 kb in the first frame where actualy is just a script.
does anyone has some "optimized script" for avoiding this
"blank screen" couse it's really annoing.you are doing a preloader but you shoul do a preloader for the preloader itself :L)
THANX
Get Bytes Loaded Blows
I have 3 scenes,
In the first scene I want to use the getbytesloaded data to check when 30000 bytes have loaded, because from the test report I found this is the point where the 2nd scene has finished loading. Once the second scene has loaded I want to go to it, letting the 3rd scene load whilst the user plays with the 2nd scene, my code is as follows:
_root.getBytesLoaded();
if (_root.getBytesLoaded() >= 30000){
gotoAndPlay("Scene2",1)
}
gotoAndplay(1)
So it should loop back to the first frame and keep testing until more than 30000 bytes have loaded
But it simply goes back to frame 1 and keeps looping, it never figures out if more than 30000 has loaded (which the 'view streaming' window says it has).
I can't see what the problem is. Any help would be totally appreciated.
Bytes-based Preloader
The component that you can get off of Macromedia, through the Flash exchange, is called bytes-based preloader. I can't seem to get it to work. Any ideas?
Preloading X Number Of Bytes
I have a 600kb movie and I need the movie to play when 300 kb has loaded.
I have this script:
ifFrameLoaded (n) {
gotoAndPlay (n);}
I need to change the frame loaded event to bytes loaded. How do I do this?
Any help is appreciated.
Problem With Checking Bytes
Hi,
I want to check if the last image of 139 (small) images has loaded. I want to start checking when the final image is loading and then set the interval through the offset variable.
Somehow the function is not executed.
// MAKE MAIN LAY-OUT
// make holders
// make row
for (i=0; i<row; i++){
// make col
for (j=0; j<col; j++){
_root.createEmptyMovieClip("holder"+aantal, aantal);
// properties
_root["holder"+aantal]._x = i*39;
_root["holder"+aantal]._y = j*80;
choise = pics_array.splice(random(pics_array.length),1)[0];
_root["holder"+aantal].loadMovie("verschaal&dump.php?beeld="+choise, POST);
_root.aantal++;
// all pics are loaded
if (_root.aantal == 139){
function check_bytes(){
load_amount = Math.floor(_root.holder139.getBytesLoaded()/1024);
total = Math.floor(_root.holder139.getBytesTotal()/1024);
trace("alle bytes"+total);
// pic is loaded
if (total>4 && load_amount == total) {
// set fast offset
_root.offset = 400;
// set offset for alpha and volume change
_root.change_offset = 100/(sleep_time/offset);
// remove check_bytes interval
clearInterval(load_check_id);
}
};
load_check_id = setInterval(check_bytes, 50);
}
//
trace(offset);
}
}
What did I miss?
Thanks in advance for your time and effort, Danielle.
Round Bytes Loaded
for a preloader how do you round the bytes loaded to the nearest thousanth. my works, but for example displays 34.445453(to forever) when i want it to show 34.445
the code im using is
onClipEvent (load) {
_root.stop();
}
onClipEvent (enterFrame) {
var totalk = _root.getBytesTotal()/550;
var loadedk = _root.getBytesLoaded()/550;
var percent = Math.round((loadedk/totalk)*100);
if (loadedk<550) {
_parent.btxt = totalk;
}
if (loadedk<550) {
_parent.btxt = loadedk add "k";
}
if (percent<100) {
_parent.ptxt = percent add "%";
} else {
_root.play();
}
}
Getting Bytes Loaded In Root.
Hello,
I'm trying to read the bytes loaded of a picture in the root.
the command I'm using is: _root.picture+number.getBytesLoaded()
When I just give the command: _root.picture1.getBytesLoaded()
then it works fine.
I want to load more than one picture thats why I would like to use a loop for that.
Can somebody help me?
Thanks in Advance.
Edwin
Determine Datasize (bytes)
Hey,
does anybody knows if there is a way to determine datasize in bytes? The deal is that i have an array and need find out it's byte size before i send it of. Thanks
Preloader Help But Not 100% Of Bytes Loaded
Happy holidays all...
I'm posting this here and there so if you've read this in another guise, shed some light for me please or ignore, whichever is a better fit...
I've got a bit of free time and wonder if someone might give me a little help with a flash site I'm working on with a bunch of video clips. I have each video converted to a movie clip that's nested inside of a button so it appears only on the rollover state. Right now I have published each one seperately with it's own preloader and I've set them all into an html page that's about 1500 wide that the viewer moves through with a horizontal scrollbar. Each video clip is about 600 kb. and I have things set up linearly so that the viewer will experience only one video at a time -one after another. The problem I have is that I have about ten such clips and worry about download time. It seems to work o.k. with the video clips all as seperate .swf files but it makes it impossible for me to script actions between clips because everything is broken up on the html page.
What I would like to know is how I can put all the mc's into one flash movie and somehow create a preloader where instead of waiting for 100% of the totalBytes to load before the first frame of the movie plays, the wait is say, only for 25% of the total Bytes Loaded?
Essentially, I want to have a preloader that will run until the title, initial sounds, and the first video clip load. Thereafter, I would like each successive video to load while the previous one is playing, or some such arrangement that avoids the viewer waiting for a clip to load and capitalizes on the time spent watching a clip that is already loaded. This way I can get the show on without having a ten minute preloader. I don't want the videos to stream within a little quicktime player but for everything to be embedded in the actual finished .swf file.
I have considered loading the videos into empty mc's one at a time with the loadMovie action but could use a little advise on the best way to design this -I know nothing about using levels, could there be some solution using levels?
Please help...
llyfre
Bytes Loaded Preloader, Please Help
Ok, so I've set up a preloader in Flash MX using the getbytesloaded controls. Here is the code I have:
onClipEvent (load) {
//set the status bar width to zero;
_xscale = 0;
}
onClipEvent (enterFrame) {
//calculate the load as a percentage;
counter = math.floor(_parent.getBytesLoaded()/_parent.getBytesTotal()*100);
_parent.counterpercent = counter+"%";
//if loaded, play;
if (counter>=100) {
gotoAndPlay("Scene 1", 1);
} else {
//if not loaded, set the status bar width;
_xscale = counter;
}
}
I want the preloader to load 50% of the movie and then have it start playing while the rest downloads... Anyone know how I can do this?? TIA!
Animated Maskpreload Using Get Bytes?
hey say i have an animated mask effect revealing an image, it goes out in a circular motion. using get bytes loaded how do i make a preloader....
i mean would i make it go one frame for every byte or just slowly tween as it loads?
help is awsome!
|