ActionScript 2.0 :: Dynamic Positioning Only Working After Resize

Jul 7, 2009

URL...Its a dynamic positioning template, basically.I'm importing docked_icons.swf onto the stage via the holder movie clip (at the end). However, the position is messed up until I resize the window. From there, it's perfect. How do I set the initial position to be correct?[code]

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Can't Use StageWidth For Positioning When Resize

Sep 5, 2010

I'm trying to get the width and height of the stage to position my objects when the user resizes the window, but I can't figure out how.

I've Googled a lot and found some examples and my last try looks like this [code]...

View 4 Replies

ActionScript 3.0 :: Positioning After Stage Resize?

Aug 25, 2011

coordinates in flash, particularly after resizing the flash player window.I have an mc on stage and draw an ellipse inside that mc. The movie is of size 800 x 600.

Code:
var ellipse:Shape = new Shape();
ellipse.graphics.beginFill(0x6CCDF4, 0.5);
ellipse.graphics.lineStyle(4,0x186B87);

[code]....

If I check the coordinates of that ellipse from it's transform property, I see that the top left is at 400, 300.

Code:
ellipse.transform.pixelBounds.topLeft.x
ellipse.transform.pixelBounds.topLeft.y

This seems fine to me as this position is in relation to the stage, yes? If I convert this to a position local to the container I get values ~0,0.

Code:
var stagePoint:Point = new Point(ellipse.transform.pixelBounds.topLeft.x, ellipse.transform.pixelBounds.topLeft.y);
var localPoint:Point = join.canvas.globalToLocal(stagePoint);

When the flash player window is resized, the coordinates change entirely. Instead of being at 400,300 the transform property indicates that it is at 640, 510. I assume this is because the viewport has changed, but the stageWidth and width properties of the stage do not change.

View 12 Replies

Flex :: 3 - Auto-sizing - Automatically Resize To Fit The Length Of The Content And Positioning

Jan 4, 2010

I am working on a flex app that uses XML templates to dynamically create DisplayObjects. These templates define different layouts that can be used for each page of content in the app (ie , 2 columns, 3 columns etc etc). The administrator can select from one of these and populate each area with their content.

The templates add one of 3 types of DisplayObject - HBox, VBox or a third component - LibraryContentContainer (an mxml component that is defined as part of the app) - which is effectively a canvas element with a TextArea inside. The problem that I am getting is that I need each of these areas to automatically resize to fit the length of the content but don't seem to be able to find an effective way to do so.

In the LibraryContentContainer, when the value of the TextArea is set, I am calling .validateNow() on the LibraryContentContainer. I then set the height property on both the TextArea and LibraryContentContainer to match the textHeight property of the TextArea. In the following example, this is the LibraryContentContainer, viewer is the TextArea and the value property of the TextArea is bound to this.__Value. v is the variable containing the content for the textarea

[Code]...

View 1 Replies

ActionScript 2.0 :: Top Right Dynamic Positioning?

Mar 8, 2007

how would you go about positioning a MC in the top right hand corner - a few pixels. And How to get it to stay even on Resize? to get it to stay in that corner so it moves with the screen resize?

View 2 Replies

ActionScript 2.0 :: Positioning The Dynamic MovieClips?

Jan 9, 2009

Been working w/ Flash for some time now, but mainly on the timeline and only a bit with AS. I am working w/ a tutorial:

[URL]

This particular portion of code is supposed to center the movieClip to the stage, but it is not working for me

target_mc._x = (Stage.width - target_mc._width)/2;
target_mc._y = (Stage.height - target_mc._height)/2;

I added some animation to it as well here:

var xScaleT:Tween = new Tween(movieClip, "_xscale", Elastic.easeOut, 50, 100, 3, true);
var yScaleT:Tween = new Tween(movieClip, "_yscale", Elastic.easeOut, 50, 100, 3, true);

And added this part just in case the tween was affecting it:

var xPosT:Tween = new Tween(movieClip, "_x", 0, (Stage.width - target_mc._width)/2, 3, true);
var yPosT:Tween = new Tween(movieClip, "_y", 0, (Stage.height - target_mc._height)/2, 3, true);

But it only fixes the centering on the y-axis.

View 3 Replies

ActionScript 2.0 :: Mac IE And Dynamic Image Positioning?

Nov 24, 2004

I'm using MX 2004 for a photographic portfolio project. The site seems to work fine on 99% percent of systems. Unfortunatley a strange error occus when viewing the site with IE on Mac OSX.I a dynamically loading images using LoadMovie and repostioning them so that they are centred. Sometimes with Mac IE the image doesn't get centred and is loaded with the top left corner in the centre of the screen as it would had the repositioning not happened.

This only happens sometimes and only with some images and with different images each time. I can reproduce the effect on my Mac but am stumped as to why it happens. I have ruled out the flash player version (it happens with them all) and have tried numerous export settings.Here's the code for the loading and repositioning and the link,

if (_root.image1loaded == false) {
//load image to empty movie clip
_root.images.createEmptyMovieClip("holder1", 1001);[code]...

View 5 Replies

ActionScript 2.0 :: Mac IE And Dynamic Image Positioning?

Nov 24, 2004

I'm using MX 2004 for a photographic portfolio project. The site seems to work fine on 99% percent of systems. Unfortunatley a strange error occus when viewing the site with IE on Mac OSX.I a dynamically loading images using LoadMovie and repostioning them so that they are centred. Sometimes with Mac IE the image doesn't get centred and is loaded with the top left corner in the centre of the screen as it would had the repositioning not happened.

This only happens sometimes and only with some images and with different images each time.I can reproduce the effect on my Mac but am stumped as to why it happens.I have ruled out the flash player version (it happens with them all) and have tried numerous export settings.Here's the code for the loading and repositioning and the link,

_root.images.createEmptyMovieClip("holder1", 1001);
_root.images.holder1.loadMovie("flashimagesmac/mike.jpg");
//loader[code]....

View 5 Replies

ActionScript 2.0 :: AttachMovie Dynamic Positioning Within A CreateEmptyMovieClip

Sep 2, 2009

In the current project for my schools interactive yearbook(new development). Im trying to create a grid table within a createEmptyMovieClip, by attaching a movie clip from the library, and populating it with an external xml, that i populate a few arrays too.

As of now im just trying to get the basic portion of it down. I see it as if i can create a "page" without having to dublicate the page, then i can easly do it with the multipul pages.

In a nut shell, when i publish my fla, i only get 2 images, when i should have 23, which is the number of childNodes that are in the external XML file...

Im going to attach my souce, and i'll point out the portion that im having issues with:

stop();
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

[Code].....

View 0 Replies

ActionScript 3.0 :: Why Menu Loses Dynamic Positioning

Jan 10, 2011

I am dynamically centering my menu movieclip using the code

Code:
top_menu.y = 0;
top_menu.x = top_menuXPos / 2;

[code].....

View 1 Replies

ActionScript 2.0 :: Dynamic Positioning Kills Timeline Tween?

Jan 20, 2009

I'm working on a banner ad project where we're trying to send dynamic variables from one of our servers to position a movieclip that simply slides in from offstage and then does a little bounce. My AS2 frame script at the beginning of the tween sets the _x and _y properties of the clip successfully. But that seems to destroy all the movement of the tween. In other words, when I set those two positioning properties on the clip, it just sits there and no longer slides in or bounces. I've tried a lot of different values, but they all seem to kill the movement of the tween.

View 0 Replies

ActionScript 3.0 :: Flash XML Array / Dynamic Text Box Positioning?

Jun 24, 2010

I am loading an XML file into several textboxes. Each group of textboxes is contained in a movieclip. There is a textbox in each group that varies in height and I want to put each movieclip underneath each other. So I need to get the height of the previous mc in my for loop so I can set the y position of the next mc. I am not quite sure how this is done, but here is my as3:


[code]...

View 1 Replies

ActionScript 2.0 :: Dynamic Positioning Of The Rollover Images In A Movie Clip?

May 10, 2006

i have a movie in which i have 50 thumbnails dynamically added to a mc and i have a scroller to scroll the mc which works fine.. on each thumb i have a rollover image (which is a bigger image of the thumb) which works fine but i want the rollover image to be shown within the area of mask area which is not happening now..

View 4 Replies

ActionScript 3.0 :: Resize Not Working For MovieClips On Stage?

Feb 18, 2009

Why the mc's are staying where I want them when you resize the stage?

View 2 Replies

ActionScript 3.0 :: Loader Resize Not Working In Distributed SWF?

Jul 5, 2009

I have recently created a game in Flash CS3 with AS3 which displays a random picture (this is a pretty integral part of the game).I have written a small procedure to resize the picture to an appropriate size for the flash application. This is as follows:

ActionScript Code:
function onComplete(ev:Event):void {
var maxheight = 240;
var maxwidth = 400;

[code]....

Here is where it is called, please just take for granted that d_arr[1] contains the correct URL of the image I want to load :-)

ActionScript Code:
var url = d_arr[1];
var urlRequest:URLRequest = new URLRequest(url);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);

[code]...

This resizes the picture when it is fully loaded. This seems to work fine on my own site, but on the sites to which mochi ads has distributed it, it doesn't resize the image at all, even if it is left to fully load.

View 1 Replies

ActionScript 3.0 :: Microphone Stops Working If Resize Application?

Jan 6, 2011

Well I have now managed to trace down the problem. It seems as the microphone stops working if I resize my flash application. In other words if I resize my flash application from its original size, the allow microphone dialogue is no longer displayed at the start of the application and the microphone remains muted.

View 2 Replies

ActionScript 2.0 :: Liquid Flash Not Working When Resize Scrollbars?

Apr 21, 2010

The floating elements stop floating on the y axis when javascript resizes the scrollbars.

It seems that when externalinterface calls the resize function that after that then flash uses that value as the Stage.height value.

I need a way for the scrollbars to be forced to accomodate 2000 px worth of content. But still have the elements float within the actual open browser window which could be much smaller than 2000.

View 4 Replies

ActionScript 2.0 :: Movie Clip Resize Not Working When Image Is Loaded

Oct 25, 2007

I'm having some strange luck in building an image slide show.I load the image paths into an array from an XML page and then step through the array elements w/ forward and back buttons.I have an empty image clip on the stage where I create an empty movie clip inside each time a new image is loaded.I load the image into the second movie clip like this:[code]Now, 98% of the time this works perfectly, but there is some certain times where the image resizing is completely ignored and the image gets loaded as it's normal size.Can anyone see why the image sizing get's ignored in some instance?

View 1 Replies

ActionScript 2.0 :: Video Resize Metadata - FLV Scrubber Stops Working

Feb 26, 2010

