Working Out A Scale Formula?

Mar 14, 2009

I'm having a real problem trying to work this out...


A: I start with a movieclip on stage. it's 100x100.

B: I set xscale and yscale to 150.

C: I use "attachMovie" to add a little man into the square.The problem is, the man has an xscale of 100, but he is also scaled with the movieclip square container. So he appears too big.

D: What i would like to know, is what formula you would use to reduce his scale so he is the correct height, if the container movieclip had an xscale of 100?

[Code]...

View 2 Replies


Similar Posts:


Actionscript 2.0 :: Scale 100% In Browser Not Working Correctly?

Feb 23, 2010

I am having a issue scaling the swf in the browser. The properties are set in the html tab correctly I think. I published in flash and it scales the movie only on the first and second frame(while the preloader is playing). then it jumps back to the original size of the movie even when the browser window is smaller. My settings are

Demensions: percent. 100
Scale: default (Show all).

here is my html code for reference.

Code: Select all<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>people page</title>

[Code].....

View 8 Replies

JQuery :: UI Scale Effect Not Working With Flash Object

Jun 29, 2011

I have a div with a flash object in it. That div is going to pop up in a modal triggered when a user clicks a thumbnail of the flash presentation. The problem occurs when I try to use the scale effect to scale in or out, it errors out.

Here is the HTML:
<div id="modal">
<object id="presentation" width="720" height="576" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[URL]" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value=" video.swf" />
<param name="quality" value="high" />
[Code] ......

View 1 Replies

ActionScript 2.0 :: Re-size Function On Website Im Working On For BG To Scale?

Feb 5, 2009

I have a re-size function on this website im working on for my BG to scale, my content to stay centered, and my nav bar to always stay top right. I need some sort of if statement saying if my navagation is 200px from the left it needs to stop moving. I hope that makes since.

[Code]...

View 2 Replies

Flex :: Image Scale Stopped Working After Deploy To Server?

Nov 18, 2009

I have some code to scale an image's width according to its height after the image is being loaded. It works fine on my development PC if I point to the wrapper html using local file system path. However, after I deploy the web application to JBoss AS 5.1, it stopped working - it always sets the image width to 0, causing it to disappear.

Code for scale image side:

private function scaleImage():void {
img.width = img.contentWidth;
}
<mx:Image id="img" updateComplete="callLater(scaleImage)" height="100%" />

View 1 Replies

Actionscript 3 :: Flex Web Application Resize Method(and Scale X / Y) Not Working On Server But Works On Local Flex Builder

Oct 18, 2011

I have a quite different problem with resizing. I have a Flexbook component which uses the middle part of screen (center) with a html header menu and footer. The problem: The scaling works perfectly when we run in the local machine ( Flexbuilder). But when we deploy it to the server its like scaling never existed.. The requirement: when user maximizes the window or minimizes it, the Flexbook should be resized to fit the screen.

[Code]....

View 1 Replies

ActionScript 2.0 :: Rolledover Clip To Scale Up And All The Others To Scale Down And Blur?

Mar 8, 2007

Scenario: main moveiclip with 4 other clips in it. I want the rolledover clip to scale up and all the others to scale down and blur.

Question: What is the most effiecent way to code this. Would it be a "for in loop"? I am trying to minimize the code and would rather not use a whole bunch of if then statements.

View 3 Replies

IDE :: Flash Content To Scale When Scale Browser Window?

Feb 19, 2010

I want my flash content to scale when I scale my browser window.

View 5 Replies

ActionScript 3.0 :: Calculate The Value Of A Formula?

Oct 21, 2009

I need to calculate the value of a formula which is passed dynamically by using text box.This formula contains a set of variables which are already declared and assigned a value(hard coded). I will provide a submit button , on clicking this button I must be able to evaluate the formula that I have passed dynamically using the text box.

View 2 Replies

ActionScript 3.0 :: Formula For 3D Movement?

Nov 7, 2011

I've been trying to look this up but not had any luck so far. I'm trying to make a simple pseudo-3D app, but I'm stuck on how to pull off the movement. If I have an object with x,y,z coordinates, and its movement speed, pitch, and yaw, what formula would I use for movement? So for example, if the object is at 0,0,0, moves 6 units per frame, and has pitch 30 degrees and yaw 15 degrees, what will be its coordinates next frame?

View 1 Replies

ActionScript 2.0 :: Can't For The Life Of Figure Out The Formula?

Oct 19, 2009

I have a little math problem with a game I'm making, and I can't for the life of me figure out the formula needed to accomplish something..Say, there's a sniping game, and a BIG image that must scroll from left to right according to the mouse movement.

Something like this:[URL]... In that example, the scene is 550 pixels wide, and the image is 1100, exactly two times the scene, so the formula is kinda easy..

[Code]...

the center of the image would be at x 1500, way over to the right of the scene, outside it, but it would fit inside the screen, like this (the blue square represents the real size of the scene):[URL]..Then when the mouse is at the far right side, that is 550 x, the image center should be at -950 x, like this:[URL]...

