Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
flash array

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash
View previous topic :: View next topic  
Author Message
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 11.01.2005 02:52    Post subject: flash array Add user to your forum ignore list Reply with quote

kad kazem ovo
Code:
image = [];

lik mi automatski napravi array, ali stringova?

kako ga nagovorim da radi array integera i/ili realnih brojeva?

hvala
Back to top
View user's profile Send private message Visit poster's website Twitter profile
njava
mi3.crew


Joined: 25 Aug 2003
Posts: 624
Location: Zagreb

PostPosted: 11.01.2005 03:23    Post subject: Re: flash array Add user to your forum ignore list Reply with quote

blackduke wrote:
kad kazem ovo
Code:
image = [];

lik mi automatski napravi array, ali stringova?


short answer: wrong

long answer

Code:
image = [];


je isto sto i

Code:
image = new Array();


odnosno kreiranje praznog arraya

kazi liku

Code:
images = new Array();
images.push("aaa");
images.push(1);
for (i in images) {
   trace(typeof(images[i]));
}


pa ce ti ovaj rec da mu je jedan element arraya string a drugi number

ako si tio dobit nesto ala associative array onda probas

Code:
image = new Object();

...ili ak oces biti smensi-fensi as2 geek

var image:Object = new Object();

i onda

image["key1"] = "aaa";
image["key2"] = 123;

ili

image.key1 = "aaa";
image.key2 = 123;

i opet ista provjera

for (i in images) {
   trace(typeof(images[i]));
}

Back to top
View user's profile Send private message Visit poster's website
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 11.01.2005 10:23    Post subject: Add user to your forum ignore list Reply with quote

ma ja zapravo vadim xy varijabli iz xml filea...
i dok su svi stringovi i to funkcionira ok, imam jedan niz gdje su mi svi brojevi integeri...
kak to profurat?

jel bi trebo neko petlju i na pocetku definirat sve elemente sa

Code:
for (i=0; i<total; i++) {
ht[i].push(0);
}


zapravo, probo sam sa ovim gore, nece....
Back to top
View user's profile Send private message Visit poster's website Twitter profile
njava
mi3.crew


Joined: 25 Aug 2003
Posts: 624
Location: Zagreb

PostPosted: 11.01.2005 12:26    Post subject: Add user to your forum ignore list Reply with quote

postaj code snippet kak vadis te varijable iz xml-a
Back to top
View user's profile Send private message Visit poster's website
blackduke
mi3.crew


Joined: 08 Sep 2003
Posts: 2681
Location: Zagreb

PostPosted: 11.01.2005 15:16    Post subject: Add user to your forum ignore list Reply with quote

ma rijesio sam stvar tako da kad vadim iz xmla, odmah pretvaram u broj taj string
Code:
var[i] = Number (var[i]);


tnx na pomoci, appreciated
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Danko



Joined: 16 Sep 2004
Posts: 124
Location: Zagreb

PostPosted: 22.02.2005 03:26    Post subject: Add user to your forum ignore list Reply with quote

Evo zanimljive i korisne stvari - Flash array code generator: http://www.permadi.com/tutorial/flashArray/index2.html Cool

_________________
dankokozar.com | Adjungo | UnityHR | eDriven
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group