DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

LoadVars Sample

06.09.2008
| 191 views |
  • submit to reddit
        // description of your code here

		lv = new LoadVars();
 	   	lv.j = this.i;
		lv.q = _global.id[_global.current];
		lv.onLoad = function(success) {
			if (success) {
				if (this.output > -1) {
					hiderating = new Tween(_parent.rating, "_alpha", mx.transitions.easing.Regular.easeOut, 100, 0, 5); 
					hiderating.output = this.output;
					hiderating.onMotionFinished = function() {
						_parent.rating.mask._width = this.output * 19; 

						_global.rate[_global.current] = this.output;

						new Tween(_parent.rating, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 5); 
						new Tween(_parent.thanks, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 5); 
					}
				}
				else if (this.output == "error") {
						new Tween(_parent.denied, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 5); 
				} 
			}
        }
        lv.sendAndLoad(_global.contest + "contest.php", lv, "POST");