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

    file xml esterno = menu flash.....link?

    un file flash richiama il seguente xml esterno per il testo dei links di un menù.

    come aggiungo il relativo collegamento ipertestuale?........

    non so niente di xml........ho letto la guida ma non sono riuscita a risolvere granché.........

    grazie!!!!!!!

    <?xml version="1.0"?>
    <MENU>
    <ITEM id="home">Pagina principale ...</ITEM>
    <ITEM id="works">I miei lavori</ITEM>
    <ITEM id="curriculum">curriculum</ITEM>
    <ITEM id="friends"> amici</ITEM>
    <ITEM id="credits"> ...</ITEM>
    <ITEM id="contact">Come contattarmi ...</ITEM>
    <ITEM id="links">Siti utili ...</ITEM>
    </MENU>
    ranACIDA against chloroformic minds

  2. #2
    ho provato di tutto, ma il menù flash che ho scaricato prende i dati da questo file esterno:

    chi mi dice dove aggiungere i link...........vi prego aiutatemi, il mio capo si é fissato con sto menù e vuole per forza questo......(


    /* #####################################
    » Menu Class
    Written by: CyberPunk
    Release Date: 9/4/03
    Contact: alessandro.bianco@visual-emotion.it
    ##################################### */
    // Constructor
    _global.Menu = function(data_file, ref) {
    // Set the menu reference
    this._p = ref;
    // Read the menu info from the xml file
    this.XmlData = new XML();
    this.XmlData.ignoreWhite = true;
    this.XmlData._p = this;
    this.XmlData.load(data_file);
    this.XmlData.onLoad = function(ok) {
    if (ok) {
    this._p.SetVariables();
    }
    };
    delete ref;
    delete data_file;
    };
    // Parse the information loaded
    Menu.prototype.SetVariables = function() {
    // Set the vars readed from the xml file
    this.Root = this.XmlData.childNodes;
    this.Titles = new Array();
    this.Descriptions = new Array();
    for (i=0; i<this.Root.length; i++) {
    if (this.Root[i].nodeName.toUpperCase() == "MENU") {
    this.Nodes = this.Root[i].childNodes;
    for (k=0; k<this.Nodes.length; k++) {
    this.Item++;
    this.Titles.push(this.Nodes[k].attributes.id.toString());
    this.Descriptions.push(this.Nodes[k].childNodes.toString());
    }
    }
    }
    delete this.Root;
    delete this.Nodes;
    delete this.XmlData;
    this.DrawMenu();
    };
    // Construct the UI
    Menu.prototype.DrawMenu = function() {
    // Use vars and arrays to contruct the menu
    for (i=0; i<this.Item; i++) {
    this._p.attachMovie("ITEM", "Item" add i, i);
    this._mc = eval(this._p add ".Item" add i);
    this._mc._x = 0;
    this._mc._y = 174+21*i;
    this._mc.Title.label.htmlText = this.Titles[i].toUpperCase();
    this._mc.Graphic.Slide.label.htmlText = this.Titles[i].toUpperCase();
    this._mc.Description.htmlText = "» " add this.Descriptions[i];
    this.format = new TextFormat();
    this.format.align = "right";
    this._mc.Title.label.setTextFormat(this.format);
    this._mc._id = i;
    delete this.format;
    }
    this.SetAction();
    this.SetActive(0);
    };
    // Set the action for the menu tabs
    Menu.prototype.SetAction = function() {
    for (i in this.Titles) {
    this._mc = eval(this._p add ".Item" add i);
    this._mc._ref = this;
    this._mc.$active = (i == 0) ? true : false;
    this._mc.Ico.gotoAndPlay((i == 0) ? "SlideIn" : "SlideOut");
    this._mc.onRelease = function() {
    if (this.$active == false) {
    this._ref.SetActive(this._id);
    }
    };
    }
    };
    // Set the visualization options
    Menu.prototype.SetActive = function(id) {
    for (i in this.Titles) {
    this._mc = eval(this._p add ".Item" add i);
    // Move Title And Graphics of the Mc
    this._mc.Ico.gotoAndPlay((id == i) ? "SlideIn" : (this._mc._currentframe != 1 && this._mc.$active == true) ? "SlideOut" : null);
    this._mc.gotoAndPlay((id == i) ? "UnActive" : (this._mc._currentframe == 1) ? "Stop" : (this._mc.$active == true) ? "Active" : null);
    this._mc.$active = (id == i) ? true : (this._mc._currentframe == 1) ? this._mc.$active : false;
    // Move the tabs (with easing) in the correct position
    if (id<i) {
    // Move top to bottom
    if (this._mc.act != "GoToBt") {
    this._mc.__t__ = 0;
    this._mc.act = "GoToBt";
    delete this._mc.onEnterFrame;
    this._mc.onEnterFrame = function() {
    if (this._y == (21*this._id+174)) {
    delete this.onEnterFrame;
    this.act = "";
    delete this._mc._x0;
    delete this._mc._y0;
    delete this._mc._x1;
    delete this._mc._y1;
    delete this._mc.spd;
    delete this._mc.__t__;
    }
    this.moveFromTo(this._x, this._y, this._x, (21*this._id+174), 0.02);
    };
    }
    } else if (id>=i) {
    // Move bottom to top
    if (this._mc.act != "GoToTp") {
    this._mc.__t__ = 0;
    this._mc.act = "GoToTp";
    delete this._mc.onEnterFrame;
    this._mc.onEnterFrame = function() {
    if (this._y == 21*this._id+1) {
    delete this.onEnterFrame;
    this.act = "";
    delete this._mc._x0;
    delete this._mc._y0;
    delete this._mc._x1;
    delete this._mc._y1;
    delete this._mc.spd;
    delete this._mc.__t__;
    }
    this.moveFromTo(this._x, this._y, this._x, 21*this._id+1, 0.02);
    };
    }
    }
    }
    delete id;
    };
    // Move Clips (written by gdeparta@yahoo.com )
    MovieClip.prototype.moveFromTo = function(xFrom, yFrom, xTo, yTo, speed) {
    this.x0 = xFrom == undefined ? this._x : xFrom;
    this.y0 = yFrom == undefined ? this._y : yFrom;
    this.x1 = xTo == undefined ? xFrom : xTo;
    this.y1 = yTo == undefined ? yFrom : yTo;
    this.spd = speed == undefined || speed>1 ? 0.0125 : speed;
    this.__t__ += this.spd;
    this._x = Math.round(this.x0+(this.x1-this.x0)*this.__t__);
    this._y = Math.round(this.y0+(this.y1-this.y0)*this.__t__);
    };
    ranACIDA against chloroformic minds

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 © 2026 vBulletin Solutions, Inc. All rights reserved.