Professional :: Changing The Origin Of The Stage?

Aug 13, 2010

This question has been raised in other forums as one of "moving the stage," and the solution seemed to be that the stage cannot be moved, only the components of the animation can be moved. That solution does not work for my situation (I am using CS4) where moving a motion path causes the shape off an object to be altered.Perhaps I can pose the question this way:The stage initially has origin (0,0) and the size of the stage is measured from that point. Is it possible to change the origin to, say, (-100, -200), which, in effect moves every object on stage 100 pixels to the right (because the stage has moved 100 pixels to the left) and 200 pixels down?

View 3 Replies


Similar Posts:


How To Change Coordinate Origin In Flash Stage

Jan 16, 2010

I think I did this before but can't find the code. Flash as many other graphical frameworks use the top-left corner as the coordinate origin (0,0) because it's how the underlying memory model is by convention. But it would be really simpler for my calculations if the origin was in the center of the stage, because all the game revolves around the center and uses a lot of trigonometry, angles, etc. Is there some built-in method like Stage::
setOrigin( uint, uint );
or something like that?

View 2 Replies

ActionScript 3.0 :: Resizing .swf Window Causes Stage Size And Origin?

Feb 14, 2011

When I create a little .swf file with actionscript it will run correctly in whatever stage size I choose for the document.  However, I want the display to update when I change the window size that the .swf is running in as it is running.  It does some resizing as I drag the corner of the .swf window, but not correctly.  I actually put the statement:
graphics.drawRect(0,0,stage.stageWidth, stage.stageHeight);into the code, and it is not drawing the origin at the corner of the window (among other problems).  Is this a bug in Flash, and/or is there some way around this  When I put the window back to its original size, it displays correctly, and this is happening for all stage sizes and aspect ratio

View 2 Replies

Professional :: Changing Color Of An Object On Stage During Runtime?

Mar 4, 2010

I was wondering if there is a way to change the color of an object during runtime.

View 1 Replies

Professional :: Dynamically Changing Stage Size On Runtime

Mar 31, 2010

I need to change the stage size dynamically. When I try to do this?
size_mc.onRelease = function(){
trace(Stage.height);
Stage.height += 100;
trace(Stage.height);}
It comes always the current stage size.

View 3 Replies

Changing Stage Size Dynamically?

Dec 10, 2009

I am doing one completely dynamic interface which is control by an admin module. what i want to do is to control the stage size by this admin module.When i press submit in the admin module it will generate one xml file which is connected to the flash flie, and what ever the size is mention in that xml that has to reflect in that flash file. I don't want any supporting file only one swf. I don't know whether it is possible to adjust the stage size dynamically on fly.

View 3 Replies

Changing Order Of Movieclips On Stage?

Nov 21, 2010

I have some movieclips on my stage that are there via timeline. I also add movieclips on stage using addChild.

What is the best way of changing the order of the movieclips because they overlap sometimes? eg.

mc_a is on the stage already
mc_b is called on stage using addChild

Can I change the order of mc_a using script even though it was already on stage?

Can I remove mc_a off stage using script?

How do add mc_b under mc_a so that mc_b does not overlap mc_a?

View 2 Replies

ActionScript 3.0 :: Changing The Background Of The Stage?

Aug 24, 2008

What the best way is to add or change the background image of the stage.

View 2 Replies

ActionScript 3.0 :: Changing The Stage Size?

May 27, 2011

I am importing 4 SWFs from one SWF. I load them in, and addChild them, every 20 seconds. So the first one will be visible for 20 seconds, then I will remove that, and addChild the second loaded SWF, etc. One SWF is 350x200, but the other 3 SWF's are 700x500. If I addChild the 350x200 SWF, it will be surrounded by the huge 700x500 stage size which can't happen for this project. Do I need to change the stage size?

View 2 Replies

ActionScript 3.0 :: Changing Image In A Stage?

Feb 25, 2012

I have these classes: Main Class, Button Class, and ImageHolder Class..In evertime I click the button class, the image in ImageHolder class will change..i have a button name apple, when i Click it, the image will be apple.i have a button name mango, when i Click it, the image will be mango.

View 6 Replies

AS3 :: Changing Stage Variables From Within A Movie Clip

Feb 2, 2012

I want to change variables on the main stage's code from within a movie clip.

Say for example, I want to change a variable called 'chair'

In AS2, this is how I would do it:

(on the main stage)

Code:
chair = 2;
(in the movie clip)

[Code].....

But all I get is a 1119 error saying 'Access of possibly undefined property chair through a reference with static type flash.displayisplayObject.'

