Avatar billede sniperpete Nybegynder
27. april 2007 - 08:16

Flash panorama

jeg har lagt panorama ud på dette link:

http://ferieborg.dk/250-flash_stue.htm

problemet er at den kører ud i sort hvis man ikke bruger panoramafunktionen med markøren.. den skal bare stoppe når billedet stopper.
her kan i se action scriptet:

btlink = [""];
conteudo = new XML();
conteudo.ignoreWhite = true;
conteudo.load("conteudo.xml")
conteudo.onLoad =function (success) {
    if(success) {
    for (var x = 0; x < _root.conteudo.firstChild.childNodes.length; x++) {
        btlink.push(_root.conteudo.firstChild.childNodes[x].attributes.link)
        trace(_root.conteudo.firstChild.childNodes[x].attributes.link)
    }
    }
   
           
}

// Parametros
anchoPelicula = 764;
altoPelicula = 500;
acel = 10;
iniciado = true;
// Operaciones
fondo_mc._width=anchoPelicula;
fondo_mc._height=altoPelicula;
fondo_mc._x=0;
fondo_mc._y=0;
acel /= 50;
panoramica_mc._y = 0;
panoramica2_mc._y = 0;
mitad = anchoPelicula/2;
ancho = panoramica_mc._width;
panoramica_mc._x = 0;
panoramica2_mc._x = (0-ancho);

// Al pasar el mouse encima

fondo_mc.onRollOver = function() {
    iniciado = false;
    mover();
}

fondo_mc.onRollOut = function() {
    //delete panoramica_mc.onEnterFrame;
}

// Funcion Mover
function mover() {
    barraqueanda();
    panoramica_mc.onEnterFrame = function() {
        //trace("grandao dando role em: "+ _root.panoramica_mc._x);
        //anda2();
        if (_xmouse != mitad) {
            if (_xmouse<mitad && _ymouse < 500) {
                if(panoramica_mc._x < 0) {
                inc = Math.abs(_xmouse-mitad)*(acel/10);
                //       
                    panoramica_mc._x += inc;
                   
                }               
            } else {
                inc = Math.abs(_xmouse-mitad)*(acel/10);
                if (panoramica_mc._x>(-2200) && _ymouse < 500) {
                       
                        panoramica_mc._x -= inc;
                       
                    }
               
            }
        }
    }
}
init();
function init() {
    barraqueanda();
    this.onEnterFrame = function() {
        if (iniciado) {
            if (panoramica_mc._x>(-3780.4)) {
            panoramica_mc._x -= 1.8;
            }
        }else{
        delete this.onEnterFrame;
    }
    }
}
   



maior = _root.panoramica_mc._width;
menor = _root.slider._width;
desl = maior - Stage.width +20;

var prop = desl / menor;


function anda(obj, lugar){
    //trace("movendo " + obj._name + " para " + parseInt(lugar));
    obj._x = lugar;
}

function barraqueanda() {
    _root.slider.bar.onEnterFrame = function() {
    this._x =  (_root.panoramica_mc._x / 5.5) *-1;
}
}
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester