# Swf address with as2 tweens (mctween) is jumpy

**URL:** <https://forum.kirupa.com/t/swf-address-with-as2-tweens-mctween-is-jumpy/286554>\
**Category:** Uncategorized\
**Created:** [April 16, 2009, 11:18pm UTC](https://forum.kirupa.com/t/swf-address-with-as2-tweens-mctween-is-jumpy/286554 "2009-04-16T23:18:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jibble](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jibble/32/2265_2.png) [@jibble](https://forum.kirupa.com/u/jibble)\
**Post date:** [April 16, 2009, 11:18pm UTC](https://forum.kirupa.com/t/swf-address-with-as2-tweens-mctween-is-jumpy/286554/1 "2009-04-16T23:18:31Z")

</div>

i can’t figure out what is going on with this and was hoping someone had some insight as to why it’s being a bit jumpy/sluggish sometimes.

I would assume it has something to do with the delay it takes to send/listen for swfaddress

here is the link to my test

[http://www.brainsqueezecreative.com/v5/test](http://www.brainsqueezecreative.com/v5/test)

and here is the code

```auto
stop();
#include "mc_tween2.as"
#include "com/SWFAddress.as"

SWFAddress.onChange = function() {
	var addr = SWFAddress.getValue();
	// Your navigation code here.
	navigationPage(addr);
	trace(addr);

	// Set the title.
	SWFAddress.setTitle('My Website :: '+addr);
};

//page = "/clientname/projectname1/";
SWFAddress.setValue("/clientname/projectname1/");

//======================================\\
content.img1.onRollOver = function():Void {
	content.img1.alphaTo(50,.25,"linear");
};
content.img1.onRollOut = function():Void {
	content.img1.alphaTo(25,.25,"linear");
};
content.img1.onRelease = function():Void {
	content.img1.enabled = false;
	content.img2.enabled = true;
	content.img3.enabled = true;
	content.img4.enabled = true;
	page = "/clientname/projectname1/";
	SWFAddress.setValue(page);
};
//======================================\\
content.img2.onRollOver = function():Void {
	content.img2.alphaTo(50,.25,"linear");
};
content.img2.onRollOut = function():Void {
	content.img2.alphaTo(25,.25,"linear");
};
content.img2.onRelease = function():Void {
	content.img1.enabled = true;
	content.img2.enabled = false;
	content.img3.enabled = true;
	content.img4.enabled = true;
	page = "/clientname/projectname2/";
	SWFAddress.setValue(page);
};
//======================================\\
content.img3.onRollOver = function():Void {
	content.img3.alphaTo(50,.25,"linear");
};
content.img3.onRollOut = function():Void {
	content.img3.alphaTo(25,.25,"linear");
};
content.img3.onRelease = function():Void {
	content.img1.enabled = true;
	content.img2.enabled = true;
	content.img3.enabled = false;
	content.img4.enabled = true;
	page = "/clientname/projectname3/";
	SWFAddress.setValue(page);
};
//======================================\\
content.img4.onRollOver = function():Void {
	content.img4.alphaTo(50,.25,"linear");
};
content.img4.onRollOut = function():Void {
	content.img4.alphaTo(25,.25,"linear");
};
content.img4.onRelease = function():Void {
	content.img1.enabled = true;
	content.img2.enabled = true;
	content.img3.enabled = true;
	content.img4.enabled = false;
	page = "/clientname/projectname4/";
	SWFAddress.setValue(page);
};
//======================================\\

function navigationPage(pageId) {

	if (pageId == "/clientname/projectname1/") {
		content.img1.alphaTo(100,.25,"linear");
		content.img2.alphaTo(25,.25,"linear");
		content.img3.alphaTo(25,.25,"linear");
		content.img4.alphaTo(25,.25,"linear");
		content.tween("_x",Stage.width/2-(content._width-content._width/4*4+170),.5,null,.25);

	} else if (pageId == "/clientname/projectname2/") {
		content.img1.alphaTo(25,.25,"linear");
		content.img2.alphaTo(100,.25,"linear");
		content.img3.alphaTo(25,.25,"linear");
		content.img4.alphaTo(25,.25,"linear");
		content.tween("_x",Stage.width/2-(content._width-content._width/4*3+170),.5,null,.25);

	} else if (pageId == "/clientname/projectname3/") {
		content.img1.alphaTo(25,.25,"linear");
		content.img2.alphaTo(25,.25,"linear");
		content.img3.alphaTo(100,.25,"linear");
		content.img4.alphaTo(25,.25,"linear");
		content.tween("_x",Stage.width/2-(content._width-content._width/4*2+170),.5,null,.25);

	} else if (pageId == "/clientname/projectname4/") {
		content.img1.alphaTo(25,.25,"linear");
		content.img2.alphaTo(25,.25,"linear");
		content.img3.alphaTo(25,.25,"linear");
		content.img4.alphaTo(100,.25,"linear");
		
		content.tween("_x",Stage.width/2-(content._width-content._width/4+170),.5,null,.25);
	}
}

```
