A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: First flash site - help.

  1. #1
    Shadowtunerz
    Join Date
    Mar 2012
    Posts
    1

    Question First flash site - help.

    Hi everyone! I'm new here and I need alot of help to get a website up and running (school project). I am going to use this thread to post my problems I come across so I don't spam the forum of useless threads.

    OK. My first problem is that I get an error. This is what the error looks like:

    Code:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    	at fl.transitions::Tween/setPosition()
    	at fl.transitions::Tween/set position()
    	at fl.transitions::Tween()
    	at Untitled_fla::MainTimeline/fl_MouseOverHandler()
    The thing is that I have a wheel inside a button. This wheel I have named "kugghjulEtt" ("wheelOne" on english). What I want to do is to make the wheel spin faster and faster and at the same time fade out. How I do that, I do know. But I do not know why it won't start to spin when I hover. The error I wrote is the error that is displayed when I hover this button.

    Here's the code for the "spin":

    Code:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    
    movieBtn.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler);
    
    function fl_MouseOverHandler(event:MouseEvent):void
    {
    	var kugghjulEtt = new Tween(kugghjulEtt, "rotation", Regular.easeIn, 0, 3000, 6, true);
    }

  2. #2
    Senior Member x-death's Avatar
    Join Date
    Aug 2009
    Posts
    175
    well when i use the tween class i have to write it like:
    Actionscript Code:
    var kugghjulEtt:Tween = new Tween( // and so on and so forth....

    other then that i didn't spot any other potential mistakes.

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