{lang: 'de'}
Flashhilfe.de - Flash Community

Übersetzung AS2 in AS3 (Scrolling Thumbnails) [Flash 10]

 


AntwortenRegistrieren Seite1  

CaptainFarrell#1
Benutzerbild von CaptainFarrell
Beiträge: 4
Registriert: Aug 2011

21.08.2011, 23:38

Hallo,

als ich noch Flash 8 hatte, habe ich mit AS 2 eine Thumbnail-Bar erstellt, die sich je nach Mausposition nach links oder nach rechts bewegt... Ausgesehen hat das so:

PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
_root.onEnterFrame = function(){
    if((_root._ymouse>511) or ((_root._ymouse<420) and (_root._ymouse>305))){
        myVar=true;
    }
    if((_root._ymouse<304) or ((_root._ymouse<510) and (_root._ymouse>421))){
        myVar=false;
    }
    if(_root._xmouse<100 and _root._ymouse>305 and _root._ymouse<420){
        myVar1=true;
    }
    else{
        myVar1=false;
    }
    if(_root._xmouse>700 and _root._ymouse>305 and _root._ymouse<420){
        myVar2=true;
    }
    else{
        myVar2=false;
    }
    if(_root._xmouse<100 and _root._ymouse>500 and _root._ymouse<540){
        myVar3=true;
    }
    else{
        myVar3=false;
    }
    if(_root._xmouse>700 and _root._ymouse>500 and _root._ymouse<540){
        myVar4=true;
    }
    else{
        myVar4=false;
    }
    if(_root._xmouse<350 and myVar == true){
        barbaras.prevFrame();
    }
    if(((myVar1 == true) or (myVar3 == true)) and myVar == true){
        barbaras.prevFrame();
        barbaras.prevFrame();
    }
    if(_root._xmouse>450 and myVar == true){
        barbaras.nextFrame();
    }
    if(((myVar2 == true) or (myVar4 == true)) and myVar == true){
        barbaras.nextFrame();
        barbaras.nextFrame();
    }
    else{
        barbaras.stop();
    }
}


und hat auch super funktioniert...
nun möchte bzw. muss ich das ganze in as 3 umschreiben, da ich davon jedoch noch weniger ahnung als vom zweier hab, funktioniert das nicht ganz so, wie ich möchte (besser gesagt - es funktioniert gar nicht). bis jetzt habe ich es in etwa so versucht:

PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
var myVar:Boolean = false

barbaras.addEventListener(Event.ENTER_FRAME, scrolling); 

function scrolling(event:Event):void 
{
    if((mouseY>511) or ((mouseY<420) and (mouseY>305))){
        myVar=true;
    }
    if((mouseY<304) or ((mouseY<510) and (mouseY>421))){
        myVar=false;
    }
    if(mouseX<100 and mouseY>305 and mouseY<420){
        myVar1=true;
    }
    else{
        myVar1=false;
    }
    if(mouseX>700 and mouseY>305 and mouseY<420){
        myVar2=true;
    }
    else{
        myVar2=false;
    }
    if(mouseX<100 and mouseY>500 and mouseY<540){
        myVar3=true;
    }
    else{
        myVar3=false;
    }
    if(mouseX>700 and mouseY>500 and mouseY<540){
        myVar4=true; }
    }
    else{
        myVar4=false; }
    }
    if(mouseX<350 and myVar == true){
        barbaras.prevFrame(); }
    }
    if(((myVar1 == true) or (myVar3 == true)) and myVar == true){
        barbaras.prevFrame();
        barbaras.prevFrame();
    }
    if(_root._xmouse>450 and myVar == true){
        barbaras.nextFrame();
    }
    if(((myVar2 == true) or (myVar4 == true)) and myVar == true){
        barbaras.nextFrame();
        barbaras.nextFrame();
    }
    else{
        barbaras.stop();
    }
}


es kommen gleich mal lauter fehlermeldungen, da ich jedoch wie gesagt ein kompletter newbie bin was flash und as angeht, kann ich mit denen nicht viel anfangen...

deswegen wollt ich mal fragen, obs vl hier jemanden gibt, der mir helfen kann?
danke schon mal,

lg
vindel#2
Benutzerbild von vindelFlashhilfe.de Moderator
Beiträge: 3000
Wohnort: Köln
Registriert: Oct 2007

22.08.2011, 10:54