Solved

Byte Array Action script2 2.0

Posted on 2006-07-24
2
219 Views
Last Modified: 2011-10-03
How can you declare a byte array with Action scripts version 2.0?

cheers

apb2
0
Comment
Question by:apb2
2 Comments
 
LVL 7

Accepted Solution

by:
muxxter earned 500 total points
ID: 17171996
Hi apb2.

Actionscript doesn't actually have a byte class. It does, however, have a Number and String class. You can use a String object like a character array, almost (like in the various flavours of C). But it isn't as elegant:

my_str.charAt(<index>);

It all depends on what you want to store in each byte. If you're using it as a less memory intensive integer, you're only option is to make an array of Number objects. If you're storing characters, you can use the String class. Or, to stick with the array functionality, you'd have to make an array of Strings. Each one being only one character long. However, if you do it this way, when you try to print out the array, you get a "Object [Array]" statement, instead of the word that it represents.

I hope this helps. :-)
MuXx
0
 
LVL 6

Author Comment

by:apb2
ID: 17182527
Cheers mate
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now