ActionScript 2.0 :: 3D Zoom Effect - How To Calculate Width / Height

Oct 25, 2005

I am working on a 3d zoom function. How can I calculate it it best? I have a placeholder_mc:
width: 400
height:400
_x:0
_y:0

In the placeholder_mc I have 10 obj_mc's:
orig width:400, scaled in placeholder_mc: _xscale=20
orig height:400, scaled in placeholder_mc: _yscale=20
the _x and _y are random positions

Now I need a formula that make the placeholder_mc zoom into obj_mc inside and the placeholder_mc must be _xscaled, _yscaled so that the width and height of the clicked _mc are exactly 400x400.

for the _x and _y I use.. onEnterframe=
placeholder_mc._x=placeholder_mc._x+(placeholder_m c.obj_mc._x-placeholder_mc._x)/8;
placeholder_mc._y=placeholder_mc._y+(placeholder_m c.obj_mc._y-placeholder_mc._y)/8;

So this makes the placeholder_mc move to the correct position of the clicked object but how can I scale it now the placeholder_mc so that he moves and scales correct?

View 12 Replies


Similar Posts:


ActionScript 3.0 :: Calculate Width And Height After Object Rotation

Jul 31, 2009

I am tweeing a bunch of rectangles randomly on stage.

Code:
TweenLite.to(thumbArr[i],1,{
x:Math.random () * (stage.stageWidth - thumbArr[i].width),
y:Math.random () * (stage.stageHeight - thumbArr[i].height),
rotation: Math.random () * (60) - 30});

the problem is that after I added random rotation (between -30 and 30 degrees), the corners of my rectangles are still sticking out of the stage at the end of the tween.

If I trace objects width and height after the rotation I get the new values but this still doesnt help me because I am tweening to that rotation.

Code:
mc.rotation = 20;
trace(mc.width);
trace(mc.height);

View 5 Replies

Flex :: Calculate Height Of Text (width Fixed)?

Nov 18, 2009

I want to create a text box with a fixed width that will fit itself to its current text. So I went ahead and wrote this simple application[code]...

View 2 Replies

ActionScript 3.0 :: Calculate Width And Height After Object Rotation?

Jul 30, 2009

I am tweeing a bunch of rectangular shaped objects randomly on stage.

Code:
TweenLite.to(thumbArr[i],1,{
x:Math.random () * (stage.stageWidth - thumbArr[i].width),
y:Math.random () * (stage.stageHeight - thumbArr[i].height),
rotation: Math.random () * (60) - 30});

the problem is that after I added a random rotation between -30 & 30 degrees they still stick out of the stage a little.how could I calculate width & height of the these objects based on their final rotation so they dont stick out of the stage?

View 6 Replies

Flash :: Calculate The X & Y Coords - Width And Height Of Specific Piece Of Text Inside A PDF Document

Oct 28, 2010

On my website, I display uploaded PDF files in a flash player for my users to read. I already use various tools to extract the text and produce a serious of high quality images from the file and the system works well. The last piece of the puzzle is to be able to highlight specific parts of the document to help users with accessibility issues.

However I cannot figure out how to calculate where the specific text is positioned on the page? Notes: The documents uploaded to the system are from 3rd parties, so fonts may be embedded. Meaning that I cannot be sure of the width of specific letters. The text to be highlighted may not be unique, the same text may be repeated How can I calculate the coordinates, height and width of a specific piece of text on a PDF, so that I can then draw a box around it?

View 1 Replies

Flex :: UIComponent's Width And Height Have No Effect On Sprite

Oct 23, 2009

Given this code:

[Code]...

Why does changing the width and height of uiComp not affect the Sprite? Wouldn't UIComponent provide Sprite with a Graphics object, which limits that area where Sprite can draw?

View 1 Replies

ActionScript 3.0 :: Flash Referencing Stage.width/height References Mc.width/height?

Jul 29, 2010

I am trying to reference to top level (stage) width and height of the main stage for the placement of something located inside a movieclip on the stage.

My code is:
Code:
my_loader.x = (stage.stageWidth - my_loader.width)/2;
my_loader.y = (stage.stageHeight - my_loader.height)/2;

But this seems to just relate to the width/height of the mc that my_loader is nested in...

I have tried the following and had no luck:

stage.stage.stageWidth
root.stage.stageWidth
parent.stage.stageWidth
MovieClip(root).stage.stageWidth

View 8 Replies

ActionScript 1/2 :: Load External Image Of Different Height & Width Into Same Height And Width

