MCs mit Variablen anschreiben..

malibubu

Mitglied
<div class="bbWrapper">Hallo Zusammen,<br /> <br /> schon einmal im Voraus: Ich bin Flashanfänger und wusste nicht, wie ich men Problem in eure Suche eingeben soll <img src="https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png" class="smilie smilie--emoji" loading="lazy" width="64" height="64" alt=":-)" title="Smile :-)" data-smilie="18"data-shortname=":-)" /><br /> <br /> Also, ich habe 5 Movieclips (Instanz: feld1, feld2,...feld5).<br /> <br /> mit folgendem Code will ich die Koordinaten der MCs ansprechen:<br /> <br /> <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"> <div class="bbCodeBlock-title"> Code: </div> <div class="bbCodeBlock-content" dir="ltr"> <pre class="bbCodeCode line-numbers" dir="ltr" data-xf-init="code-block" data-lang=""><code>var i:number = 1; button0.onRelease = function() { xkoo = feld i._x ////ALSO feld1,... feld5//// ykoo = feld i._y trace(xkoo); trace(ykoo); i++; }</code></pre> </div> </div><br /> Wie bringe ich das i da rein?<br /> <br /> Danke im Voraus.... Ciao</div>
 
<div class="bbWrapper">Sollte so stimmen:<br /> <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"> <div class="bbCodeBlock-title"> PHP: </div> <div class="bbCodeBlock-content" dir="ltr"> <pre class="bbCodeCode line-numbers" dir="ltr" data-xf-init="code-block" data-lang="php"><code>button0.onRelease = function() { for(i = 1; i &lt; 6; i++) { xkoo = _root[&quot;field&quot; + i]._x ykoo = _root[&quot;field&quot; + i]._y trace(xkoo); trace(ykoo); } }</code></pre> </div> </div></div>
 
Zurück