A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Tweening freeze

  1. #1
    Mafia Bros
    Join Date
    Nov 2007
    Location
    Czech, Moravia
    Posts
    33

    Question Tweening freeze

    Hello guys
    What do you thing could be the problem.
    I've got on different frames buttons when I click one of them the tweening the tweening shows up.
    The problem is: when I click button tweening shows up pretty fine but when I click another button DURING the tweening the next tweening crash/freeze.
    When I wait for tweening to finish it works fine, the problem is only during the tweening...
    ???
    "I believe in peace and bashing two bricks together."
    .~*MONTY PYTHON*~.*~.

    .~*MONGOL RALLY 2009*~. PIRANHA BROTHERS RT

  2. #2
    Member
    Join Date
    Aug 2010
    Posts
    65
    post your code

  3. #3
    Member
    Join Date
    Mar 2010
    Posts
    30
    I think that when the swf just stops, it's an issue regarding where you actually define the tween variable. Make sure you define the tween variable so its scope is global (i.e., at the top of the script)

    Actionscript Code:
    var myTween:Tween;

    and the function where you actually instantiate the tween should be in the function itself

    Actionscript Code:
    function someFunction(evt:MouseEvent):void
    {
    myTween = new Tween(yadda yadda your particular tween particulars here
    }

    Note how it should NOT be:
    Actionscript Code:
    function someFunction(evt:MouseEvent):void
    {
    var myTween:Tween = new Tween(yadda yadda your particular tween particulars here
    }

  4. #4
    Member
    Join Date
    Aug 2010
    Posts
    65
    so the second button that you click makes an another tween on the same object, right? You could use a second different tween object for the second button to work with, or if you dont want anything to happen if the tween has not finished yet set a 'tweening' boolean to true whenever the tween starrts and obviously set to false when it ends, then on the second button place an if statement to check whether it is still tweening

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