IDE :: Setting Boundaries On Zooming Map?

Jun 8, 2009

I am attempting to create a map that has the ability to zoom in and out as well as a click and drag feature.What I need help on is setting boundaries for the map. I can set them for the map when it is zoomed out, but they need to change as the map zooms in. I've been searching lots of forums lately to see if anyone can help, but no luck yet...

View 1 Replies


Similar Posts:


ActionScript 2.0 :: StartDrag And Setting Boundaries?

May 14, 2006

I have a movie clip that can only move to certain parts in the stage. For this I used another movie clip that supposedly should constitue the rectangle constraint. But this doesn't seem to work !startDrag(this,true,bounds._x,bounds._y,bounds._x+ bounds._width,bounds._y+bounds._height);

View 2 Replies

ActionScript 2.0 :: Setting Boundaries For Mc With Random Movement

Aug 2, 2009

I'm a noob on this forum & pretty desperate now. I've been on a research & trial&error odyssey for days now, but this problem remains unsolved. I am creating a game with an mc (say "target_mc") randomly moving around. Everything is working beautifully, except for one thing: My stage was initially 900x600 and the game took up all of that space. target_mc's movement was accordingly set for a width of 900 and height of 600.

I have now resized the stage height to 958 with the game (still 900x600) being centered vertically. The top border is now at 170.8 (y). The bottom y border is at 770.8. But target_mc still thinks the top border is at 0. As a result, it is still covering the same area as before, hence floating off the actual game area into the stage margin area between 0 and 170.8. As I have other frames following which require my new and larger stage size, going back to the original 900x600 is not an option.

I have tried and tried but not managed to tell target_mc to keep its random movement within <=170.8 and >=770.8. I have tried all variations of "if statements" and other tricks at my disposal. And since I'm not an expert, I'm at my wit's end. Everywhere I looked, the solutions offered were for draggable objects or cursor movements, but not for movieclips moving randomly as soon as the frame is loaded. My script & codes are very, very elaborate and there is a lot happening on the stage, so a mask is not an option for me. Surely there's got to be a way to set variables and commands in the script...? I just don't know which to go for...

Do I work with some kind of math involving the total stage height of 958? I have tried setting variables for xMin, xMax, yMin, yMax, but must have done something wrong in implementing them in the rest of the random motion code cos nothing worked.

View 3 Replies

ActionScript 2.0 :: Setting Boundaries When Moving MC With X Values

Oct 5, 2004

I'm moving this little red box along the x axis. It just moves w/ the mouse but it moves off the movie clip area, I want to be able to set the left and right boundaries.

Heres my code.
mc_movingBox.onEnterFrame = function() {
var xMouse = _root._xmouse;
if(Math.abs(xMouse - this._x) < 1) {
this._x = xMouse;
} else {
this._x -= (this._x-xMouse) / 6;
}}

View 6 Replies

ActionScript 2.0 :: Setting Drawing Board Boundaries?

Dec 12, 2006

I used Kirupa's drawing board tutorial, but when I finished making the flash file I wondered if there was a way to limit where the viewer can draw. For example, on his tutorial he shows you how to create an easy erase button. Well, what if I don't want the viewer to be able to draw on the button. Is there a way to specify the area that you want the viewer to be able to draw on? I tried making the space a movie clip and just adding the actionscript to the movieclip, but when I placed the movie clip inside a bigger flash file it wouldn't let me draw at all. I thought making it a movie clip would then limit the drawable area. Did I do a good enough job explaining my problem? I just want to be able to limit where the viewer can draw, so that the viewer can't get wild and draw all over the buttons and controls.

View 1 Replies

ActionScript 2.0 :: Setting Boundaries When Moving Mc With ._x Values?

Oct 5, 2004

I'm moving this little red box along the x axis. It just moves w/ the mouse but it moves off the movie clip area, i want to be able to set the left and right boundries. Heres my code..

