473,322 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Help Actionscript

Hi i have Flash CS3 and i'm having a nightmare. done a tutorial here

http://www.oman3d.com/tutorials/flash/video/preloader.php

seemed to be ok till i tried it and got two errors heres the actionscript

stop() ;
mask_mc._height = 1;
this.onEnterFrame = function():Void (
var loadedData: Number = this.getBytesLoaded();
var allData: Number = this.getBytesTotal();
var percent: Number = Math.round (loadedData/allData*100);
mask_mc._yscale = percent;
if (loadedData>=allData) {
gotoAndStop (10);
delete this.onEnterFrame;
}
};

heres the errors

'{' expected this.onEnterFrame = function():Void (

Operator '=' must be followed by an operand var allData: Number = this.getBytesTotal();

so now i'm stuck havent a clue how to fix this.
any help greatly appricated
Nov 24 '07 #1
1 1993
rsdev
149 100+
try this;

Expand|Select|Wrap|Line Numbers
  1. stop() ;
  2. mask_mc._height = 1;
  3. this.onEnterFrame = function():Void  {
  4.     var loadedData:Number = this.getBytesLoaded();
  5.     var allData:Number = this.getBytesTotal();
  6.     var percent:Number = Math.round (loadedData/allData*100);
  7.     mask_mc._yscale = percent;
  8.     if (loadedData>=allData) {
  9.         gotoAndStop (10);
  10.         delete this.onEnterFrame;
  11.     }
  12. };
Nov 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
Atran
by: Atran | last post by:
Hello EveryBody, I am new to ActionScript. I make to my flash page a button, I want make the button open a web using getURL commnad. See this code: button1.onRelease = function(){ ...
1
lolixpop
by: lolixpop | last post by:
Hi everybody thanks for reading! i have a few actionscript questions that i really need help on...any help would be greatly appreciated! Okay so i came upon this tutorial:...
1
by: Rocky86 | last post by:
hi ppl bascially I am require to pass my php coding to actionscript and the actionscript will seperate the code of my php how do I do it? Must I create a function for php to be pass into actionscript...
3
by: JuneNasch | last post by:
Hi. I'm a beginner in using Actionscript. Do you know what is the actionscript for a button to exit or quit my project? I'm using Flash 8 pro. I don't know which version of actionscript is used,...
0
by: gabrielk43 | last post by:
Hi I am new to Flex and I use Flex Builder 2 to make a web service client. So I have a web service in .NET(c#) with a simple web method that returns a string(no arguments). It works, I tested it...
3
by: DMcN | last post by:
Hi, I've set up a form in flash which will send data to a PHP file on my web space, which in return will return the data from the textfields to my e-mail address. I know PHP is enabled in enabled on...
15
by: Leslie Cox | last post by:
Hi I wonder if anyone could shed some light on what I need to do with this code I have tried everything I know and come up blank. **Error** Scene=Scene 1, layer=Layer 6, frame=115:Line 1: ')' or...
1
by: cyra | last post by:
Hi guys, this is the first time I post in our forum, I would like to say thanks to whom reading this. I'm new to ASv3 and in stuck of dealing with a problem like this : I have some .fla file...
2
by: NitinSawant | last post by:
Hello, I'm beginner to actionscript, I've defined following function in script tag of page <script type="text/javascript"> function showMessage(){ alert("javascript says: Hello...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.