Actionscript 3 :: Make A Flash Shape's (x - Y) Coordinate Relate To Not Its Starting Point But Its Location On The Frame

Feb 14, 2012

Alright, so I've been struggling with this one since last night. When I create a new object (a new unit), and draw it to the screen (Flash does all the work there), the point at which it's first placed is considered its origin. That is, getX and getY will return the distance from that point... Why is that? Or how can I stop this?

[Code]...

View 2 Replies


Similar Posts:


ActionScript 1/2 :: Make An Object Tween From Its Starting Location To The Location Of A Mouse Click?

Apr 27, 2009

I am trying to make an object tween from its starting location to the location of a mouse click. I have a script, but it has a very annoying ease to it.I would LIKE the object to mantain a certain speed during while traveling from its starting location to the mouse click location.

View 16 Replies

ActionScript 1/2 :: Finding The Minimum Y Point In A Complex Shape In A Given X Coordinate?

Dec 1, 2010

Iīd like to know if itīs possible to find a minimum y point (where the shape ends) of a shape, in a given x coordinate.
 
Example: I have a complex shape like a big "S". Suppose the "S" minimum x coordinate is 0. How can I find the minimum y point of the "S" (again, where the shape ends) in the x coordinate of 14?
 
Here is the image: I need to find the y coordinate (or point) of the blue point in the image. 

View 11 Replies

ActionScript 2.0 :: Random Key Frame Starting Point In Slide Show?

Jan 13, 2009

I have a image slideshow set up on a time line. Each image is on a different layer and I am looking for a code to make the flash animation start at a random key frame every time the page is loaded. Here is a link to the site I am working on:

[URL]

View 1 Replies

ActionScript 3.0 :: Make Shape Rotation At It's Center Point?

Jun 14, 2011

I draw a shape,like follows:

var shape1:Shape;
shape1=draw();
addChild(shape1);
shape1.rotation=50;

[Code]....

Then I want to rotate the shape at it's center point(200,202) by using shape1.rotation=50,but I find the shape don't rotate at the the center of it's shape. How to realize the function which make shape rotate at its center point?

View 4 Replies

ActionScript 2.0 :: Movieclip To Move Along The X-axis To A Certain Point And Then Back To The Starting Point Again?

Apr 12, 2007

It's been a long time since I've done any work with actionscript, and alas I've forgotten nearly everything. I've tried to look for a tutorial that would explain basic animation with actionscript, but the one that I found on Kirupa was no longer there.

Basically I'd like to do this:On the stage I have a movieclip and I'd like the movieclip to move along the x-axis to a certain point and then back to the starting point again. The moving speed of the movieclip should also be adjustable.

View 8 Replies

Professional :: Make A Circular Dial, Point At The Mouse Position While Staying Locked To It's Location?

Jul 23, 2010

I trained on flashMX back in the day and haven't done anything since so now I've got CS5 it's a bit like being at school again! I have a circular dial sat in the middle of the screen with an arrow placed on it's edge. How do I get the dial to rotate so it always faces the mouse pointer?

View 7 Replies

Actionscript 3 :: Change The Starting Point(x Second) To Load Flv With Flash Player?

Jun 23, 2010

I want to use flv files for help document. But i need to set flv file, start and end points with code.

I'm trying to code flash player which can take these parameters(file name, start, end points) from html parameters.

NetConnection, NetStream and Video components are that i'm using. But i couldn't change the starting point to load flv.

View 1 Replies

Actionscript 3 :: Setting X Coordinate From Mouse Location

Jul 28, 2011

i have a darkBlueRect rectangle sprite and a copy of the same sprite with a larger scale and a lighter color - lightBlueRect.i'm attempting to shift the location of the lightBlueRect according to the mouse.x location when the mouse is moving over the darkBlueRect. this way if the mouse is on the right of the darkBlueRect than the location of the scaled up lightBlueRect will be on the opposite side and shifted towards the left proportionate to the mouse position and scale. in addition, the lightBlueRect must appear "locked" to the darkBlueRect so lightBlueRect.x must never be more than darkBlueRect.x and lightBlueRect.x + lightBlueRect.width must never be less than darkBlueRect.x + darkBlueRect.width.

[code]...

View 1 Replies

Professional :: Find A Child's Location In Parent's Coordinate Space

Jul 21, 2010

I've created a map of Montana counties. Each county is a seperate MC withing the larger parent clip (allcnt_mc). When a county is clicked on, I'd like to center that county on the stage and zoom to its extent. The challenging part has been telling the parent (allcnt_mc) where to tween to. Since each individual county is a child of the parent, they have their own coordinate space referencing that of the parent.

