Autor |
Nachricht |
Kai.S
Threadersteller
Dabei seit: 20.12.2005
Ort: München
Alter: 41
Geschlecht:
|
Verfasst Do 10.05.2007 14:52
Titel Flash Syntax Problem: Variable in Instanzname |
|
|
Hey Leute,
ich hoffe mir kann jemand sagen, wo da der Syntaxfehler ist, finds einfach nicht
Sehr gerne auch per ICQ!
Danke vielmals
Code: | for (i=1; i<=6; i++) {
this.createEmptyMovieClip("clip"+i, this.getNextHighestDepth());
this["clip"+i].createEmptyMovieClip("bg"+i, this.getNextHighestDepth());
this["clip"+i].createEmptyMovieClip("holder"+i, this.getNextHighestDepth());
this["clip"+i+".holder"+i].loadMovie(path+i+extension);
this["clip"+i+".holder"+i]._x = width / -2;
this["clip"+i+".holder"+i]._y = height / -2;
this["clip"+i]._x = 0;
this["clip"+i]._y = i * width;
with ( ["clip"+i] )
{
drawit();
} //end with
}//end for |
Zuletzt bearbeitet von Kai.S am Do 10.05.2007 14:53, insgesamt 1-mal bearbeitet
|
|
|
|
|
phihochzwei
Moderator
Dabei seit: 08.06.2006
Ort: Mülheim an der Ruhr
Alter: 46
Geschlecht:
|
Verfasst Do 10.05.2007 15:02
Titel Re: Flash Syntax Problem: Variable in Instanzname |
|
|
Was mit deiner Syntax nicht stimmte:
- with ( ["clip"+i] ) : geht nicht, wenn überhaupt with (this["clip"+i] )
- this["clip"+i+".holder"+i] : Hab ich nicht probiert, sollte aber auchnicht gehen
Versuch mal
Code: | for (i=1; i<=6; i++) {
var Clip:MovieClip = this.createEmptyMovieClip("clip"+i, this.getNextHighestDepth());
var BG:MovieClip = Clip.createEmptyMovieClip("bg"+i, this.getNextHighestDepth());
var Holder:MovieClip = Clip.createEmptyMovieClip("holder"+i, this.getNextHighestDepth());
Holder.loadMovie(path+i+extension);
Holder._x = width / -2;
Holder._y = height / -2;
Clip._x = 0;
Clip._y = i * width;
with ( Clip)
{
drawit();
} //end with
}//end for | [/quote]
|
|
|
|
|
Anzeige
|
|
|
Kai.S
Threadersteller
Dabei seit: 20.12.2005
Ort: München
Alter: 41
Geschlecht:
|
Verfasst Do 10.05.2007 15:16
Titel
|
|
|
Danke
Zuletzt bearbeitet von Kai.S am Do 10.05.2007 17:32, insgesamt 3-mal bearbeitet
|
|
|
|
|
|
|
|
Ähnliche Themen |
[MySql]Problem mit Syntax in Query
Flash Variable Get bearbeiten
Flash AS3: Variable übergeben (XML an Schaltfläche)
Flash MX 2004 - Variable aus Textdatei
Flash Syntaxproblem bei Funktionsaufruf mit Variable
[Flash AS3] Variable von nachgeladenen SWF aus abrufen
|
|