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

    Script non funzionante se non in Flash 6

    Qualcuno sa dirmi perchè questo script funziona solo se pubblicato per Flash6 e AS 1 o 2 e invece non va se pubblicato per Flash 7 AS1 o 2?
    codice:
    maskNum = 13;
    ratio = 0.14999999999999999;
    friction = 0.59999999999999998;
    mask._visible = 0;
    foto_mc._visible = 0;
    stageWidth = 800;
    StartY = 450;
    gap = 30;
    count = 4;
    j = 1;
    k = 1;
    i = 1;
    while (i <= maskNum) {
    	attachMovie("mask", ("mask" + i), (i + 1889));
    	mc = this[("mask" + i)];
    	mc._x = _root.stageWidth / 7;
    	mc._y = mc.posY = -mc._height;
    	mc.onEnterFrame = function() {
    		if (this.active) {
    			this.nextFrame();
    		} else {
    			this.prevFrame();
    		}
    		this.next_pos = (this.posY - this._y) * _root.ratio + this.next_pos * _root.friction;
    		this._y +=  this.next_pos;
    		if (this.posY <= this._y && this.done) {
    			this.active = true;
    		}
    	};
    	foto_mc.duplicateMovieClip(("foto_mc" + i), (i + 9908));
    	this[("foto_mc" + i)].setMask(mc);
    	i++;
    }
    _root.onEnterFrame = function() {
    	if ((j % count) == 0) {
    		this[("mask" + k)].posY = this.StartY - this.gap * (k - 1);
    		this[("mask" + k)].done = true;
    		k++;
    	}
    	j++;
    	if (k > maskNum) {
    		this.onEnterFrame = null;
    	}
    };
    txt.onEnterFrame = function() {
    	if (_root[("mask" + _root.maskNum)].active) {
    		this.gotoAndPlay(2);
    		this._visible = 1;
    		this.onEnterFrame = null;
    	}
    };
    txt.swapDepths(10000);
    txt.stop();
    txt._visible = 0;

  2. #2
    la butto li..

    ho provato a cercare sulla guida di flash 7 swapDepths non c'è,

    allora ho pensato che forse è una proprietà obsoleta in
    flash 7 e non la riconosce

  3. #3
    Non può essere, ho provato in un filmato prova e swapDepths funziona anche con flash 7..

    altre idee?

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    1,037
    dando un occhiata al volo, devi tipizzare e dichierare le variabili, se non erro
    var maskNum:Number = 13;
    var ratio:Number = 0.14999999999999999;
    var friction:Number = 0.59999999999999998;

  5. #5
    nulla...
    codice:
    var maskNum:Number = 13;
    var ratio:Number = 0.14999999999999999;
    var friction:Number = 0.59999999999999998;
    mask._visible = 0;
    foto_mc._visible = 0;
    var stageWidth:Number = 800;
    var StartY:Number = 450;
    var gap:Number = 30;
    var count:Number = 4;
    var j:Number  = 1;
    var k:Number  = 1;
    var i:Number  = 1;
    ho cambiato così ma non va..

    che posso fare?

  6. #6
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    1,037
    e che tipo di errore ti da?

  7. #7
    nessun errore, semplicemente non va....

  8. #8
    Utente di HTML.it L'avatar di and80
    Registrato dal
    Mar 2003
    Messaggi
    15,182
    il codice sembra non riportare anomalie, tranne questa

    codice:
    this[("mask" + i)]
    non è necessario scrivere le parentesi tonde, magari son quelle che non digerisce il player 7

  9. #9
    macchè... nulla le ho tolte in tutti i punto dove si presentavano ma non funziona...

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.