473,774 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help Actionscript

1 New Member
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.onEnterFra me = function():Void (
var loadedData: Number = this.getBytesLo aded();
var allData: Number = this.getBytesTo tal();
var percent: Number = Math.round (loadedData/allData*100);
mask_mc._yscale = percent;
if (loadedData>=al lData) {
gotoAndStop (10);
delete this.onEnterFra me;
}
};

heres the errors

'{' expected this.onEnterFra me = function():Void (

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

so now i'm stuck havent a clue how to fix this.
any help greatly appricated
Nov 24 '07 #1
1 2001
rsdev
149 New Member
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
1732
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(){ getURL("http://www.adobe.com/", "_blank"); } When I export my project to a swf file, and run the swf from my directory, not from flash program. When the swf is running I click my button, flash show to me a messagebox that the url cannot be shown for...
1
3195
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: http://www.kirupa.com/developer/mx/fadegrid2.htm It looks awesome! I absolutly love it but i'm not quite sure how to apply it to my banner. My banner consists of 3 movie clips that moves...like instead of a still image like the one shown on the tutorial there are several text...
1
2487
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 like below? function showuserdetails(uname, uid, department, designation, contact) { locate.uname.text = uname; locate.uid.text = uid; locate.department.text = department; locate.designation.text = designation; locate.contact.text =...
3
17961
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, but I really want an answer compatible to my software. (If i'm not mistaken it's actionscript 2.0) Also, does any of you know how the actionscript for a button so that when it's pressed, a text will appear? If another button is pressed, different...
0
2878
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 using firefox. I have managed to consume the service in Flex by using MXML like this: <mx:WebService id="wsTestWebService" wsdl="http://localhost:3521/AjaxControlToolkitWebSite2/TestFlexService.asmx?wsdl"showBusyCursor="true"...
3
1373
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 my web server because I tested it and it's OK. Please can anyone check my PHP script below to see if I am missing something that would cause my e-mails not to be returned (I'm new to PHP). I posted last week and I had to many parameters but I...
15
1433
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 ',' expected getURL(http://www.somestore.com/index.php" "_self"); Total ActionScript Errors: 1 Reported Errors: 1
1
2895
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 with text/image in it, say, it was a text of "I love U", and a picture of a heart, now I need to make some ActionScript embedded in the .fla file, then compile to a SWF file, say "valentine.swf" All I want, is that actionscript embedded in the SWF...
2
4999
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 ActionScript"); } </script> i want to call it from actionscript,
0
10267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.