Solved

Byte Array Action script2 2.0

Posted on 2006-07-24
2
221 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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,…
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 what frame rate is, how to control it and what effect it has on the video.

733 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