A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Draw method stop at first frame

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    9

    Question Draw method stop at first frame

    I need to make an animated flower movie using tile of one bitmap. I use the code below but write only the first frame then stop, how can I draw more frames?

    Code:
    createEmptyMovieClip("triangle",2);
    triangle.beginFill(0x000000,100);
    triangle.moveTo(width_map/2,height_map/2);
    triangle.lineTo(width_map/2+(height_map*Math.tan(angle)/2),0);
    triangle.lineTo(width_map/2,0);
    triangle.endFill();
    triangle._visible = false;
    
    attachMovie(elm_link,"elm",1);
    
    elm.setMask(triangle);
    
    sl_bmp = new flash.display.BitmapData(height_map*Math.tan(angle), height_map/2, true, 0x00000000);
    angl = 0;
    for (i=1; i<=slices; i++) {
    	createEmptyMovieClip('elm'+i,10+i);
    	this['elm'+i].createEmptyMovieClip('elm',0);
    	this['elm'+i].elm.attachBitmap(sl_bmp,0,"always",true);
    	this['elm'+i].elm._x = -height_map*Math.tan(angle)/2;
    	this['elm'+i].elm._y = 2-(height_map/2);
    	this['elm'+i]._x = width_map/2;
    	this['elm'+i]._y = height_map/2;
    	if (angl>0) {
    		this['elm'+i]._rotation = angl;
    	}
    	angl += 360/slices;
    }
    function onEnterFrame() {
    	elm._rotation += rotspeed;
    	elm._x += transpeed;
    	elm._y += transpeed;
    	var tmp_bmp = new flash.display.BitmapData(height_map*Math.tan(angle)/2, height_map/2, true, 0x00000000);
    	tmp_bmp.draw(elm,new flash.geom.Matrix(1, 0, 0, 1, -(width_map/2), 0),null,"normal",null,true);
    
    	sl_bmp.draw(tmp_bmp,new flash.geom.Matrix(-1, 0, 0, 1, tmp_bmp.width, 0),null,"normal",null,true);
    	sl_bmp.draw(tmp_bmp,new flash.geom.Matrix(1, 0, 0, 1, tmp_bmp.width, 0),null,"normal",null,true);
    
    }

  2. #2
    Junior Member
    Join Date
    Aug 2004
    Posts
    9
    Nobody know the answer?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center