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

Spread the love

L’ultima lezione per la realizzazione della nostra chat sviluppata in Flash per il nostro sito, ci permetterà di renderla più simpatica e gradevole dal punto di vista estetico, infatti doneremo un tocco di colore.

Secondo quanto abbiamo predisposto in precedenza (vedi lezione 1), oltre ai controlli di testo ed il pulsante invia, avremo altri controlli tra cui: pulsanti di selezione “refresh time” di 5 e 10 secondi. Il refresh da 5 secondi verrà inserito sul fotogramma numero 58-60 (è consigliabile il 60 per avere unaparità di valori durante l’utilizzo), mentre quello da 10 secondi sul fotogramma 118-120 (consigliabile 120 per le motivazioni di prima).
Il codice ActionScript che utilizzeremo per il refresh sarà il seguente:

Caso di refresh ogni 5 secondi:

if (reftime==1){
q = random(999999);
loadVariablesNum (“refresh.asp?q=”+q, 0, “POST”);
gotoAndPlay(1);
}

Caso di refresh ogni 10 secondi:

q = random(999999);
loadVariablesNum (“refresh.asp?q=”+q, 0, “POST”);

Inseriamo quindi in questo momento il codice ASP dello script refresh (lo esaminiamo con i soliti commenti per comprendere quello che stiamo facendo):

<%
Dim strLinea, FileObject, Instream, intVisite, intTipo, OutStream,allMsg
strFile = Server.MapPath(“msg.txt”)
‘Creiamo un oggetto
Set FileObject = Server.CreateObject(“Scripting.FileSystemObject”)
‘e lo apriamo in lettura
intTipo = 1
Set InStream = FileObject.OpenTextFile(strFile,IntTipo,true)
‘Leggiamo i messaggi dal file di testo
Do While not InStream.AtEndOfStream
         StrLinea = InStream.ReadLine()
         allMsg=allMsg&StrLinea&”<br />”
Loop
InStream.Close
Set InStream = Nothing
‘Inviamo tutti i messaggi alla chat Flash
Response.Write(“corpo=”&allMsg)
%>

Per una verifica finale, qualora decidessimo di aprire il file di testo, noteremmo una cosa del genere:

10.23.11 – <font color=’#FF0066′>Mario – ciao sono Mario</font>
10.22.58 – <font color=’#FF0066′>Luigi – ciao sono Luigi</font>

Ultimo passo è la creazione della pagina html che conterrà il nostro file chat.swf da creare con il seguente codice:

<html>
<head>
<title>La mia chat</title>
</head>
<body bgcolor=”#cccccc”>

<p>
<object type=”application/x-shockwave-flash” data=”chat.swf” width=”550″ height=”450″>
<param name=”movie” value=”chat.swf” />
<param name=”quality” value=”high” />
</object>
</p>

</body>
</html>

A lavoro terminato, salvare il file dando i permessi in lettura e scrittura completi su questo file.