Jun 12, 2009

i want to load external images of different height and width into same height and width.

View 3 Replies

ActionScript 2.0 :: Load External Image Of Different Height & Width Into Same Height And Width?

Feb 24, 2010

i want to load external images of different height and width into same height and width.

View 0 Replies

Actionscript 2.0 :: Change Width - Height And Width / Height Ration In Flv?

Mar 25, 2011

I would like to use a movieclip to load a flv video. The problem I have is that I want to change the video dimensions. I've tried several software to change the video dimensions but as far as it seems all of them keep the same height-width ratio than in the original video. Is there any software that would allow me to change the height and width without keeping the same height/width ratio as in the original video file?

View 1 Replies

ActionScript 3.0 :: Zoom In And Out - Calculate Distance Between 2 Points In Map

Aug 6, 2009

I am trying to make a program where I put in a bitmap map and then am able to calculate the distance between two points, and I have done that. Now I want to be able to zoom out and still have those two distance calculate the same distance apart, is there a way to do this with AS3 without have to manually scale my code?

For example I don't necessarily want to have to do
var distance = Math.sqrt(dx*dx+dy*dy)/scale...
Reason being is I would have to redo a lot of code.

View 3 Replies

ActionScript 2.0 :: Change Widht, Height And Width/height Ration In An Flv Video File?

Mar 25, 2011

I would like to use a movieclip to load a flv video. The problem I have is that I want to change the video dimensions. I've tried several software to change the video dimensions but as far as it seems all of them keep the same height-width ratio than in the original video. Is there any software that would allow me to change the height and width without keeping the same height/width ratio as in the original video file?

View 3 Replies

Professional :: SimpleButton.width Doesn't Change - Width And Height Remain 0

Jun 1, 2010

I am looking at the SimpleButton entirely wrong. Here's what I'm doing (inside of a MovieClip):

[Code]...

the close_btn.width and height remain 0. Am I supposed to just rely on the DisplayObject members of the SimpleButton completely and ignore width/height/x/y or what?

View 2 Replies

Flex :: Calculate Absolute Height Of Dropdown?

Apr 5, 2012

I have many dropdowns in my flex application. Now I want to set rowCount property so that as many rows as possible so there is less scrolling when see the dropdown items.The flex application was running on a popup window. So I think I have to know the distance from dropdown to bottom border of window, and then calculate what number should be for the rowCount. Like Height/per row height.As I known, the dropdown.y is the relative y coordinate of itself. But my dropdown has many parent UI layout component, and also I have many dropdowns, it is hard to calculate one by one.

View 1 Replies

Flex :: Calculate The Height Of Parent Element?

Jun 3, 2010

I have three datagrids inside VBox container. Since I don't want scrollbar in my flex widget i am increasing the height of SWF through javascript, which increases with each addition of row in my datagrid. My query is how can I get the exact height of my VBox which is the parent element of datagrid. I am not able to get the height of VBox. I have tried to use measuredHeight,height with no success.

View 1 Replies

IDE :: Calculate Textarea Height Based On The Text Length And Fontsize

Jul 2, 2009

calculate textarea height based on the text length and fontsize in as2?

View 4 Replies

Actionscript 3 :: Calculate The Width Of An Image Loaded Into A Movieclip?

Jun 8, 2010

I am loading an image into a movie clip via AS3, and what I want to do is center the image inside the movieclip. The problem is that I can't seem to grab the width value of the image being loaded. Below is what I'm doing:

imageLoader = new Loader();
imageLoader.load(new URLRequest(event.target.name));
screenBox.screenHolder.addChild(imageLoader);
trace(this.imageLoader.width);

When I trace the width, it always comes back at zero(0) even though there is an image inside the imageLoader. What is it I need to do to find the actual width so I can center the image?

View 2 Replies

ActionScript 3.0 :: Calculate Width Of Array Elements On Stage?

Feb 10, 2009

I have a very simple XML doc that as3 outputs via dynamic textfields. Once loaded, how would I calculate the total width of the array objects on stage? Keeping in mind that the textfields stack horizontally.

S3:

Code:
var widthValue:Number;
var spacer:Number = 10;
var startPos:Number = 0;

[Code].....

View 1 Replies

How To Achieve Zoom In / Out Effect

Sep 24, 2009

Dreamweaver How I could create the page showing a similar zoom in/out map as on the below link. I was referred to come here. How do I achieve the zoom in/out effect? [URL].

View 4 Replies

ActionScript 2.0 :: Create The Zoom And Pan Effect

