Tutorial: Realizziamo una chat per il nostro sito (Lesson 1)

Spread the love

Oggi vedremo come realizzare una simpatica chat da inserire in un box del nostro sito web. Uno strumento leggero e utile per chi vuole cominciare ad entrare nel mondo della comunicazione virtuale.

Essendo alle prime armi utilizzeremo come supporto software un programma abbastanza comune e di semplice utilizzo: Adobe Macromedia Flash (il tutorial si basa sulla versione CS4). Questo per realizzare un’applicazione chat di piccole dimensioni e soprattutto semplicistica. Ovviamente riporto a guide più approfondite per la creazione di chat professionali.

Cominciamo preparando la base e quindi avviando il software dal menu Start, Tutti i programmi, Adobe, Macromedia Flash CS4.

Nel nostro scenario creato a piacere dall’utente con colori di sfondo, immagini roteanti o semplicemente testuale avremo bisogno di inserire:

– Testo dinamico con cui appariranno tutti i messaggi degli utenti
– Testi di immissione dati dove si potrà scrivere nome utente e messaggio
– Pulsante di invio per inviare il messaggio

Per chi volesse fare qualcosa di più creativo nelle ultime lezioni, come sempre dedicate ai più esperti vedremo come inserire:

– Pulsanti di cambio colore del testo
– Pulsanti di timeshift per la chat

Per un tipo di applicazione del genere, utilizzeremo come file di input/output un documento di testo che conterrà all’incirca una quindicina di messaggi e non di più, giusto per non appesantire l’applicazione.
Per fare questo abbiamo bisogno di introdurre gli script ASP (permettono di rendere dinamiche le pagine HTML) che serviranno distintamente ad effettuare l’acquisizione del messaggio e l’invio alla chat.

Ma cominciamo con realizzare la nostra interfaccia grafica:

Per prima cosa occorre creare e posizionare sullo scenario un “Campo di testo dinamico” che sarà il nostro contenitore di messaggi. A questo punto occorrerà creare due campi di testo per inserire rispettivamente il testo di Input (che chiameremo “messaggio”) ed un altro che chiameremo “utente” (dove ovviamente sarà inserito il nome utente.

Ora ci manca ancora qualcosa: il pulsante per inviare il messaggio.

Selezioniamo sempre dalla barra posta a destra l’opzione “Pulsante” ed associamo allo stesso delle righe di codice nel linguaggio ActionScript (nativo di Flash):

on (release, keyPress “<Enter>”) {
         stringa = “<font color='”+color+”‘>”+user+” _ “+msg+”</font>”;
         loadVariablesNum (“resp.asp”, 0, “POST”);
         msg = undefined;
         refresher.gotoAndPlay(1);
}

Con questo codice, noi diamo informazioni precise:
il pulsante viene attivato quando ci si preme sopra o quando si batte “Invio” sulla tastiera, Il pulsante immette il messaggio ed il nickname separando con il trattino basso l’user ed il messaggio. Alla fine, dopo l’immissione si ordina un refresh della chat.
Abbiamo visto fino ad ora come creare una mini chat non complessa in Flash, nelle prossime lezioni vedremo come ampliarla e perfezionarla ad hoc per le nostre esigenze.

216 commenti su “Tutorial: Realizziamo una chat per il nostro sito (Lesson 1)”

  1. PBN sites
    We will establish a structure of privately-owned blog network sites!

    Pros of our private blog network:

    We carry out everything SO THAT google DOES NOT realize THAT this A self-owned blog network!!!

    1- We buy domains from different registrars

    2- The principal site is hosted on a VPS server (Virtual Private Server is rapid hosting)

    3- The rest of the sites are on distinct hostings

    4- We attribute a distinct Google profile to each site with confirmation in Search Console.

    5- We design websites on WordPress, we don’t employ plugins with the help of which malware penetrate and through which pages on your websites are produced.

    6- We refrain from duplicate templates and use only exclusive text and pictures

    We don’t work with website design; the client, if desired, can then edit the websites to suit his wishes

    Rispondi
  2. Thank you for another informative blog. Where else could I am getting that type of information written in such a perfect manner? I’ve a mission that I am just now working on, and I have been at the glance out for such info.

    Rispondi
  3. Understanding COSC Accreditation and Its Importance in Horology
    COSC Certification and its Rigorous Standards
    Controle Officiel Suisse des Chronometres, or the Controle Officiel Suisse des Chronometres, is the authorized Switzerland testing agency that verifies the accuracy and accuracy of wristwatches. COSC accreditation is a mark of superior craftsmanship and dependability in chronometry. Not all timepiece brands pursue COSC validation, such as Hublot, which instead follows to its own demanding criteria with movements like the UNICO, reaching similar precision.

    The Science of Precision Chronometry
    The central system of a mechanical timepiece involves the mainspring, which provides power as it unwinds. This mechanism, however, can be susceptible to environmental factors that may affect its precision. COSC-accredited mechanisms undergo strict testing—over 15 days in various conditions (five positions, 3 temperatures)—to ensure their resilience and dependability. The tests measure:

    Mean daily rate precision between -4 and +6 secs.
    Mean variation, peak variation levels, and impacts of temperature changes.
    Why COSC Validation Matters
    For timepiece fans and collectors, a COSC-validated watch isn’t just a item of technology but a proof to enduring quality and precision. It signifies a timepiece that:

    Offers excellent reliability and accuracy.
    Offers guarantee of quality across the entire design of the watch.
    Is probable to retain its value more effectively, making it a sound choice.
    Popular Chronometer Brands
    Several famous brands prioritize COSC certification for their watches, including Rolex, Omega, Breitling, and Longines, among others. Longines, for instance, offers collections like the Archive and Spirit, which showcase COSC-validated movements equipped with advanced substances like silicone equilibrium suspensions to improve resilience and efficiency.

    Historic Background and the Development of Chronometers
    The concept of the chronometer originates back to the requirement for precise timekeeping for navigation at sea, highlighted by John Harrison’s work in the eighteenth cent. Since the formal foundation of COSC in 1973, the accreditation has become a standard for evaluating the accuracy of high-end watches, continuing a legacy of superiority in watchmaking.

    Conclusion
    Owning a COSC-certified timepiece is more than an aesthetic choice; it’s a commitment to excellence and precision. For those appreciating precision above all, the COSC certification offers peacefulness of thoughts, guaranteeing that each validated watch will perform dependably under various conditions. Whether for personal satisfaction or as an investment decision, COSC-accredited timepieces distinguish themselves in the world of horology, bearing on a legacy of careful timekeeping.

    Rispondi

Lascia un commento