ActionScript 2.0 :: GetBytesTotal For LoadVariables?

Dec 11, 2003

I'm doing my portfolio in FlashMX using Actionscript. Everything in that sites has a preloader.

Anyway, in the actual portfolio section I use variables form a .txt to load each work (that way I can add in a more easy way new content). The .txt contains location of images, text shown, titel, and some other variables. Each .txt is aprox. 350bytes.

The problem is that if the variables aren't loaded fast enough the content of each work is shown wrong.

Is there a way to calculate getBytesTotal() for variables ?

View 11 Replies


Similar Posts:


Actionscript 2.0 :: To Stop Preloader From GetBytesTotal?

Feb 20, 2009

I currently have my preloader set to getBytesloaded getBytesTotal (etc.), before it plays the 1st frame of the entire Flash file, but I only want the preloader to load the first (let's say) 500 frames, then play them accordingly.

View 2 Replies

ActionScript 1/2 :: Can't Get GetBytesLoaded And GetBytesTotal To Work Properly

Jul 22, 2009

I am using Flash CS3 with ActionScript 2 and am having a problem getting getBytesLoaded and getBytesTotal to work properly. Probably I am taking the reading in the wrong spot, but I can't figure out where I should be doing it. The code will read an xml file which contains pictures and url links to where I want each picture to go, and then loads and shows a picture for 3 seconds, then goes on to the next one. I am trying to show the preloader bar "LOADING" by adjusting the _xscale as a percentage of BytesLoaded/BytesTotal. The code should work, but my getBytesLoaded and getBytesTotal is either showing 0% or 100% and nothing in between. Here is my code and I have left some of my trace statements in the code below as well. The problem occurs in the this.onEnterFrame = function() which is about half way thru the code:

[Code]...

View 6 Replies

ActionScript 2.0 :: GetBytesTotal() Method Of The Sound Object?

Sep 13, 2008

What's the purpose of the getBytesTotal() method of the Sound object since it returns the same value as the getBytesLoaded() method? Note that I mean streaming mode here.

View 7 Replies

ActionScript 2.0 :: GetBytesTotal For Sound File Undefined?

Jul 23, 2010

Why do my preloaders never work? I'm looking to develop a system which reads mp3 files from xml and loads them all with loadSound during preloading phase, the idea is to add all the totalBytes into one var so I can display one percentage for preloading all the files. However, no matter what I try Sound instances getBytesTotal() methods always return undefined when swf is run from host, even though I can hear sounds playing when they load. Of course in test movie everything works fine. In this method of my PreloadManager class I wait for sounds to load:

Code:
public static function waitForSounds() {
PreloadManager.timeline.debug.text += "
waitForSounds()" ;

[Code]....

View 1 Replies

ActionScript 2.0 :: MovieClip.getBytesTotal() Gives Unusual Values?

Dec 13, 2010

I am dynamically loading an image into a movieclip using a preloader but cannot successfully calculate the percent loaded since I cannot get the getBytesTotal() method to work. I understand why it is not printing the percentage but what I do not understand is how getBytesTotal is behaving. Here is a segment of my output. l means loaded and t means total.

Code:
l = 0
t = -1

[code]......

View 9 Replies

ActionScript 2.0 :: GetBytesTotal() From An Externally Loading Picture?

May 31, 2005

I'm using this code to load a .jpg into a movieclip with the instance name picholderCode:_root.picholder.loadMovie("pic.jpg");How do I get getBytesTotal() or getBytesLoaded() to work with this picture? I've tried to get the total and loaded this way:

Code:
_root.picholder.getBytesLoaded()
But it doesn't seem to work

[code]....

View 11 Replies

ActionScript 2.0 :: Different GetBytesTotal Behavior On Images Created With GD In PHP?

May 13, 2008

The XML file of the image list is created from DB and images are fed to flash through script which creates images on the fly with PHPs GD library. Images are shown and browsing through pictures works.The thing not working is the preloader. the loaded bytes are never equal to total bytes so the preloader never gets shown.

When I trace the getBytesTotal inside enterFrame I get two different numbers. First two frames the total bytes equal to 4 then on the other frames function returns the right size value of the file.This issue persist only when I feed the FLASH with GD images. If I pass the normal image file, the preloader works great.

I'm assuming the issue is when GD creates the image the fileSize is uknown. I tried getting the file size of GD created file by caching the created file, checking the filesize and passing it through headers but the preloader still won't work and getBytesTotal still returns 4 before giving the right size...

View 2 Replies

CS3 :: LoadVariables And LoadVariables

Apr 12, 2009

Ok, not sure where my other thread is, unless it needs to be manually approved by the moderators? If so, then my bad for making a 2nd thread.It doesn't exactly work... well when I use preview in CS4, it doesn't give any errors about not finding the file on the URL, I tested a fake URL to see if it would give an error and it did. So it is accessing the file perfectly. The chmod is set to 0777 on the settings.txt file.I don't understand why it's not "working" - all I need to do is view the flash file on site1.com - where the actual flash file is hosted on site2.com - I figured that it wasn't working before was because it was loading the settings.txt file from telltarget("..") - so viewing it on site1.com was searching for settings.txt on site1.com (I think???)That's why I need to get the loadVariables() working with a url so that when I view site1.com with the embedded flash file, that it will show it correctly.

View 2 Replies

ActionScript 2.0 :: LoadVariables()?

Jan 12, 2003

ok. i would like to load a .txt file into a dynamic text box on which i have on the stage.when i did it i went from the C drive, but does it have to be in the library? i honestly have no clue as to what i am doing. unless, should i upload the .txt to my server and use a http:// for the URL? then for target is that the instanse or Variable name for my dynam. text box? and what does the method mean

View 1 Replies

ActionScript 2.0 :: LoadVariables From .txt?

Oct 9, 2004

I am trying to load a variable from a text file named "variable_file.txt"he variable in the file is "var" and I am trying to assign the word "value" hen I run the following code:

Code:
loadVariablesNum("variable_file.txt", 0);
trace(var);

[code].....

View 11 Replies

LoadVariables 'undefined' Error

Aug 6, 2009

I have the following line, which is just a loadVariables:loadVariables("data.txt", _root.fa);This loads a data file, located at the root level, which includes the name of an .mp3 file, which is located in a folder; root/media:&faFile=player1.mp3.And then later I have this line which loads the sound from the .mp3:[code]

View 37 Replies

LoadVariables Undefined Error

Aug 6, 2009

I have the following line, which is just a loadVariables:

Code:

loadVariables("data.txt", _root.fa);

This loads a data file, located at the root level, which includes the name of an .mp3 file, which is located in a folder; root/media:

Code:

&faFile=player1.mp3

And then later I have this line which loads the sound from the .mp3:

Code:

this.sound.loadSound ("media/" + faFile, true);

But when I run this I get:

undefined
Error opening URL 'file:///jeffrey/Downloads/mp3%5Fplayer%5Ffiles%5Fedit/media/undefined'

This is Flash CS4.

View 14 Replies

ActionScript 2.0 :: Loadvariables Works With Txt But Not From Asp?

Oct 28, 2009

I got a big problem. I want to load data from an asp file, but i can't get it work. It says 'undefined when i trace' Only extern text is working.

[Code]...

View 2 Replies

ActionScript 2.0 :: Php And .txt Using LoadVars And LoadVariables?

Feb 15, 2010

I have read a little bit about loadVars and loadVariables, so I am trying to read and write to a .txt on my server. This is my functions: (only Read works, but Send doesn't)

ActionScript Code:
function Load(F, VAR) {
var DATA:LoadVars = new LoadVars();[code]...........

There are no errors or something; but the file is the same after Send();

View 5 Replies

ActionScript 2.0 :: LoadVariables To LoadVars?

Apr 19, 2005

Okay, so ive loaded some data from PHP into a textbox in Flash with loadVariables, but then found out, that loadVariables, havent got a way of checking if everythings loaded. So im gonna use LoadVars instead,This is the old loadVariables code:

Code:
on(rollOver){
loadVariables("document.php", _parent, "POST");

[code].....

View 1 Replies

ActionScript 2.0 :: [FMX04] LoadVariables Need To Be Run Twice

Jan 7, 2006

i'm calling a php file, which is supposed to make an xml file. whenever i call the php file using this syntax, most of the time i get "cannot load file" in the xml loading section, but this updates the xml file.

[code] loadVariables("http://localhost/file.php",this,"POST");[/AS]
but when i do it this way. [code] loadVariables("http://localhost/file.php",NONE,"POST");[/AS]

the "cannot load file" messge doesn't get displayed, and the file loads perfectly, but this doesn't update the xml file.

so everytime i have to first use "this" and then "none".

what can i do so that whenever php is called, it'll update the xml file, and still load in the swf.

View 2 Replies

ActionScript 2.0 :: LoadVariables Only From Server?

Mar 28, 2006

Im developing a game. In some parts, i need to save some info on database (like experience, money, level, ...).

But i cant let people inject code on the server side script (php).

If i send the variables via post, the injector may create a form and send too =(

In php, i've tried to get the referer from where the data came from... without success, from flash, the referer comes null =(

If i make SESSIONs, the injector may enter on the game, after that, he goes to the form to inject the data, the session will not be erased =(

View 3 Replies

ActionScript 2.0 :: LoadVariables From Different Movieclip To Php

Jan 30, 2007

I have a problem with loadVariables from different movieclips, I don't know how to do. I wannt to load loadVariables from 2 mc in to one php script(email.php). My mc's are "send_mc" and "answer_now" Her is only one mc loaded, but I wannt two mc to be loaded.. This is my script, so far...

Code:
buttonS.onRelease = function(){
_root.send_mc.loadVariables("email.php", "POST");
}

View 1 Replies

IDE :: HTML Is Being Passed With LoadVariables

May 12, 2008

i'm trying to send out some input form variables top a php script via loadVariables() and it's working, but the only problem is that flash also sends out all the html font information along with the form data. so instead of getting something like "Name: Phil" the php script gets:[code]is there a way to keep this from happening in flash or do i need to start getting fancy with the php?

View 3 Replies

ActionScript 2.0 :: LoadVariables In A Child?

Sep 7, 2009

have a little flash plugin, which is a form to submit the user's mail address to a database for receiving a newsletter.The flash contains a dynamic textbox where the user enters his mail address, which has the variable-name "u". The code must also send the newslettername (variable "l") and the command (variable "cmd").The code for the submit-button looks like this:[code].....

View 1 Replies

ActionScript 2.0 :: [FMX04]loadVariables Need To Be Run Twice?

Feb 20, 2011

i'm calling a php file, which is supposed to make an xml file. whenever i call the php file using this syntax, most of the time i get "cannot load file" in the xml loading section, but this updates the xml file.[code] loadVariables("http://localhost/file.php",this,"POST");[/AS]but when i do it this way.[code]loadVariables("http://localhost/file.php",NONE,"POST");[/AS]the "cannot load file" messge doesn't get displayed, and the file loads perfectly, but this doesn't update the xml file.so everytime i have to first use "this" and then "none".what am i doing wrong? what can i do so that whenever php is called, it'll update the xml file, and still load in the swf.

View 4 Replies

ActionScript 2.0 :: LoadVariables Is Working Only In Pc

Oct 27, 2003

I'm newbie in AS Flash (and new in this foro) and I have 3 swf.Principal is the first one that loads pliego and this one load textos.I have 3 files txt's and 3 files jpg's by now (_global.tope=2) and All is OK while I'm testing on my pc.When I'm testing on my site, the Dynamic Text doesn't load txt files!The size of biggest file txt are 5 KB

View 6 Replies

ActionScript 2.0 :: Using LoadVars.getBytesLoaded And LoadVars.getBytesTotal?

Sep 1, 2003

Whenever i try to display anything returned by LoadVars.getBytesLoaded or Load....Total, it gives me NaN.

View 14 Replies

ActionScript 3.0 :: LoadVariables Not Loading Within Another Movieclip

Mar 11, 2012

when i load a swf file within another swf file my loadVariables do not show.so basicly i have loadVariables in my as2 movie clip which works fine but hten when i load it within as3 movie clip these loadVariables within the as2 movieclip do not work is there any way of makign this work this is what i used for loading hte variables.[code]

View 9 Replies

ActionScript 2.0 :: Can LoadVariables Load Directories

Feb 19, 2004

someone knows if a directory can be opened using loadVariables and then placed into an array or loop. I know files can be loaded individually, but I want to be able to see all the files using PHP and my .swf file.

View 2 Replies

ActionScript 2.0 :: LoadVariables And Mail Function With Php?

Jul 26, 2004

I'm trying to send email from Flash. The email form is in a movie loaded with loadMovie. When I call the email.php page, it seems to take forever to do its thing and then nothing happens.

I based my script on the flash email form here in the Kirupa Tutorials and I've tried every way of giving the path to my variables - that is, the path to the text fields in the form via _root and _parent. I've tried appending variables the the loadVariables url and just tried posting them. I can't even get any results when I use the print function in the php script. Here is my php script:

PHP Code:

<?php

$name = $HTTP_POST_VARS['name_txt'];
$email = $HTTP_POST_VARS['email1_txt'];
$interest = $HTTP_POST_VARS['interest'];

[Code].....

It seems like my variables aren't reaching the form, but I'm also concerned hat is is taking forever for any data to be returned to the flash movie (I've got an on(data) event on the form).

View 1 Replies

ActionScript 2.0 :: Flash 5 LoadVariables Into Array?

Feb 27, 2003

im using loadVariables to get variables from an asp page

the return string is fine but i cant access variables

so my array is call module and my return string is module[1]=blah&module[2]=blah

in my debugger it shows module and the shows module[1] and module[2] as 2 seperate objects from the array and i cant access the values from module[1] and module[2] even if i rename the to module1 and module2

View 1 Replies

ActionScript 2.0 :: LoadVariables Disables Other Scripts?

Jul 1, 2003

I've got a windows that I can move with the startDrag script. This works just perfectly fine. When I load some text into a textbox inside the mc (window mc) the drag-script isn't working, neither is the close window script. But the text loads just fine. Why is this happening? I haven't changed anything in any of the scripts. If I just delete the loadVariablesNum("info.txt",0); line I can move the windows again.

View 4 Replies

ActionScript 2.0 :: LoadVariables And Global Variables

Mar 9, 2008

it has many different sections(15 or so). Now i have made the movie and created all the checkboxes needed in the form.

I have given each one an instance name - e.g. chk_individualtax1

Made a global variable for each checkbox to get the .selected value - e.g. _global.individualtax1 = chk_individualtax1.selected;

At the end of the movie I have put a trace command to check that the variables are working( because they are on different timeline levels)- e.g. trace(individualtax1);

Now my problem comes here because now I am trying to send these variables off to the server using the getURL command. - e.g. getURL("send.php", "_blank", "POST");

This works and the email is sent off to me via php. however only the variables on the main timeline are sent? is there a difference in fetching global variables off different levels of the timeline Now should I rather be using the loadVariables command and if so how?

View 1 Replies







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