5 to MX code conversion

Go into File/Publish Settings

When you open up the file it is set to publish as Flash 5, if you click on the Flash tab and tell it to Publish as Flash 6, it won’t work.

At least it hasn’t for any of us… seems kinda strange that it works just for you :crazy:

Nevermind… I get it now… Hmm That’s strange… I’ll have a further look into this coding… BTW… I don’t think it’s that main code… Try looking at the 10+ code blotches thrown around everywhere else in the file :wink:

playamarz :player:

I think the problem lies in the sticky_update prototype as that is the prototype that gets this puppy sticky.

you are deffinetly right about that LIB. It seems like the update just stops working. THe icon pulls out a bit but then settles back into place and then stops moving all together. Marz i took out those extra “;”. Allthough the don’t seem to be the main problem i’m sure it was good to get rid of them thianks every one for helping so far. I jsut hope we can get this soon. You have all been a great help.

lol i just was playing wiht it and tried clicking it. the thing shot off like a rocket. So whats up with that?

Hmm… Hasn’t done that for me… Albeit… Hmm… If I wasn’t so focused on PHP today I’d crack open Flash for another gander :wink:

hehe playamarz :player:

OK so i broke down and found a commponet that works. It kind of sucs to have to use one but u guess i’ll have to. thanks for all your help u guys and if any body wants to keep at it please do because it would be soem great code to have. Thanks again u guys

Yeah, this thing is driving me friggin nuts. Everything looks perfectly fine to me… I DON’T GET IT!!!

As long as the component works, I guess that is all that matters :-\

Sorry I couldn’t help at all :frowning:

No no no everybody was a great help and i thank u all for the time u guys put in. Thanks alot all of u

Originally posted by sintax321
No no no everybody was a great help…

hey! at least i got it partially working!! :stuck_out_tongue: jk :wink:

seriously now…
this sucks! i have no idea what’s wrong :-\

i’ll keep trying though :wink:

ok… i’m bored today and i remembered about this thread so… :stuck_out_tongue:

// prototype
MovieClip.prototype.sticky = function(r, a, c) {
	this.cx=this._x, this.cy=this._y;
	this.onEnterFrame = function() {
		if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
			this._x = _root._xmouse-(_root._xmouse-this.cx)/r;
			this._y = _root._ymouse-(_root._ymouse-this.cy)/r;
		} else {
			this.x=this.x*a+(this.cx-this._x)*c, this._x += this.x;
			this.y=this.y*a+(this.cy-this._y)*c, this._y += this.y;
		}
	};
};
// usage
MovieClip.sticky(6, .8, .4);