Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    problema con full screen

    ciao raga... ho una texture (con la quale ho creato una img 1024 * 1280) che ho inserito nel mio stage (840 *600) e apro tutto al 100% sembra funzionare bene anche se l'img texture non sembra al massimo eppure la risoluzione è alta... .. il problema è questo ora voglio fare apparire questa texture tramite una maschera ho fatto in questo modo:

    Codice PHP:
    this.mask_mc._width 30;
    this.mask_mc._height 30;
    this.mask_mc._x Stage.width 2;
    this.mask_mc._y Stage.height 2;

    mask_mc.onEnterFrame =function() {
    mask_mc._width mask_mc._width 40;
    mask_mc._height mask_mc._height 40;
        if (
    mask_mc._width == Stage.width mask_mc._height == Stage.height) {
        
    trace("ok");
        
    delete this.onEnterFrame;
        }
    }
    stop(); 
    la maschera è un cerchio mc istanziato mask_mc il problema è che io voglio farlo apparire al centro dello stage e poi si deve aprire fino a coprire tutto lo stage ... il problema è che non appare al centro e non mi da il trace ... qualche consiglio?

  2. #2
    vi spiego nello stage principale ho inserito questo codice:

    Codice PHP:
    _root.bkg._root.bkg._width;
    _root.bkg._root.bkg._height;

    myResize = new Object();
    function 
    Window()
    {
        var 
    CDim _root.bkg._root.bkg.h;
        var 
    SDim Stage.width Stage.height;
        if (
    SDim CDim)
        {
            
    _root.bkg._height Stage.height;
            
    _root.bkg._width _root.bkg.Stage.height _root.bkg.h;
        } else {
            
    _root.bkg._width Stage.width;
            
    _root.bkg._height _root.bkg.Stage.width _root.bkg.w;
        }
        
    _root.bkg._quality "BEST";
    };

    myResize.onResize = function()
    {
        
    Window();
    }
    Stage.addListener(myResize);
    Window(); 
    bkg è un mc che contiene la texture è una img grande 1024 x 1280
    dentro a bkg ho inserito una maschera mask_mc questa maschera è un cerchio che si deve aprire al centro dello stage.. ho inserito questo codice nella timeline di bkg

    Codice PHP:
    trace(Stage.width);
    this.mask_mc._width 30;
    this.mask_mc._height 30;
    this.mask_mc._x Stage.width 2;
    this.mask_mc._y Stage.height 2;

    mask_mc.onEnterFrame =function() {
        
    trace(mask_mc._height)
        
    trace(mask_mc._width)
        
    mask_mc._width mask_mc._width 45;
        
    mask_mc._height mask_mc._height 45;
            if ((
    mask_mc._width == Stage.width) || (mask_mc._height == Stage.height))  {
            
    trace("ok");
    delete this.onEnterFrame;
            }
    }
    stop(); 
    questo codice mi dovrebbe ingrandire la maschera fino a raggiungere la larghezza dello stage... lo script funziona più o meno ma non mi centra la maschera mask_mc

    qualche aiutino?? :master:

  3. #3

  4. #4
    ho risolto così

    Codice PHP:
    this.mask_mc._width 30;
    this.mask_mc._height 30;
    this.mask_mc._x _root.Stage.width /2;
    this.mask_mc._y _root.Stage.height /2;

    trace(_root.bkg_mc.mask_mc._x);
    trace(_root.bkg_mc.2);
    // funzione che mi ingrandisce il cerchio mask
    mask_mc.onEnterFrame =function() {
        
    mask_mc._width mask_mc._width 45;
        
    mask_mc._height mask_mc._height 45;
            if ((
    mask_mc._width == _root.Stage.width) || (mask_mc._height == _root.Stage.height))  {
            
    trace("ok");
    delete this.onEnterFrame;
            }

    praticamente dovevo mettre _root.stage e non solo Stage

    ho 1 altro problema ora ... se ridimensiono il browser l'immagine mi si rimpicciolisce a 10px più o meno come mai?

  5. #5

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.