473,396 Members | 2,036 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,396 software developers and data experts.

Operand Error and tips/ guides for beginner on ASP

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+”%”;
gotoAndStop(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
}
}

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
gotoAndStop(percent);

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
1 1414
improvcornartist
303 Expert 100+
Since percent is an integer, you might try using .toString():

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

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

Similar topics

1
by: LRW | last post by:
I was wondering if anyone could recommend some good beginner sites and tutorial sites for writting ASP.Net pages in C#. Things that especially help with datagrids!! And, are there additional...
14
by: japin0 | last post by:
Hi, I am a absolute beginner in ASP ..I do have a bit of exposure to .VBS and other scripting languages. I need your guidance, where do I start? I had been to MS website Quick start guide but it...
5
by: Alex Pavluck | last post by:
Hello. I get the following error with the following code. Is there something wrong with my Python installation? code: import types something = input("Enter something and I will tell you the...
3
by: Krishna7002 | last post by:
Hi all I am new to perl programming. pls let me know how to proceed from beginning. I dont know how to start with. I need some tips from all of u. Thanks & Regards Krishna
29
by: aarthi28 | last post by:
Hi, I have written this code, and at the end, I am trying to write a vector of strings into a text file. However, my program is nor compiling, and it gives me the following error when I try to...
6
by: captainmorgan | last post by:
I have attempted to use the following IIF statement in a query, with no success. Iif(="580" OR "585", Iif(Month()=Month(Now()), =+40), Iif(Month()=Month(Now()), =+100)...
13
by: mike3 | last post by:
Hi. (crossposted because the program is in C++ and some C++-related elements are discussed, hence comp.lang.c++, plus general program design questions are asked, hence comp.programming.) I'm...
1
by: tshad | last post by:
In VS 2008, why can I not do: trace.warn("parameters(3) = " & parameters(3).value) I get an error: Option Strict on prohibits operands of type Object for operator '&' This worked fine in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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,...

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.