Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 13-07-2004, 15:51   #1 (permalink)
Animateur
 
Benutzerbild von Master Wu
 
Registriert seit: Jan 2003
Ort: MZ
Beiträge: 1.536
registerClass funzt nicht?!

Hallo, ich wollte ne Klasse schaffen für Content-MovieClips,
die dragbar sein sollen.

Habs so probiert, aber mcBand2 wird nichtmal auf die Bühne attached.

Wo ist der Fehler?!

Code:
//KLasse ContentMc
function ContentMc() {
	this.onPress = function() {
		this.startDrag();
	}
	
	this.onRelease = function() {
		this.stopDrag();
	}
}

ContentMc.prototype = new MovieClip();
Object.registerClass("mcBand2", ContentMc);
_root.attachMovie("mcBand2",1);
PS: FLA im Anhang
Angehängte Dateien
Dateityp: zip ContentMc.zip (124 Bytes, 2x aufgerufen)
__________________
there is no way to happiness, happiness is the way - flashgames
Master Wu ist offline   Mit Zitat antworten
Alt 13-07-2004, 16:04   #2 (permalink)
Neuer User
 
Registriert seit: Dec 2003
Ort: Oldenburg
Beiträge: 25
Hallo Master Wu,

dein attachMovie ist falsch

ActionScript:
  1. //_root.attachMovie("mcBand2", 1);
  2. _root.attachMovie("mcBand2", "mcBand", 1);

der zweite Parameter ist der Instanzname des neuen MCs, der dritte die Tiefenebene.

Gruß Simon
MrPink ist offline   Mit Zitat antworten
Alt 13-07-2004, 17:29   #3 (permalink)
Animateur
 
Benutzerbild von Master Wu
 
Registriert seit: Jan 2003
Ort: MZ
Beiträge: 1.536
ah, ok, danke, hab das hier ausm forum kopiert, naja, hätt ich mal chekcne sollen
__________________
there is no way to happiness, happiness is the way - flashgames
Master Wu ist offline   Mit Zitat antworten
Alt 13-07-2004, 18:32   #4 (permalink)
Animateur
 
Benutzerbild von Master Wu
 
Registriert seit: Jan 2003
Ort: MZ
Beiträge: 1.536
Noch ne Frage:

Kann man das registerClass auch auf einen MC anwenden, der schon auf der bühne liegt?
__________________
there is no way to happiness, happiness is the way - flashgames
Master Wu 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 06:11 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele