Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 01-02-2005, 07:11   #1 (permalink)
Neuer User
 
Registriert seit: Nov 2003
Ort: köln
Beiträge: 16
dynamische maske maskiert nur lezten movieClip

Morgen zusammen!
Ich hab da ein kleines Problem, und zwar:
Ich dupliziere mir mehrere movieClips und lege dann darüber einen weiteren movieClip mit setMask um die anderen zu maskieren.
das funktioniert auch so weit da alle darunter liegenden MovieClips angezeigt werden. Jedoch wenn ich die _y position der MovieClips verändere um einen scroll effect zu erziehlen verschwindet nur immer der lezte duplizierte movieClip unter oder überhalb der maske

hier mal mein srcipt:
Code:
// test einträge
titel_t = "bal!!";
text_t = "BlaBlaBlaBlaBlaBasdfsddfasfdsdfadfsdfasdfsdsfasdfasfasfasasfsdafasfasfasdfasdfsdffsddfdfadfa asfaBlaBlaBla 1234567890";
datum_t = "2005-01-30";
posX = 0;
posY = 0;
// functions aufruf
this.duplicateNews(titel_t, text_t, datum_t, posX, posY, i++);
this.duplicateNews(titel_t, text_t, datum_t, posX, posY += 80, i++);
this.duplicateNews(titel_t, text_t, datum_t, posX, posY += 80, i++);
this.duplicateNews(titel_t, text_t, datum_t, posX, posY += 80, i++);
//function zum erstellen der movieCplis
function duplicateNews(titel_t, text_t, datum_t, x, y, i) {
	i++;
	duplicateMovieClip(bgcont, "NewsCont" add i, i);
	this["NewsCont"+i]._x = x;
	this["NewsCont"+i]._y = y;
	//titel news
	this["NewsCont"+i].createTextField("titel", 1, 1, 2, 1, 1);
	this["NewsCont"+i].titel.autoSize = true;
	this["NewsCont"+i].titel.text = titel_t;
	this["NewsCont"+i].titel.embedFonts = true;
	this["NewsCont"+i].titel.selectable = false;
	this["NewsCont"+i].Format = new TextFormat();
	this["NewsCont"+i].Format.color = 0x000000;
	this["NewsCont"+i].Format.font = "NewsFont";
	this["NewsCont"+i].Format.size = 10;
	this["NewsCont"+i].titel.setTextFormat(this["NewsCont"+i].Format);
	//datum news
	this["NewsCont"+i].createTextField("datum", 2, 200, 2, 1, 1);
	this["NewsCont"+i].datum.autoSize = true;
	this["NewsCont"+i].datum.text = datum_t;
	this["NewsCont"+i].datum.embedFonts = true;
	this["NewsCont"+i].datum.selectable = false;
	this["NewsCont"+i].Format = new TextFormat();
	this["NewsCont"+i].Format.color = 0x000000;
	this["NewsCont"+i].Format.font = "NewsFont";
	this["NewsCont"+i].Format.size = 10;
	this["NewsCont"+i].datum.setTextFormat(this["NewsCont"+i].Format);
	//text news
	this["NewsCont"+i].createTextField("text", 3, 1, 20, 250, 50);
	this["NewsCont"+i].text.multiline = true;
	this["NewsCont"+i].text.wordWrap = true;
	this["NewsCont"+i].text.autoSize = true;
	text_t = text_t.substring(0, 100);
	text_t += " ...";
	this["NewsCont"+i].text.html = true;
	this["NewsCont"+i].text.htmlText = text_t;
	this["NewsCont"+i].text.embedFonts = true;
	this["NewsCont"+i].text.selectable = false;
	this["NewsCont"+i].Format = new TextFormat();
	this["NewsCont"+i].Format.color = 0x000000;
	this["NewsCont"+i].Format.font = "Verdana";
	this["NewsCont"+i].Format.size = 10;
	this["NewsCont"+i].Format.embedFonts = true;
	this["NewsCont"+i].text.setTextFormat(this["NewsCont"+i].Format);
	//erstellen der maske
}
duplicateMovieClip(my_mask, "my_mask" add i, 200);
this["NewsCont"+i].setMask(this["my_mask"+i]);
this["my_mask"+i]._x = -10;
this["my_mask"+i]._y = -10;
Hoffe ich konnte mein problem verständlich schildern
denn ich bin echt am verzweifeln ^^
danke jedem tipp schon mal im voraus!!

Jo

Geändert von 4r4gorn (01-02-2005 um 07:52 Uhr)
4r4gorn ist offline   Mit Zitat antworten
Alt 01-02-2005, 15:22   #2 (permalink)
-
 
Benutzerbild von pape
 
Registriert seit: Jan 2004
Beiträge: 3.002
müssten die letzten 4 zeilen des scripts nicht mit in die "duplicateNews"-function ?

sonst gibst du ja nur dem letzten Mc die Maske, anstatt jedem seine zu zuteilen.

ansonsten mal fla bidde....

grz
pape
pape ist offline   Mit Zitat antworten
Alt 01-02-2005, 16:13   #3 (permalink)
Neuer User
 
Registriert seit: Nov 2003
Ort: köln
Beiträge: 16
Jo danke das war natürlich der eine fehler,
der andere war das die tiefe von der maske immer gleich war ... jetzt geht aber alles!!

danke danke danke
4r4gorn ist offline   Mit Zitat antworten
Alt 01-02-2005, 17:45   #4 (permalink)
-
 
Benutzerbild von pape
 
Registriert seit: Jan 2004
Beiträge: 3.002
bitte!

Bei weiteren Fragen immer her damit!

grz
pape
pape 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 05:10 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele