Zurück   Flashforum > Flash > ActionScript > ActionScript 3

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 11-02-2008, 12:26   #1 (permalink)
OFF
Neuer User
 
Registriert seit: Dec 2007
Beiträge: 13
Panorama

Hallo zusammen,

ich habe von einem bekannten einen Code für eine Panorama-Animation bekommen.

PHP-Code:
addEventListener(Event.ENTER_FRAMEscrollit); 
// -> is the zone defined for scrolling
var offset:int 10;







// stage.StageWidth - panowidth 
function scrollit (e)
{
    if (
mouseX offset)
    {
        
trace("goleft"); 
        
pano_mc.pano_mc.x-4;
        
pano2_mc.pano2_mc.x-4;
        if (
pano_mc.x<=stage.stageWidth-pano_mc.width&&pano_mc.x>=stage.stageWidth-pano_mc.width-5)
        {
            
pano2_mc.pano_mc.x+pano_mc.width;
        };
        
        if (
pano2_mc.x<=stage.stageWidth-pano2_mc.width&&pano2_mc.x>=stage.stageWidth-pano2_mc.width-5)
        {
            
pano_mc.pano2_mc.x+pano2_mc.width;
        };
    }
    
    
        if (
mouseX stage.stageWidth offset && mouseX stage.stageWidth )
    {
        
trace("goright"); 
        
pano_mc.pano_mc.x+4;
        
pano2_mc.pano2_mc.x+4;
        if (
pano_mc.x>0&&pano_mc.x<5)
        {
            
pano2_mc.pano_mc.x-pano_mc.width;
        };
        
        if (
pano2_mc.x>0&&pano2_mc.x<5)
        {
            
pano_mc.pano2_mc.x-pano_mc.width;
        };


    }


Es funktioniert alles blendend, bis ich weitere Objekte (mc's) auf das Panorama setze. Dann verschwinden diese plötzlich beim Scroll.

Ich bin ein totaler Actionscript-Anfänger. Deshalb bitte ich um Nachsicht, wenn mein eigener Code null Sinn macht.


PHP-Code:
addEventListener(Event.ENTER_FRAMEscrollit); 
// -> is the zone defined for scrolling
var offset:int 10;







// stage.StageWidth - panowidth 
function scrollit (e)
{
    if (
mouseX offset)
    {
        
//trace("goleft"); 
        
pano_mc.pano_mc.x-4;
        
pano2_mc.pano2_mc.x-4;
        
stern_mc.stern_mc.x-4;
        
stern2_mc.stern2_mc.x-6;
        
stern3_mc.stern3_mc.x-5;
        
maria_mc.maria_mc.x-4;
        
        
        
        if (
pano_mc.x<=stage.stageWidth-pano_mc.width&&pano_mc.x>=stage.stageWidth-pano_mc.width-5)
        {
            
pano2_mc.pano_mc.x+pano_mc.width;
            
        };
        
        if (
pano2_mc.x<=stage.stageWidth-pano2_mc.width&&pano2_mc.x>=stage.stageWidth-pano2_mc.width-5)
        {
            
pano_mc.pano2_mc.x+pano2_mc.width;
            
        };
        
        
        
    }
    
    
        if (
mouseX stage.stageWidth offset && mouseX stage.stageWidth )
    {
        
//trace("goright"); 
        
pano_mc.pano_mc.x+4;
        
pano2_mc.pano2_mc.x+4;
        
stern_mc.stern_mc.x+4;
        
stern2_mc.stern2_mc.x+6;
        
stern3_mc.stern3_mc.x+5;
        
maria_mc.maria_mc.x+4;
        
        
        if (
pano_mc.x>0&&pano_mc.x<5)
        {
            
pano2_mc.pano_mc.x-pano_mc.width;
            
        };
        
        if (
pano2_mc.x>0&&pano2_mc.x<5)
        {
            
pano_mc.pano2_mc.x-pano2_mc.width;
            
        
        };
        
        if (
stern_mc.x>0&&stern_mc.x<10)
        {
            
pano_mc.pano2_mc.x-pano2_mc.width;
        
        };

    }


Ich wäre sehr dankbar für etwas Hilfe. Wie kann ich meine eigenen Objekte, (welche kleiner sind als die Panorama MC's) in den Code integrieren?

Vielen Dank schon mal.
OFF 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 12:09 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele