Visualizzazione dei risultati da 1 a 4 su 4

Discussione: tooltip prototype

  1. #1
    Utente di HTML.it L'avatar di arn
    Registrato dal
    Jun 2002
    Messaggi
    420

    tooltip prototype

    IL PROBLEMA E' CHE NON RIESCO A CREARE l' EMPTYMC-riemp !!!
    Ecco il nuovo codicillo:

    #include "drawRect.as"//-->genera movieclip con angoli arrotondati
    //
    MovieClip.prototype.setTooltip = function(theText, timer, text_color, bg_color, border_color, larg_tip) {
    if (timer == undefined) {
    // tempo di apparizione TIP
    timer = 100;
    }
    var addMsg = function (theMsg, col, bg_color, border_color, level) {
    var x = _root._xmouse+5;
    var y = _root._ymouse+20;
    var f = new TextFormat();
    f.font = "verdana";
    f.size = 9;
    f.color = col != undefined ? col : 0x000000;
    f.blockIndent = 5;
    larg_tip = larg_tip != undefined ? larg_tip : 105;
    _level0.createTextField('tooltip', 123456, x, y, larg_tip, 0);
    with (_level0.tooltip) {
    setNewTextFormat(f);
    text = theMsg;
    selectable = false;
    autoSize = true;
    wordWrap = true;
    multiline = true;
    border = true;
    // border = false;
    borderColor = border_color != undefined ? border_color : 0x000000;
    // background = true;
    background = false;
    backgroundColor = bg_color != undefined ? bg_color : 0xFFFFEE;
    _y -= 0;
    // _height;
    }
    _level0.onMouseMove = function() {
    // setta la posizione del tip in movimento
    this.tooltip._x = x;
    this.tooltip._y = y;
    this.riemp._x = x;
    this.riemp._y = y;
    updateAfterEvent();
    };
    // ------------------------------------------------------------------------da qui non va
    // crea la mc riempimento del campo di testo con angoli arrotondati
    _level0.createEmptyMovieClip('riemp', 123450, x, y, larg_tip, 0);
    this.riemp._x = this.tooltip._x;
    this.riemp._y = this.tooltip._y;
    this.riemp.clear();
    this.riemp.lineStyle(1, 0xE7E7E7);
    this.riemp.beginFill(0xFFFFCC, 100);
    // Il valore 5 setta il raggio !!!
    this.riemp.drawRect(0, 0, larg_tip, this.tooltip._height, 5);
    this.riemp.endFill();
    // ------------------------------------------------------------------------fine non va
    clearInterval(level.q_t);
    };
    this.q_t = setInterval(addMsg, timer, theText, text_color, bg_color, border_color, larg_tip, this);
    };
    -----------------------eof




    Dove Sbaglio ???
    La rapidità che è una virtù, genera un vizio che è la fretta !
    -------------------------
    Browser: Opera & Firefox

  2. #2
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    Ho dato solo un'occhiata di sfuggita: il createEmptyMovieClip riceve solo due parametri, nome e profondità:

    clip.createEmptyMovieClip("nome", 10);

  3. #3
    Utente di HTML.it L'avatar di arn
    Registrato dal
    Jun 2002
    Messaggi
    420
    ahhh !!!
    allora riprovo modificando !
    grazie
    poi ti faccio sapere
    thks
    La rapidità che è una virtù, genera un vizio che è la fretta !
    -------------------------
    Browser: Opera & Firefox

  4. #4
    Utente di HTML.it L'avatar di arn
    Registrato dal
    Jun 2002
    Messaggi
    420
    era anche un problema con il THIS
    voleva _level0.

    La rapidità che è una virtù, genera un vizio che è la fretta !
    -------------------------
    Browser: Opera & Firefox

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.