Flash help urgent
- Started
- Last post
- 16 Responses
- versa
let me preface this poorly written plee for help, by letting you know that i haven't slept much for 2 days -
i desperately need some help getting a mouse / ease map viewer working for a project that is going live tomorrow, and i just can't seem to figure how to get my coordinates right
basically i have a map that is larger than API-based mask that reveals it - on mouseover the map repels away from the cursor revealing other portions of the map previously hidden, BUT, ideally never past the edges of the map being ease/scrolled
i would love to show an example if someone will help - i have the basic code working, but can seem to constrain it
thanks!
- heavyt0
i am not sure, but i think that you are may be able to modify this:
http://todd.resudek.com/main.swf…
i will check back.
TR1
- ganon0
are you looking to do something like this?..:
http://www.expressfashion.com/st…
when you select a product, then select "zoom in", and the your mouse movements move the image...?
- versa0
something very similar to this map ... ( in the contact section )
- versa0
ganon - yes, exactly !
any ideas, this should be really easy ...
- deconcept0
like this?
http://www.deconcept.com/v2/01/0…
shoot me an e-mail and i'll mail you the source tomorrow.
- versa0
yes, and thanks deconcept
mine currently works so closely to this, but it goes past the edges of the masked MC...
just need to see how to constrain it, and how to position the MC
I can't wait until tomorrow unfortunately, cause the project has go live tomorrow, but thanks!
- deconcept0
ah, that's too bad.. i would actually guess that the contact thing uses the same code that i wrote for that aftermath thing.
it's pretty simple.. just think of it as a scrollbar...
- ganon0
if it goes too far, why not the contrain the _x and _y positions...if/else, the MC gets here, then stop....
- ********0
it's too bad unfittoprint is taking a break, as he told me. Otherwise he would bang this out quick-like. He's a master
- jevad0
yeah I was wondering what unfit was up to....
- phirschybar0
yeah... ganons right.. your quick fix is to set some limits for your _x and _y properties to simply make it stop at the edges.
- versa0
help please
- phirschybar0
ok.. so open the debugger when you preview your movie. Check the properties of the image that is moving behind the mask. Look specifically at the _x and _y values. When your image gets close to the left and right edges, take note of what _x is and do the same for _y at the top and bottom edges.
Then, set some limits by adding code to your onEnterFrame controls (assuming you are using onEnterFrame... And add something like:
if (myMC._x > 100){
myMC._x = 99;
}and do this for the other 3 edges as well....or something like this so you create a wall for the edges of the image. Its not the most elegant solution but you can find ways to make it work... does this help?
- JamesEngage0
if you do it right you won't need any constrain values....
take whatever the zoomed image size is and divide by the rollover size (frame)) that gives you your zoom...
then you do something like set the zoomed image to ((originx-(_xmouse-originX)*zoom... for the X value and the equivalent for the y
- versa0
thanks guys - i don't need to zoom, just want to ease to the edges; i understand that i can check the value of x and y and stop if i exceed a certain cooridinate, but this seems crude - i don't want it to stop suddenly, i want to ease to its edge
i am starting with this:
on(release){
_global.mapTipSeen = true;
if(_global.mapTipSeen == true)
{
_root.tipMC.tipArrowMC.AniStop...
_parent.gotoAndStop("map2");
}on(rollOver)
{
this.onEnterFrame = function()
{
mouseX = (-_root._xmouse);
mouseY = (-_root._ymouse);
thisX = this._x;
thisY = this._y;
diffX = mouseX-thisX;
diffY = mouseY-thisY;
moveX = diffX/10;
moveY = diffY/10;
this._x += moveX;
this._y += moveY;
}
}not quite there obviously
- versa0
i should add that my maps are registered at LT (0,0), and my maps are 400 x 290, and the mask is 250 x 200