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 pomoc oko dynamic texta...

 
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
astolitu



Joined: 26 Jun 2004
Posts: 547
Location: Zagreb

PostPosted: 08.10.2005 20:28    Post subject: Flash pomoc oko dynamic texta... Add user to your forum ignore list Reply with quote

ako netko moze pomoc, nemogu nikako dokucit kako bi se moglo napravit da se text ispisuje
od kraja prema pocetku.


imam dynamic text field


1.frejm

slova = 1;
text = "frane ivana kreso filip";

2.frejm

if (slova < text.length) {
nazivi_text = text.substring(0,slova);
slova++
} else {
nazivi_text = text;
gotoAndStop(1);
}

3.frejm
gotoAndPlay(2);

hvala unaprijed

_________________
http://www.markobjedov.com/
Back to top
View user's profile Send private message Visit poster's website Twitter profile
carr



Joined: 13 Nov 2003
Posts: 1397
Location: Karlovac

PostPosted: 08.10.2005 22:12    Post subject: Re: Flash pomoc oko dynamic texta... Add user to your forum ignore list Reply with quote

astolitu wrote:
ako netko moze pomoc, nemogu nikako dokucit kako bi se moglo napravit da se text ispisuje
od kraja prema pocetku.


imam dynamic text field


1.frejm

slova = 1;
text = "frane ivana kreso filip";

2.frejm

if (slova < text.length) {
nazivi_text = text.substring(0,slova);
slova++
} else {
nazivi_text = text;
gotoAndStop(1);
}

3.frejm
gotoAndPlay(2);

hvala unaprijed

- slova = text.length (ili koja je vec string length naredba u flashu, nedamise manual otvarat)
- if (slova>0)
- nazivi_text = text.substring(slova, text.length);
- slova--;

_________________
Bolje biti malo lud, nego malo pametan.
Back to top
View user's profile Send private message Visit poster's website
astolitu



Joined: 26 Jun 2004
Posts: 547
Location: Zagreb

PostPosted: 08.10.2005 22:49    Post subject: Add user to your forum ignore list Reply with quote

- slova = text.length (ili koja je vec string length naredba u flashu, nedamise manual otvarat)
- if (slova>0)
- nazivi_text = text.substring(slova, text.length);
- slova--;


- nazivi_text = text.substring(slova, text.length);
//ode dobijem
nazivi_text = text.substring(slova,slova);
//ne radi ovako....


popizdit cu dok ovo ne rijesin

_________________
http://www.markobjedov.com/
Back to top
View user's profile Send private message Visit poster's website Twitter profile
carr



Joined: 13 Nov 2003
Posts: 1397
Location: Karlovac

PostPosted: 09.10.2005 12:02    Post subject: Add user to your forum ignore list Reply with quote

astolitu wrote:
- slova = text.length (ili koja je vec string length naredba u flashu, nedamise manual otvarat)
- if (slova>0)
- nazivi_text = text.substring(slova, text.length);
- slova--;


- nazivi_text = text.substring(slova, text.length);
//ode dobijem
nazivi_text = text.substring(slova,slova);
//ne radi ovako....


popizdit cu dok ovo ne rijesin

sta dobijes, pa on ti index slova pomice od kraja prema naprijed.
recimo ako je text "pero" to izgleda
Code:
slova=4
text.substring(4, text.length); // "" -> ovaj red je bezveze, treba ga izbacit

slova=3
text.substring(3, text.length); // "o"

slova=2
text.substring(2, text.length); // "ro"

slova=1
text.substring(1, text.length); // "ero"

slova=0
text.substring(0, text.length); // "pero"

di je zapelo?[/quote]

_________________
Bolje biti malo lud, nego malo pametan.
Back to top
View user's profile Send private message Visit poster's website
astolitu



Joined: 26 Jun 2004
Posts: 547
Location: Zagreb

PostPosted: 09.10.2005 14:09    Post subject: Add user to your forum ignore list Reply with quote

ne radi ...

radi jedino ako stavim

slova = 8;
text ="branimir";


if (slova > 0) {
nazivi = text.substring(0,slova);
q--
} else {
nazivi = text;
gotoAndStop(1);
}


ali onda dobijem rijec koja se brise od kraja.

_________________
http://www.markobjedov.com/
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Ivan Podrug - e1



Joined: 15 Apr 2005
Posts: 316
Location: Solin

PostPosted: 10.10.2005 09:53    Post subject: Add user to your forum ignore list Reply with quote

obrni logiku ....

ulaz="probni tekst";
var mySplit:Array = ulaz.split("");

//trace (mySplit.pop());

for (x=0; x<ulaz.length; x++) {
izlaz = mySplit.pop() + izlaz;
}

ovo će sve spucat u prvom frameu ali rastavi po frameovima pa ćeš dobit što tražiš.
izradi dynamic tekst field varijabla izlaz (da vidiš rezultat)

sustav je jednostavan. Splita se string u array po svakom slovu, a zatim se iz njega izbacuje svaki zadnji element i pribraja izlaznom (željenom) rezultatu.
Back to top
View user's profile Send private message
astolitu



Joined: 26 Jun 2004
Posts: 547
Location: Zagreb

PostPosted: 10.10.2005 12:16    Post subject: Add user to your forum ignore list Reply with quote

probat cu ovo sta si napisa, ali car mi je pomoga tako da je problem rijesen, ali sigurno cu probat ovo sta si napisa, tnx

_________________
http://www.markobjedov.com/
Back to top
View user's profile Send private message Visit poster's website Twitter profile
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