Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-11-2008, 07:24 AM   #1
alohachow
Registered User
 
Join Date: Sep 2008
Posts: 1
Question Help! Flash Array

Can I change the length of an array in flash?

Example:

if(a==true)
{
array.length=5;
}
else
{
array.length=6;
}
alohachow is offline   Reply With Quote
Old 09-11-2008, 07:29 AM   #2
kishorpapnai
Senior Member
 
Join Date: Aug 2008
Location: India
Posts: 114
Default

no not possible
kishorpapnai is offline   Reply With Quote
Old 09-11-2008, 09:01 AM   #3
mj7
no idea!
 
mj7's Avatar
 
Join Date: Aug 2008
Posts: 53
Default

You could fill it with temporary values but I am struggling to think of any reason why you'd want to have an array lengh to differ from the actual amount of values contained.

What exactly are you trying to achieve - there may be a different way to do it?
mj7 is offline   Reply With Quote
Old 09-11-2008, 09:42 AM   #4
Flatcat
The Flat One
 
Join Date: Oct 2004
Location: Edmonton, AB
Posts: 21
Send a message via MSN to Flatcat
Default

I'm pretty positive that you can't modify the .length property directly like that, you'll have to look into:

http://www.adobe.com/support/flash/a...ionary072.html

or

http://www.adobe.com/support/flash/a...ionary064.html

or

http://www.adobe.com/support/flash/a...ionary062.html
Flatcat is offline   Reply With Quote
Old 09-11-2008, 10:13 AM   #5
mikeooh
Registered User
 
Join Date: Sep 2008
Posts: 6
Default

Why would you need to change the length of an array. If you just want to add values use the .push method..
mikeooh is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
one template, many looks? subquark ActionScript 1.0 (and below) 1163 12-22-2009 02:10 AM
Array of objects & web service - Flash converting array to a string jeffcool ActionScript 2.0 1 03-14-2005 07:31 PM
Streaming Flash Player 6 simail Other Flash General Questions 7 04-03-2002 12:14 PM
Flash MX seminar Tink ActionScript 1.0 (and below) 5 03-17-2002 05:41 AM
Php, Javascript, and Flash 5 browser detect and more! Redline01 Server-Side Scripting 2 08-11-2001 02:09 AM


All times are GMT. The time now is 05:42 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.