+ Reply to Thread
Results 1 to 3 of 3

Embed Font!

This is a discussion on Embed Font! within the Actionscript 3.0 avanzato forums, part of the Flash Italiano category; Salve a tutti, ho letto in giro che per fare un effetto alpha da as 3 bisogna embeddare il testo ...

  1. #1
    Junior Member Settled In Nedyc is on a distinguished road
    Join Date
    Jun 2008
    Posts
    6
    Rep Power
    0

    Embed Font!

    Salve a tutti, ho letto in giro che per fare un effetto alpha da as 3 bisogna embeddare il testo dinamico, cosa che io ho fatto ma ho come la sensazione di aver sbagliato qualcosa!
    Mi trovo ad creare un oggetto font a dargli dimensione, nome, colore e font desiderato e a selezionare la voce "esporta per actionscript". Ho poi un primo testo dinamico (creato graficamente) chiamato labelText a cui assegno queste proprietà:

    Code:
    var embFont: MenuFont = new MenuFont();
    
    var embFormat:TextFormat = new TextFormat();
    embFormat.font = embFont.fontName;
    
    labelText.embedFonts = true;
    labelText.setTextFormat(embFormat);
    E fin qui tutto bene, creo poi da as un altro testo dinamico chiamato effetto1 il quale dovrà fare il tween con abbassamento di alpha, e assegno ad esso le stesse proprietà di labelText:

    Code:
    var effetto1 = new TextField(); 
    effetto1.type = TextFieldType.DYNAMIC; 
    
    effetto1.text = labelText.text; 
    
    var formato : TextFormat;
    formato = labelText.getTextFormat(); 
    
    effetto1.embedFonts = true;
    effetto1.setTextFormat(formato); 
    
    effetto1.x = labelText.x; 
    effetto1.y = labelText.y; 
    effetto1.width = labelText.width;
    effetto1.height = labelText.height;
    addChild(effetto1);
    E anche fin qui tutto bene, il problema consiste in questa riga di codice

    Code:
    var myAlpha:Tween = new Tween(effetto1, "alpha", None.easeOut, effetto1.alpha, 1, 0, true);
    Infatti quando avvio il filmato flash il fade alpha non avviene...heeelp

  2. #2
    Junior Member Settled In Giò is on a distinguished road
    Join Date
    Jan 2008
    Posts
    25
    Rep Power
    0

    Unhappy Re: Embed Font!

    Ciao Flep, ogni tanto torno a chiederti aiuto.

    Ho seguito il tuo tutorial e va tutto bene: sono riuscita ad incorporare i font e ad utilizzarli per i campi di testo, ma per le label e i componenti?

    Mi spiego meglio.
    Nella mia applicazione ho definito un TextFormat

    var formato_gen:TextFormat = new TextFormat();
    formato_gen.font = "Anivers";
    formato_gen.color = 0x000000;
    formato_gen.size = 14;
    formato_gen.bold=false;

    ....
    e poi ho settato lo StyleManager in questo modo:

    StyleManager.setStyle("textFormat",formato_gen);

    Come faccio a dirgli che si tratta di un font Embedded?

    Dovrebbe usare il font embedded per tutti i componenti presenti:
    radiobutton, tilelist, label...
    Che posso fare?

    Non sono riuscita a trovare informazioni in merito in rete

    Grazie mille

  3. #3
    Junior Member Settled In webbed is on a distinguished road
    Join Date
    Oct 2008
    Posts
    20
    Rep Power
    0

    Re: Embed Font!

    Ciao Nedyc,
    vedo che è un pò tardi per risponderti...comunque non si sa mai...

    hai provato a settare il blendMode per il TextField??

    es.:

    effetto1.blendMode = BlendMode.LAYER;

    questo dovrebbe far funzionare l'alfa sul testo...
    prova e dimmi se ci sei riuscito.

+ Reply to Thread

Similar Threads

  1. embed swf
    By domdurakov in forum Flash Italiano
    Replies: 0
    Last Post: 16-04-10, 10:56
  2. Embed video in timeline?
    By Zombie in forum CS4
    Replies: 0
    Last Post: 29-12-09, 15:23
  3. Embed variable must not have an existing value
    By armaluca in forum advanced Actionscript 3.0
    Replies: 0
    Last Post: 19-06-09, 06:29
  4. embed di pagine esterne
    By menhir in forum Flash CS3 Design
    Replies: 3
    Last Post: 29-10-08, 17:28
  5. Css e Embed sovrapposti
    By krdesign007 in forum CSS | HTML
    Replies: 2
    Last Post: 15-09-08, 10:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts