Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 11-09-2006, 17:08   #1 (permalink)
Neuer User
 
Registriert seit: Feb 2003
Beiträge: 78
Hilfe Zu Kleiner änderung In As-scipt :-)

Hallo,

habe mir eine Navigation mit folgendem Script eingebaut:

Code:
Stage.scaleMode = "noScale";

labels = ['TEXT1', 'TEXT2', 'TEXT3', 'TEXT4', 'TEXT5', 'TEXT6'];

x = 200;
y = 370;

dist = 5;
openWid = 145;
speed = 8;

MovieClip.prototype.scala = function(w, vel) {

	vel = w>this._width ? vel : -vel;
	this.onEnterFrame = function() {
		if (this._width == w) {
			delete this.onEnterFrame;
		} else {
			this._width = (Math.abs(this._width-w)>Math.abs(vel)) ? this._width+vel : w;
		}
		mc0._x = x;
		this._parent.visited._x = this._width-mcWid;
		for (i=1; i<labels.length; i++) {
			_root['mc'+i]._x = _root['mc'+(i-1)]._x+_root['mc'+(i-1)]._width+dist;
		}
	};
};

obj = {};

obj.onRollOver = function() {
	this.bt.gotoAndStop('over');
	_root[temp].bt.scala(mcWid, speed);
	this.bt.scala(openWid, speed);
	path = this;
	clearInterval(id);
	_root[temp].txt.text = '0'+(Number(_root[temp]._name.substring(2))+1);
	clearInterval(pausa);
	pausa = setInterval(function () {
		randomChar(path.txt, labels[path._name.substring(2)]);
		clearInterval(pausa);
	}, 200);
};

obj.onRollOut = function() {
	clearInterval(pausa);
	clearInterval(id);
	this.bt.gotoAndStop('up');
	_root[temp].bt.scala(openWid, speed);
	this.bt.scala(mcWid, speed);
	pausa = setInterval(function () {
		randomChar(_root[temp].txt, labels[_root[temp]._name.substring(2)]);
		clearInterval(pausa);
	}, 200);
	this.txt.text = '0'+(Number(this._name.substring(2))+1);
};


obj.onRelease = function() {
	_root[temp].txt.text = '0'+(Number(_root[temp]._name.substring(2))+1);
	_root[temp].bt.gotoAndStop('up');
	_root[temp].enabled = true;
	_root[temp].bt.scala(mcWid, speed);
	this.enabled = false;
	temp = this._name;
	this.visited._visible = true;

	if (temp == 'mc0') {
		_root.gotoAndStop ("LINK1");
		}
	
	if (temp == 'mc1') {
		
		_root.gotoAndStop ("LINK2");
		
	
	}
	
	if (temp == 'mc2') {
		_root.gotoAndStop ("LINK3");
	}
	
		if (temp == 'mc3') {
		_root.gotoAndStop ("LINK4");
	}
		
	
	if (temp == 'mc4') {
		_root.gotoAndStop ("LINK5");
	}
	
	if (temp == 'mc5') {
		_root.gotoAndStop ("LINK6");
	}


};

//	----- NEUE FUNKTION -----

obj.setNav = function () {

	this.bt.gotoAndStop('over');
	_root[temp].bt.scala(mcWid, speed);
	this.bt.scala(openWid, speed);
	path = this;
	clearInterval(id);
	_root[temp].txt.text = '0'+(Number(_root[temp]._name.substring(2))+1);
	clearInterval(pausa);
	pausa = setInterval(function () {
		randomChar(path.txt, labels[path._name.substring(2)]);
		clearInterval(pausa);
	}, 200);

	_root[temp].txt.text = '0'+(Number(_root[temp]._name.substring(2))+1);
	_root[temp].bt.gotoAndStop('up');
	_root[temp].enabled = true;
	_root[temp].bt.scala(mcWid, speed);
	this.enabled = false;
	temp = this._name;
	this.visited._visible = true;

}


for (i=0; i<labels.length; i++) {
	attachMovie('mc', 'mc'+i, i, obj);
	mcWid = mc0.bt._width;
	this['mc'+i]._x = i*(mcWid+dist)+x;
	this['mc'+i]._y = y;
	this['mc'+i].txt.text = '0'+(i+1);
	this['mc'+i].txt.autoSize = true;
	this['mc'+i].visited._visible = false;
}

mc0.setNav();
Ich möchte, dass die NAvigationsbeschreibungen nicht mehr einzeln aufgebaut werden, sondern als ganzes Wort von Anfang an erscheinen.
Hat jemand eine Idee wo im Script ich dazu was ändern muss?

Grüsse,

Matze
mediamacher 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 16:09 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele