• beyond tellerrand – play. Register Now!
Zurück   Flashforum > Flash > ActionScript > ActionScript 3

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 13-03-2010, 00:07   #1 (permalink)
SGD-Flashboon
 
Registriert seit: Sep 2009
Beiträge: 449
mc instanz prob

Hi,

ohne große worte hier ein pfeil der in richtung der 'circles' zeigt.

PHP-Code:
import caurina.transitions.*;
var 
lr:Number;
stop();
mc_01.circle01.addEventListener(MouseEvent.MOUSE_OVERmc_01_mouseover);
mc_02.circle02.addEventListener(MouseEvent.MOUSE_OVERmc_02_mouseover);
mc_03.circle03.addEventListener(MouseEvent.MOUSE_OVERmc_03_mouseover);
mc_04.circle04.addEventListener(MouseEvent.MOUSE_OVERmc_04_mouseover);
mc_05.circle05.addEventListener(MouseEvent.MOUSE_OVERmc_05_mouseover);
mc_06.circle06.addEventListener(MouseEvent.MOUSE_OVERmc_06_mouseover);
mc_01.circle01.addEventListener(MouseEvent.MOUSE_OUTmc_01_mouseout);
mc_02.circle02.addEventListener(MouseEvent.MOUSE_OUTmc_02_mouseout);
mc_03.circle03.addEventListener(MouseEvent.MOUSE_OUTmc_03_mouseout);
mc_04.circle04.addEventListener(MouseEvent.MOUSE_OUTmc_04_mouseout);
mc_05.circle05.addEventListener(MouseEvent.MOUSE_OUTmc_05_mouseout);
mc_06.circle06.addEventListener(MouseEvent.MOUSE_OUTmc_06_mouseout);
mc_01.circle01.addEventListener(MouseEvent.CLICKmc_01_mouseclick);
mc_02.circle02.addEventListener(MouseEvent.CLICKmc_02_mouseclick);
mc_03.circle03.addEventListener(MouseEvent.CLICKmc_03_mouseclick);
mc_04.circle04.addEventListener(MouseEvent.CLICKmc_04_mouseclick);
mc_05.circle05.addEventListener(MouseEvent.CLICKmc_05_mouseclick);
mc_06.circle06.addEventListener(MouseEvent.CLICKmc_06_mouseclick);



function 
mc_01_mouseover(evt:MouseEvent):void {
    
Tweener.addTween(arrow_mc, {rotation:-60time:0.8transition:"easeOutElastic"});
    
Tweener.addTween(knob_mc, {rotation:-60time:0.8transition:"easeOutElastic"});
    
    
mc_01.gotoAndPlay(2);
}
function 
mc_02_mouseover(evt:MouseEvent):void {
    
Tweener.addTween(arrow_mc, {rotation:-36time:0.8transition:"easeOutElastic"});
    
Tweener.addTween(knob_mc, {rotation:-36time:0.8transition:"easeOutElastic"});
    
    
mc_02.gotoAndPlay(2);
}
function 
mc_03_mouseover(evt:MouseEvent):void {
    
Tweener.addTween(arrow_mc, {rotation:-13time:0.8transition:"easeOutElastic"});
    
Tweener.addTween(knob_mc, {rotation:-13time:0.8transition:"easeOutElastic"});
    
    
mc_03.gotoAndPlay(2);
}
function 
mc_04_mouseover(evt:MouseEvent):void {
    
mc_04.gotoAndPlay(2);
    
Tweener.addTween(arrow_mc, {rotation:11time:0.8transition:"easeOutElastic"});
    
Tweener.addTween(knob_mc, {rotation:11time:0.8transition:"easeOutElastic"});
    
}
function 
mc_05_mouseover(evt:MouseEvent):void {
    
Tweener.addTween(arrow_mc, {rotation:34time:0.8transition:"easeOutElastic"});
    
Tweener.addTween(knob_mc, {rotation:34time:0.8transition:"easeOutElastic"});
    
    
mc_05.gotoAndPlay(2);
}
function 
mc_06_mouseover(evt:MouseEvent):void {
    
Tweener.addTween(arrow_mc, {rotation:58time:0.8transition:"easeOutElastic"});
    
Tweener.addTween(knob_mc, {rotation:58time:0.8transition:"easeOutElastic"});
    
    
mc_06.gotoAndPlay(2);
}
function 
mc_01_mouseclick(evt:MouseEvent):void {
}
function 
mc_02_mouseclick(evt:MouseEvent):void {
}
function 
mc_03_mouseclick(evt:MouseEvent):void {
}
function 
mc_04_mouseclick(evt:MouseEvent):void {
}
function 
mc_05_mouseclick(evt:MouseEvent):void {
}
function 
mc_06_mouseclick(evt:MouseEvent):void {
}
function 
mc_01_mouseout(evt:MouseEvent):void {
    
arrow_move_right();
    
mc_01.gotoAndPlay(1);
}
function 
mc_02_mouseout(evt:MouseEvent):void {
    
arrow_move_right();
    
mc_02.gotoAndPlay(1);
}
function 
mc_03_mouseout(evt:MouseEvent):void {
    
arrow_move_right();
    
mc_03.gotoAndPlay(1);
}
function 
mc_04_mouseout(evt:MouseEvent):void {
    
arrow_move_right();
    
mc_04.gotoAndPlay(1);
}
function 
mc_05_mouseout(evt:MouseEvent):void {
    
arrow_move_right();
    
mc_05.gotoAndPlay(1);
}
function 
mc_06_mouseout(evt:MouseEvent):void {
    
arrow_move_right();
    
mc_06.gotoAndPlay(1);
}