Potremmo utilizzare così la nostra chat per rendere interattivo e dinamico il nostro sito web e cominciare ad avere nuovi rapporti con i nostri utenti molto spesso anonimi.

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

  1. Hello very nice web site!! Guy .. Beautiful .. Amazing .. I will bookmark your web site and take the feeds also? I am satisfied to find so many useful information here in the publish, we’d like develop more strategies in this regard, thank you for sharing. . . . . .

    Rispondi
  2. Мы служба специалистов по поисковой оптимизации, специализирующихся на увеличении трафика и повышении рейтинга вашего сайта в поисковых системах.
    Мы достигли значительных результатов и желаем поделиться с вами нашими знаниями и навыками.
    Что мы можем вам предложить:
    • [url=https://seo-prodvizhenie-ulyanovsk1.ru/]сео оптимизация сайта цена[/url]
    • Подробный анализ вашего сайта и создание персонализированной стратегии продвижения.
    • Модернизация контента и технических аспектов вашего сайта для оптимальной работы.
    • Постоянный контроль и анализ данных для улучшения вашего онлайн-присутствия.
    Подробнее [url=https://seo-prodvizhenie-ulyanovsk1.ru/]https://seo-prodvizhenie-ulyanovsk1.ru/[/url]
    Результаты наших клиентов уже видны: рост посещаемости, улучшение позиций в поисковых системах и, конечно, рост бизнеса. У нас есть возможность предоставить вам бесплатную консультацию, чтобы обсудить ваши потребности и помочь вам разработать стратегию продвижения, соответствующую вашим целям и бюджету.
    Не упустите шанс улучшить свои результаты в интернете. Свяжитесь с нами немедленно.

    Rispondi
  3. Undeniably believe that which you stated. Your favorite justification appeared to be on the internet the simplest thing to be aware of. I say to you, I definitely get irked while people consider worries that they plainly do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side effect , people can take a signal. Will likely be back to get more. Thanks

    Rispondi
  4. PBN sites
    We build a system of PBN sites!

    Advantages of our PBN network:

    We carry out everything SO THAT google does not comprehend that this A PBN network!!!

    1- We obtain web domains from various registrars

    2- The principal site is hosted on a virtual private server (Virtual Private Server is high-speed hosting)

    3- The rest of the sites are on distinct hostings

    4- We allocate a unique Google account to each site with confirmation in Google Search Console.

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

    6- We refrain from reproduce templates and utilize only unique text and pictures

    We refrain from work with website design; the client, if desired, can then edit the websites to suit his wishes

    Rispondi
  5. chronometer watches
    Understanding COSC Validation and Its Importance in Watchmaking
    COSC Validation and its Stringent Criteria
    Controle Officiel Suisse des Chronometres, or the Controle Officiel Suisse des Chronometres, is the official Swiss testing agency that attests to the accuracy and accuracy of timepieces. COSC certification is a mark of excellent craftsmanship and dependability in chronometry. Not all timepiece brands seek COSC validation, such as Hublot, which instead follows to its proprietary stringent criteria with movements like the UNICO calibre, achieving similar precision.

    The Science of Precision Chronometry
    The core mechanism of a mechanical watch involves the spring, which delivers energy as it loosens. This mechanism, however, can be vulnerable to external factors that may affect its accuracy. COSC-validated movements undergo strict testing—over 15 days in various conditions (five positions, three temperatures)—to ensure their resilience and reliability. The tests evaluate:

    Average daily rate precision between -4 and +6 seconds.
    Mean variation, peak variation rates, and impacts of temperature variations.
    Why COSC Accreditation Is Important
    For timepiece fans and connoisseurs, a COSC-certified watch isn’t just a piece of tech but a testament to lasting excellence and precision. It symbolizes a watch that:

    Provides excellent reliability and precision.
    Ensures guarantee of quality across the whole design of the timepiece.
    Is apt to retain its value better, making it a wise choice.
    Famous Chronometer Brands
    Several renowned brands prioritize COSC certification for their watches, including Rolex, Omega, Breitling, and Longines, among others. Longines, for instance, offers collections like the Archive and Soul, which highlight COSC-validated movements equipped with innovative materials like silicone equilibrium suspensions to boost resilience and efficiency.

    Historical Context and the Development of Timepieces
    The concept of the chronometer dates back to the requirement for exact timekeeping for navigation at sea, emphasized by John Harrison’s work in the eighteenth century. Since the formal foundation of COSC in 1973, the certification has become a benchmark for judging the accuracy of luxury watches, continuing a tradition of superiority in watchmaking.

    Conclusion
    Owning a COSC-certified timepiece is more than an aesthetic selection; it’s a commitment to quality and accuracy. For those appreciating precision above all, the COSC certification offers tranquility of thoughts, guaranteeing that each validated timepiece will perform dependably under various conditions. Whether for individual contentment or as an investment decision, COSC-validated timepieces distinguish themselves in the world of horology, maintaining on a tradition of careful timekeeping.

    Rispondi

Lascia un commento