mc_movingBox.onEnterFrame = function() {
var xMouse = _root._xmouse;
if(Math.abs(xMouse - this._x) < 1) {

[Code].....

View 6 Replies

ActionScript 2.0 :: Custom Drag And Setting Boundaries?

Aug 22, 2009

I'm using a custom drag for easing properties:

ActionScript Code:
var yMouse:Number;
var xMouse:Number;
onEnterFrame = function(){
yMouse = _root._ymouse;

[Code]...

As you can see, I'm trying to prevent it from passing _root.block by only allowing the mouse's Y to be followed when it isn't passing _root.block. The only problem is that once it hits _root.block, there's no way to drag it back from _root.block. It gets stuck. Is there a better way to prevent it from passing _root.block but allow it to be pulled back from _root.block

View 1 Replies

ActionScript 2.0 :: Setting Boundaries For Dragging Movie Clip?

Jul 2, 2009

I have created this swf that allows me to drag my movie clip around with easing effects.However, if I drag it too fast, my movie clip will actually goes out of my "flash".PS: I actually got this script from a user in this forum. Sorry about that. Hence, i left the credits there.)Is there anyway where I can set the boundaries where the movie clip can be dragged to? I've came across a website where the effect of dragging within a specific area is exactly what I desired.Also, I'm using AS2 and here it is.

//Tutorial criado pela Cabana Cro: www.cabanacriacao.com
//Visite tambm o Cabanoblog: www.cabanacriacao.com/blog
_root.myMC.ease = 5;

[code].....

View 1 Replies

ActionScript 1/2 :: Zooming In And Then Zooming Out In (Without Scaling The Image)?

Feb 27, 2012

Basically I want to know if there is a way to go from a zoomed in version of something, and then seeing the whole image in another frame. (By pressing a button)

Let's say there's a tree, I would bascially like (upon pressing a button which I can do) to zoom out and see the whole scenery. Is there a way I can do this without actually changing the size of the image?

View 2 Replies

Professional :: Animations: Zooming In And Zooming Out?

May 25, 2011

I look at professional animations and notice the camera-like effects they manage to put into these animations. I'm wondering how I can do the same without having to just enlarge or reduce a movieclip across the stage. Is there any way to add a camera view on your animations or do you just have to bear with Flash's basic necessities?

View 1 Replies

Zooming To Certain Map Locations?

Oct 27, 2009

how to zoom into(hence zooming the map outward) set locations on a map, yet only those locations. I have a script which will zoom to your mouse location and also if I set the specific x and y, but still zooms when clicking on any other spot.

how do I zoom to only a set location and nothing else within a map/image.

View 38 Replies

Professional :: Zooming In/out On One MC Of Many?

Jan 11, 2010

I'd like to have my viewers mouse over any of the MovieClips on the scene and using the keyup / keydown have only that MC scale up or down.  The scaling should only effect the moused over MC.Here is what I'm using for the scaling on one MC now...
 
var Listener:Object;Listener = new Object();Listener.onKeyDown = function(){    if (Key.isDown(Key.UP))     {                    container._xscale = container._xscale + 10;            container._yscale = container._yscale + 10;    }     if (Key.isDown(Key.DOWN)) {                    container._xscale = container._xscale - 10;            container._yscale = container._yscale - 10;    } };Key.addListener(Listener);

View 2 Replies

ActionScript 2.0 :: Zooming In And Out A Swf Using AS Or Anything

Aug 2, 2002

I was just working on trying to zoom a flash movie using JS but cant seem to get it and it is driving me nuts any of you guys know how I can zoom in and out on a movie using action script.

View 2 Replies

ActionScript 2.0 :: Zooming In And Out?

Feb 22, 2006

I need some help with creating two buttons that zoom in and out of a movieclip.I have seen some tutorials and tried them, but got really confused.My problem is that the movieclip i want zoomed (in & out) is embedded inside another movieclip, so don't know how to refer to it.

also where should i declare the zoom function?? on the movieclip or on the main timeline?? the buttons that control the zoom in and zoom out are on the main timeline.

View 1 Replies

Loads The Clip Outside Of Those Boundaries?

Apr 14, 2009

i am looking to make something like this for my page.[URL].. i can do all the vid work etc.. the thing im stumped on is how can they resize the working area it uses eg.. where the presenter comes up.. because to start with the swf looks like its only tiny little play start stop thing then it loads the clip outside of those boundaries?

View 1 Replies

ActionScript 2.0 :: Drag A MC Within Set Boundaries?

Nov 3, 2011

What i am trying to do is move a MC around by dragging it, but i dont want the MC to move so far that it could be lost on the stage. i need some sort of parameters so that the MC is always showing. basically i have a large map of the united states and i want to be able to move it around and look at the individual states. the map is much larger than the stage and i am using a mask to clean up the appearance. i just want to make sure that the user cant move the map so far in one direction that it gets lost.

View 3 Replies

IDE :: Mc Follow Mouse With Boundaries?

Jun 1, 2010

I can't find any info on this so I guess I'll just ask. I'm trying to make moveclips that will follow the mouse pointer on MOUSE_OVER but only up to a certain distance then tween back to its original coordinates (preferably with a bounce or elastic ease).I tried startDrag(); on mouse over and that works quit cool but the problem is stopping the drag...

View 5 Replies

ActionScript 2.0 :: Set And Then Reset X Boundaries?

Feb 3, 2012

I have been working with some code back and forth but am pretty much stuck now! I have four movie clips of different colored cars - two on the left side off the stage, and two on the right side off the stage. The clips move across the stage to the right and the left respectively. I have all the elements that I needed to get working, but now I am stuck because the animation only plays one time. I need it to play over and over again, never stopping. I tried to "reset" the _x boundary for each movie clip since they are in different starting locations, but have not been successful. Below is my code and I also attached a screen shot of how the clips are positioned so you can see how they will cross the screen.

Code:
var loop:Number = 0;
var messageTxt:TextField;
var mc_name:String;
function time():Void {

[code]....

View 9 Replies

ActionScript 1/2 :: Web Flash Zooming In/out?

May 27, 2009

I am a really new flash beginner, and I am trying to write a site that can do this scaling in/out effect (Not an image) after when a new file is loaded into the page. I've googled and searched everywhere and couldn't find a possible solution to this.You can see the site, there is a zoom in and moving effect after a button/new page is loaded.
 
Here are the scaling, I am talking about:http:[url]....

View 5 Replies

ActionScript 1/2 :: Zooming To Mc And Not To Stage?

Oct 22, 2009

I had found a script which zooms to your mouse position, but is there a way to adapt this so it only zooms in on the particular mc and not the mouse position?

[Code]....

View 1 Replies

ActionScript 1/2 :: Zooming To Certain X/y Coordinates?

Oct 25, 2009

I've been racking my brain for the last week, and Im trying to use a map to zoom into certain city locations on the map. I believe each city locatio needs to be its own mc on the map, but don't know if I need to zoom into the coordinates of that mc? Here's what I have so far which zooms in on the appropritea x/y coordinates. Does anyone have any advice as how to change this or some other way to zoom into certain locations on a a map?

[Code]....

View 1 Replies

ActionScript 2.0 :: Web Flash Zooming In/out?

May 27, 2009

I am a really new flash beginner, and I am trying to write a site that can do this scaling in/out effect (not on image) after when a new page is loaded into the page.You can see the site, there is a zoom in and moving effect after a button/new page is loaded.

View 2 Replies

ActionScript 2.0 :: Zooming In And Out On An Image?

Jul 22, 2004

Is there a way to that users can zoom in and out of an image and even drag/scroll around if the image is larger than the viewing window.I looking for a way to creativly display my portfolio in a limited area.

View 2 Replies

IDE :: Bitmap Resolution & Zooming OUT

May 10, 2011

I am working with some images in my flash file which I would like to have at a high resolution (approx 1280X1024 px or even higher) so that they look good when they take up a full screen, and also when I zoom IN on them.

However, when I import them into flash at this size, they look TERRIBLE when zoomed OUT (eg. to 15%). They look fine in photoshop at this size.

View 4 Replies

ActionScript 3.0 :: Rotating With Boundaries But With A Catch

May 8, 2009

I have a pointer that follows the mouse movement only in determined angles. lets say the pointer can only follow the mouse when the mouse is moving below the pointer. (it rotates perfectly and smoothly to the left and right) but the thing is, lets say that the mouse is now above the pointer to the right, the pointer stays to the last permited right/down angle BUT if i go down with the mouse from the left, the pointer obviously will jump from facing right/down to facing left/down...what i would like is the pointer to make a nice transition/rotation to the inverse side...just what it does when moving the mouse from left to right, right to left (having the mouse below the pointer).

[Code]...

View 1 Replies

ActionScript 2.0 :: Drag Within Custom Boundaries?

Nov 12, 2009

I am trying to create a movieClip that will always stay on a track. You get me, or have a lost you?Picture the London underground map, I want a little circle that will follow the track BUT also follow my cursor.So if I drag the circle to the right it will go to the right but always stay on track even if there are slopes or corners in the track.

View 3 Replies

ActionScript 2.0 :: AS 2 Image Scroll Boundaries

Nov 15, 2010

i've been trying to solve this for an hour now and I have to resort to a forum post. I don't understand why this isn't working.I have two background images that scroll up,right,left and down with arrow keys. They also scroll to the left while no arrow keys are being used.What I want is the background images to reach a boundary, so the player never leaves the background image and sees the stage.My background image x,y coordinates by default are: x(223.0), y(272.4)Just to see if my condition works, I have it move the wisp(player). However, even in the debug screen when it shows the Y coordinate of backround image go below 170, it never moves the wisp.

View 1 Replies

Make Boundaries On My Stage For My MC Box1_mc?

Dec 16, 2010

Im am trying to make boundaries on my stage for my MC box1_mc, there are no errors but it doesnt seem to work.. Here is the code..

function limitStageBorder(box1_mc) {
var box1_x:Number = stage.stageWidth - box1_mc.width;
var box1_y:Number = stage.stageHeight - box1_mc.height;[code]......

View 7 Replies

ActionScript 1/2 :: Set Boundaries For Magnifying Cursor

Nov 15, 2009

I have placed an image within a movieclip that I would like to zoom in on when the mouse passes over it. The zoom on the cursor is working, but the mouse remains a magnifying glass even after it rolls off of the zoomable image. I have tried putting the image and zoom code inside an swf and loading in it into a container via loadmovie, but the same problem with the cursor occurs.

[Code]...

View 16 Replies

ActionScript 3.0 :: Boundaries For Draggable Objects?

Jul 24, 2010

How can I make draggable objects not go off screen?

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved