ActionScript 2.0 :: Flash 8 - MC Position Changing At First Zoom Attempt

Apr 12, 2008

I got an mc (named "img") on the stage. In order to zoom it, I'm using the following code:

Code:
myZoom = function (myDepth){
if (myDepth == "deep") {
myDepth = 4;
} else if (myDepth == "medium") {
myDepth = 8;
[Code] .....

Problem is, when I release on the mc it changes its original position to X=0,0 Y=0,0 as you can see here. Obviously, I want it to keep its starting position on the stage and zooming in and out from there.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Fluid Layout Stop Changing Resize Position When Movieclip Is At Certain Position?

Nov 19, 2009

I added a Menu_mc on my stage. Initially, this should be at the center of the stage and when I click on it, it will tween on the upper left corner of the browser. However, when I resize the browser, the Menu_mc goes back to the center of the screen.

I have tried separating a different actionscript file where it is specifically for initialization of the object and another one for resizing. And then when I call it on my main AS file it goes like this:

Code:
// Add the symbols to stage
var Menu_mc = new Menu_MC();
addChild(Menu_mc);

[code]...

But it seems futile.

View 6 Replies

ActionScript 3.0 :: Changing Y Position Results In Random Position

Nov 8, 2010

I've run into a new problem, this time with positioning. I've narrowed down the line that's causing it--"block.y = block.y + block.height;" in SetOfBlocks.shiftDown. When I take it out, no problem. But with it in, instead of just dropping each block down by a block height, the affected blocks sometimes move up, and also often move about randomly within the X axis--although their new positions always keep them lined up with the 'grid', which is to say, within multiples of the block height and widths.

[Code]...

View 3 Replies

Flash :: Changing The Position Of AIR-window?

Feb 20, 2010

I created a simple transparent app for Adobe AIR in Flash. It has not chrome, so now I need to make it draggable. How could this be done?

View 1 Replies

Flash 9 :: Layers Position Changing And Disappearing On Test

Sep 24, 2008

Im new to flash and doing my best to teach myself.Im using CS3.I've already been working on this project for a while, and I don't know why this is all of the sudden happening.I have a text graphic that I want to create a motion tween with.I created a new layer for it, and drug it to the stage.If I tested the movie at that point, it looked fine and didn't move. If I tried to move the original keyframe, or added a motion tween, it would look fine when I played it on the stage, but when I go to "test movie", its either not on the screen at all, or its in a totally different position.

View 1 Replies

ActionScript 2.0 :: Zoom To Clicked Position?

Aug 3, 2007

So I've been working on a being able to click on an image and zoom it to that position.my movie is 550x340. just make a mc with an image and give it the linkage ID of "box_mc". I put a crosshair in that MC as well so i can see where it zooms to.The problem I'm having is that on the third click, it won't adjust correctly. I don't understand why not. Maybe you people can aid a little.

Code:
_root.attachMovie("box_mc","box_mc",this.getNextHighestDepth());
MovieClip.prototype.scaler = function(nValue) {
nValue *= this._height;[code]......

View 3 Replies

Flash :: Professional - Animate - Invisible Hotspots Changing Position In Time

Jan 27, 2011

I'm creating sort of a game in Flash, which requires invisible hotspots changing their position in time, relative to the stage. The question is: can I simply keyframe the hotspot position and have it work, or is there something that I should consider?

View 5 Replies

ActionScript 2.0 :: Scale Too Say 150% And Move To A Different X Y Position And Zoom

Apr 19, 2004

how i could create a function to do the following:- I have a mc and when you click on it i want it to scale too say 150% and move to a different x y position, then when you click on it again i want it to go back to its original size and position.

View 4 Replies

ActionScript 2.0 :: Scale And Zoom - Back To Its Original Size And Position?

Apr 19, 2004

how i could create a function to do the following. I have a mc and when you click on it i want it to scale too say 150% and move to a different x y position, then when you click on it again i want it to go back to its original size and position.

View 3 Replies

Professional :: Flash CS5 Crash And Corruption During Previewing Attempt Mac OSX 10.6.3

May 9, 2010

I had been using Flash CS5 as a trial for the past 6 days without issues. Yesterday, I made a change to a file, and went to preview it, as I had several times before. This time, when I slected preview movie, Flash crashed umexpectedly. When I launched it again, it came up looking very corrupted - window as messed up, and any an all attempts to load any of the workspaces resulted in Flash crashes. I had to completely uninstall it including all prefs to get it to work again. I am hesitant to try a preview movie again.

View 5 Replies

Actionscript 3 :: VerifyError: Error #1107: The ABC Data Is Corrupt - Attempt To Read Out Of Bounds - Flash CS5

Jan 26, 2011

I tested this flash application in Flash IDE, it never through this error. But When I uploaded in server, got this error. Why we getting this VerifyError? It is a flash application loads all the library assets through bulk loader, later it will get assets from bulkloader to display in the main page. Assets includes swf,xml etc.

View 1 Replies

Actionscript 3 :: Changing Index Position On StartDrag()?

Nov 5, 2010

I am making a dragable map and there are few thing on top of the map(UI). When the map is double clicked it enables drag. But it's changing the index position, basically, it going over the UI. what's the easiest way to control the index position of the map? The click and drag event is controlled in mapZoom class.

this.addEventListener(MouseEvent.MOUSE_DOWN, enableDrag);
public function enableDrag(e:MouseEvent):void
{
this.startDrag();
}

View 1 Replies

ActionScript 3.0 :: Flip An Image Without Changing Position?

Jun 25, 2010

I know I can horizontally flip an image using ActionScript Code: image.scaleX *= 1;

However, this seems to move the left border of the image past its x coordinate.

I would like to make sure that the image stays within the same borders as before and that (x,y) is still the top left corner. Short of wrapping it in another image, is there a way to do that?

View 8 Replies

ActionScript 3.0 :: VCAM - Fireball's Position Keep Changing

Feb 11, 2011

i added a vcam in my game but it messes up the x and y position of my moveclips, when i pressed space to shoot fireball, the fireball's position keep changing. Everything is working right before adding the vcam. Does anyone have a solution to this or why does vcam cause this to happen?

View 2 Replies

ActionScript 2.0 :: Changing Position In Song Timeline?

Oct 2, 2004

how do u make a currently playing song (s1) move to a new spot in the song? s1.position=wure; were wure is the position in milliseconds i want it to be does not seem to work .

s1.stop;
s1.play(wure,0);

does not seem to work either

View 2 Replies

Actionscript 3 :: Removing Elements From Array W/o Changing Position?

Nov 15, 2011

I want to write a function which removes elements from an array of integers starting from the lowest values without changing the positions of the elements. Programming language is ActionScript3.

[Code]...

I know Array.NUMERIC and Array.DESCENDING would change the position of the elements, but I can't seem to figure out the logic on how to keep their positions.

View 3 Replies

Actionscript 3 :: Changing Mouse Pointer Position In FULLSCREEN?

Mar 16, 2012

Is it possible to change the mouse-pointer position in fullscreen. I want my mousepointer never hits the left or right side screen walls.. in case it does so, it resets itself in between somewhere.

A fake mouse pointer using a movieclip, won't solve this problem, because after-all i have to save the mouse pointer from hitting screen-walls.

View 2 Replies

ActionScript 2.0 :: 4WD Animation - Movies Changing Position Without Command?

Sep 3, 2009

Well the animation works okay despite the convoluted timeline. You can select any transfer case mode by moving the slider switch. To shift into neutral from any gear, you press the neutral (N) button. To exit neutral, you press the neutral button again. If you shift into N from either 4WD Auto or 4WD Low, the slider switch jumps to 2WD even though there should be no movement and the animation goes where it is supposed to. It's been a long time since I've been able to work in Flash and it's so close to complete that this is driving me nuts.

View 0 Replies

ActionScript 3.0 :: Changing The X Position Of Two MovieClip Instances At The Same Time?

Apr 26, 2011

This is a 2 part question really:

1) I'm trying to change the position of two different MovieClips instances to the same .x position. It works individually, but as soon as I put this code in, it says that it cannot assign it to a non reference value:

ActionScript Code:
coinArray[1].x && coinShadowArray[1].x = -591.5

2) I have a whole load of variables which are all going to different .x positions at the same event trigger - something similar to this, but there's around 30 of them:

ActionScript Code:
object[1].x = -560
object[2].x = 764.45
object[3].x = 700.45
object[4].x = 740.45

View 4 Replies

ActionScript 2.0 :: Changing Frames Depending On Mouse Position?

Jun 8, 2004

I know this can't be to hard too achieve, but my actionscript skills aren't quite up to it yet.

- I have 5 frames within a MC.

- In this MC there is text saying "center", "left", "right", "up", "down" on each frame.

- All I want to be able to do is make the MC change to frame 3 "right" when my mouse moves to the right of the MC.

I know the script below is wrong, but would it go something like, this. Would I have to use angle and math or is there a simpler way to achieve this?

onClipEvent (mouseMove)
get x position
get y position[code]......

View 1 Replies

IDE :: Changing An Object's Size Depending On Mouse Position?

Oct 6, 2009

I have a button symbol on my stage that I want to change size depending on where the mouse is on stage. ie: the y position of the mouse will make the x and y scale change (the symbol should get smaller as the mouse moves up the page and larger as it moves down - as if it is getting closer or further away).

View 1 Replies

ActionScript 3.0 :: Flipping The Clip Horizontally Without Changing The Position?

Jul 19, 2010

I've loaded a clip in my main swf and I want to flip it by using scaleX*=-1the problem is that in my clip, the animation is at the center of the stage so when I load it and flip it using scaleX instead of staying at the same place it flips by using the top left corner of the clip as a pivot instead of the center of the animation itselfI could either solve this problem by placing the center of my animation on the point (0,0) in the clip or flip then rearrange the clip's x position inside my main swf...but is there a more effective method?

View 3 Replies

ActionScript 2.0 :: Changing Frames Depending On Mouse Position

Jun 8, 2004

I know this can't be to hard too achieve, but my actionscript skills aren't quite up to it yet.
- I have 5 frames within a MC.
- In this MC there is text saying "center", "left", "right", "up", "down" on each frame.
- All I want to be able to do is make the MC change to frame 3 "right" when my mouse moves to the right of the MC.

onClipEvent (mouseMove)
get x position
get y position
if statement x= > -180 and y=> 0 (something like that)
_root.myMovieClip.gotoAndStop(3)

View 1 Replies

ActionScript 3.0 :: Zoom To Mouse Position Using Mouse Wheel?

Mar 9, 2010

Code:

addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheel);
function mouseWheel(event:MouseEvent) {
Map.scaleX = Map.scaleX + event.delta*.01;
Map.scaleY = Map.scaleX;
}

