Homepage -> Guida SWISHmax

REALIZZARE UNA SLIDESHOW DI IMMAGINI







  1. Come prima cosa dovete creare le varie sprite, le varie forme ( piccoli rettangolini colorati per i bottoni, mentre le prime due forme servono solo per il bordo foto ed applicazione ) e le scritte dei bottoni.




    Fig. 1




    Fig. 2



  2. Vediamo ora i tre bottoni; essi sono uguali a meno della scritta e dell'immagine che richiamano nel loro relativo script.




    Fig. 3




    Fig. 4




    Fig. 5



  3. Vediamo ora la Sprite Controls: essa è semplicemente vuota, ma è importante per gli script ad essa applicati.


    Syntax
    tellTarget(object) {
    statement(s);
    }

    Arguments
    object: An Instance of an Object or Sprite.
    statement(s): An Action or group of Actions enclosed in curly brackets {...}.

    Returns
    Nothing.

    Description
    Action: Allows you to specify an Object (such as a Movie Clip) with the Object parameter. The statements within the tellTarget curly brackets are applied to that Object. This prevents you from having to repeatedly write the Object's name or the path to the Object.

    Sample
    Consider a Sprite _root.s1. Sprite properties can be accessed from other Sprites or from the root level via the following code:

    tellTarget (_root.s1) {
        _X += 10;    // same as _root.s1._X += 10
        _alpha = 40;    // same as _root.s1._alpha = 40
    }

    Note: In Flash the Object is a either a string containing a target OR a target reference. In SWiSH, it is always a target reference. If you want to use a string variable then enclose it in parentheses, as shown below:

    who = "mysprite";
    tellTarget((who)) {
        stop();    // same as mysprite.stop();
    }

    If you do not use the parentheses around the variable name, it will be treated as a target name instead. In the above example, if you did not put the extra parenthesis around the variable name you would get this:

    who = "mysprite";
    tellTarget(who) {
        stop();    // same as who.stop();
    }



  4. Vediamo ora la Sprite masked_things: essa contiene al suo interno un'altra sprite di nome "things" ed una forma rettangolare rossa ("mask"). La sotto sprite è mostrata in Fig. 8. Le tre ../immagini devono essere importate, come mostra tale figura.




    Fig. 6




    Fig. 7








    Fig. 8



  5. A tal punto non rimane altro che salvare ed esportare l'applicazione.