View 3 Replies

ActionScript 3.0 :: Math Formula Conversion?

Jun 21, 2011

I'm not that good with Math and i have a formula for a that it's universal from what i understood but i dont know how to transform it to work with Flash's Math API. 

View 2 Replies

ActionScript 3.0 :: The Formula Used In The Blendmode: 'layer'?

Oct 1, 2011

I've been searching for the formula used intrinsically in Flash but I couldn't find anything. Does anybody know how the result colors are obtained when the 'layer' blend mode is chosen for the upper object? I thinks it's done separately in each channel using the transparency values.There might be some bitwise operations going on there but I'm not sure.

View 7 Replies

ActionScript 2.0 :: Formula For DL Speed Code

Apr 15, 2004

Someone got code for showing time left to download requested flash file?.

View 2 Replies

ActionScript 2.0 :: Dynamic Layout Formula?

Jul 12, 2004

i'm trying to dynamically layout a calendar using actionscript and i'm no good at determining algorithms to quickly and efficiently lay things out.what i want to do is set it up per the image attached:

* where there are 7 columns and a varying number of rows.

* the top row has the 2 arrows and the month and year display.

* the second row has all the day headings, i.e. S, M, T, W, R, F, S

* and the rest of the rows will have the dates.

how do i come up with a nice clean formula to calculate the positions so all these elements align?

View 3 Replies

ActionScript 3.0 :: Flash Doesn't Like My Formula?

Mar 31, 2011

I am trying to code a loan calculator into Flash, however AS3 doesn't like my formula and won't calculate it, can someone help? Here is what I have:

loan=15000
apr=13
term=48

var loan_amount = (apr + (apr / (Math.pow(trm, (1 + apr)) -1 ))) * loan;

When I print out the loan_amount I get a 0.If I do: var loan_amount = (Math.pow(trm, (1 + apr)) -1); it will give me the result 1.0331079714165e55

As soon as I add the next part of the equation (apr / (Math.pow(trm, (1 + apr)) -1 )); it will give me the actual apr value as the result instead of the apr divided by the 1.0331079714165e55.Likewise, if I try to add a fixed value instead of the apr variable, it will return that fixed value instead of doing the math.

View 6 Replies

ActionScript 2.0 :: Initialize X Scale And Y Scale Into Percentages?

Jan 14, 2006

How can I convert the current scale of the instance to 100% so I can easily "visualize" and manage the instance when I modify its scale? Here's the actionscript, it works, but I just want the temp._xscale and temp._yscale to be in percentages, not real numbers.

