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


Similar Posts:


Actionscript 3.0 :: Positioning MovieClips From A Loop?

Sep 6, 2009

Im working on an Xbox Live flash gamercard. Ive ran into a problem. I can't position each of the MovieClips ive genereated from the loop. I get the error:

Code: Select all1120: Access of undefined property rpg0.
1120: Access of undefined property rpg1.
1120: Access of undefined property rpg2.

[code].....

View 1 Replies

ActionScript 2.0 :: Duplicating And Positioning Movieclips Loaded From An Xml

Jan 24, 2005

I'm working with a script that loads from an XML some jpgs, these ones once loaded move to their positions.

[Code]....

the problem is that i would like put all these movies well aligned in rows and columns, i've seen it's possible to do this with a nested for.. loop, something like this

[Code]....

View 3 Replies

Actionscript 3 :: Positioning Nested Movieclips Based On Stage?

Aug 12, 2010

I have multiple nested movieclip in its own different movieclip, and i would like to arrange them accordingly. My idea was to use the localToGlobal function. I can get the position of the MC on stage, but how do I use the function and place the MC based on stage?

cAPos = new Point(objectA.y);
newcAPos = objectA.localToGlobal(cAPos);
cBPos = new Point(objectB.y);
newcBPos = objectB.localToGlobal(cBPos);
objectB.y=objectA.y+objectA.height <-- based on stage

View 1 Replies

ActionScript 2.0 :: Adjust The _x And _y Area Positioning Of This Set Of Duplicate Movieclips?

Jun 25, 2003

how can I adjust the _x and _y area positioning of this set of duplicate movieclips? 710 x 143 are the dimensions I would like the duplicateMovieClip to take place, but it is not the positioning. How can I fix this?

[AS]
duplicateMovieClip (flower, "mc"+i, i);
setProperty ("mc"+i, _x, random(710));

[code].....

View 11 Replies

ActionScript 3.0 :: Flash Fullscreen Screensaver - Positioning Unscaled MovieClips

Aug 30, 2010

I am making a fullscreen "screensaver" project (using screentime, FYI). I have some mcs on the stage that I want to scoot down to the bottom left, right or whatever on the screen. I want these elements to position themselves differently based on the users resolution and aspect ratio of their monitor. (for example: whether the monitor is 800x600, 4:3 OR 1366x768, 16:9, I want a text field or mc to be 10 pixels for the bottom and left of the screen).

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 :: 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 :: 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

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 :: Manage Dynamic Images Into Dynamic Movieclips?

May 25, 2010

I'm getting crazy with this error and found no solution until now. Well, the issue consist in create dynamic movieclips and external jpgs into a for loop through xml nodes and add the respective image into that movieclip.

[Code]...

View 1 Replies

ActionScript 3.0 :: Dynamic Movieclips From Xml

Jul 7, 2008

hi, below is some code I am using to load buttons from an xml doc, the xml part is working and the buttons are place on the stage. I am having trouble with accesssing the individual movie clips. in the function showtitle you will see the error messages I get. I am assigning the names a0, a1 and a2 to the movieclips if I use a trace statement in marker it gives the movieclips names as being a0 a1 and a2..

[code]...

View 2 Replies

ActionScript 3.0 :: Remove The Dynamic Movieclips?

Nov 9, 2009

I've created an XML thumbnail gallery, and would dearly love to add a simple looping preloader animation to each of the thumbnails whilst they are still loading. I'm struggling to remove the preloader movieclip, once the corresponding image has been loaded.

I'm currently creating the new movieclips within the loop, so I'm having problems referencing them in the following load complete function. I gave naming the "spin_loader" instances a go (i.e. spin_loader.name = "spin" + i), and then trying to remove it in the "thumbLoaded" function ( i.e. project_mc.removeChild(getChildByName("spin" + spinNum)), where spinNum is the equivalent number to "i"), but I just can't seem to crack it.

Code:

function createThumbs()
{
for (var i:Number = 0; i<my_total_project; i++)

[code]....

View 2 Replies

ActionScript 3.0 :: Nesting The Dynamic Movieclips?

Dec 8, 2009

I want to create dynamic movieclips inside another dymanic movieclips.Here's what I came up with:

Code:
function prepararConteudos():void
{
for (var j:uint = 1; j<=numMenuWeb; j++)

[code]....

I'm adding a child to "fundoConteudo_mc" with the instance "mc_contentor", which works fine. But when I try to add a child to "mc_contentor" i keep getting the "A term is undefined and has no properties" error.

View 2 Replies

ActionScript 1/2 :: Using Dynamic Names For MovieClips

Jul 3, 2009

I am trying to simplify things by using dynamic MovieClip names. I have three MovieClips on the stage.

1) mcPage1
2) mcPage2a
3) mcPage2b

But my code isn't working. I'm guessing the "this" part is what is messing it up. Thinking that the computer doesn't know which MC is "this". It traces fine outside the function, but inside the function it traces undefined.[code]

View 2 Replies

ActionScript 3.0 :: Creating Dynamic MovieClips?

May 30, 2011

