ActionScript 2.0 :: CS3 Scale MovieClip But Adjust X Position Of MC's To Left And Right Of It
Sep 14, 2010
I have 4 movieClips on stage named text1, text2 etc. When I RollOver any one of them I have a tween which changes their xscale and yscale. So basically when you rollover they get bigger and when you rollout they go back to 100 scale.
What I want to be able to do is make it so that if I hover over item 3 then item 4's x position is shifted according to the scale of item 3. I ALSO want to be able to move items 1 and 2 to the left to account for the new scale. I can do this but only by moving things to the right, I cannot understand how to make items to the left of that selected update their x position to account for the scale.
the code I'm using is:
[Code].....
The onEnterFrame function is working but only shifting the x position of items that are on the right of that currently selected - it doesn't scale the selected item and shift things left and right accordingly.
View 4 Replies
Similar Posts:
Feb 2, 2011
[URL]while in "portfolio" section, if you resize, the content go to the left.I know WHY it does it : while in a MC, an external movieclip lose his stagesize to compress into the movieclip, if resize, it use the size of ALL the content in the SWF to resize. the external fla stage is 1600 x 680, but the content goes out of the stage to the right to make an 1760 x 680 size.to make it LOAD at the right place and right size, i've got a layer with a MC (externalStageSize) in the external SWF that is the size of the Stage, while on frame 1, only this MC(externalStageSize) is active, so when loaded, the _level0 flash can position and scale the external SWF.
BUT, while active content is on, any live resize does not go well..I tried to "connect" the scaling with (externalStageSize) BUT once loaded the size does not change.I wanted to use the math : "new width" = ("allcontent".width / externalStageSize._width)/Stage.width but _level0.ContentMC.externalStageSize._width return the value it have in the flash... like, even if rescale, it will say "1600" is there a way to counter this ? before you ask : AS3 was out of the question because the person who will maintain the site is not that advanced.
some script used when resize :
ContenuMC : the movieclip in witch external swf is loaded
Code:
function setContent() {
// content dimensions
ContenuMC._width = Stage.width;
[code]....
View 1 Replies
May 18, 2010
Let me try my best to explain this... On the stage I have a master movieclip, for explanation purposes, let's call this movieclip "body". Nested inside of body are several other movieclips (we'll call them anatomy items like: arm, hair, foot, etc) Now let's say we scaled body to 200% (body.scaleX = body.scaleY = 2.0)
When I run localToGlobal on one of the nested anatomy movieclips (e.g. arm), actionscript is returning the x and y values of the initial state, not reflecting the scale of body and how it actually caused the arm's position to shift globally.
View 0 Replies
Jun 22, 2009
I've been through all the tutorials on flash scaling and stage resizing and can't figure this one out. I have an MC in _y proportion to the Stage.height-40, so when resizing the browser I should always be able to see it.
The Problem: I know how to do this; by publishing the movie at 100% width and height - this works fine. But my flash movie is a magazine which is long, and requires scrolling in the browser to see the content.
As soon as I set the movie to publish width/height at 100% I can no longer scroll my flash magazine in the browser.
Is there a way to readjust the MC _y position as the user scrolls up and down; so the MC is always in view. So it'd look similiar to those pesky ads that follows you as you scroll away.
My code:
PHP Code:
Stage.align = "TL";
Stage.scaleMode = "noScale";
resConfig = function(){
[Code]....
View 1 Replies
Jun 28, 2011
How can I drag the key frames back within each of the layers below so that they all end on the final scene. Currently when I hit play, the clip runs till the last key frame and the other layers that don't run that length disappear. How can I best fix this?
View 2 Replies
Sep 24, 2011
I am developing a video player, in that full screen mode option. I have given the following code for width and height of the video
ActionScript Code:
flash.system.Capabilities.screenResolutionX
flash.system.Capabilities.screenResolutionY
The problem is the y position and x position is not at the left top of my monitor. it is varying when I change the dimension of the file. I also tried with stage.stageHeight and stage.stageWidth etc. but no reaction.
View 3 Replies
Oct 1, 2009
Is there any way using tween scale to scale a MovieClip from 'top right' to 'bottom left' as oppsed to 'top left' to 'bottom right'?
View 5 Replies
Nov 30, 2009
I have an MC with the registration point set to the Top Right so it will scale down and left:
[Code]...
View 1 Replies
Oct 3, 2009
1. Is there a way to scale up an object from its center even if its registeration point is at the top left? can that be done using TweenMax?2. can I apply the same tween on two objects at the same time? basically what I want to do is load up an image to the stage, and then tween its scale from 0 to the original size along with another movie clip behind it that would form some sort of a border for the image. and I want to scale them up from the center.
View 5 Replies
Nov 25, 2011
I am using AS2 and I'm looking for a way to scale an MC from the center meaning that the width will expand equally on both sides.For example .. If the movie clips needs to expand +10 then it would be +5 on the left and +5 on the right.So, in order to simulate the movie clip going forward the position on the left would offset -5 then scale.
View 2 Replies
Sep 15, 2010
I have a problem with stage resize.I have a small rectangle on the right bottom of my stage. When I resize the stage, I want my rectangle keep its size (no scale) and position ( always on the right bottom of the stage). Here is my code:
mymc._width = 50
mymc._height = 20
Stage.scaleMode = "noScale";[code].......
View 6 Replies
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
May 15, 2006
imagen I have a movieclip (space_mc) w1000Xh1000 px?
inside the space_mc I have 2 movieclips:
- vlak1_mc (w100xh100px, _x:100,_y:100);
- vlak2_mc (w100xh100px, _x:400,_y:400);
ok!?
now i put the space_mc on the stage and scale it to 20% the stage (document properties) are w800xh600
Now i want that the USER clicks on vlak1,2_mc and the space_mc scales to 100% But the clicked vlak(1,2)_mc must have the exact coordinates as in the space_mc?
so if clicked on the vlak1_mc!
the space_mc zooms in to 100% and the _x,_y of the vlak1_mc are x100,y100 on the stage(800x600)?
[URL]
View 1 Replies
Jan 22, 2010
I have a MC on the stage and when the user clicks on it I want it to center itself and scale up. Then when the user clicks on it again I want it to return to its original position and scale. Then they can click on the next MC which would do the same thing. Any suggestions on how to handle this? I was thinking of adding the event listener, of course, and inside the handler function I would use an IF to check the x position or scale of the target MC. Is this a "clean" way of doing it?
View 2 Replies
Nov 15, 2011
I have a var that captures a slider position like this:
Code:
var sliderPosition = Math.round((thumb.y-bounds.top)/(bounds.right-bounds.top)*100);
which outputs a number between 0 and 100 starting on 0. I need to scale an mc from 1 at sliderPosition =0 to .42 at sliderPosition = 100.
View 1 Replies
Sep 27, 2009
how to force a SWF from Top left corner to the correct position.. When I tried to use a container it made the external swf not work at all, though it was in right position
WITH THIS CODE, THE SWF LOADED BUT JUST IN WRONG POSITION :
on (release) {gotoAndPlay(4);
loadMovie("gallery.swf",1);
}
then when I used a EmptyMovieClip it came in as the attachment.
Is there any other way to still use the LoadMovie() and adjust the x and y positions?
View 1 Replies
Jan 4, 2005
I made a movieclip and the framerate of my movie is 30.I like to run the mc at half the speed(framerate 15).Is there a script to doing this?
View 1 Replies
Jan 4, 2005
I made a movieclip and the framerate of my movie is 30.I like to run the mc at half the speed(framerate 15).Is there a script to doing this?
View 1 Replies
Jul 16, 2009
I animate a DisplayObject with a Motion XML (exported from Flash). The first time I apply a motion to it, everything works fine. The second time I apply a motion, the position / scale is reset to what it was before I first applied a motion. How can I keep the transform of the DisplayObject after a motion is played when I want to play a new motion ? I want the DisplayObject to start from where it was at the end of the first motion.Here's the code I use:
private function animate(motionXML:XML, target:DisplayObject):void
if(!animator)animator = new Animator(motionXML, target);
// Add event listerners
[code].......
View 5 Replies
Mar 21, 2004
The selector mark is suposed to "mark" the selection on the menu after a selection is pressed. But Im having problems with the X and y coordinates and scales of the MC and when I click on the option, the MC gets smaller and then bigger to the size I want. Its suposed change scale and position but its not working like it is suposed to work. Im not sure either if I�m setting the Mc on the initial x and y coordinates.
View 4 Replies
Aug 19, 2006
I've recently taken Krilnon's tutorial on interactive image panning, and have a need for more complexity. My image to be panned (relative to user's mouse movement) has several 'hot spot' buttons placed within. Each hot spot, when clicked, is to smoothly zoom and shift within the mask, with pertinent info displayed next to each, once zoom and shift is complete. almost like I'm making a motion tween, where the final position is known, but the start position is wherever the BG image is when the user clicks the nested button. I need to determine the x-position at the moment of click of the button (different for each button), and then, I think, use a simple-math "stagger-step" method of moving and scaling, until I've reached my final dest. here's the link to the tutorial I originally referenced:Url...
View 8 Replies
Mar 19, 2009
I cannot find any information anywhere on how to change my layout or even the ruler layout in Flash. The stage is stuck in the upper left-hand corner of the pasteboard. If I could get the zero point of the rulers to move (like to the right and down), then I could reposition the stage, but I can't. There is no edit ruler function. The zero points are right in the upper left-hand corner together.I can't see items which I need positioned to the left or above the stage at all. Does anyone know how to change the stage position on the pasteboard or ruler layout?
View 6 Replies
Aug 19, 2006
I've recently taken Krilnon's tutorial on interactive image panning, and have a need for more complexity. My image to be panned (relative to user's mouse movement) has several 'hot spot' buttons placed within. Each hot spot, when clicked, is to smoothly zoom and shift within the mask, with pertinent info displayed next to each, once zoom and shift is complete. almost like I'm making a motion tween, where the final position is known, but the start position is wherever the BG image is when the user clicks the nested button. I need to determine the x-position at the moment of click of the button (different for each button), and then, I think, use a simple-math "stagger-step" method of moving and scaling, until I've reached my final dest. here's the link to the tutorial I originally referenced:If anyone knows of a tutorial or example out there, I'd love directions to it(them). or,
View 1 Replies
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
Jul 15, 2004
I have a block that I'm trying to make move from right to left, and if the block gets to a certain point, it will move back to it's original position. So, I have this on my block (movieclip) right now.
Code:
onClipEvent(enterFrame) {
speed = 3
dist = 8.5
_x -= speed;
if (_x = dist) {
_x += 3
}}
But all this is doing is throwing the block at the 8.5 distance...
View 9 Replies
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
May 13, 2010
I'm hoping someone can solve this headache. Basically, I want a movieclip to move to the position of each of my buttons from any position along my x axis. Therefore, the movieclip needs to 'flip' to face the way it is traveling.At the moment I have the movieclip moving to the mouse x axis when I ROLLOVER the button and stop following the mouse when I ROLLOUT but the code won't flip the movieclip so I must have something wrong...
btn.addEventListener(MouseEvent.ROLL_OVER,followCa t);
btn.addEventListener(MouseEvent.ROLL_OUT,stopCat);
btn02.addEventListener(MouseEvent.ROLL_OVER,follow Cat);
btn02.addEventListener(MouseEvent.ROLL_OUT,stopCat );
[code]....
View 0 Replies
Jul 3, 2009
setting a position of movieclip called red x and y position within a movieclip called background
Code:
background.redsquare.x = 300;
background.redsquare.y = 300;
comes up with TypeError: Error #1010: A term is undefined and has no properties.
setting a position of movieclip called red x and y position withen a movieclip called background
Code:
redsquare.x = 300;
redsquare.y = 300;
This works fine but how can that be when surely you must access the red withen the background rather then just accessing red?
View 3 Replies
Aug 11, 2009
I have a horizontal scrolling movieclip that scrolls when the mouse is left or right of a certain point of that movieclip. However, it only moves slightly then stops when the cursor goes over it, it doesnt actually scroll normally...
[Code]...
View 1 Replies
Nov 3, 2009
lets say i have a sprite on the stage and one movieclip inside it. now i want to tween or just set that movieclip x and/or y position according to stage position. so for example i want to set mc.y = - 100; (by which i mean -100 to stage, not sprite which mc is in.)
View 2 Replies