function 
arrow_move_left():void {
    
Tweener.addTween(arrow_mc, {rotation:-75time:10transition:"easeInOutBounce"onComplete:arrow_move_right});
    
Tweener.addTween(knob_mc, {rotation:-75time:10transition:"easeInOutBounce"});
    
    
lr=0;
}
function 
arrow_move_right():void {
Tweener.addTween(arrow_mc, {rotation:80time:10transition:"easeInOutCirc"onComplete:tween_done});
    
Tweener.addTween(knob_mc, {rotation:80time:10transition:"easeInOutCirc"});
    
    
lr=1
}
function 
tween_done():void {
    
arrow_move_left();
}

tween_done(); 
warum funzt der switch zwischen den circle_mc's nur bei mc_01?

bei allen anderen setzt sich beim mouseout der mc nicht zurück zu zb. mc_02.bild 1

http://flstudio.tv/files/tacho2.swf

danke für eure hilfe

Geändert von xeed (13-03-2010 um 00:19 Uhr)
xeed ist offline   Mit Zitat antworten
Alt 13-03-2010, 00:38   #2 (permalink)
in the boondocks
 
Benutzerbild von shin10
 
Registriert seit: Feb 2006
Ort: Augsburg
Beiträge: 3.236
ich rate jetzt mal. du hast da noch irgendwo framescripts?
ich würde dir ohnehin raten das etwas anders anzugehen und eine function für alle buttons zu schreiben. da wird man ja kirre.

mfg

sx
__________________

flintfabrik.de
shin10 ist gerade online   Mit Zitat antworten
Alt 13-03-2010, 00:59   #3 (permalink)
in the boondocks
 
Benutzerbild von shin10
 
Registriert seit: Feb 2006
Ort: Augsburg
Beiträge: 3.236
ein code-vorschlag:
PHP-Code:
import caurina.transitions.*;
var 
lr:Number;
stop();
mc_01.dingsda "Hallo";
mc_02.dingsda "da!";
mc_03.dingsda "Ist";
mc_04.dingsda "das";
mc_05.dingsda "nicht";
mc_06.dingsda "einfacher?";

for (var 
1<=6i++) {
    
this["mc_0" i].addEventListener(MouseEvent.MOUSE_OVERmouseover);
    
this["mc_0" i].addEventListener(MouseEvent.MOUSE_OUTmouseout);
    
this["mc_0" i].addEventListener(MouseEvent.CLICKmouseclick);
}


