Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 12-07-2004, 17:31   #1 (permalink)
rookie
 
Benutzerbild von rok°!
 
Registriert seit: Apr 2002
Beiträge: 370
mc löschen

hallo!

ich hab auf meiner alten festplatte ein script gefunden, das ich gern wieder verwenden möchte (hatte es irgendwann, irgendwo gesaugt). das script bastelt mir aus div. mc's ein scrollbares textfeld. funzt prima. allerdings krieg ich das ding nich mehr weg, wenn ich in einen anderen frame wechsel...

ich habs schon per removeMovieclip() versucht, aber ohne erfolg. hat jemand eine idee?

hier mal das script, was das ganze initialisiert:
Code:
Movieclip.prototype.addscale=function(x,y,hoehe,tiefe,count,linkname) {

	attachMovie("scrollfeld","scrollfeld"+count,tiefe);
	attachMovie("scrollarrow1","arrow1"+count,tiefe+1);
	attachMovie("scrollarrow2","arrow2"+count,tiefe+2);
	attachMovie("emask","emask"+count,tiefe+3);
	eval("emask"+count+".empty").attachMovie(linkname,"inhalt",3);
	w=eval("emask"+count+".empty.inhalt")._width;
	h=eval("emask"+count+".empty.inhalt")._height;
	eval("scrollfeld"+count)._yscale=hoehe-36;
	eval("scrollfeld"+count)._x=20+x+w/2;
	eval("scrollfeld"+count)._y=y;
	eval("arrow1"+count)._x=20+x+w/2;
	eval("arrow1"+count)._y=y-hoehe/2+17;
	eval("arrow2"+count)._x=20+x+w/2;
	eval("arrow2"+count)._y=y+hoehe/2-17;
	eval("scrollfeld"+count).scrolltarget=eval("emask"+count+".empty.inhalt");
	eval("scrollfeld"+count).faktor=(h-hoehe)/-64;

	eval("arrow1"+count).scrolltarget=eval("scrollfeld"+count);
	eval("arrow2"+count).scrolltarget=eval("scrollfeld"+count);

	eval("emask"+count)._xscale=w;
	eval("emask"+count)._yscale=hoehe;
	eval("emask"+count+".empty")._xscale=10000/w;
	eval("emask"+count+".empty")._yscale=10000/hoehe;
	eval("emask"+count+".empty.inhalt")._y=h/2-hoehe/2;

	eval("emask"+count)._x=x;
	eval("emask"+count)._y=y;
}
addscale(438,300,300,500,5,"test");
__________________
Das Newslettersystem auf deiner Homepage!
rok°! ist offline   Mit Zitat antworten
Alt 12-07-2004, 20:03   #2 (permalink)
Flash & TYPO3
 
Registriert seit: Oct 2003
Ort: Bayern
Beiträge: 2.700
Bei mir gehtz
PHP-Code:
Movieclip.prototype.addscale=function(x,y,hoehe,tiefe,count,linkname) {

    
attachMovie("scrollfeld","scrollfeld"+count,tiefe);
    
attachMovie("scrollarrow1","arrow1"+count,tiefe+1);
    
attachMovie("scrollarrow2","arrow2"+count,tiefe+2);
    
attachMovie("emask","emask"+count,tiefe+3);
    eval(
"emask"+count+".empty").attachMovie(linkname,"inhalt",3);
    
w=eval("emask"+count+".empty.inhalt")._width;
    
h=eval("emask"+count+".empty.inhalt")._height;
    eval(
"scrollfeld"+count)._yscale=hoehe-36;
    eval(
"scrollfeld"+count)._x=20+x+w/2;
    eval(
"scrollfeld"+count)._y=y;
    eval(
"arrow1"+count)._x=20+x+w/2;
    eval(
"arrow1"+count)._y=y-hoehe/2+17;
    eval(
"arrow2"+count)._x=20+x+w/2;
    eval(
"arrow2"+count)._y=y+hoehe/2-17;
    eval(
"scrollfeld"+count).scrolltarget=eval("emask"+count+".empty.inhalt");
    eval(
"scrollfeld"+count).faktor=(h-hoehe)/-64;

    eval(
"arrow1"+count).scrolltarget=eval("scrollfeld"+count);
    eval(
"arrow2"+count).scrolltarget=eval("scrollfeld"+count);

    eval(
"emask"+count)._xscale=w;
    eval(
"emask"+count)._yscale=hoehe;
    eval(
"emask"+count+".empty")._xscale=10000/w;
    eval(
"emask"+count+".empty")._yscale=10000/hoehe;
    eval(
"emask"+count+".empty.inhalt")._y=h/2-hoehe/2;

    eval(
"emask"+count)._x=x;
    eval(
"emask"+count)._y=y;
}
addscale(438,300,300,500,5,"test");

this.scrollfeld5.onPress = function() {
    
trace("hallo2");
    
this.removeMovieClip();

__________________
Mediendesign-Student
johanness ist offline   Mit Zitat antworten
Alt 12-07-2004, 20:18   #3 (permalink)
rookie
 
Benutzerbild von rok°!
 
Registriert seit: Apr 2002
Beiträge: 370
kannst du mir bitte noch erklären wie und warum? würde gern auch dahintersteigen.
__________________
Das Newslettersystem auf deiner Homepage!
rok°! ist offline   Mit Zitat antworten
Alt 13-07-2004, 08:58   #4 (permalink)
rookie
 
Benutzerbild von rok°!
 
Registriert seit: Apr 2002
Beiträge: 370
war wohl zu frühzeitig meine antwort.
ich habs mal durchgetestet.
mein eigentliches problem lag wohl daran, dass ich nicht wusste, wie die zusammengeflickten mcs alle heißen (da es mehrere sind - oder werden die nochmal in einem zusammengefasst?).

mit
Code:
removeMovieClip("emask5.empty.inhalt");
removeMovieClip("scrollfeld5");
removeMovieClip("arrow15");
removeMovieClip("arrow25");
konnte ich zumindest alle entfernen (die 5 steht für die variable count)

geht es noch einfacher?
__________________
Das Newslettersystem auf deiner Homepage!
rok°! ist offline   Mit Zitat antworten
Alt 13-07-2004, 09:57   #5 (permalink)
rookie
 
Benutzerbild von rok°!
 
Registriert seit: Apr 2002
Beiträge: 370
ich hab jetzt allerdings noch ein problem. ich kann keine ebenen darüber anordnen. der angezeigte text ist immer im vordergrund. was mach ich falsch?
__________________
Das Newslettersystem auf deiner Homepage!
rok°! 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 20:30 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele