Solved

Byte Array Action script2 2.0

Posted on 2006-07-24
2
220 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

910 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

23 Experts available now in Live!

Get 1:1 Help Now