Is there a way I can query the location (x,y) of a child in the parent's coordinate space? With this number, I could calculate the distanct between the parent's current reg. point and that of the child, indicating the distance that the parent would have to move to be centered on the stage. I was trying to use localToGlobal but could not figure out how to use it.

[Code]....

View 8 Replies

ActionScript 2.0 :: Make Shape Tween Stop At A Certain Frame?

Aug 9, 2009

I currently got a movieclip. On the timeline of the movieclip i've put a keyframe on frame 100, so that my movieclip is 100 frames long.On the stage I got a 100px wide red square as BG and on top of that a copy of the 100px square just in blue (my shape tween).What im basically trying to do is having the 100px blue square act as a percentagebar. So when I do something like:

ActionScript Code:
percentagebar.gotoAndStop(50);

The shape tweener should tween from frame 1 to frame 50 (with 50 representing 50%).

View 9 Replies

Flash - Color Under A Point Or From A SHAPE?

Mar 19, 2011

I am using flash as3.I have some shapes I have drawn on the screen. They are made using:

graphics.beginFill(0x00ff00);
graphics.drawRect(0,0,50,50);
graphics.endFill();

to draw them. Each shape has a different color for fun (different beginFill).How can I get the color of the shape under the mouse pointer as I move the mouse around the shapes?I see two choices so far but don't know how to do either of them: Get color under the mouse point get the color from the shape properties (preferred)how to do either of these...

View 3 Replies

Flash :: Check Whether Line From Point(x1,y2) To (x2,y2) Intersects This Shape?

Mar 11, 2011

