mena__99
07-31-2010, 08:05 PM
hello guys , iam makeing a new project ... iam tring to make the Player's car not to touch the side road , what should it do ? ..
PlayerCar_mc >>> inside this movie clip there is a ActionScript layer have all the car movement ..... the car activates ones i click on it.
the point is when i made a rectangle and called it "Building" and tried the hitTestObject ... it gave me an error said that "Parameter hitTestObject must be non-null' error" i dont even know what null means , plz help me ...
if (this.carMC.hitTestObject(this.Buildings_mc))
{
trace ("working");
}
Not Working >>>> Failed!! ...
Error :
--------------------------------------------------------------------
TypeError: Error #2007: Parameter hitTestObject must be non-null. ^
at flash.display::DisplayObject/_hitTest() ^
at flash.display::DisplayObject/hitTestObject() ^
at 7_fla::MainTimeline/frame1713() ^
--------------------------------------------------------------------
What should i do .. why its not working , is there is any other method ? ... if there is plz Let me know i will really appraciate it .
Thank you alot .
PlayerCar_mc >>> inside this movie clip there is a ActionScript layer have all the car movement ..... the car activates ones i click on it.
the point is when i made a rectangle and called it "Building" and tried the hitTestObject ... it gave me an error said that "Parameter hitTestObject must be non-null' error" i dont even know what null means , plz help me ...
if (this.carMC.hitTestObject(this.Buildings_mc))
{
trace ("working");
}
Not Working >>>> Failed!! ...
Error :
--------------------------------------------------------------------
TypeError: Error #2007: Parameter hitTestObject must be non-null. ^
at flash.display::DisplayObject/_hitTest() ^
at flash.display::DisplayObject/hitTestObject() ^
at 7_fla::MainTimeline/frame1713() ^
--------------------------------------------------------------------
What should i do .. why its not working , is there is any other method ? ... if there is plz Let me know i will really appraciate it .
Thank you alot .