The problem with this code is that it scales from the registration point (0,0). Due to the other transformations I'm doing to this image at various times, it isn't possible to move the registration point. The image is larger than the stage and the user is able to drag it around. I want the mouse wheel to zoom in on the place the mouse is hovering over (or at a minimum...the center of the "view" they have...aka the stage)I tried doing this:

Code:
internalPoint = new Point(Map.mouseX, Map.mouseY);
externalPoint = new Point(stage.mouseX, stage.mouseY);
var matrix:Matrix = Map.transform.matrix;

[code]....

Which, incidentally, I'm using that whole portion of code to zoom into the state they will be in when they use the mouse wheel.

View 1 Replies

Actionscript 2.0 :: Can't Get Zoom Slider To Work With The Position Of The Slider

Mar 25, 2010

What I have is a map that you can click on points and it will zoom in, you can also click on a "plus/minus" buttons to zoom in and out (I even have the mouse wheel zooming in and out). The client wanted me to add a "zoom slider bar" to it so you know you could move it up and down to scale it. Everything is working except the slider, I can't seem to get it to work with the position of the slider. All of the zoom functionality is there but the slider is killing me.

I am putting up the fla file since there is a lot of code in there and I didn't want to put it all in the forum. if you look in the fla in frame ten on line 726 you can find the function that is supposed to handle the zooming when you move the slider. Up on line 74 you can find the slider onPress and onRelease functions, but those I believe should be fine.

