A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: simple line animation

  1. #1
    Junior Member
    Join Date
    Mar 2003
    Posts
    14

    simple line animation

    hello i wanna do i simple line animation starts off small then streches the length of my project window sort of like drawing a straight line with a pencil. my begining and endframes are graphic symbols when i tween it doesnt work any help would be appreciated

  2. #2
    Member
    Join Date
    Feb 2003
    Location
    California
    Posts
    90
    this is my line animation with actionScripting that I used for a site.... perhaps you can modify it to suit your needs.

    // Draw a line and move it across the stage under the title to create sort of an animation
    with(_root.createEmptyMovieClip("holder", 1)){
    lineStyle(1, 0xCCCCCC, 100);
    moveTo(0,125);
    newX=0;
    newY=125;
    speed = 5
    onEnterFrame = function(){
    if(_parent.newX <= 175 && _parent.newY == 125){
    _parent.newX +=_parent.speed;
    lineTo(_parent.newX, _parent.newY);
    }else{
    if(_parent.newY <= 200){
    _parent.newY +=_parent.speed;
    lineTo(_parent.newX, _parent.newY);
    }else{
    if(_parent.newX <380){
    _parent.newX +=_parent.speed;
    lineTo(_parent.newX,_parent.newY);
    }
    }
    }
    }
    }

    stop();

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