Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 29-08-2005, 14:00   #1 (permalink)
Neuer User
 
Registriert seit: May 2003
Beiträge: 10
Warum kann ich auf Movieclip nicht zugreifen?

ActionScript:
  1. _root.createEmptyMovieClip("content", 0);
  2. _root.content.createEmptyMovieClip("test1", 1);
  3. // .. //
  4. alphatec("content.test1", 399,100);
  5. //
  6. //
  7. function alphatec(movieclip, x, y) {
  8. _root[movieclip]._x =x;
  9. _root[movieclip]._y =y;
  10.  
  11. }

Warum kann ich auf Movieclip _root.content.test1 in der Funktion nicht zugreifen?
Vielen Dank im Voraus.

Grüße aus Berlin
Christian
jodu ist offline   Mit Zitat antworten
Alt 29-08-2005, 14:11   #2 (permalink)
Pending…
 
Benutzerbild von psyk
 
Registriert seit: Jul 2002
Ort: Hamburg
Beiträge: 3.866
Versuch mal so.
ActionScript:
  1. _root.createEmptyMovieClip("content", 0);
  2. _root.content.createEmptyMovieClip("test1", 1);
  3. // .. //
  4. alphatec(_root.content.test1, 399, 100);
  5. //
  6. //
  7. function alphatec(movieclip, x, y)
  8. {
  9.     movieclip._x = x;
  10.     movieclip._y = y;
  11.     trace("MC= "+movieclip+"  x="+x+" y="+y);
  12. }
__________________
:: Warum einfach, wenn's auch kompliziert geht! ::
psyk ist offline   Mit Zitat antworten
Alt 29-08-2005, 14:14   #3 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
aloha!

ActionScript:
  1. _root.createEmptyMovieClip("content", 0);
  2. _root.content.createEmptyMovieClip("test1", 1);
  3. // .. //
  4. alphatec(_root.content.test1, 399,100);
  5. trace("x= "+_root.content.test1._x+"y= "_root.content.testy._y);
  6. //
  7. //
  8. function alphatec(movieclip, xPos, yPos) {
  9.         _root[movieclip]._x =xPos;
  10.         _root[movieclip]._y =yPos;
  11.        
  12. }
edit: @psyk: langsam fällts auf, dass du immer schneller bist...
__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary

Geändert von andretti (29-08-2005 um 14:15 Uhr)
andretti ist offline   Mit Zitat antworten
Alt 29-08-2005, 14:29   #4 (permalink)
Neuer User
 
Registriert seit: May 2003
Beiträge: 10
Super es geht!
Vielen Dank!
jodu ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 11:24 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele