ciroco
Threadersteller
Dabei seit: 24.03.2010
Ort: Düsseldorf
Alter: 38
Geschlecht:
|
Verfasst Mi 24.03.2010 10:18
Titel attachmovie problemchen |
|
|
Hallo zusammen,
ich habe hier eine Seite indem die Inhalte mit Alpha aus und eingefadet werden,
d.h. wenn man einen Button nutzt dann wird in einem Container der gewünschte MC geladen...
soweit so gut. funktioniert auch...
ich möchte aber gern zu Beginn schon den MC "Home" auf der Bühne liegen haben...sieht komisch aus das
man zuerst auf home klicken muss damit man einen Content zu sehen bekommt....
Wer kann mir helfen? Hier wäre schonmal der Code....wie postet man hier denn Dateien?
Code: |
var seite = new Array("uebermich", "home", "referenzen", "gaestebuch", "kontakt", "links", "kunst");
var current = -1;
function switchTo(num) {
if (current != num) {
this.onEnterFrame = function() {
container._alpha += (0 - container._alpha) / 4;
if (container._alpha < 1) {
fadeIn(num);
}
}
}
}
function fadeIn(num) {
current = num;
container.attachMovie(seite[num], "inhalt", 1);
this.onEnterFrame = function() {
container._alpha += (100 - container._alpha) / 4;
if (container._alpha > 99) delete this.onEnterFrame;
}
}
var clicked=this;
for(var i = 1;i <= 5;i++) {
this["mc"+i ].onRollOver = function() {
if(this != _root.clicked) {
this.gotoAndPlay("over");
}
};
this["mc"+i].onRollOut = this["mc"+i].onReleaseOutside = function() {
if(this != _root.clicked) {
this.gotoAndPlay("norm");
}
};
this["mc"+i].onRelease = function() {
if(this != _root.clicked) {
trace("vor: "+_root.clicked)
//hier die Navigations-Aktion
switchTo(this._name.substring(2,3));
this.gotoAndPlay("out");
_root.clicked.gotoAndPlay("norm");
_root.clicked.useHandCursor = true;
_root.clicked = this;
trace("nach:"+_root.clicked);
this.useHandCursor = false;
}
};
}
| [/code]
Zuletzt bearbeitet von ciroco am Mi 24.03.2010 10:20, insgesamt 1-mal bearbeitet
|
|