View 3 Replies

Actionscript 3 :: Changing The Stage Size During Runtime?

Mar 23, 2012

Can we change the stage size during runtime?

I need to change the size of the stage dynamically during the runtime when the swf receives a flashvar from the html page. Can this be done?

View 2 Replies

ActionScript 2.0 :: FMX- Changing Stage Height Dynamically?

Jun 27, 2004

how to change the height of the stage dynamically, with ActionScript. Is there a way to change the height of the stage with a pixel value? I don't want to scale down the whole movie just make the stage bigger, just like when you change it manually in Modify-Document.

View 9 Replies

ActionScript 2.0 :: Changing Stage Height Dynamically?

May 28, 2005

is it possible to dynamically change the height of the stage?I am using 'dimensions: pixels', and 'noscale' as publish settings. What I would like to do is, when the height of a movieclip gets bigger (because of its dynamically loaded content), to make the 'stage.height' bigger too, so you can scroll more downwards.

I know stage.height is read-only, but it would be nice to have just the right amount of space at the bottom of the page, depending on how high the movieclips are. Reading back, I wonder if i state my question clear, hopefully I use the right terminology.so if stage.height would work i would like to do something like:

Code:
stage.height= MC._y+ MC._height +30;

View 1 Replies

ActionScript 2.0 :: Changing Colour Of Clips On Stage?

Oct 25, 2006

I have 20 odd little swfs, each of which will be loaded into a body swf at one point or another.Each of these contains anywhere between 4 and 20 single-colour buttons. What I need is for each of them to simply change colour when rolled over/out. The naming convention is just b1,b2 etc depending on how many said buttons are in each clip.