After a click event I want to dynamically create 2 movieclips with the sequential number in their name, e.g. mc_001 & mv_001 so that I can 'link' them together later on.How can I create a movieclip with a dynamic name?I am trying to use this at the moment:Code:var movieclip["name"+dynamicNumber]:MovieClip = new MovieClip();I can't use an array unless someone can tell me how to access it across multiple classes...

View 6 Replies

ActionScript 2.0 :: XML To Dynamic Text Box (with MovieClips)?

Feb 1, 2006

i've been working on a project based on this tutorial: [URL]it's an interactive/searchable bibliography. Search for an author, get a list of papers all writen by that author. in this list of results, i want to add a button linking to a pdf. i've done projects in the past linking to pdfs via .exe/.bat files but never dynamically. i've learned how to add <img src> code to link to library movieClips, but i can't figure out how to add functionality to said movieClips. is there a tutorial, where i could learn how to have the XML file tell flash not only to add a specific movieClip, but how that movieClip behaves (ie - which pdf to link to).

View 6 Replies

ActionScript 3.0 :: Create Dynamic MovieClips From Xml?

Feb 1, 2009

the code places 10 movieclips on stage and gives them name ranging from snipper1 to snipper10, now I want to display in each movieclip the correct image and tekst, which is given by the XML file, so for movieclip snipper 1, image snipper1.png and tekst Theme1 should be displayed.p.s. Does it make sense to import the XMLNode and XMLNodeType class for this purpose??I have this code:

Code:
import flash.xml.XMLNode;
import flash.xml.XMLNodeType;

[code].....

View 4 Replies

ActionScript 3.0 :: Dynamic Variables For Movieclips?

Mar 25, 2009

How do you do something like

["button"+num].gotoAndStop(2)
eval("button"+num].gotoAndStop(2) doesn't work either?
Also how do you do _root.?

[code].....

View 2 Replies

ActionScript 3.0 :: Adding The Dynamic MovieClips?

Apr 26, 2009

I am trying to construct a MENU with 5 buttons and a dinamyc instance for them (to manipulate later ) so i am having some problems..

// vars
var allButtons:int = 5;
var espacing:Number = 10;
var navBar:MovieClip = new MovieClip();

[code].....

View 3 Replies

IDE :: Load Dynamic Array Into MovieClips?

Feb 9, 2010

I have a flash file with about 32 empy MovieClips on the stage.Basically what I need to do is take an array of images and load them into these empty MovieClips. Hope this makes sense so far.This array will be dynamic and will come from a PHP file.The problem is I'm not sure how to do this? I don't know to take an array in flash and allocate the images to individual MovieClips.

View 1 Replies

ActionScript 2.0 :: Dynamic Text In MovieClips?

Feb 28, 2010

I have a dynamic text box in a movieclip called ScoreText. On the root timeline I have a variable called "Scorevar". I used "ScoreMC.ScoreText.text = Scorevar;" to display the score, however it won't change. It just stays at zero.

View 1 Replies

Error #1009 - Dynamic MovieClips Don't Work

Jul 13, 2009

im practicing on how to do websites in flash cs4 using AS3.0, so im doin a basic dynamic test website, all the codes seem to be fine because i dont get any compilers errors. but one Error that is driving me nuts is the Error #1009 which says.

[Code]....

View 1 Replies

ActionScript 2.0 :: Dynamic Variable Inside Movieclips

Jan 21, 2011

I recently started learning Flash and Actionscript and now I'm trying to write an actionscript for the first time. Im doing this in Actionscript 2.0.I have a movieclip that consists of two images and one dynamic text field with a variable. The name of the images are "VS1_P1_RUN" and "VS1_P1_OFF" and the name of the dynamic text field is "pumptext". In the dynamic text field I have the variable "VS1_P1_Ind". VS1_P1_Ind is probably a boolean variable as it shows 1 or 0 in another program but in Flash it shows True or False (not sure if Flash thinks it's a text/word or a boolean).My script is supposed to display the image named VS1_P1_RUN if the variable of the dynamic text field pumptext shows the text True and it goes like this:[code]

So I'm completely stuck in what to do. The bottom code works as it should but I want the images to show depending on the value of the variable VS1_P1_Ind. I thought just changing the text field to dynamic and typing the variable name in the variable field would do it but no.If it could be a clue to the solution I'll also share that the value of the variable is not seen/shown in textfield while inside the movieclip. Creating a dynamic textfield outside of the movieclip shows the value of the variable just fine, True/False.

View 1 Replies

ActionScript 2.0 :: Dynamic Text Inside Movieclips

Mar 27, 2011

I am trying to make hitsplats that are activated when I hit an "Attack" button on my main layer. I have placed a Dynamic text box with the variable Hitsplat and I made an animation with stop(); on the first frame, having it off of the stage. what can I do to activate the hitsplat, and change the number in it, to the damage being dealt by the button? [code]hitsplatmc would be the movie clip containing the dynamic text I wish to become the dmg and move upward. I am assuming the problem lies with the fact that _root.hitsplat lies in another MC.

View 1 Replies







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