Question : zoom bar

Greeneel,
I'm finally getting back to my map project. I think the zoom bar will finish it off. The link you sent me was helpful, but I'm still a bit lost. I'm wondering if I should use the various increments that you helped me set up with the buttons to correspond with the various points along the zoom bar? or if a completly different method will be used with the zoom bar?

Bm71

Answer : zoom bar

look a this peace of code with the next level in place.

GE
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
 
on (press) {
 
	startDrag(this, false, 0, 0, 81.2, 0);
 
	
}
 
 
on (release) {
 
	import mx.transitions.Tween;
	import mx.transitions.easing.*;
 
	trace(this._x);
 
	if ((this._x>=0) && (this._x<2.5)) {
 
		trace("in the area 1");
		var paddle_X:Tween = new Tween(this, "_x", Strong.easeOut, this._x, -2.50, 1, true);
 
		var zoom_handlerX:Tween = new Tween(_root.mapall2, "_width", Strong.easeOut, _root.mapall2._width, 540.6, 2, true);
		var zoom_handlerY:Tween = new Tween(_root.mapall2, "_height", Strong.easeOut, _root.mapall2._height, 417.4, 2, true);
 
		contrainLeft = -184;
		contrainTop = -120.1;
	}
	if ((this._x>=2.6) && (this._x<14.5)) {
		trace("in the area 2");
		var paddle_X:Tween = new Tween(this, "_x", Strong.easeOut, this._x, 9.50, 1, true);
 
		var zoom_handlerX:Tween = new Tween(_root.mapall2, "_width", Strong.easeOut, _root.mapall2._width, 617.8, 2, true);
		var zoom_handlerY:Tween = new Tween(_root.mapall2, "_height", Strong.easeOut, _root.mapall2._height, 477.1, 2, true);
 
		contrainLeft = -263;
		contrainTop = -180.1;
 
	}
	stopDrag();
 
}
Open in New Window Select All
Random Solutions  
 
programming4us programming4us