Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

global to local x/y thing

Status
Not open for further replies.

blended

Programmer
Aug 8, 2000
154
US
This question is in regards to a pseudo mouseOver call, but instead of having the mouse go over a button, I want the movieclip to go back to frame one when the x or y of the mouse from within the movie clip goes over 50 pixels of the origin of the axis(i.e., +/-50 on each axis.)

I've tried many things, but the kicker is that I can't use absolute target references due to the movie clips being called from an array (no, it's not an option to undo this). So, if anyone knows how to do this, you're pretty good!

Blended
 
hey man couple questions..first of all why can you not use absolute target references from an array? second explain what is the point of this effect? not that i'm challanging why you can't do it, simply i want to know why you are doing it..i've read up some on this effect, from what i gather it is used for mouse over effects that are similar to flash only in dhtml..you say you are using this because you want the mc to restart after the mouse rolls away from a certain area..why? could you not just set the mc on a timer or something to have it restart? but i'm sure you have thought of that and there must be a specific reason..could the x,y coordinates not be determined from within the movie somehow and acheive the same effect without relying on calling it from an array..


just curious..sorry can't help..but is interesting..
e.gif


carlsatterwhite@endangeredgraphics.com
 
Blended, can you give me a litte more "graphical explanation" of what you're trying to do?
So I have this mc... And if the mouse cursor going over it, is further away than 50 pixels on any side of both the original axis (determined by an array?), it should go back to frame 1?
Is this mc allways the same size? Where is the original axis within the mc? Dead center? Randomly determined by the array?

;-)ldnewbie
 
Ok.....

This goes all the way back to the early xml days. The way xml works is you load the xml data into a series of arrays which are then parsed by movie clip which hold all of the data variables. These movie clips do not sit on the main time line because they are called by "linking" which is done by setting the mc to "linked" from the library and giving it a name. Also, they load up in the order the xml file is in, so (in this case) the one on the left is loaded first and therefore "under" the one on the right in terms of the "z" axis on its level. The advantage to this is that you don't have dead buttons, and the end user can simply add an paragraph to a text file and make a new button occur on the flash site without using Generator.

The complication is this: You can't call the movie from itself by its instance name because there are eight of them, so if you tell _root.video to gotoAndStop (1) they all will. What you need to do is set up a variable from within the mc which will tell itself to gotoAndStop (1) when it is left or exited by the mouse. The only way I can figure out how to do this it so set up a local x/y coordinates from within the specific mc and the create an if/else statement to call it. You can't use buttons to have a smooth effect due to the layering, and because the movie clip is linked you can't assign specific mc events to it from right clicking on it, but you can to a mc within it, but you then have to call every mc relative and not absolute.

Tragically, you both seem to understand what I'm asking but are unsure what approach to take. I promise this is the last option. As to Virt, yeah, they all have to stay in their arrays (...xml....) and as to Old, Lets just assume that the origin is dead center and take it from there. It's always the same size (about 103x103 if I remember correctly) and the only variables to affect each array are the ones called by the xml file (not anything involving size/shape aspects).

Thanks! Have fun!

Mucho props,

Blended
 
Thought I understood a bit of it! But this is way over my head! Dave! Think you should give Blended a house call!

;-)ldnewbie

 
good luck dude...maybe dave will post the answer here so we all can see..



sheeeeeeeeeeeeshhhhhh!!!!!!!!!!!!!!!!
e.gif


carlsatterwhite@endangeredgraphics.com
 
hey one more question? can you use javascript and the fs command to call the absolute target from an array?

just a thought!!
e.gif


carlsatterwhite@endangeredgraphics.com
 
Maybe, but I'm not using absolutes!

Blended
 
I've tried many things, but the kicker is that I can't use absolute target references due to the movie clips being called from an array (no, it's not an option to undo this). So, if anyone knows how to do this, you're pretty good!

isn't that what you said..anyways try using the fs command to make that work..see what happens..
e.gif


carlsatterwhite@endangeredgraphics.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top