Professional :: Place Ruler 0,0 Anywhere On Stage To Measure From?
Feb 1, 2011
I have two artworks on stage which have a common shape within the artwork. I need to make the one I have just added to stage fit the prior one by getting that common shape the same size for both. In Freehand I would drag the junction of the two rulers out onto stage to the left edge of the item, to create a zero point from which to take a measurement. I would drag a guide out to the right edge and read from the info panel an x value, thats my width, or double click the guide to get a reading from the guides palette. Repeat that for the other artwork then get a calculator and divide one measurement by the other to work out the scaling factor I need.
How in CS5 Flash does one place a ruler zero point on stage ? I can drag guides out, but how do I make the left hand guide to be zero ?
Since Flash doesn't allow you to specify exact coordinates to place guides, I wanted to create a command to "fit guides to stage". When manually dragging and watching the "Info" panel, you always end up skipping pixels, causing you to zoom way in for precise coordinates.
I can't seem to find (and it's possible it doesn't exist) a way to place guides on the stage using JSFL.
how can I change my rulers' zero points on the stage? In Photoshop I just drag new points from the top left corner, but that doesn't seem to work in Flash. This is very useful for me, e.g., setting "0" at the center of the stage, or quickly measuring some space.
P.S. Where's the email alert button on this Forum's posts?
I was wondering if I can draw a straight line along the edge of a ruler that I make that students can manipulate (drag,rotate, etc.)
Let's say that I ask students to draw a line on a grid that has a slope of 4 and a y-intercept of -2. In a Flash file, they would manipulate the ruler to where the line would be drawn. Let's say the ruler is where it should be. They then press a button to initiate the drawing function.[code]...
I've been working on my new flash site for a few weeks, along with learning AS3, tackling problems as I encounter them and I've learned a lot...but sometimes the simplest things I cannot figure out for the life of me.
All I am trying to do is have some flash banner SWF files I created play within the portfolio page of my site. I don't want them to open in a pop up or anything just play within the page when the link on my site is clicked. I figured it would act like a movie clip and I could just drop it onto the stage, but when I do that it doesn't look right, loops continuously, and is not interactive.
In this .swf where can I place the stage color? I am using the[url].... and it made the stage color black? Which is suppose to be #999 .HERE IS THE CODE SCRIPT:
I was wondering if I can draw a straight line along the edge of a ruler that I make that students can manipulate (drag,rotate, etc.) Let's say that I ask students to draw a line on a grid that has a slope of 4 and a y-intercept of -2. In a Flash file, they would manipulate the ruler to where the line would be drawn. Let's say the ruler is where it should be. They then press a button to initiate the drawing function. Can the edge of the ruler be used to help them draw a nice, straight line ... the mouse not drawing over or under the ruler???
if i make say a button in my timeline, convert it to a button. and then remove it from the stage (it is still in the library) in my exeternal .as file how can i then place that movieclip on the stage? i know how to do this within the timeline, but not when it is an external .as file.
The player controls the character with their mouse - it follows their cursor. I'm trying to make an environment continually scroll from the right hand side of the screen to the left - much like in Canabalt (click to see). I've been trying to do this with tweens, but it doesn't seem like it's going to be the most efficient way of doing it... Plus Flash keeps dying on me whenever I try to do it.
I have a couple of background images, and then I have objects in the foreground that the player is going to destroy by mousing the character over them. How do I get Actionscript 3 to place instances of movieclips on the screen at certain points, and make them to scroll from the right of the screen to the left? I have a lot of different movieclips to use, so it'd also be great if they could be removed from the stage once they reach a certain point.
what i'm trying to create is a map system with pan and zoom functions similar to google maps. that part is easy. what i'm having trouble with is figuring out how to scale the coordinates at the top and left of the map.so if at 100% my map is viewable from mile 0 to mile 99 (numbers are only for the sake of example) then when i zoom in on the center to 150% i would need to show coordinates from mile 25 to mile 75 ... i think if that example is not clear just look at flash or photoshop. when you zoom in just look how the ruler around the stage changes with the zoom level.
I have made many small swf files for each section of my website. The problem is now I want to club them all together to avoid breaks and showing of the loader at inappropriate moments, I know that was poor planning on my part. I want to know I can place an external swf onto the stage, so that it gets loaded with the main swf. As in, I don't want to call a loadMovie or loadClip
I just noticed that when you place a text field on the stage using code:
Code: var texter:TextField = new TextField(); texter.defaultTextFormat = new TextFormat("Impact", 68, 0xffffff); texter.text = "890";
[code]....
It does not look the same as a text field that I placed on the stage in the Flash editer. The text created by code has very harsh edges, but the other text has smooth edges. How can I get my code TextField to look like the editor Text Field?
Basically I have manually built these MC's onto the stage. I want to delete one of them when an event is complete.
Here is how it looks. Keep in mind it doesn't work at all. I guess the catch is that these MC's are manually placed on stage I get an error msg: 1120 access of undefined property.
I want to load some mcs randomly on the stage, except for a footer area at the bottom of the stage. Is there a way to exclude just a certain part of the stage using something like Math.random()*Stage and then specifying the bottom 300 pixels as off limits?
I'm using the whole stage because the swf is embedded 100% across the browser, so I can't restrict the dimensions.
Code: onClipEvent (load) { x = this._x=Math.random()*Stage.width; y = this._y=Math.random()*Stage.height; }
I've been working on this for over 3 hours and it is about to drive me crazy! I was one of those people who never paid attention to math in high school because i thought i would never use it ( i knew i wanted to be an artist/designer of some sort). But now of course, that attitude is coming back to haunt me. I'm using a for loop to place several objects on stage. I need a formula that will space objects along the x axis evenly, and center all the objects on the stage. Kinda like if you use the align panel in flash to distibute the vertical centers of several objects to the stage, if that makes sense. If there is only one item, it should be directly in the center of the stage. If there are 2, it should place them in the center of the 2 halves of the stage, and so on for howeve many objects there are. I also want a buffer of about 25 pixels on either edge of the stage so that no object is ever on the very edge of the stage. I made a simple diagram to illustrate:
Just wondering How I would place the Flex button component on the stage with actionscript and make it execute a function when pressed...this is easy in MXML:
I have a movieclip which is added to the stage every second at a random place.i want all instances of this movieclip to move to the postion x=100px and y=200px on the stage at a rate of 5px.im not sure how to code this, i would like the code to be in as3 if possile as i do not know as2.
My requirement/need is the AS3 code for placing any type of Component(viz., Button, CheckBox, ComboBox, ListBox, radiobutton, Slider, Scrollbar,Label,TextField, etc.,) on the stage with desired width,height, X and Y parameters(values) which we mention in "Properties" tab of Properties Window in flash. Hence, What i need is, (say)a generic ActionScript 3.0 method/function, which places any of the components present in "Components Panel" onto the stage. the function prototype or signature may be like this:
function addComponent(int <width>, int <height>, int <XPos>, int <YPos>)
t is a general query i think so. i.e., A basic programmer's task for defining a function for my requirement.I think,if I want to add a Button onto the stage at 100,100 pixel position and the button component's width and height are 50,50 respectively, (i.e., button.X=button.Y=100 && button.width=button.height=50).So, a button must be placed at 100,100, then, the sample code looks like this:
Button <btn_instance> = new Button(); //creates Button instance <btn_instance>.addComponent(50,50,100,100);// properties of button.
I have this footer image, that I want to align to the bottom of the stage, however I'm getting errors. As you can see I have an ADDED_TO_STAGE listener in the constructor function.
I want to be able to create and place objects on the stage dynamically and remember their location. I'm guessing the best way would be saving the object type and location in an array? Just wondering if there is a better way before I start coding.