Skocz do zawartości


Alligator and Skew images


  • Zaloguj się, aby dodać odpowiedź
3 odpowiedzi w tym temacie

#1 eisflash

  • Użytkownik
  • PipPip
  • 11 postów
  • Program:
    Alligator 8
  • Time Online: 5h 11m 13s

Napisano 28 październik 2011 - 14:27

Hllo ,
her is my test to skew images with Alligator
Załączony plik  perspective.swf   41,87 KB   23 Ilość pobrań

but I have a problem with attacMovie and duplicateMovieClip movie.
Who can help me please ?

msk._y = (Stage.height-msk._height)/2;
 
bar._y = (Stage.height-bar._height)/2;
bar._x = msk._width+msk._x;
bar.tog1._y = (bar._height-msk._height)/2-32;
bar.tog2._y = bar.tog1._y+msk._height+32;
 
onClipEvent (enterFrame)
{
 
function paint()
{
	var y0 = 0;
	var y1 = bar.tog1._y;
	var endScale = bar.tog2._y - bar.tog1._y;
	var k = 1;
	while (k < 50)
	{
		_root["msk" + k]._y = msk._y + (y1 - 0) / 50 * k;
		_root["msk" + k]._yscale = 100 - k * (100 - endScale) / 50;
		++k;
	} // end while
} // End of the function
msk.mc.attacMovie("mv2", mv22, 2);
var k = 1;
while (k < 50)
{
	duplicateMovieClip("msk", "msk" + k, k);
	_root["msk" + k]._x = _root["msk" + k]._x + 2 * k;
	_root["msk" + k].mc._x = _root["msk" + k].mc._x - 2 * k;
	_root["msk" + k].mc.duplicateMovieClip("mv2", mv22, 2);
	++k;
} // end while
 
}
 

more thanks in adwance

please use tag:
[as] code as [/as] 
:) - ARdziej


#2 eisflash

  • Użytkownik
  • PipPip
  • 11 postów
  • Program:
    Alligator 8
  • Time Online: 5h 11m 13s

Napisano 01 listopad 2011 - 15:13

ok i have resolved my problem.
AFD have a problem width attchMovie and i solved my problem width only duplicatemovieclip:

var larg = msk.mc.pic._width;
var alt = msk.mc.pic._height;
var doplarg= larg*2;
function paint()//scalare immagine
{	   
	    var y0 = 0;
	    var y1 = tog1._y;
	    var endScale = tog2._y - tog1._y;
	    var k = 1;
	    while (k < larg)
	    {
		 this["msk" + k]._y = msk._y + (y1-133) / larg *k;
		 this["msk" + k]._yscale = 100 - k * (alt - endScale) / doplarg;	    
		 ++k;
	    }
}
var k = 1;
while (k < larg)// ricostruzione immagine
{
    msk.duplicateMovieClip("msk" + k, k);
    this["msk" + k]._x = _root["msk" + k]._x + (1 * k);
    this["msk" + k].mc.pic._x = _root["msk" + k].mc.pic._x -( 1 * k);
    ++k;
}
onEnterFrame = paint;

Załączone pliki



#3 Ardziej

  • Administrator
  • 1472 postów
  • Gadu-Gadu:
    914999
  • Program:
    8.0.25
  • Time Online: 2d 2h 51m 25s

Napisano 01 listopad 2011 - 18:41

Hi, Great job!
But sometimes yours code can be like a "fork bomb", loops and loops :D
Best

#4 eisflash

  • Użytkownik
  • PipPip
  • 11 postów
  • Program:
    Alligator 8
  • Time Online: 5h 11m 13s

Napisano 03 listopad 2011 - 13:51

thnx




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych