ActionScript 2.0 :: Elastic Sizing Not Scaling?
Jan 26, 2006
i am working on movie clip that will change dimensions ( width and height ) depending on the loaded picture size .I made an easing transformation and works fine.
on (release) {
this.onEnterFrame = function() {
_root.box._width = _root.box._width+(200-_root.box._width)/2;[code]......
I think that it will be much more flashy if I make this transformation bouncy or elastic .I started by searching for tutorials but most of them were about elastic scaling (the shape is changing as one peace )But nothing about sizing , I mean putting a specific value for width and height .
View 12 Replies
Similar Posts:
Apr 24, 2009
I need to scale a movieclip to fit the width of the screen and it's height to stay proportional. I have code that's always worked fine but, in this case, the movieclip is constantly changing size and this throws off my code, scaling it incorrectly when using a listener (it's initial scale is perfect).
Code: Select allgreybar._width = Stage.width;
greybar._height = Stage.height;
greybar._xscale = greybar._yscale = Math.max(greybar._xscale, greybar._yscale);
I imagine it's because it has shifted from the size it's proportions were read from by the time it applies them. I know my problem is theoretically solvable because the movieclip can be scaled correctly if I scale width and height equally. However, I need the movieclip to always be the width of the screen.
View 4 Replies
Mar 30, 2010
I've set the publish settings to 100% width and 100% height and have then added the 'noScale' function into the first frame of my timeline. Here is an idea of what I'm trying to create:
I have three movieclips that are touching the left side of the Stage and want them to touch the left side of the browser but centre vertically. I can do this by adding the 'Stage.align = LC' command, but not sure if this is the right way to go about it.
The movieclip that is on top contains a logo and I want it to have a fixed size. I called the instance name 'logo_mc'.
The movieclip below 'logo_mc' is called 'container_mc' and is a strip of photographs that I need to run from the left to the right side of the browser no matter what the browser size. I need this movieclip to scale proportionally up and down as they viewer resizes their browser so the first photo is touching the left side of the browser and the last picture is touching the right side (without distorting).
The final movieclip is called 'buttons_mc' and is right below the 'container_mc' clip. This movieclip needs to remain a fixed size.
Obviously when the 'container_mc' clip resizes I need the other movieclips to move up and down to stay the same distance above and below the 'container_clip'.
Example of what I am trying to create: [URL]
View 1 Replies
Oct 22, 2008
I want to put together a flash gallery of photography for my photography business. I am very good at Photoshop design, html, css, javascript but I am a novice with flash. I can use it and use some actionscripting but my knowledge is limited.
I see galleries like this one: [URL]
The images expand and contract perfectly as the browser is resized. I am used to having to size pics for the lowest res screens (I design for 1024 width resos's usually).
What size should I make pictures to work like this... Does flash scale them down / up / either... are there quality issues with letting flash manage the sizing.
View 0 Replies
Aug 25, 2009
I'm getting closer.
Here's my code:
one._width = Stage.width;
one._height = Stage.height;
and this will make an MC called "one" stretch to fill the entirety of the "Stage" (in this case, it's your browser) and that's good...but not what I want I don't want the "elastic" effect. I want the MC "one" to scale as in if the web browser was too thin you would see the background color behind it.
View 1 Replies
Mar 14, 2006
i have an MC (hand) that ive made to be draggable. once the hand is released it should return to its original position....but of course, it doesnt. the code is a slight variation of some i found a while back and have kept in a folder. first frame on code layer in main timeline Code:[code]
View 7 Replies
Mar 11, 2008
I've search through all the threads with "scaling" and "resizing" and can't find the solution.
Basically I have a GUI element on a gallery that I don't want to scale, while the rest of the page is free to resize/scale.
I think I need to add a listener of some sort to the stage, but I'm not sure how to do this.
View 2 Replies
Feb 23, 2009
I'm building some navigation that extends all the way from left to right across my SWF. When the window resizes, I'd like the nav buttons to get wider but not have the text on the buttons get wider.
The buttons themselves are rectangles with a vertical gradient and a stroke around the outside. I'm using 9-slice scaling so the stroke doesn't scale, but the middle (gradient) gets wider or narrower.What'd be great is to be able to select an object or layer and say "don't scale, even if the rest of this movie clip scales". Is there a way to do that, or will I have to do it via actionscript?
View 1 Replies
May 20, 2010
i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild
Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
var br:mc_bottomright = new mc_bottomright();
addChild(br);
//proportional scale
if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))
[code]....
View 4 Replies
Apr 10, 2009
I am trying to achieve an effect of scaling a movie clip on click...very similar to [URL] When the user clicks on See, Hear, Play and Shop boxes, the boxes expand. I have created a box movieclip that has a bar on top. This bar is a movie clip inside the box movieclip. When i try to scale the main box movieclip, the internal bar movie clip scales as well. How to stop this?
View 2 Replies
Apr 18, 2004
really sorry to bring this one up again. I've managed to create quite good working gallery. What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1
View 14 Replies
Apr 18, 2004
What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1
View 13 Replies
Aug 24, 2009
As shown in the example... I have entered an action to load a movie when I press a button.It works fine but the original swf was made at 800 by 600 when I need it to be 400 by 200.Is there a way to have the video loaded smaller using some kind of width and height line to the command above?I don't want to have to go redue the swf I am loading in...In the swf, I am working on this for class, so It is not finished or have any real sense to it, other than what is required by the teacher
View 5 Replies
Oct 21, 2009
I'm adding text to a movieclip as you can see below. The text is alomost not visible because it's so small. If I don't scale the movieclip then the text becomes clipped. I basically want the movieclip to be a tight container (the same size as the textfield) for the Textfield. The below does not work. How can I do this?
[Code]....
View 1 Replies
May 21, 2010
give me any leads as to the methodology behind a flash feature that senses browser size and sizes itself accordingly.
View 1 Replies
Nov 5, 2010
I have a flash document that I want to always take up the entire web page. Setting to 100% width & 100% height doesn't do the trick, because if the window dimensions aren't right, white space will show on the sides/top and bottom.
Is there a way to get the window dimensions are say if window height > window width : flash movie = window height (and vice versa)?
[Code]...
View 1 Replies
Oct 25, 2011
When using HTML and CSS you can automate the size of an "area" of the page an "area" is classed as a DIV and you automate it by setting its height and/or width to auto (usually height only with width given a fixed size)in adition you can set the DIVs overflow parameter
this is vital for CMS managed websites
does flash have any simple functions for achieveing the same result? or if i used flash with a CMS system would i need use AS3 to calculate the total height and width of all child objects and set this number as the height and width of the pearent object? (with HTML/CSS i would use javascript to do this)
View 1 Replies
Jan 12, 2010
My question today is dealing with a dynamically generated button with a textField.I have the button copy in XML and I need to add a buffer of 10 pixels to either side of the textField. I tried to CENTER my textFormat, but then I could not see my text because the button is for some strange reason 545.45 instead of 88 like it should be. When I change the alignment to LEFT then I can see my text, but still the larger issue is my button size is horribly off.[code]
View 1 Replies
Nov 23, 2011
I'm trying to make an online TCG and I'm starting out by creating the table and card stacks. I've set it up where I have a table which holds stacks. The stacks hold cards, and the cards hold a front and back image. Really simple. So I thought. For some reason, the card is re-sizing to fit the screen. Even though a trace shows that the width and height are correct. Here is an example:n all reality, it should be about the height of the white box with the "A" in it, in the top left hand corner. The only place where I explicitly set a width and height is setting the table width and height. The table, Stack, and card are all sublasses of the flash Sprite class. Since there are 4 seperate files for the example above, if someone would need to look at the code,
View 1 Replies
Feb 6, 2009
I'm trying to re-size and move a movie clip using my keys, and I can do it, but for some reason, if I set a really low value to "speed", it won't move to the right or down, but it will move to the left or up, even if very slowly.
It is as if flash has problems in advancing very low values on the positive x and y axis.
Add this code to the first frame:
stop();
var speed = 0.01;
var grow = 3.6;
[Code].....
View 1 Replies
May 25, 2011
I only have some background on html and java. I made a website using a actionscript 1.0 template in cs5. I converted it to 2.0 and the mp3 player doesn't work properly with more than one track it was playing all 3 at once. I got it to work with one track messing around with files and coding but the buttons don't function properly. For example when I hit stop it will stop but then play button wont play track and the forward and back buttons don't change the tracks.My other issue is that after finishing my site I realized it wont upload to my host because it 18mb and the limit per file is 5mb. I read that there is a way to break it up into smaller files but I am unsure how to do this.
View 2 Replies
Jul 25, 2011
Is there a way to stop someone from re-sizing pr maximizing the flash application???
View 2 Replies
Oct 20, 2008
Is it possible to put Elastic eas in and out without using the
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
and then putting in values? Coz i need it for buttons, and diagonal popping doesnt work. So i was wondering if i could just put it on keyframes, and then select bounce or elastic.
View 0 Replies
May 29, 2009
I have a preloader(as3) that is working great, I use FlashVars to pass it what movie it is loading, then it loads that movie, and shows it on the stage after loaded. I would like to make this a bit more dynamic. Right now I can use the same preloader for any movie so long as the movie and the preloader is the same size. I would like to pass the size of the movie im loading to the preloader with flashvars just like im passing it the file path for the movie itself. Here is how im passing the movie:
var swfLocation = this.loaderInfo.parameters.flashPath;
var myRequest:URLRequest = new URLRequest(swfLocation);
now i just access the variable wherever i want to say load the movie
I tried:
var swfHeight = this.loaderInfo.parameters.flashHeight;
var swfWidth = this.loaderInfo.parameters.flashWidth;
stage.stageHeight = swfHeight;
stage.stageWidth = swfWidth;
then in my flashvars i have a value of flashPath=<?=path?>&flashHeight=<?=height?>&flashW idth=<?=width?> (passing these to the embed and object using php btw)
View 2 Replies
Jun 4, 2010
I just did two 100% Flash sites. I always size my sites 1024 by 768 or a bit smaller. I have never had a problem with it not fitting in the browser. I exported with Flash HTML at 100%, no scale.I tested these sites on Safari and IE on different monitor sizes. They looked great.
Both of my clients are using Firefox said it cuts the bottom off by about and inch or so. I did some research and this seems Firefox does this. I read this article below and wanted to know the following:[URL]
1 - Is this the best way to fix it? Or have I developed these sites too big for FF.
2 - Is there something else I could do (i.e. export the HTML a different way?).
3 - Should I size differently in the future?I would like to prevent me having to resize the stage and change all the objects.
View 3 Replies
Nov 28, 2011
For some background: I'm creating some e-learning modules using a client's existing Flash/AS/XML template. There is another separate file that is loading XML content and directing the "flow" or progression of the module. Basically, it is broken up into three parts:
1. Chapter = a selection made from a main menu (<chapter> in the XML) and is a large section; it is comprised of one to several "pages"
2. Page = sections within the chapters that users can progress to via navigation buttons; each page represents a separate Flash/SWF file with several clips (driven by audio clips played by another AS file from the XML direction). Also, each page has a certain AS file (only ONE) associated with it to either create interactivity, an activity, or text placement.
3. Clip = audio-driven parts of each page; represented within each 'page' FLA/SWF by keyframes. These modules are being produced for two languages - thus the use of AS/XML to pull in text from two different files. We also have the need to pull in images using AS from the XML files. These images are essentially screenshots; some are large, some are small. Depending on text placement, we may want to resize images to make them fit within a certain space. Can you all suggest the best way to resize/scale these images dynamically. Basically, if the image's width is over 570 pixels or the height is greater than 550 pixels, I want to resize it so it fits within that 570x550 space. You can see the code that I tried (in "//") that didn't work. Feel free to comment on other aspects of the code.
[Code]...
View 3 Replies
Jul 21, 2009
Is there a way to have the TileList component to auto-size to its contents? I have tried setting it 100%, but it seems that won't help. I don't want to hard-code the height because the content will be vary, and I don't want scrollbars to show up.
View 2 Replies
Jan 19, 2010
Here is the code I'm using for the div in question (which is the 3rd box of the javascript dynamic box):
<div class="contentdiv" style="margin:-20px 0 10px -30px;">
<object height="100%" cellSpacing="0" cellPadding="0">
<param name="movie" value="images/tri.swf">
[Code]....
I want the .swf graphic to fit the div just like the image in box #5 does.
Right now I can't get it to be either the proper size or the proper alignment. I'm admittedly not a Flash expert, so any clues would be great here.
Also, other stuff on the page is totally broken because this is just the "dev" version of the site where I test stuff out. So hopefully that can all be ignored.
View 1 Replies
Aug 31, 2010
I need to position an object in the bottom half of a container (working on flex 4)- abt 25% above the bottom...and cant use x,y coordinates given need for resizing. I have been able to position the layout containers and they work well
Also need fonts to resize as the buttons get smaller
View 1 Replies
May 11, 2011
We are building a flex project and would like it to render faster. We do have situations where we reference parent module size properties to size current module containers, as well as current module size properties for a bunch of attributes including font size and element positions and sizes.
Would it help to create temporary variables for
a) pcw=parentcontainer.width, pch= parentcontainer.height
b) ccw=currentcontainer.width, cch=currentcontainer.height
and reference to pcw,pch,ccw and cch while doing positioning. Also given the bulk of the positioning will be done in mxml, will setting these interim variables in initialization function, allow them to be used in mxml such that they will resize as browser size is changed.
View 2 Replies