Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Posts
    2,807
    Tokens
    0

    Latest Awards:

    Default Basic actionscript problem

    I havent done any actionscript in ages so I wrote some last night for something Im building. It all worked apart from the easiest bit. Even now when I'm not tired I can't see where I'm going wrong.

    I have a movieclip and I only want it to drag if Bar = 1 but even when I define Bar as 2 before the if statement it still moves.


    Code:
    onClipEvent(load){
    Bar = 2;
    if(Bar = 1){ 
    startDrag(this);
    }
    }


    It always drags even if bar = 2, any ideas?
    Last edited by MrPinkPanther; 12-11-2008 at 03:55 PM.

  2. #2
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    Change

    if(Bar = 1)
    to
    if(Bar == 1)

    Perhaps?


  3. #3
    Join Date
    Dec 2007
    Posts
    2,807
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by L?KE View Post
    Change

    if(Bar = 1)
    to
    if(Bar == 1)

    Perhaps?
    Yeh thanks, I noticed it about an hour after I posted the thread. I knew it would be something stupid. +REP

Posting Permissions

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