Code:
USflag.onMouseDown = function ()
{
var temp = USflag;
onEnterFrame = function ()

[code]....

One last thing, what's the tag you have to put that is designed for boxing actionscripts? I'm suing [ code ][ /code ]

View 1 Replies

ActionScript 1/2 :: Make Formula For Calculation Of Speed

Jan 3, 2011

I´d like to know how would I make a formula for the calculation of speed.It´s not as simple as distance divided by time.I want something different.I have an helicopter.This helicopter is landed.He will take off with a small speed, but increasing speed.What I want is.This helicopter movement. In other words, increasing vertical speed, in a given time, say, 2.4 seconds, in a give distance, say, 100 pixels.After that he keeps vertical speed constantly. So I think the helicopter will start with its vertical speed slow, increasing, then, decreasing untill it reachs its constant vertical speed.

View 1 Replies

ActionScript 1/2 :: Math - Formula To Change A Number

Dec 24, 2011

how to convert it to 0 and also if the number wsa 9, convert it to 1, and if it was 8 it gets converted to 2.. and so on.. where if it was 0 it would then be 10 Is there a formula? The 0 to 10, and 10 to 0 may not be possible but that's ok.

View 1 Replies

ActionScript 3.0 :: Create A Formula With 'POST' / 'GET' Method?

Dec 24, 2011

How to create a formula with 'POST' or 'GET' method

View 2 Replies

ActionScript 3.0 :: If Conditions Using Formula And Input Text?

Jan 7, 2010

Currently, we have an activity in class wherein we're supposed to resize a Movieclip to a specified size restricted to any value between 50 and 250% that will be entered in an input text field. If the value entered goes beyond 250 or below 50%, it's also supposed to show a warning that the entered value isn't valid. Also, when a value is entered in the textfield, supposedly, it can be entered either by using the ENTER key or by clicking the resize button.

I've already managed to resize the movie clip according to the amount specified but I think there's something wrong with the "If" condition in my resizeShape function, because it still accepts values above 250 and below 50%. Also, I don't know how to make it so that both pressing the ENTER key and clicking the resize button enters the value without repeating the whole resizeShape function.Here's what I've done so far:

ActionScript Code:
var input_txt:TextField=new TextField();
var warningBig:TextField=new TextField();
var warningSmall:TextField=new TextField();[code]...........

View 2 Replies

ActionScript 3.0 :: Convert Decimal To Binary Ive Got The Formula?

Mar 19, 2012

Im having a problem with this code to convert decimal to binary ive got the formula but it wont print to the screen_txt only on the console and also my calculator wont let me change any other number other than 3 so if i press 7 binary should be 111 but it stays 11...

[Code]...

View 3 Replies

ActionScript 2.0 :: Mathematics - Determine The Formula Of The Curve?

Jun 30, 2004

I can't pinpoint or make up a set of calculus to determine the right formula which describes a curve that goes through 3 specific points...I'll try to say it with a more hand-on approach. I have a spaceship which can move vertically,located to the left.The enemies, obviously, arrive from the right. Now, when i click anywhere on the scene,I want a missile/plasma orb/projectile to be shot from the spaceship, but doing more than going in a straight line: imagine 3 points, one at the spaceship, one in front (therefore to the right) of the spaceship (5/10 units in front) and the third at the click location. How do I determine the formula of the curve that goes along these three points?

View 6 Replies

ActionScript 3.0 :: Calling Phd Maths Gods Best Random Formula?

Apr 13, 2010

I have an app that was actually written for me. It's a multiple choice quiz basically where a question comes up and there are 4 answers. HOWEVER the answer always seems to be 80% on the same answer ie: BUTTON ONE out of the four. BILLIANT random function I don't think.Would this be a better answer formula to use?
 
function randomBetween(a:Number, b:Number):Number {   return (a + Math.floor(Math.random()*(b-a+1)));}

View 8 Replies

Flash :: Formula To Determine Designation Point Given A Variable?

Aug 4, 2011

i have a game inwhich a bait is thrown determined by a variable of a power meter, when the meter is full it returns a variable of 1 when half 0.5 and when low near 0, how can i use this to determine how far my "bait will be thrown" onto the screen? i have tried how ever the X value would not be consistent with my fishing rod placement, and when the point is decided i will have to move my bait to that point and stop.

[Code]...

View 1 Replies

Actionscript 3 :: Mathematical Error In Physics Restitution Formula

Aug 14, 2011

I admit it. I'm a mathematical imbecile. should I be attempting this at home? Probably not without serious injury. Anyway. Anyone that has a bit of experience in games and physics who can review this code and provide insight into why there is a built in "loss" in velocity in prototype would be hugely admired.

the concept: the actor falls from the sky, at some point intersects a boundary (trampoline.y) after which gravity (in this example a value of 1.6) stops operating and a restitution factor (in this case a value of -6) takes over.

right now I'm trying to create a zero-sum situation where you have the same velocity coming out of the trampoline "bounce" (hero.y >= trampoline.y) as you did going in. That's just not the case as the traces reveal.

[Code]...

For now I'm hoping to have a solution where the velocity on the tic after the character leaves contact with the trampoline is the same (but negative) of the velocity just prior to going in. Heck I've even tried storing and retrieving the entry position and velocity, but that just looks like a hiccup.

View 1 Replies

ActionScript 3.0 :: Drag Easing Formula - Panning Motion Of X?

Oct 24, 2010

I've got an object (camera) I'm trying to pan. This code works perfectly for panning it on the Y axis, but it's the exact opposite for the natural panning motion of X. By simply subtracting the velocity (as opposed to adding), the camera.x creates a crazy "Ease In" effect that shoots the camera off at a crazy speed. I've tried reversing the order of everything, but without the result I'm seeking.

[Code]...

View 0 Replies

ActionScript 3.0 :: Formula - Output Not Displaying The TelephoneNum.text

Feb 3, 2012

I'm having a problem with a function that I have in my Flash: in the output window, it's giving me the following errors:

[Code]....

Why is the output not displaying the telephoneNum.text, it seems as though it doesn't even see the information that a user types in that field. It is also displaying the message in the incorrect_txt field regardless of what I type in the field.

View 2 Replies

ActionScript 3.0 :: ScrollBar Formula - Add Extra Space After Content?

Feb 11, 2011

so i have some scrollbar(track and button) and some content.the formula i am using to calculate to calculate y of content is the following:

//contentStarting.y and scrollbarButtonStarting.y are positions of sprites at the moment they are created
content.y = -((contentStarting.y -scrollbarButtonStarting.y) +scrollbarButton.y) * ((content.height- content.mask.height) / (scrollbarTrack.height - scrollbarButton.height));

the only problem i have is that i need to add extra space after content, so basically i want forumla to act as if content. height = content.height + extraSpace , but unfortunatelly setting the height scalesY, which is what i don't want.

View 1 Replies

ActionScript 2.0 :: Unable To Make Dynamic Layout Formula?

Jul 12, 2004

i'm trying to dynamically layout a calendar using actionscript and i'm no good at determining algorithms to quickly and efficiently lay things out. i was hoping for a litwhat i want to do is set it up per the image attached:* where there are 7 columns and a varying number of rows.* the top row has the 2 arrows and the month and year display.* the second row has all the day headings, i.e. S, M, T, W, R, F, S* and the rest of the rows will have the dates.

View 3 Replies







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