Sep 9, 2009

I have been searching high and low trying to create the zoom and pan effect used in this website [URL]

View 3 Replies

ActionScript 3.0 :: Get A Zoom In Effect After A Hit Test

Dec 23, 2010

im trying to get a zoom in effect after a hit test. so basically hit test occurs, zoom in and then go to next function i experimented with transition effects and simply resizing the bg...but nothing works correctly... i found this

[Code]...

View 17 Replies

Actionscript 3 :: Zoom And Pan Effect In Flash?

Mar 1, 2011

I have made a flash world map (Continents Wise). What i want is that, when i click on any continent, it should zoom out to the full area and the area should also be floatable so that it can be panned with mouse.

View 2 Replies

ActionScript 2.0 :: OnMouseOver Zoom Effect?

Feb 21, 2007

how can I make a zoom effect onmouseover. Like I've an image & I want to zoom it to +10% when I move the mouse over the image

View 1 Replies

IDE :: Coverflow Effect With Zoom Function?

Jul 31, 2009

i just wanted to ask if anybody know where i could find a source code (fla) of a coverflow effect with an integrated zoom function (like this one or simpler: [URL]. i don't care if it's written in as2 or as3.

View 1 Replies

ActionScript 3.0 :: Zoom In/out Effect On Images?

Oct 19, 2009

I want to do a zoom in/out effect on images. I am using caurina to scale the images everythign is working fine but it always scales for the rigstration point of the movie clip which in this case is top left.

Is there any way to zoom from the point the user clicks the image using caurina?

View 1 Replies

Tackle This Zoom Effect With Audio In Flash?

May 22, 2009

have a payslip which can be zoomed into at different sections, and then a voice over will explain what each bit means.the client sent me this link as an example, but it hasn't got the zoom or audio on.[URL]

They have seven bits of audio around 15 secs each, and my thinking is that when a user clicks on a certain button, the image zooms in, the audio plays, and an animation of a pen ringing it or something will will happen.

How best should I tackle this to keep the file size down and make the audio sync with the animation? He has sent high res images of payslips but I'm not sure whether I should re-draw the payslip in flash to keep the file size down? I am used to working with frame labels so should I just have the movie go to a certain frame label when the button is clicked and the audio play there? Should I just have a preloader at the very start of the whole thing, or at all the sections?

View 1 Replies

ActionScript 3.0 :: Zoom / Pan Effect For Image Gallery

Jun 26, 2009

I am trying to create a zoom/pan effect for an image gallery. The thing is that i dont have any idea on how to do it so I've started to play with it. I created a zoom button that basically make the image bigger and a mask for the image so no matter how big you going to scale it its going to show the masked area only and if I want to pan all I have to do is move the image inside of the mask.

But my problem is that I use a MouseEvent.MOUSE_DOWN event on the zoom in button and the function scale it up and position it in the center only once. What I want to do is as long as the user have is mouse down the image will zoom and when the user releases the mouse it's going to stop. Thats the effect that im trying to achieve [URL]. But the cool thing about this gallery is that when you zoom in or out it actually ease out or in and stop and it run's really smooth.

View 1 Replies

Professional :: Zoom Effect On Photos Always Flicker?

Jul 23, 2010

I'm trying to create a little slideshow with photos. I created a little animation on every photo (a really subtle zoom-in or zoom-out effect) and transition using alpha transparency.

But some photos will flicker very bad. Expecially photos containing elements like grids or straight lines. Only really blurred pictures will render well.

I already raised FPS up to 60 but flicker still occurs.
 
I'm using flash8. Will another flash version (which?) render the movie in a better way?

View 2 Replies

ActionScript 3.0 :: OnRollOver Button - Zoom In / Out Effect

Nov 5, 2010

I want to do a simple thing in Flash CS3, but some how I am unable to do it. Actually my requirement was....OnRollOver of a Button I want to slightly zoom it and OnRollOut. I want to slightly zoom out the Button. And the conditions are I should not use TimeLines/Stage Assets etc. Every thing has to come dynamically. Including the Button creation/ZoomOut/ZoomIn effect etc. and mainly I need it in Flash Cs3/Flash Cs4.

View 3 Replies

ActionScript 2.0 :: Stars/Space Zoom Effect?

Mar 4, 2005

Looking for a zoom through space & starfield effect. I've seen horizontal ones but I am looking for stars coming at you head on. Similar to the snow tutorial. Random generated stars zooming at you....

View 3 Replies







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