/ Forside / Teknologi / Multimedie & design / Flash / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Flash
#NavnPoint
bentjuul 4251
molokyle 1978
Klaudi 1488
jhvp 1265
pallenoc 1160
katekismus 1020
Fnollerpi.. 790
slander 510
Dr.Disco 500
10  Flash77 500
koordinater
Fra : Thomas K


Dato : 09-02-02 16:08

Hej NG

jeg har en kort med nogle byer på. og det jeg vil er at når man trykker på
nogle knapper skal kortet "flytte" sig til den by... er det noget med
koordinater eller hvad...

jeg havde tænkt på at gøre det med simplet at lave en animation, men det er
jo ikke sikkert at brugerene vælger byerne i den rækkefølge som jeg har
lavet det...
hvordan kan man ellers gøre det....

--
Thomas Kaarup
Kaarup@privat.dk
www.thomaskaarup.dk

"Livet har læst mig,
at kærlighed ikke går
ud på at vinde over hinanden,
men at se i samme retning



 
 
Papusniak (10-02-2002)
Kommentar
Fra : Papusniak


Dato : 10-02-02 01:14

Du kan lave fx sådan noget:
Du skal have i alt 3 frames og kortet skal være MC med navn map
Hvis man klikker på knappen så går den til frame fx 20 og der sætter du
sådan noget skript


slutpositionmapx = 768;
slutpositionmapy = -61;
setProperty (map, _x, positionmapx);
setProperty (map, _y, positionmapy);

if ((positionmapx > slutpositionmapx) and not (positionmapx -
slutpositionmapx >= -35 and positionmapx - slutpositionmapx <= 35)){
positionmapx = (positionmapx-30);
}
if ((positionmapy > slutpositionmapy) and not (positionmapy -
slutpositionmapy >= -35 and positionmapy - slutpositionmapy <= 35)){
positionmapy = (positionmapy-30);
}
if ((positionmapx < slutpositionmapx) and not (positionmapx -
slutpositionmapx <= 35 and positionmapx - slutpositionmapx >= - 35)){
positionmapx = (positionmapx+30);
}
if ((positionmapy < slutpositionmapy) and not (positionmapy -
slutpositionmapy <= 35 and positionmapy - slutpositionmapy >= - 35)){
positionmapy = (positionmapy+30);
}




if ((positionmapx - slutpositionmapx >= -35) and (positionmapx -
slutpositionmapx < 0)) {
positionmapx = (positionmapx+1);
}
if ((positionmapy - slutpositionmapy >= -35) and (positionmapy -
slutpositionmapy < 0)) {
positionmapy = (positionmapy+1);
}
if ((positionmapx - slutpositionmapx <= 35) and (positionmapx -
slutpositionmapx > 0)){
positionmapx = (positionmapx-1);
}
if ((positionmapy - slutpositionmapy <= 35) and (positionmapy -
slutpositionmapy > 0)) {
positionmapy = (positionmapy-1);
}


I frame 21 skriver du:

if ((positionmapx - slutpositionmapx == 0) and (positionmapy -
slutpositionmapy == 0)) {
gotoAndStop (22);
}
gotoAndPlay (20);



I de 3 frames skal du have selvfølgelig det samme baggrund.




Søg
Reklame
Statistik
Spørgsmål : 177501
Tips : 31968
Nyheder : 719565
Indlæg : 6408528
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste