By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,653 Members | 1,384 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,653 IT Pros & Developers. It's quick & easy.

Operand Error and tips/ guides for beginner on ASP

P: 1
Greeting to everyone, I am a rookie at ASP and this may seem like a very simpleton question to most but I am clueless about it.
I copied a code from a tutorial on to Flash its ASP but it does not work.
It tells me that I have an operand error.

The code is for a preloader in which the numbers run from 0% to 100% on a flash animation. Everything works, except the % numbers do not move. It stays stuck at 99% which is the inital text entered onto the animation.

Here is the original code as I got it:

onClipEvent (load) {
total = _root.getBytesTotal();

onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
percen1 = +percent+%;
if (loaded == total) {

The error I get in Flash 8 is the following:

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 8: Operator '%' must be followed by an operand
percen1 = ('+percent+'%);

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 9: ')' expected

Total ActionScript Errors: 2 Reported Errors: 2

Can someone explain to me what I am doing wrong and also can someone suggest a book or a site for beginners ASP so I can understand why the errors occur?

you assistance is really appreciated.

thank you.
Jun 14 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 303
Since percent is an integer, you might try using .toString():

Expand|Select|Wrap|Line Numbers
  1. percen1 =  + percent.toString() + %;
Jun 15 '07 #2

Post your reply

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