function 
mouseover(evt:MouseEvent):void {
    var 
winkel:Number = new Number((180/Math.PI)*Math.atan2(arrow_mc.y-evt.currentTarget.yarrow_mc.x-evt.currentTarget.x));
    
Tweener.addTween(arrow_mc, {rotation:winkeltime:0.8transition:"easeOutElastic"});
    
Tweener.addTween(knob_mc, {rotation:winkeltime:0.8transition:"easeOutElastic"});

    
evt.currentTarget.gotoAndPlay(2);
}

function 
mouseclick(evt:MouseEvent):void {
    
trace(evt.currentTarget.dingsda)
}

function 
mouseout(evt:MouseEvent):void {
    
arrow_move_right();
    
evt.currentTarget.gotoAndStop(1);
}


function 
arrow_move_left():void {
    
Tweener.addTween(arrow_mc, {rotation:-75time:10transition:"easeInOutBounce"onComplete:arrow_move_right});
    
Tweener.addTween(knob_mc, {rotation:-75time:10transition:"easeInOutBounce"});

    
lr 0;
}
function 
arrow_move_right():void {
    
Tweener.addTween(arrow_mc, {rotation:80time:10transition:"easeInOutCirc"onComplete:tween_done});
    
Tweener.addTween(knob_mc, {rotation:80time:10transition:"easeInOutCirc"});

    
lr 1;
}
function 
tween_done():void {
    
arrow_move_left();
}

tween_done(); 
mfg

sx
__________________

flintfabrik.de
shin10 ist gerade online   Mit Zitat antworten
Alt 13-03-2010, 10:51   #4 (permalink)
SGD-Flashboon
 
Registriert seit: Sep 2009
Beiträge: 449
vielen dank, so ist das natürlich echt cooler

aber der stopt die mc_s 2-6 trotzdem nicht, nur beim ersten machters, obwohl das alles umbenannte duplikate sind.

haste dafür noch ne idee?
xeed ist offline   Mit Zitat antworten
Alt 13-03-2010, 13:28   #5 (permalink)
in the boondocks
 
Benutzerbild von shin10
 
Registriert seit: Feb 2006
Ort: Augsburg
Beiträge: 3.236
da muss sich irgendwo noch script verstecken. aber vielleicht kannst du mal die fla hochladen.

mfg

sx
__________________

flintfabrik.de
shin10 ist gerade online   Mit Zitat antworten
Alt 15-03-2010, 13:00   #6 (permalink)
SGD-Flashboon
 
Registriert seit: Sep 2009
Beiträge: 449
jo da is noch stop und play script in den movieclips.

aber die sind exakt wie die nr1, und da funzts ja
xeed ist offline   Mit Zitat antworten
Alt 15-03-2010, 19:42   #7 (permalink)
in the boondocks
 
Benutzerbild von shin10
 
Registriert seit: Feb 2006
Ort: Augsburg
Beiträge: 3.236
raushaun und neu rein. irgendwas stimmt nicht
__________________

flintfabrik.de
shin10 ist gerade online   Mit Zitat antworten
Alt 17-03-2010, 15:45   #8 (permalink)
SGD-Flashboon
 
Registriert seit: Sep 2009
Beiträge: 449
so habs jetz nur über actionscript gemacht, nich mit zeitleisten-tweens und nu funzts...

aber kp warum.

danke dir
xeed 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


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Instanz in der Instanz hittesten dr.mc.coy ActionScript 2 1 11-04-2008 14:22
Problem: Instanz Variabel hochrechnen von einer anderen Instanz aus... Rouby ActionScript 1 7 29-07-2004 23:26
Prob: "goto" befehl in höhrer instanz cenix Flash MX 2 11-04-2004 14:04
prob mit instanz -as rian ActionScript 1 4 22-08-2002 10:54
gaaanz seltsames Prob ... Symbol A erzeugt Instanz von Motiv B Basark Flash 4 und Flash 5 1 22-11-2001 10:39


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:45 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele