Actionscript not working

Hi there,

Just wondering if someone can have a look at the linked Flash file and tell me what is wrong with it…? When you roll over the “classic” panel in the flash movie it should scroll right out to the right, like the “modern” panel does. But it doesn’t, then other strange things happen which is driving me crazy. It was all working before, then the client asked me to resize the panels, and since I did that the actionscript has not been working- despite not having changed it!

File was too large to attach- download from here:

Thanks,
Ross

Hi again,

Thought I might have more success if I didn’t rely on a download. have a look at this link:

http://www.calibrebuiltdevelopments.com.au/temp/

The flash is now working better than it was before, but there are some issues when you roll over ‘modern’. It works fine for the most part, but sometimes breaks when you roll the mouse over near the right hand side. It also doesn’t work if you roll over onto modern from the right of the flash movie- or rather doesn’t work properly.

The code I have on the ‘Classic’ movie is:

onClipEvent (enterFrame) {
	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
		
		_root.house2.nextFrame();
				_root.house1.nextFrame();

	} else {
		_root.house2.prevFrame();
				_root.house1.prevFrame();

	}
}

And on the ‘Modern’ movie is:

onClipEvent (enterFrame) {
	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
		
		_root.house3.nextFrame();
		_root.house2.nextFrame();
		_root.house1.nextFrame();




	} else {
		_root.house3.prevFrame();



	}
}

house1 refers to ‘custom’, house2 refers to classic and house3 refers to modern, They are independant movie clips.

I hope someone can give me some guidance as I just cannot see anything wrong with either the code or the movieclips.

Thanks,
Ross

Can’t say exactly why it’s misbehaving but I’d advise not putting multiple batches of independent code onto movieclips and using onEnterFrames and frame navigation to animate. You’d be a lot better off with a single controlling piece of code in the root that maintains state for all the clips, and using programmed tweens to move stuff, so whatever happens is integrated (and more easily debuggable) in one place