 |
| Hinweise |
Willkommen im TP-Hilfe-Forum!Dies ist ein Forum zu den Themen Photoshop, Dreamweaver, Flash, Selbständigkeit und mehr, in dem Du Hilfe, Anleitung oder eine Lösung zu Deinen Problemen erhältst. Aktuell bist Du in unseren Foren als Gast mit reinen Leserechten unterwegs. Wenn Du Dich registrierst, kannst Du eigene Themen verfassen, deine Frage stellen und privat mit anderen TPlern kommunizieren. Weitere Foren werden zugänglich, und Du wirst – falls gewünscht – per Mail über neue Beiträge informiert. Die Registrierung ist schnell und kostenlos. Sollten bei der Registrierung Fragen auftauchen, reicht ein Klick in unsere Hilfe - Häufig gestellte Fragen oder eine kurze Mitteilung an das Support-Team. Viel Spaß bei Traum-Projekt.com |
06.03.2004, 15:54
|
#1
|
|
TP-Supporter
Registriert seit: Jan 2004
Ort: hyannis
|
leichte frage: dragOut, onPress, ... mit einmal festlegen...
ich habe folgenden script:
PHP-Code:
news_mc.onRelease && news_mc.dragOut = function(){
_root.b = 1;
_root.threads_mc.gotoAndPlay(_root.threads_mc._currentframe + 1);
};
ich möchte das das auch gleich für dragOut gilt.
ich möchte aber nicht jedesmal das script neu schreiben, weil ich viele mcs hab wo ich das machen muss
sowas wie news_mc.onRelease && news_mc.dragOut geht leider nicht....
help!
|
|
|
07.03.2004, 16:59
|
#2
|
|
TP-Specialist
Registriert seit: Mar 2001
Ort: NDS
|
PHP-Code:
news_mc.onRelease = function(){
_root.b = 1;
_root.threads_mc.gotoAndPlay(_root.threads_mc._currentframe + 1);
};
news_mc.dragOut = function(){
_root.b = 1;
_root.threads_mc.gotoAndPlay(_root.threads_mc._currentframe + 1);
};
oder
1. Keyframe:
PHP-Code:
function machwas(){
_root.b = 1;
_root.threads_mc.gotoAndPlay(_root.threads_mc._currentframe + 1);
};
auf deiner Instanz:
PHP-Code:
news_mc.onRelease = function(){
machwas ();
};
news_mc.dragOut = function(){
machwas ();
};
__________________
the0bone
Wissen ist Macht, nichts Wissen macht nichts!
|
|
|
24.03.2004, 16:07
|
#3
|
|
TP-Supporter
Registriert seit: Jan 2004
Ort: hyannis
|
solche festgelegten funktionen gelten für den gesamten swf oder nur für den mc in dem ich sie festlege???
|
|
|
24.03.2004, 17:21
|
#4
|
|
TP-Insider
Registriert seit: May 2003
Ort: Köln
|
du kannst funktionen definieren und in Kombination, so wie du sie brauchst, immer aufrufen sobald sie einmal erstellt wurden. (Pfad berücksichtigen... wie bei Variablen, Instanzen etc. gewohnt halt auch)
__________________
Code:
if (IchKannsNicht==GehtNicht){IchKannsNicht=true}
else {IchKannsNicht=IchLerne}
GreetZzz,
<=:: ChrisU ::=>
|
|
|
24.03.2004, 17:46
|
#5
|
|
TP-Supporter
Registriert seit: Jan 2004
Ort: hyannis
|
aso thx
|
|
|
24.03.2004, 18:24
|
#6
|
|
TP-Supporter
Registriert seit: Jan 2004
Ort: hyannis
|
wieso funzt dieser script nicht????
wenn ich mit trace arbeite, merke ich, das eigentlich alles stimmt...
aber die buttons reagieren trotzdem nicht....
PHP-Code:
function rollover () {
this.lauf = true;
this.kontr = true;
};
function rollout () {
this.lauf = false;
this.kontr = false;
};
function enterframe () {
if (this.lauf && this.kontr) {
this.nextFrame ();
}
if (!this.lauf && !this.kontr) {
this.prevFrame ();
}
};
navi_home_mc.lauf = false;
navi_home_mc.kontr = true;
navi_home_mc.onRollOver = function () {
rollover ();
};
navi_home_mc.onRollOut = function () {
rollout ();
};
navi_home_mc.onEnterFrame = function () {
enterframe ();
};
bei dem mc um den es geht steht im 1. frame stop(); kontr = true; im letzen stop(''); kontr = false;
ich mache das mit den funktionen, weil es noch 7 weitere buttons gibt
Geändert von hesa (24.03.2004 um 18:28 Uhr).
|
|
|
24.03.2004, 19:34
|
#7
|
|
TP-Insider
Registriert seit: May 2003
Ort: Köln
|
auf den ersten Blick ein Pfadproblem.
z.B. hier (gilt für den gesamten code):
function rollover () {
this.lauf = true;
this.kontr = true;
};
this ist normalerweise Objektbezogen. Da du aber eine Funktion definierst, die erst greift, wenn sie initialisiert wird, weiss flash nicht auf was das bezogen ist.
wenn du die Variablen auf der Hauptzeitleiste definiert hast, musst du sie auch so adressieren:
_root.lauf=true; _root.kontr=true; etc.
EDIT
Das auf dem Avatar bin ich NICHT! *fg
Mit 26J. hab ich keinen Babyspeck mehr!
__________________
Code:
if (IchKannsNicht==GehtNicht){IchKannsNicht=true}
else {IchKannsNicht=IchLerne}
GreetZzz,
<=:: ChrisU ::=>
Geändert von ChrisU (24.03.2004 um 19:39 Uhr).
|
|
|
24.03.2004, 20:07
|
#8
|
|
TP-Supporter
Registriert seit: Jan 2004
Ort: hyannis
|
lol thx, hab mir schon gedacht das es wieder mal am pfad liegt!!!!
@avatar
naja, man kann ja nicht genau erkennen wie alt die person auf dem bild ist!!!!!
|
|
|
24.03.2004, 20:11
|
#9
|
|
TP-Supporter
Registriert seit: Jan 2004
Ort: hyannis
|
hatt dann jemand mal ne ahnung wie ich das ein bisschen kürzen könnte????
PHP-Code:
function rollover () {
this.lauf = true;
this.kontr = true;
};
function rollout () {
this.lauf = false;
this.kontr = false;
};
function enterframe () {
if (this.lauf && this.kontr) {
this.nextFrame ();
}
if (!this.lauf && !this.kontr) {
this.prevFrame ();
}
};
navi_home_mc.lauf = false;
navi_home_mc.kontr = true;
navi_skills_mc.lauf = false;
navi_skills_mc.kontr = true;
navi_design_mc.lauf = false;
navi_design_mc.kontr = true;
navi_design4u_mc.lauf = false;
navi_design4u_mc.kontr = true;
navi_contact_mc.lauf = false;
navi_contact_mc.kontr = true;
navi_guestbook_mc.lauf = false;
navi_guestbook_mc.kontr = true;
navi_links_mc.lauf = false;
navi_links_mc.kontr = true;
navi_home_mc.onRollOver = function () {
this.lauf = true;
this.kontr = true;
};
navi_skills_mc.onRollOver = function () {
this.lauf = true;
this.kontr = true;
};
navi_design_mc.onRollOver = function () {
this.lauf = true;
this.kontr = true;
};
navi_design4u_mc.onRollOver = function () {
this.lauf = true;
this.kontr = true;
};
navi_contact_mc.onRollOver = function () {
this.lauf = true;
this.kontr = true;
};
navi_guestbook_mc.onRollOver = function () {
this.lauf = true;
this.kontr = true;
};
navi_links_mc.onRollOver = function () {
this.lauf = true;
this.kontr = true;
};
navi_home_mc.onRollOut = function () {
this.lauf = false;
this.kontr = false;
};
navi_skills_mc.onRollOut = function () {
this.lauf = false;
this.kontr = false;
};
navi_design_mc.onRollOut = function () {
this.lauf = false;
this.kontr = false;
};
navi_design4u_mc.onRollOut = function () {
this.lauf = false;
this.kontr = false;
};
navi_contact_mc.onRollOut = function () {
this.lauf = false;
this.kontr = false;
};
navi_guestbook_mc.onRollOut = function () {
this.lauf = false;
this.kontr = false;
};
navi_links_mc.onRollOut = function () {
this.lauf = false;
this.kontr = false;
};
navi_home_mc.onEnterFrame = function () {
if (this.lauf && this.kontr) {
this.nextFrame ();
}
if (!this.lauf && !this.kontr) {
this.prevFrame ();
}
};
navi_skills_mc.onEnterFrame = function () {
if (this.lauf && this.kontr) {
this.nextFrame ();
}
if (!this.lauf && !this.kontr) {
this.prevFrame ();
}
};
navi_design_mc.onEnterFrame = function () {
if (this.lauf && this.kontr) {
this.nextFrame ();
}
if (!this.lauf && !this.kontr) {
this.prevFrame ();
}
};
navi_design4u_mc.onEnterFrame = function () {
if (this.lauf && this.kontr) {
this.nextFrame ();
}
if (!this.lauf && !this.kontr) {
this.prevFrame ();
}
};
navi_contact_mc.onEnterFrame = function () {
if (this.lauf && this.kontr) {
this.nextFrame ();
}
if (!this.lauf && !this.kontr) {
this.prevFrame ();
}
};
navi_guestbook_mc.onEnterFrame = function () {
if (this.lauf && this.kontr) {
this.nextFrame ();
}
if (!this.lauf && !this.kontr) {
this.prevFrame ();
}
};
navi_links_mc.onEnterFrame = function () {
if (this.lauf && this.kontr) {
this.nextFrame ();
}
if (!this.lauf && !this.kontr) {
this.prevFrame ();
}
};
navi_home_mc.onRelease = function(){
_root.threads_mc.gotoAndPlay(1);
};
navi_skills_mc.onRelease = function(){
_root.threads_mc.gotoAndPlay(3);
};
navi_design_mc.onRelease = function(){
_root.threads_mc.gotoAndPlay(5);
};
navi_design4u_mc.onRelease = function(){
_root.threads_mc.gotoAndPlay(7);
};
navi_contact_mc.onRelease = function(){
_root.threads_mc.gotoAndPlay(9);
};
navi_guestbook_mc.onRelease = function(){
_root.threads_mc.gotoAndPlay(11);
};
navi_links_mc.onRelease = function(){
_root.threads_mc.gotoAndPlay(13);
};
|
|
|
|
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
|
|
|
| Themen-Optionen |
Thema durchsuchen |
|
|
|
| Thema bewerten |
|
|
Forumregeln
|
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.
HTML-Code ist aus.
|
|
|
Alle Zeitangaben in WEZ +2. Es ist jetzt 09:41 Uhr.
|
 |