View 2 Replies

ActionScript 3.0 :: Changing Position Of MovieClip Acting As Menu - AddChild?

Oct 10, 2008

I am trying to change the position of a movie clip which is acting as a menu and loading other swfs onto the stage. The problem is, is that the movie clip is also animated and when an swf is loaded the movie clip appears underneath the loaded swf. What method I should use to change the hierarchy of this movieclip.

View 2 Replies

Actionscript 3 :: Prevent A Loader From Changing Apps Position And Size?

Nov 15, 2010

I load an SWF using a simple loader but it changes the main applications x/y position and size.Which loader do I use to load an swf that will maintain the position size of my app?

var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, function handleInit(event:Event):void{
var UIDesigner:UIComponent = new UIComponent();

[code]......

View 3 Replies

Arrays :: Changing Child Index Of MovieClips Based On Their Y Position?

Mar 1, 2012

I'm writing a game with Flash CS5/AS 3.0 that tries to simulate depth of field by drawing all the relevant Movie Clips based on their Y position in ascending order, i.e. things lower on the stage overlap things higher on the stage. A MovieClip with a Y position of 10 would therefore need to have a lower index compared to a MovieClip with a Y position of 20, so the second one gets drawn on top of the first.

I wrote a quick and dirty function just to test this. During the trace, I've noticed that the truck's index hits 0 when I go near the top of the stage, but if I go too far up it will completely disappear from the stage. Trace then starts generating this error:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at EICT::Game/ReorganizeDisplayIndexes()

[Code].....

View 2 Replies

ActionScript 3.0 :: Changing Link Position Dynamically Depending On Image

Jun 19, 2010

I'd like to make sort of gallery with previous/next buttons. And on each image you'd have circles/link over important parts of the image.So each image wold have these circles on different locations. Question: how can I make that dynamically? And that it's not to complicated for the editor of the site? One way would be to write in XML x and y positions.

View 0 Replies

ActionScript 2.0 :: Changing Background Image Depending On Character Position

Nov 5, 2003

I'm making a game...and I want to change my background image depending on where the character is. I thought I would make a MovieClip...with all the different background images on different keyframes. My question is....can I use AttachMovie, and if so...how do I reference the particular frame that I want to...? I've never used AttachMovie before, and wasn't sure of the syntax...and how to reference it...to go to a particular frame.

View 1 Replies







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