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);
}