All this code works properly, however when I include the part which controls the video resize metadata the scrubber stops working... (see the section between the ">>> <<<").

Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(2);
ns.onStatus = function(info) {
[Code] .....

View 2 Replies

ActionScript 3.0 :: Flash Website Event.RESIZE Isn't Working In Windows 7?

Sep 28, 2010

Is anybody else finding their flash website event.RESIZE isn't working in Windows 7?My website works fine when I run it at home in Vista, however at work in Windows 7 it just does not work and I have no idea why???! Essentially the bit that says portfolio works should stick in the top right corner on resize and the mute and sound button in the bottom left.

View 9 Replies

ActionScript 3.0 :: Dynamic Resize Of Array?

Dec 13, 2009

I have a mc which needs to resize based on whats "in it" (lol, sorry) heres my code, can anybody assist..thnx

OH, currently mc is what would contain the "childrens"

import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.motion.easing.*;

[Code].....

View 0 Replies

ActionScript 2.0 :: Dynamic Text Box Resize?

May 3, 2004

Alright, this question has been sort of asked, but my case is a tad bit different, as I have searched the forum and haven't found the right answer.I need to resize a dynamic text box to its contents. I know about the TextField.autoSize property, but what I need is only a vertical resize, not horizontal. I tried just doing autosize and then setting the width back to the original width, but it didn't work, and in any case it will most likely make the text malformed.

View 12 Replies

Professional :: Resize A Dynamic Textfield To A Particular Height?

Mar 19, 2010

Using the flash authoring tool, I want to resize a dynamic textfield to a particular height.However, it will not allow me to size the textfield smaller than a height that will fit all of the (multiline) text. How can I override this and make the height smaller so I can use scrollbars?

View 5 Replies

ActionScript 2.0 :: Resize Dynamic Loaded Images?

Aug 15, 2010

i'm trying to resize dynamic loaded images, they are loaded from a xml file into a existing movieclip in _root. When I try to resize using _height and _width the images just don't show in the swf. I searched the forum and found that _xscale and _yscale works, but I really need to resize the image with _height and _width

View 4 Replies

ActionScript 2.0 :: Resize And Reposition Dynamic Image?

Dec 4, 2006

I'm currently building an application that allows users to "import" uploaded images into the FUI and move them around to place them where they want. I have three seperate sections where they can do this and each section has a different maxWidth and maxHeight... What I'm trying to accomplich is to be able dynamically bring the image in resize it so that it fits within the _root.maxWidth and _root.maxHeight, while constraining the proportions, THEN I need it to be be placed (if needed) within the boundry of the section they are importing the image to...

I'm grabbing the image via the tree component and continuing from there... here is my code.

Code:
myTreeDataProvider = new XML();
myTreeDataProvider.ignoreWhite = true;
myTreeDataProvider.load("tree_source.xml");
myTreeDataProvider.onLoad = function() {

[Code]...

View 7 Replies

ActionScript 2.0 :: [MX] Resize Border To Fit Dynamic Image?

Apr 9, 2004

I have a background with a border that is behind dynamic images. I am trying to resize the background to custom fit each jpg that is loaded. However, I cannot get the width/height from the movieclip the jpgs are loaded into and I can't get the width/height from the jpgs.

Here is what I tried:

setProperty("_root.serve_contents.photo_button.pho to_background_image.subpages.photo_examples_bg", _height, getProperty("examples/photo/event/amcel_medium.jpg", _height));

[Code]....

View 1 Replies

Actionscript 3 :: Build A Dynamic Resize-able Flash Player?

Nov 9, 2009

Morning stackers! So my question today isn't dealing with any code, but how to go about this the correct way from the start. I have a video player built to a static size (max: 800x600) which I'll have to re-code every time I need it to be a different size. What I need it to do in the near future is dynamically resize itself and all the elements inside of it based on 1 width variable that it will received either from HTML or XML. Now to me there are 2 ways to go about this:

Start with the smallest size possible and resize upwards, but I'm unsure of how the Flash movie will actually expand upwards as of right now.
Or 2, start with the largest size possible (in this case 800x600) and size everything down. Step 1, I think seems to be the better way to go about this (ala YouTube style), but Step 2 also seems like it could be the easier way? A friend of mine mentioned that I should go with the larger size and have elements resize in each class, then fix to the upper left hand corner. However for the player to fit inside of certain div columns on sites, blogs whatever he said that there will have to be an HTML/CSS side of this... meaning that the div containing the resized flash player will have to cover up the areas of the Flash movie that are not to be shown? Is that possible to put a 800x600 flash movie into a div that smaller then 800 pixels wide? And cover it up with another div?

View 2 Replies

ActionScript 2.0 :: Dynamic Text - Auto Resize Of Font

Oct 21, 2010

I have dynamic text field that must be a fixed width and height. The actual text that will populate the dynamic text field is variable. What I would like to do is to reduce the font size if the text does not completely display within the text field's dimensions. How I can accurately perform this? Also, I am using AS 2.

View 2 Replies

Actionscript 3 :: Auto-Resize Dynamic Text Font?

Jun 22, 2011

I have dynamic text field that must be a fixed width and height. The actual text that will populate the dynamic text field is a variable. What I would like to do is to reduce the font size if the text does not completely display within the text field's dimensions.

View 2 Replies

ActionScript 2.0 :: Dynamically Resize Dynamic Text Boxes?

Dec 7, 2005

I've figured out how to pull text from the database with ASP and populate it in an array that uses looping duplicating movie clips to display.

But.. If the text is longer than the movie clip that is duplicating it gets cut off and the next one in the loop is duplicated below it.

View 4 Replies







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