Magnifier
Well, im try to do something like this http://www.xara.com/gallery/, but i have some troblues with the code, can anybody help me
FlashKit > Flash Help > Flash MX
Posted on: 02-15-2005, 06:43 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Magnifier
Hi,
I m trying to use this tutorial that i found on flash kit to create a magnify lens for a flash page. The tutorial is working with an image 400 * 400. Hovever I am using a 700 * 400 image and can t seem to alter the code to fit this image. Does anybody know where i could find a tutorial for craeting a magnifying lens?
thanks
Magnifier
Hello.
I have a little problem with actionscripted magnifier from flash kit. How can i modify it to be able to zoom my dynamicaly loaded .jpges ? I use dynamic pageflip script, and i want to zoom externally loaded pages (jpg). Is it possible ?
Thanks for help and sorry for my english, i know its bad
Code:
// copyright 2004 by brinton corb (flashkit id: brintcorb). you are welcome to use and reproduce this script, but must leave in this header. emails welcome at brintcorb@hotmail.com
// "myclip" is the name of the clip in the library that you want to magnify. In the properties or linkage panel for "myclip", click the "export for actionscript" box, and set the Indetifier to the default clip name for "myclip".
this.magV = {magmovie:"myclip", xpos:200, ypos:150, viewerxsize:100, viewerysize:100, magnification:3};
MovieClip.prototype.drawFillRectangle = function(xlen, ylen, x, y, lineThick, lineRgb, lineAlpha, fillRgb, fillAlpha) {
if (lineThick == undefined) {
lineThick = 2;
}
if (lineRgb == undefined) {
lineRgb = 0x000000;
}
if (lineAlpha == undefined) {
lineAlpha = 100;
}
if (fillRgb == undefined) {
fillRgb = 0xFFFFFF;
}
if (fillAlpha == undefined) {
fillAlpha = 100;
}
this.lineStyle(lineThick, lineRgb, lineAlpha);
this.beginFill(fillRgb, fillAlpha);
this.moveTo(x, y);
this.lineTo(x+xlen, y);
this.lineTo(x+xlen, y-ylen);
this.lineTo(x, y-ylen);
this.lineTo(x, y);
this.endFill;
};
// create clips for viewer, mask and attach the clip to be magnified
this.attachMovie(magV.magmovie, magV.magmovie, 0);
this.createEmptyMovieClip("viewer", 1);
viewer.drawFillRectangle(magV.viewerxsize, magV.viewerysize, -magV.viewerxsize/2, magV.viewerysize/2);
this.attachMovie(magV.magmovie, "mag", 2);
this.createEmptyMovieClip("mask", 3);
mask.drawFillRectangle(magV.viewerxsize, magV.viewerysize, -magV.viewerxsize/2, magV.viewerysize/2);
this.mag.setMask(this.mask);
// initialize parameters
this.magmo = this[magV.magmovie];
magmo._x = magV.xpos;
magmo._y = magV.ypos;
mag._x = magV.xpos;
mag._y = magV.ypos;
mag.magfactor = magV.magnification;
mag._xscale = mag._yscale=100*mag.magfactor;
mag.xoffset = mag._x*mag.magfactor;
mag.yoffset = mag._y*mag.magfactor;
// create magnifier and track to the mouse
this.magnifier = new Object();
magnifier.onMouseMove = function() {
viewer._x = mask._x=_root._xmouse;
viewer._y = mask._y=_root._ymouse;
mag._x = viewer._x-(mag.magfactor*_root._xmouse)+mag.xoffset;
mag._y = viewer._y-(mag.magfactor*_root._ymouse)+mag.yoffset;
};
Mouse.addListener(magnifier);
Magnifier : Can't Let Go Of Picture
hi
i've just created a magnifier in flash. Ones mouse allows the magnifier to move over the main stage small image, but for some reason when the magnifier button moves the big image that's being masked, the masked image moves with it, so it doesn't appear to be moving over the small image.
Does this make sense? If you have any ideas on what I might be missing here, I greatly appreciate your help!!
thank you
piper
Special Magnifier +
hi there
we all know the magnifier..
but i need a special one...
the picture as a little thumbnail on the left side, with maybe a square on top (that sticks to the mouse if you move over the thumbnail) and on the right, the part that is in the quare, magnified....
i saw it one time... but cant find it anymore... :O(
greetz
mel
Buggy Magnifier
HI
I am having troubles with code for a magnifier. The movie works as an standalone SWF but stops working once I bring it into my site structure. It is an adaptaion of Gagan Sachdeva's magnifier.
A zip file containing the 2 corresponding FLA files can be found here.
I have a very basic understanding of action script, I hope someone can help out. Thank you for your time.
RIff
Flash Magnifier Help
Hi,
I'm creating a website that uses a lot of visual content to explain events and view a specific area.
I hired an aerial helicopter photographer to take a vertical (top down) photo of an area (a battlefield) in France, and am using this photo as the main media to explain the events of the battle as well as view the area from an interesting viewpoint.
As part of the website I want to include a magnify section where a vistitor to the site can click a magnify link, and be able directed to a zoom control panel where a close up view of the aerial can be seen.
I don't know the best way to approach this, since I don't have any flash experience ... neither do I have a bugdet to hire someone to do the coding for me. The aerial photo ended up costing around $2000 U.S. by the time the CD arrived at my door.
Hopefully someone here can help me discover the best way to approach this.
I saw a flash magnifier and it looked great, so would like to do it in flash.
Here are the specifics:
Original file size- 6900x4848 pixels (23x16.16 inches) -300 resolution
.tif is 98 MB - .jpg is 34 MB
Photo will be reduced to 900x632 to fit on a 1024x768 webpage (image size now about 400 KB).
Thanks for any help with this.
David
Magnifier + Video
Hi,
I would like to combine the magnifying glass technique with video playing.
That is, when the user encounters a video with the magnifying glass the video automatically is played (and magnified within the glass of course).
I tried to solve this with a hot area (just a transparent skin over the video, please see first example) that causes the video to start and stop, as soon as it is hit by the mouse.
But somehow this interferes with the magnifying glass script. Even with images, instead of video, as you can see in the 2nd example I attached, there is interference, because the magnifying only works within the hot area…but it should work independently.
Any advice how to solve this?
Are both techniques combinable at all?
Thanks in advance.
Best,
flo
p.s. just noticed that my fla files are too big probably...what is the max
size for this forum? (I'll zip them and send them in a next post)
Problem With Magnifier
Hello everybody!
I'm trying to make an swf with an effect of a magnifier, and I have this code in moveMag.as:
Code:
package {
import flash.display.MovieClip;
import flash.display.Stage;
import flash.events.Event;
import flash.events.MouseEvent;
public class moveMag extends MovieClip {
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMag);
public function moveMag(e:MouseEvent):void {
magnify.x=e.stageX;
magnify.y=e.stageY;
big.x=(small.width/ big.width)-e.stageX-magnify.width/2;
big.y=(small.height/ big.height)-e.stageY-magnify.height/2;
}
}
}
In my fla file I have a mask, and two images (big and small) in different layers.
When I test I get an error: Error 1120 "stage" property not defined
Any ideas for fixing this? Thank you very much!
Image Magnifier/ Navigator
Hello!
I'm having a rough time figuring out how to program this .swf: http://www.dravenslair.net/test/magnify.swf
Could someone walk me through the basics?
Thanks!
Magnifier Tutorial (specific)
http://www.flashkit.com/tutorials/Sp...-144/more3.php
at the site (3rd page) in the very first paragraph -- i suppose that layer is called "layer 1"?
maybe it changes later but i don't see that and i don't really what he means by "main movie"? (i assume this is layer 1?)
same page, 3rd paragraph, he says to "edit in place," then he says to name "the current" layer shape, does he mean layer 2 which is the prev iously created "outline" layer?
then, same page: make the "bigpic layer", i can do that, but now i have 2 layers, shape and bigpic. i have no otl (outline layer) anymore and i never did have a button layer ?
next page: 3rd paragraph -- "right click on the button" -- what button, i have no button -- how do i do this? as shown on the page; does he mean the outer edge of the circle which was just made into a button symbol? (btw, symbol and movie are the same thing , right?)
then, i can drag the UP to HIT (but it leaves behind a small hollow square under the DOWN -- i figured that for some kind of "nothing" important?
and finally, which is enough for now:
how to i "assign" the drag action to the button (i know enough that will be copying the code), but how to assign it to the button?
thanks for anyone who will help me!
peace.
MagnifierFX - Component For Magnifier/impulse Fx
Finally~it's done!!
First, thanx to cancerinform, cause he solved my problem on creating custom components.
I've done some researches on making magnifier fx with DisplacementMapFilter last year. I've been always wondering if this effect could be made into something that is easier to reuse.
And this is it~the MagnifierFX component.
Before any explanation on how to use it, let's see this demo:
(I used Tweener in this demo)
demo http://homepage.ntu.edu.tw/~b9590100...rFX%20demo.swf
demo source http://homepage.ntu.edu.tw/~b9590100...rFX%20demo.rar
SWC file http://homepage.ntu.edu.tw/~b9590100...agnifierFX.rar
component source http://homepage.ntu.edu.tw/~b9590100...X%20source.rar
--------------Now we shall have a deeper look into MagnifierFX--------------
There are only four parameters in MagnifierFX:
1.outerRadius - the outer radius of MagnifierFX
2.innerRadius - the inner radius of MagnifierFX
(this is quite difficult to explain...just try and you'll see. By the way, this value can actually exceed outRadius, which is intentional.)
3.strength - how much the target DO is magnified
4.target - the target DO
And for efficiency's sake, MagnifierFX does not update its effect automatically. You have to call refresh() yourself.
BTW, MagnifierFX is actually much more CPU-friendly compared to directly applying a DisplacementMapFilter on a DO.
We all know that applying filters on a large DO is CPU-consuming, so I decided not to do that.
Instead, the filter is only applied on the area of MagnifierFX. It is done by copying the target DO's pixels within MagnifierFX's area and applying the filter on them only.
Hope you find this little gadget handy.
If you make something interesting with it, be sure to share your work with me~I would like to see its application
"Smooth Panning Magnifier" How To ?
here is the sample :
http://www.ozcay.com/index1.html
link is BUYUTECLI GALERI - GALLERY WITH MAGNIFIER
I use simple codes for classic magnifier trick. but which codes I must use for this type of magnifier ?
here is my codes in "lens_mc" in _root
setProperty("largeobject", _x, (getProperty("/original", _x)-_x)*2);
setProperty("largeobject", _y, (getProperty("/original", _y)-_y)*2);
and codes for drag magnifier
on (press) {
startDrag("/lens");
}
on (release) {
stopDrag();
}
that's it. and here is the fla.
thanks the information
|