Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    carousel con oggetti non xml

    salve a tutti,
    innanzitutto spero di aver centrato il forum.
    vado subito al dunque
    sto segurndo un tutorial su gotoandlearn.com .
    precisamente sto imparado a creare una galleria immagini con effetto carousel, e quaindi sono partito dal primo tutorial (Creating 3D Carousels ).

    questo tutorial l'autore crea un mc chiamato ball e poi lo ripete 10 volte (o a piacere).
    il problema e che alla fine sono tutti uguali. (di seguito il codice)

    ////////////

    var numOfBalls:Number = 10;
    var radiusX:Number = 250;
    var radiusY:Number = 75;
    var centerX:Number = Stage.width / 2;
    var centerY:Number = Stage.height / 2;
    var speed:Number = 0.05;

    for(var i=0;i<numOfBalls;i++)
    {
    var t = this.attachMovie("ball","b"+i,i+1);
    t.angle = i * ((Math.PI*2)/numOfBalls);
    t.onEnterFrame = mover;
    }

    function mover()
    {
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s = this._y /(centerY+radiusY);
    this._xscale = this._yscale = s*100;
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale) + 100);
    }

    this.onMouseMove = function()
    {
    speed = (this._xmouse-centerX)/1500;
    }


    /////////////////////////////


    Ho messo in grassetto quello che secondo me è da modificare


    nel secondo filmato da la possibilità di inserire oggetti diversi ma tramit xml.
    la mia domanda è questa.
    possi creare un effetto carousel senza utilizzare xml ,ma inserendo diversi filmati?
    Spero di essere stato chiaro.
    Grazie in anticipo.
    Felix

  2. #2
    Utente di HTML.it L'avatar di and80
    Registrato dal
    Mar 2003
    Messaggi
    15,182
    Certo che puoi, nel codice che carica il file xml esterno verifichi la parte in cui c'è l'interazione con l'xml e la cambi con quello che vuoi fare tu. Se invece preferisci che qualcuno lo faccia per te, descrivi con esattezza quello che vuoi fare e armati di tanta pazienza in attesa che qualcuno che abbia la possibilità lo faccia per te.

  3. #3
    dal codice purtroppo non ho capito, e penso sia abbastanza complesso...
    allora pongo un altra questione...nel file xml posso inserire del codice html nella sezione content?

    un esempio di contenuto del file xml è questo:
    <icons>

    <icon image="icon1.png" tooltip="LimeWire" content="LimeWire is a peer-to-peer file sharing client for the Gnutella network. It is free software released under the GNU General Public License. Limewire was the first file sharing program to support firewall-to-firewall file transfers, a feature introduced in version 4.2, which was released in November 2004.LimeWire is written in Java and therefore runs on any computer with a Java Virtual Machine installed. To facilitate installation for casual users, installation packages are available for Microsoft Windows, Mac OS X, and in the RPM format for Linux. Support for Mac OS 9 and previous versions has been dropped with LimeWire 4.0.10. The Windows version of the LimeWire installer includes a version of Sun Microsystems' Java installer which will download and install version 1.5 of the Java Runtime Environment if it detects the machine does not have a recent version of Java installed." />

    </icons>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.