A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Controlling a timeline

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Posts
    25

    Controlling a timeline

    Hi
    I'm new to actionscript!
    Have tryed to write an if else sentence but grrrrrr its hard when you are not into programming.

    My problem:
    I have a movieclip that runs as an intro to my movie.
    The first time the movie runs I want it to run all the way!!!!
    But the problem is that when it stops I have a button who controls it with a simple play action.
    and I cant get it to:

    _root.portfolio.play(95);

    which means to me that it should play frame 95
    but it doesnt?


    Why???

    SO I tried to write in the first frame:
    set (moviecliP,1)
    if{movieclip=1;
    play();}

    and in the last frame
    set (moviecliP,2)

    and in frame 95
    if{movieclip=1;
    play();}
    else{ stop;}


    Help anyone
    Less is more!

  2. #2
    feeling froggy
    Join Date
    Jul 2002
    Posts
    179
    code:
    _root.portfolio.gotoAndPlay(95);


  3. #3
    feeling froggy
    Join Date
    Jul 2002
    Posts
    179
    btw...

    standard if statement:
    code:

    if(statement){
    //true - do this
    }else {
    // false - do something else
    }


    so...
    code:

    var playMovie = true;
    if(playMovie == true){
    play();
    }else{
    stop();
    }


    is also the same as:
    code:

    var playMovie = true;
    if(playMovie){
    play();
    }else{
    stop();
    }


    here are some stardard comparsion operators:

    'val1 == val2' checks if the two values are equal if they are it returns true.
    'val1 > val2' checks to see if val1 is greater than val 2.
    'val1 < val2' less than
    'val1 >= val2' greater than OR equal to.
    'val1 <= val2' less than or equal to.
    ------------------------------------------------
    an exclaimation point ('!') means not or the opposite so...
    'val1 != val2' checks if the two values are not equal if they are it returns true. which would be the same as '!(val1 == val2)'

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