Code:
this.i = 0;
while(this["b" + (i++)]) {[code]....

View 3 Replies

ActionScript 2.0 :: Changing MovieClip Color On Stage

Aug 30, 2011

I have a problem, no I already have the code and here is what I am using (MC is the original movieclip on the stage while MC1 and MC2 are child movieclips within MC)

Code:
var ob1color = new color("_root.MC.MC1");
var ob2color = new color("_root.MC.MC2");
ob1color.setRGB(0x00FF00);
ob2color.setRGB(0x00FF00);

That code works perfectly fine it's just that if I animate MC1 and MC2 within MC it doesn't work I would have to group those 2 into a seperate movieclip called MC3 in order for the animation to work. I mean it's great I found a way around it but is there anyway to NOT have to have that MC3 in order for the animation to work? Because working with so many Movieclips can get so annoying this is my hierarchy.

Code:
[Stage] > [MC] > [MC3] > [MC1 MC2 animation]
That MC3 is an un-needed movieclip other than to work the animation. Is there any way I can fix that? I Also have to change the code to look like this
Code:
var obcolor = new color("_root.MC.MC3");
It's looking like you can't apply a color change AND animate an object.

View 7 Replies

ActionScript 2.0 :: FMX Changing Stage Height Dynamically

Jun 27, 2004

I'd like to know if anyone knows how to change the height of the stage dynamically, with ActionScript.Is there a way to change the height of the stage with a pixel value?I don't want to scale down the whole movie just make the stage bigger, just like when you change it manually in Modify-Document.

View 9 Replies

ActionScript 1/2 :: Dynamically Changing The Height And Width Of Stage?

Jun 3, 2009

how can I change the height and width of stage dynamically. I tried it with the following code:
 
Stage.height = 250;
Stage.width = 250;
 
during the run time. Initially the Stage is at a height and width of 370 and 450 respectively. Also when I tried to trace the height and width of Stage after resizing the stage width and height, its showing the old value of width and height. That means the width and height not chnaging.

View 5 Replies

Changing Order When Loading Images In As AddChild On Stage?

Jul 30, 2010

I have a movie on stage that acts as a button using the code. person_mc.buttonMode = true;

I load an image onto the stage from my library using addChild(holiday);

What happens is that the person_mc button I have on stage will not function anymore, because I am presuming it is underneath the holiday pic when I loaded it using addChild.

How do I load the holiday pic, so that it is underneath the person_mc?

I know I could do what I did with holiday using addChild for the person_mc, but I do not want to do it that way.

View 3 Replies

ActionScript 2.0 :: Drag CheckBox To Stage And Changing Width?

Oct 27, 2010

I can drag a checkbox to the stage and change the width in the property inspector and it works fine. If I target the width when attaching it dynamically, the whole box and label get skewed.

View 0 Replies

ActionScript 2.0 :: Changing Frame Inside A Movieclip From The Stage?

Aug 21, 2011

I was wondering if it's possible to change the frame of a movieclip (present on the stage) by going on a certain frame or clicking a button in the main movie, if you get what I mean. Let's just say I want to go to frame 2 in movieclip "Symbol". Also, would it be possible to do the opposite and go to a frame in the main movie from a movieclip?

View 9 Replies

ActionScript 2.0 :: Changing Frame In MC With Button On Main Stage?

Oct 24, 2006

I have one button and it's primary role is to stop all sounds in the project when triggered. It is just positioned on the main stage in the main project, not inside of a MC.

I then have a very simple music playing system (4 buttons, one for each song) in it's own MC which displays text of the artist and title song when respective buttons are pressed.

This works fine, apart from the fact that when I click the 'stop sounds' button the text is still displayed from whetever the last song was that had been playing.

I was thinking there must be a simple method of incorporating an actionscript function into the 'stop sounds' button, so that when it's pressed it also takes control of the movie clip and moves it to the first frame which doesn't display any of this text.

I was thinking of a simple gotoAndPlay command followed by something, but I don't know the command to tell Flash where to find frame 1 of this movie clip rather than just frame one of the whole project.

View 3 Replies

ActionScript 3.0 :: Changing Stage Timeline From Inside A Movieclip Button?

Jan 1, 2010

I create a movieclip button, and I want to change main timeline from it. what should I do ?
 
Is it useful to use MovieClip(root).gotoAndPlay(Is there any other way to change main timeline?

View 6 Replies

ActionScript 3.0 :: Changing A Boolean Inside A Movieclip Via The Main Stage?

Jan 24, 2011

I have a movieclip and within it is a bit of actionscript and a couple of different movieclips to make it function like the button on a ball point pen (you click it and it stays clicked until you click it again).
 
var booleanClick:Boolean = false;
var colorTransform:ColorTransform = optBox.transform.colorTransform;
optHitState.addEventListener(MouseEvent.CLICK, onClickHandler);
function onClickHandler(myEvent:MouseEvent){

[Code].....
 
I don't want to get deeper into this monster of a project without making sure this is working first. Is my boolean working and just my trace statements aren't worded right or is my method to change the boolean wrong?

View 1 Replies

ActionScript 3.0 :: Changing A Variable In A Class From A Movie Clip On The Stage

Jan 14, 2012

I'm trying to change a varialbe in a seperate class from inside a movieclip that I have on the stage in the timeline, but the variable I'm trying to change keeps coming up as null instead of what I am trying to change it to. How is this usually done?

View 6 Replies

ActionScript 3.0 :: Changing A Childs Index Makes It Not Remove From The Stage?

Jan 8, 2010

I have series of frames with stuff on them. Normally you can go through, and flash automatically removes them each time.

But if I setChildIndex, it remains on the stage permenantly and won't clean up. Is there anyway to tell flash to be able to remove it again?

View 3 Replies

ActionScript 2.0 :: Replicate The Effect Of Dynamically Changing The Stage Size?

Mar 1, 2004

i'm looking to replicate the effect of dynamically changing the stage size based on the size of the movie that is being loaded in it.

View 14 Replies

ActionScript 1/2 :: Publishing File - Content - Resizing The Stage Or Changing The Settings

May 7, 2011

I have edited the pageflip script and file to suit what I need to do and my issue is not related to the usual addition of pages or content etc... but is to do with publishing the file. I have increased the sizes of the page from what they are in the original file and this is where the issue lies because when I come to publish the file as an exe the content no longer seems to fit the window when published and you have to expand the viewer. The instructions for quite a lot of the pageflip is there and pretty easy to decipher however outputting/publishing the file seems to be unclear.

Can somone please point me in the right direction for resizing the stage or changing the settings so that the published file shows all the content without the need to resize the window?

View 1 Replies

Flash - Why Do EventListeners Stop Working After Manipulating The Z-property And Changing Stage.quality

Sep 16, 2011

Currently one of our teams suffers from a very strange phenomena: after manipulating the z property of a MovieClip and changing the stage quality some event listeners of nested MovieClips seem to disappear (or at least not react to the proper events any longer).

The problem also only appears when doing both, changing the stage quality and manipulating the zproperty.

Here is a simple class demonstrating the issue:

package {
import flash.display.StageScaleMode;
import flash.display.StageAlign;
import flash.display.Graphics;

[code]....

View 4 Replies

ActionScript 2.0 :: Origin Point Of Movieclip?

Jul 26, 2010

Can anybody tell mw what is the origin point of the movieclip.

View 1 Replies







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