Magnifying glass moved by user

The code I used in Flash 5 isn’t working in MX. (when I open and my previous .fla in MX that was created in 5 and works in 5 and “test scene”, it does not work.) I am using a magnifying lens as a mask which I want the user to be able to move around. Originally, I set the x and y of the movie clip to that of the mouse. In MX, the mask won’t work with this code; it just stays put while the handle (same code) does move. When I remove the mask function from the lens it works fine.

The code I am using is:

onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
setProperty(this, _x, _root._xmouse);
setProperty(this, _y, _root._ymouse);
updateAfterEvent(mouseMove);
}

Can anyone tell me how I can do this in MX.

Thanks,
Joan

here:


this._x = _root._xmouse;
this._y = _root._ymouse;

Peace

Thanks for the suggestion. I tried it, but this doesn’t work at all (as mask or as plain movie clip).

Any other ideas?

Joan

I made you an fla :P. I like making flas:-\

I used this code on the mask

onClipEvent (load) {
mouse.hide();
startDrag (this, true);
posx = _x ;
posy = _y ;
}
onClipEvent (enterFrame) {
back._x = posx - _x ;
back._y = posy - _y
}

i haven’t checked the fla or anything (I don’t even really know what you’re trying to do but…)
add the actions
posx = _x ;
posy = _y ;
between the onClipevent(enterFrame) handler too;

jcook wants to make a mask follow the mouse acting like a magnifying lens, the fla is mine. I make it as an example.

Jimw00d pmed me asking me to explain the fla but my explaination wouldn’t fit in a pm so I just posted it and pmed him the link to the thread.

jimw00d wrote on 01-14-2003 04:40 PM:
Would you feel up to explaining your magnifying glass fla to me. I have tried to replicate it with some success but I could use some help.

Does the picture have to be a particular format, the image I want to use has been retraced in flash, would this affect the outcome?

regards

Wow that thread is very old.
Ok try this. First import and image to your movie/project scale it down a bit then center it on the screen. Then create a new layer above the original and goto iinsert / new syombol name it what you want and make it a movie clip. In the new symbol insert the full size image and center it. then create a new layer in the symbol and on that layer draw a circle with no out line. goto insert / convert to symbol and select movie clip to make the circle a symbol. Then right click on the circle and goto actions and put this code on it

onClipEvent (load) {
mouse.hide();
startDrag(this, true);
posx = _x;
posy = _y;
}
onClipEvent (enterFrame) {
back._x = posx-_x;
back._y = posy-_y;
}

That makes the circle follow your mouse pointer

After that goto your libary (Ctrl +L) and open your movie clip with the image and the circle and make sure the layer with the circle is above the layer with the image, right click on the circle layer and goto mask.
That’s all there is to it