Given a MovieClip containing a vectorshape (loaded from the library) - is there a way to check whether a line (from point(x1,y2) to point(x2,y2) intersects this shape?

View 1 Replies

Point Of Starting And Ending Of A Line?

Aug 23, 2009

I have problem in fixing a starting and ending point of a drawing line, looking for assistance

View 18 Replies

ActionScript 3.0 :: Starting Video From Cue Point?

Oct 12, 2010

I have a video that I don't want the beginning of, I know how to set the Cue Points but I am not very familiar with ActionScript 3.0 and would like to learn some code to start my video out at a cue point so I can put this video inside another flash video.

View 0 Replies

ActionScript 2.0 :: Randomizing Animation Starting Point?

Sep 3, 2009

I'm working on a services module (slideshow for lack of a better term) for an accounting firms website - site is still under construction at On the home page, far right hand column a grey box with a service icon and user controls progresses thru the five services until the user advances the slide manually.I need to randomize the starting point of the slide show using one of the five services. To complicate the matter further I need to weight them so some services show up more often than others. But randomizing with equal weight would at least be a start.

View 1 Replies

ActionScript 2.0 :: JSFL / Commands Starting Point?

Apr 8, 2007

Maybe I just such at searching.tell me where I should start for researching the following.I want to create a "command" (JSFL i think) that has a stored AS in it so when I run the command it will type the AS in the AS panel.

View 3 Replies

Flash :: Draw A Line From A Point To Opposite Tangents On A Circle? Cone/wedge Shape?

Apr 15, 2011

This should be a bit of simple geometry: How do I calculate the points to draw the lines in the code below so that it makes a 2D cone or wedge shape?

import flash.geom.Point;

//draw circle
var mc=new Sprite()[code]...........

UPDATE:I should have mentioned my aim is not to draw a wedge shape, but to draw a line from a random point to the edge of an existing circle.If you're more comfortable with algebra than actionscript,

View 5 Replies

ActionScript 3.0 :: Modify LineTo() And CurveTo() - No Starting Point

Mar 31, 2009

LineTo() and curveTo() provide basic level drawing. However, the lines these functions produce look like they were drawn by the line or pen tools. Is there any way, through either existing functions or through modifying current ones, that I could made the drawings done through actionscript look like they were drawn using the brush tool?

My first thought was to see if this was in default actionscript and could not find it. My second was to see if someone had already created the class, and while for a time I thought someone had, I lost the link . I guess I could always create the class myself, but I honestly have no starting point (like what algorithm flash uses to create its brushstrokes) and don't want to waste my time if something similar is already in existence.

View 2 Replies

Media Server :: Starting Point Of A Video Stream?

Feb 27, 2010

I have been trying to do this locally on my machine by using the download simulator but the simulator doesnt seem to work especially when I give the player a 2GB file to load over a 14kbps connection, the file seems to load within a split second and absolutely no buffering occurs.My problem below needs to be answered before I can persue and purchase and set up a web server to run FMS as a production server, but understandably I do not want to do this until I know it is possible to do what I want to do.

Let say I have put a 60min video on the server which I want to stream. But I only want to stream the last 20mins of it. Am I able to set the player to stream from the last 20mins and for there to be no progressive download required before? I need the stream to start almost immediately from the start of the last 20mins and for it to continue plaing until the remainder of the video completes  So essentially I only want to load a part of the movie into a stream and disgard the part of the movie I do not want to show.

View 1 Replies

ActionScript 2.0 :: Tween Class - Change The Starting Point?

Jun 4, 2007

this might be an easy question but i have not found the answer. i want a MC to move vertically upwards and then stop. i have the code below but this tweens downwards. i tried changing the -30 value but it doesn't seem to change the starting point. import mx.transitions.Tween; import mx.transitions.easing.*; var xPosT:Tween = new Tween(kText,"_y", Bounce.easeOut, -30, 56, 3, true);}; xPosT.onMotionFinished = function() {};

View 3 Replies

ActionScript 2.0 :: Ending _y Position Based On The Starting Point?

Aug 19, 2008

i know the pythagorean theorem for figuring out distance between 2 points.

what i don't know is how to take that equation and determine another aspect based on 2 different bits of data.

figure out the ending _y position based on the starting point, the initial angle and the ending _x position??

View 1 Replies

ActionScript 1/2 :: Video Playing From Starting Point When Play After Pause

Oct 7, 2011

if i click 'Play' Button video playing normally, after i click 'Pause' button video pause, next i click 'Play' Button video playing from starting point. what is the problem
solution pls...... Code:

[Code]...

View 2 Replies

Actionscript 3 :: Calculate The Location Of Points In A Rotated Shape?

Jan 9, 2012

I am creating a game in which I draw a series of polygons by creating points around a radius of a cricle.

Later on I rotate the shapes and I need to calculate the new location (X,Y) of the points based on the rotation. I have the Old XY of each point, the XY of the center of the shape, radius of shape and the rotation.

Have a look at my diagram of the problem.

View 2 Replies

ActionScript 3.0 :: Get X , Y And Z Positions Of A Point In A Shape?

Jan 5, 2010

Is there any way to get the positions of points in a shape on stage at runtime? for instance a triangle, is there any way to get the positions of the 3 points that make the triangle?

View 2 Replies

ActionScript 3.0 :: Flash Button Events Frame Location?

Nov 17, 2010

I am developing a multiple choice question answer. I have a movie clip in frame 2 where the radio buttons and question choices are displayed.I am trying to define a event for the radio button in the movie clip's first frame. But i show questions in random order. Say for example the first question to show is fifth I move the movieclip to 5th frame. The event is not firing since it is declared in the first frame.

View 1 Replies

ActionScript 3.0 :: Shape And Reg Point Inside A Parent?

Nov 24, 2009

draw a shape on the stage, make it into a movieclip, registration point wherever, tl is fine, name it mc, and put his code:

trace(mc.getChildAt(0).y);

now get inside a movieclip and move that shape around (away from registration point) for example above registration point, or wherever and output will always be 0.

View 6 Replies

Flex :: Adobe Flash Builder: Make A Function To Play Embedded Video Starting From One Second And Ending In Another?

Apr 16, 2010

Adobe Flash Builder: How to make a function to play video starting from one second and ending in another? So I havein MXML simple video player tag. I need some function to play that video from second X to second Y and pause it. How to do such thing?BTW: we asume file is embeded into SWF.

View 1 Replies

CS3 : Starting MC Frame Other Than 1?

May 19, 2011

Is there any way to make a movie clip start at a frame other than 1? I know with graphics it's simple, but with MCs I'm not sure. If possible, I'd like to do it without code, but if that's the only way to do it, I'd like to know that way too.

View 1 Replies

Flash :: Position 2 Movie Clips On The Stage That Relate To Each Other?

Nov 20, 2010

I'm a bit rusty of my trig, so I'm not sure the best way to do this ... I need to position 2 movie clips on the stage that relate to each other they can't be nested ,the registation points are in the center, assume "clip B" is 50 px to the left of "Clip A" as pictured in the diagram to the left , when "clip A" is rotated, I need clip B to follow ( still 50px ) away but with new _x and _y relative to the rotation of "clip A" as in the diagram right.

View 2 Replies







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