Advertisement

08.22.2008 at 02:53PM PDT, ID: 23671626
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.8

How to adjust the x and y settings?

Asked by brucegust in Macromedia Flash

Tags: , ,

Go out to http://www.brucegust.com/ShowdownTest/ and check out the Carousel menu in the lower right hand corner. You'll notice that it whips around like a champ because the code associated with that menu is tracking the x and y coordinate of the mouse.

My question is how can I limit the response of that menu to only when the mouse is over the menu itself. You'll notice too that when you click on any of the icons, rather than the icon moving gracefully to the left a little bit, instead it charges up to the upper left hand corner of the screen.

I have the menu being "held" in a blank movie clip that the main timeline loads on entry. I don't know if that's a problem or not, but the bottom line is I need to the x and y variable(s) to be limited to the area over the movie itself.

How do I do that?Start Free Trial
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:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;
 
var numOfItems:Number;
var radiusX:Number = 250;
var radiusY:Number = 25;
var centerX:Number = Stage.width/2;
var centerY:Number = Stage.height/1.5;
var speed:Number = 0.05;
var perspective:Number = 140;
var home:MovieClip = this;
theText._alpha = 0;
 
var tooltip:MovieClip = this.attachMovie("tooltip","tooltip", 10000);
tooltip._alpha = 0;
 
var xml:XML = new XML();
xml.ignoreWhite=true;
 
xml.onLoad=function()
{
	var nodes = this.firstChild.childNodes
	numOfItems = nodes.length;
	for(var i=0;i<numOfItems;i++)
	{
		var t = home.attachMovie("item","item"+i,i+1);
		t.angle = i * ((Math.PI*2)/numOfItems);
		t.onEnterFrame = mover;
		t.toolText = nodes[i].attributes.tooltip;
		t.content = nodes[i].attributes.content;
		t.icon.inner.loadMovie(nodes[i].attributes.image);
		t.ref.inner.loadMovie(nodes[i].attributes.image);
		t.icon.onRollOver = over;
		t.icon.onRollOut = out;
		t.icon.onRelease = released;
	}
}
 
function over()
{
//BONUS Section
	var sou:Sound = new Sound();
	sou.attachSound("sover");
	sou.start();
 
	home.tooltip.tipText.text = this._parent.toolText;
	home.tooltip._x = this._parent._x;
	home.tooltip._y = this._parent._y - this._parent._height/2;
	home.tooltip.onEnterFrame = Delegate.create(this, moveTip);
	home.tooltip._alpha = 100;
}
 
function out()
{
	delete home.tooltip.onEnterFrame;
	home.tooltip._alpha = 0;
}
 
function released()
{
	//BONUS Section
	var sou:Sound = new Sound();
	sou.attachSound("sdown");
	sou.start();
	
	home.tooltip._alpha = 0;
	for(var i=0;i<numOfItems;i++)
	{
		var t:MovieClip = home["item"+i];
		t.xPos = t._x;
		t.yPos = t._y;
		t.theScale = t._xscale;
		delete t.icon.onRollOver;
		delete t.icon.onRollOut;
		delete t.icon.onRelease;
		delete t.onEnterFrame;
		if(t !=this._parent)
		{
			var tw:Tween = new Tween(t,"_xscale",Strong.easeOut, t._xscale,0,1,true);
			var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut, t._yscale,0,1,true);
			var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
		}
		else
		{
			var tw:Tween = new Tween(t,"_xscale",Strong.easeOut, t._xscale,100,1,true);
			var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut, t._yscale,100,1,true);
			var tw3:Tween = new Tween(t,"_x",Strong.easeOut, t._x,96,1,true);
			var tw4:Tween = new Tween(t,"_y",Strong.easeOut, t._y,190,1,true);
			var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
			theText.text = t.content;
			var s:Object = this;
			tw.onMotionStopped = function()
			{
				s.onRelease = unReleased;
			}	
		}
	}
}
 
function unReleased()
{
	delete this.onRelease;
	var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut, 100,0,.5,true);
	for(var i=0;i<numOfItems;i++)
	{
		var t:MovieClip = home["item"+i];
		if(t !=this._parent)
		{
			var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
			var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
			var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
		}
		else
		{
			var tw:Tween = new Tween(t,"_xscale",Strong.easeOut, 100,t.theScale,1,true);
			var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
			var tw3:Tween = new Tween(t,"_x",Strong.easeOut, t._x,t.xPos,1,true);
			var tw4:Tween = new Tween(t,"_y",Strong.easeOut, t._y,t.yPos,1,true);
			tw.onMotionStopped = function()
			{
				for(var i=0;i<numOfItems;i++)
				{
					var t:MovieClip = home["item"+i];
					t.icon.onRollOver = Delegate.create(t.icon,over);
				 	t.icon.onRollOut = Delegate.create(t.icon,out);
					t.icon.onRelease = Delegate.create(t.icon,released);
					t.onEnterFrame = mover;
				}
			
			}
		}
	}
}
 
 
function moveTip()
{
	home.tooltip._x = this._parent._x;
	home.tooltip._y = this._parent._y - this._parent._height/2;
}
 
xml.load("icons.xml");
 
function mover()
{
	this._x = Math.cos(this.angle) * radiusX + centerX;
	this._y = Math.sin(this.angle) * radiusY + centerY;
	var s:Number = (this._y - perspective) / (centerY+radiusY - perspective);
	this._xscale = this._yscale = s * 100;
	this.angle += this._parent.speed;
	this.swapDepths(Math.round(this._xscale) + 100);
}
 
this.onMouseMove = function()
{
	speed = (this._xmouse-centerX) / 2500;
}
[+][-]08.22.2008 at 04:55PM PDT, ID: 22294997

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.24.2008 at 06:00PM PDT, ID: 22302624

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.24.2008 at 08:25PM PDT, ID: 22302987

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2008 at 08:59AM PDT, ID: 22306582

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.26.2008 at 04:14AM PDT, ID: 22313276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.26.2008 at 06:08AM PDT, ID: 22314130

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.26.2008 at 07:29PM PDT, ID: 22321406

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.27.2008 at 02:45AM PDT, ID: 22322896

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Macromedia Flash
Tags: Adobe, Flash, CS3
Sign Up Now!
Solution Provided By: Dreammonkey
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.27.2008 at 03:03AM PDT, ID: 22322962

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.27.2008 at 06:58AM PDT, ID: 22324778

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628