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

    campi di testo dinamici e setMask [MX]

    Ho un problemaccio
    System.useCodepage = true;
    speed = 10;
    distanza = 114;
    text = new LoadVars();
    text.load("news.txt");
    text.onLoad = function(ok) {
    if (ok) {
    ar = new Array();
    ar = text.news.split("|");
    //trace(ar);
    //trace(ar.length);
    crea();
    }
    };
    function crea() {
    this.onEnterFrame = function() {
    posy10 = 0;
    this.masked10._y -= speed;
    this.masked11._y -= speed;
    if (this.masked11._y < -posy10) {
    this.masked10._y = -posy10;
    this.masked11._y = this.masked11._height + -posy10;
    }
    if (masked10.hitTest(_root._xmouse, _root._ymouse, true) | masked11.hitTest(_root._xmouse, _root._ymouse, true)) {
    speed = 0;
    this.signal = true;
    } else if (this.signal != false) {
    speed = 10;
    this.signal = false;
    }
    };
    for (j = 10; j < 12; j++) {
    masked = this.createEmptyMovieClip("masked" + j, j);
    totPosMC = this["masked" + j]._y = i * distanza;
    this.mask.mc.duplicateMovieClip("mc" + j, j + 100);
    trace(this.mask["mc" + j]);
    for (i = 0; i < ar.length; i++) {
    this.mask.mc._alpha = 100;
    masked.createTextField("pic" + i, i, 0, 0, 82, 114);
    trace(masked["pic" + i]);
    masked["pic" + i]._y = i * distanza;
    masked["pic" + i].embedFonts = true;
    masked["pic" + i].html = true;
    masked["pic" + i].htmlText = ar[i];
    masked["pic" + i].border = true;
    masked["pic" + i].borderColor = (0xff0000);
    masked["pic" + i].wordWrap = true;
    masked["pic" + i].multiline = true;
    masked["pic" + i].selectable = false;
    masked["pic" + i].background = true;
    masked["pic" + i].backgroundColor = (0x000000);
    }
    masked.setMask(this.mask["mc" + j]);
    }
    updateAfterEvent();
    }
    tutto questo benedetto codice, mi crea i campi di testo dinamico che voglio e in più due mc che servono per mascherare altrettante mc che contengono i campi di testo! Il tutto riesce molto bene , ma! C'è un ma!! Nn riesco a leggere il testo!!!
    Se imposto la proprietà embedFonts = false, si legge il testo, ma nn si mascherano le mc!!! Cosa c'è da fare che io nn so?!?!?
    Grazie
    :mavieni:

  2. #2
    Utente di HTML.it L'avatar di ilpiubello
    Registrato dal
    May 2000
    Messaggi
    2,685
    Il testo puoi vederlo sotto delle maschere solo nel caso in cui tu incorpori i caratteri!
    FaX

  3. #3
    Nn si incorpora impostando la proprietà embedFonts = true???
    :mavieni:

  4. #4
    si ma devi importare il font nella libreria e dargli il linkage

    a quel punto

    form = new textFormat()

    form.font="tuo linkage"
    form.size="8"
    form.color="0xff0000"



    masked["pic" + i]._y = i * distanza;
    masked["pic" + i].embedFonts = true;
    masked["pic" + i].html = true;
    masked["pic" + i].htmlText = ar[i];
    masked["pic" + i].border = true;
    masked["pic" + i].borderColor = (0xff0000);
    masked["pic" + i].wordWrap = true;
    masked["pic" + i].multiline = true;
    masked["pic" + i].selectable = false;
    masked["pic" + i].background = true;
    masked["pic" + i].backgroundColor = (0x000000);


    masked["pic" + i].setTextFormat(form)


    Ciao

  5. #5
    Provo subito! grazie tante! Era proprio quello che nn sapevo!
    :mavieni:

  6. #6
    VVoVe:
    Ho provato in locale, funziona perfettamente!!! ho provato on-line, nn mi legge i caratteri!
    :mavieni:

  7. #7
    Scusate tutti!
    era solo un problema di filmato esterno, nn ho importato il carattere nel main!
    Ciao
    :mavieni:

  8. #8
    Utente di HTML.it
    Registrato dal
    Jul 2004
    Messaggi
    27
    Non ci posso credere, ma il vostro post è proprio quello che mi serviva.
    Ho un solo piccolo problema:
    ma come faccio a importare un font nella libreria?

    Grazie
    ..Ikniv!

  9. #9
    Apri Libreria in alto a destra cliccki New Font

    scegli dai un nome e poi linkage.


  10. #10
    Utente di HTML.it
    Registrato dal
    Jul 2004
    Messaggi
    27
    Grazie grazie grazie!!!

    non riuscivo a trovare questa informazione da nessuna parte

    Ciao
    ..Ikniv

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.