Pagina 1 di 3 1 2 3 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 24

Discussione: strano effetto testo

  1. #1

    strano effetto testo

    ciao a tutti
    come hanno fatto l'effetto testo a destra nelle descrizioni
    http://www.group94.com/

  2. #2

    Re: strano effetto testo

    Originariamente inviato da Crifox
    ciao a tutti
    come hanno fatto l'effetto testo a destra nelle descrizioni
    http://www.group94.com/
    AS è un Prototype per effetto su testo..
    dovrebbero aver creato un file.mx esterno, e messo il testo a cui dare l'effetto all'interno nel fla
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  3. #3
    riesci a darmi un aituo + concreto x crearlo!
    scusa ma non saperi da che parte iniziare x quest'effetto!

  4. #4

  5. #5
    Utente di HTML.it L'avatar di iaco74
    Registrato dal
    Sep 2002
    Messaggi
    682
    prova a dare una sbirciatina qui .....
    Se e' un proto, qui ci dovrebbe essere....

    link
    IACO

  6. #6
    da quanto ho capito... fai una matrice in cui metti tutti i vari paragrafi di testo

    dopodichè quando cliccki sul primo si aggiunge carattere per carattere (ti basta parserare la stringa in un'altra vuota ed aggiungere un char alla volta)

    quando cliccki su un altro (e il textbox è già okkupato) comincia ad aggiungere (sempre un char alla volta) il testo all'inizio e il testo vecchio diventa grigio e viene cancellato un carattere alla volta

    matrice=new Array("ciao a tutti", "come andiamo?");

    testo_txt.text="";

    link.onRelease=function() {
    _root.onEnterFrame=function() {
    //aggiungi un char alla volta
    //sega un char alla volta dal fondo
    }

    poi che sia un prototype o no è solo una questione di forma

    roba così insomma
    }
    "La consapevolezza di Case suddivisa come perle di mercurio. La sua visione era sferica, come se una singola retina rivestisse la superficie interna di un globo che conteneva tutte le cose, se tutte le cose si potevano contare." —Neuromante, William Gibson (1984)

  7. #7
    Ho provato a scrivere un prototype:

    codice:
    //---------textMixing--------------
    TextField.prototype.textMixing = function(textIn, colorOut) {
    	//l_lennynero_l@msn.com
    	clearInterval(this.ID_textMixing);
    	this.formatIn = this.getTextFormat();
    	this.formatOut = this.getTextFormat();
    	this.formatOut.color = colorOut;
    	this.textIn = textIn;
    	this.textOut = this.text;
    	this.iTextIn = 0;
    	this.iTextOut = 0;
    	this.interval = 70;
    	this.ID_textMixing = setInterval(mixing, this.interval, this);
    	function mixing(tf) {
    		clearInterval(tf.ID_textMixing);
    		var textInNow = tf.textIn.substr(textIn.length-tf.iTextIn, textIn.length);
    		var textOutNow = tf.textOut.substr(0, tf.textOut.length-tf.iTextOut-1);
    		tf.iTextOut += Math.ceil((tf.textOut.length-tf.iTextOut)/8);
    		tf.iTextIn += Math.ceil((tf.textIn.length-tf.iTextIn)/8);
    		tf.text = textInNow+textOutNow;
    		tf.setTextFormat(0, textInNow.length, tf.formatIn);
    		tf.setTextFormat(textInNow.length, tf.text.length, tf.formatOut);
    		tf.iTextIn = (tf.iTextIn<tf.textIn.length) ? tf.iTextIn : tf.textIn.length;
    		tf.iTextOut = (tf.iTextOut<tf.textOut.length) ? tf.iTextOut : tf.textOut.length;
    		if (tf.iTextIn<tf.textIn.length && tf.iTextOut<tf.textOut.length) {
    			tf.interval++;
    			tf.ID_textMixing = setInterval(mixing, tf.interval, tf);
    		} else {
    			delete tf.ID_textMixing;
    			delete tf.textIn;
    			delete tf.textOut;
    			delete tf.iTextIn;
    			delete tf.iTextOut;
    			delete tf.interval;
    			delete tf.formatIn;
    			delete tf.formatOut;
    		}
    		updateAfterEvent();
    	}
    };
    //----------------------------

    per provarlo:
    codice:
    _root.createTextField("myTextField", 0, 100, 100, 200, 150);
    myTextField.wordWrap = true;
    myTextField.border = true;
    myTextFormat = new TextFormat("_sans", 13);
    myTextField.setNewTextFormat(myTextFormat);
    text1 = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
    text2 = "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";
    myTextField.text = text1;
    myTextField.textMixing(text2, 0xCCCCCC);
    [Il mio sito V2]
    ___________________
    I.m.The.Magic.Man

  8. #8
    Originariamente inviato da l_lennynero_l
    Ho provato a scrivere un prototype:
    + che provato..
    direi proprio che lo hai fatto! :adhone:
    con un frame-rate altino si ottiene proprio l'effetto chiesto/visto.. ah, per vedere tutto il testo senza perdere la prima lettere, mettete un lettera che non serve.. es. (n)

    grande Lenny :adhone:
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  9. #9
    ops... è vero ci sono degli errori,grazie webbeloz non me ne ero accorto, provvedo subito provate questa:

    codice:
    //---------textMixing--------------
    TextField.prototype.textMixing = function(textIn, colorOut) {
    	//l_lennynero_l@msn.com
    	clearInterval(this.ID_textMixing);
    	this.formatIn = this.getTextFormat();
    	this.formatOut = this.getTextFormat();
    	this.formatOut.color = colorOut;
    	this.textIn = textIn;
    	this.textOut = this.text;
    	this.iTextIn = 0;
    	this.iTextOut = 0;
    	this.interval = 70;
    	this.ID_textMixing = setInterval(mixing, this.interval, this);
    	function mixing(tf) {
    		clearInterval(tf.ID_textMixing);
    		tf.iTextOut += Math.ceil((tf.textOut.length-tf.iTextOut)/8);
    		tf.iTextIn += Math.ceil((tf.textIn.length-tf.iTextIn)/8);
    		tf.iTextIn = (tf.iTextIn<tf.textIn.length) ? tf.iTextIn : tf.textIn.length;
    		tf.iTextOut = (tf.iTextOut<tf.textOut.length) ? tf.iTextOut : tf.textOut.length;
    		var textInNow = tf.textIn.substr(tf.textIn.length-tf.iTextIn, tf.textIn.length);
    		var textOutNow = tf.textOut.substr(0, tf.textOut.length-tf.iTextOut);
    		tf.text = textInNow+textOutNow;
    		tf.setTextFormat(0, textInNow.length, tf.formatIn);
    		tf.setTextFormat(textInNow.length, tf.text.length, tf.formatOut);
    		if (tf.iTextIn<tf.textIn.length || tf.iTextOut<tf.textOut.length) {
    			tf.interval++;
    			tf.ID_textMixing = setInterval(mixing, tf.interval, tf);
    		} else {
    			delete tf.ID_textMixing;
    			delete tf.textIn;
    			delete tf.textOut;
    			delete tf.iTextIn;
    			delete tf.iTextOut;
    			delete tf.interval;
    			delete tf.formatIn;
    			delete tf.formatOut;
    		}
    		updateAfterEvent();
    	}
    };
    //----------------------------
    [Il mio sito V2]
    ___________________
    I.m.The.Magic.Man

  10. #10
    ciao a tutti!
    di prototype non me ne intendo molto..
    ma si usano su flash mx?o nel 2004?
    riuscite a farmi capire un pò meglio:
    - devo crare un campo di testo vuoto
    - poi?lo trasformo in movie?no?

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.