ActionScript 3.0 :: Moving A Shape Made By Graphic Class Drawing?

Oct 7, 2011

I drew a line (stepVoltage) in a fla using the graphics class. Once drawn, I want to move it to the right in an update function, but am having trouble. I tride just moving the line with statements like stepVoltage.x = newX; stepVoltage.y = newY; but this didnt work. Then I tried to delete the previous line and draw a new one with a clear () function (see below) but this blocked the next drawn line from showing up.

The code:

var stepVoltage:Shape = new Shape ();
stepVoltage.graphics.lineStyle(2,0x000000);
addChild (stepVoltage);

[Code]....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Drawing A Simple Shape In Class?

Oct 13, 2009

This is my first meeting with the Shapes; which don't seem cooperating, at all. Following is the Class code:

Code:
package
{

[code]......

View 2 Replies

ActionScript 3.0 :: Duplicate MovieClips Made By Flash Drawing API

Jan 12, 2012

I have this current simple setup:

- MOVIECLIP1, with more than 30 run-time drawing shapes that modify on enterframe.
- and MOVIECLIP2, wich should contain an exact copy of MOVIECLIP1 drawed data.

The point is that MOVIECLIP2 will be as a "reflection" or "shadow" of movieclip1. I won't need to do any interaction with it, only apply filters. Is there anyway that this can be possible - rather than having to draw the same shapes twice on both movieclips?

View 4 Replies

ActionScript 2.0 :: Moving A Clip Made From CreateEmptyMovieClip?

May 9, 2004

I can't seem to move a clip I created with the createEmptyMovieClip() function. the trace shows the _x and _y changing but nothing on the screen moves an inch. I have tried searching and found some threads but nothing that helped stuff about making sure the _root and what not was specified correctly. If you have some time test my code (will run in just a new fla

Code:
//draw a dashed line
function dashed_line(width, xy, size, spacing, weight, color, alpha) {

[code]......

View 3 Replies

ActionScript 3.0 :: Get A Graphic From Movie Clip Without Drawing It

Aug 15, 2009

I've tried hitTestPoint(x,y,true) but then I realized that it works fine only with vector graphics (for my .png image the resault was tha same as hitTestPoint(x,y,false) - so it was unacceptable). Then I tried hitTest function from a BitmapData class like this:[code]is it possible to get a graphic from a movie clip without drawing it (it is not necessary for me to check colission)?Then, having this bitmap (transparent png file) i tried to use hitTest function:[code]

View 1 Replies

Moving Graphic Over Webpage

Apr 2, 2009

I know how to animate with Flash, and I know the basics of Actionscript 2.0 enough to make simple games.I have a project to do which I wanted to do with Javascript/CSS, but instead I'd like to hone my Flash skills to do it.If someone could point me in the right direction that would be awesome! I'm making an image move in a path about a web page without regard to other content on the page.I was thinking that I could make a Flash vid with a transparent background and lay it over the page.If so, how do I make a transparent background? If that's not the solution, can I even do this with Flash?

View 2 Replies

ActionScript 3.0 :: Drawing Shape And SetChildIndex?

Mar 7, 2011

I'm making an android air application for school, a sketch app.But I'm facing an annoying problem, when I'm drawing I can draw over my bar and my menu, here's some code:

[code]....

--> so this is the function for drawing a shape on stage the shape is declared as

Actionscript Code:
public static var brushDraw:Shape = new Shape();

now the problem is that I can draw over my menu and everything. Putting the setChildIndex of brushDraw to 1 doesn't work, it gives some error...

View 1 Replies

Actionscript 3 :: Create A Shape Using The Drawing API?

Mar 20, 2011

How can I create such a shape using the Drawing API? where red means filled and white means not filled

View 1 Replies

Flash :: Drawing A Shape With Circles

Oct 22, 2011

The issue I am having is how to tackle forming a logo using circles. I have done one letter manually, however it would take forever to do this with every single letter, and so I am asking here if anyone knew of a faster method. Requirements:

- Has to fill non-circular letters(i.e. does not have to be precise, but look like it has edges)

- Circles have to animate in, therefore they need to have drop shadow and seem like they are landing in place

View 1 Replies

ActionScript 2.0 :: Make A Self-drawing Shape?

Oct 23, 2003

how to make a self-drawing shape with actionscript

View 2 Replies

Make Button Follow Moving Graphic?

Aug 7, 2010

I have made a simple Drag and Drop map, where its the map being dragged by the mouse. The thing is, i need to have a grid of buttons on this map, which you can click. But since im dragging the actual map, my buttons wont follow. They stay where they are.An example would be the united states world map, then each state is a button i can click. A problem would be that if the entire map is covered in buttons, then my mouse cant drag the background map as im selecting a button when i drag. perhaps i can make the buttons drag the map instead?This is the code for dragging the map:

Code:
Map.addEventListener(MouseEvent.MOUSE_DOWN, grabMe);
Map.buttonMode = true;[code]..........

View 1 Replies

Professional :: Moving A Graphic Across The Stage, Using A Png Image?

Mar 15, 2011

I am trying for moving a graphic across the stage, using a png image of a vehicle created in photoshop. Top to bottom travel takes 2 secs and stage is 767 pixels height.24fps is default and I have timeline at 48 frames long.Test movie sees very noticeable jerkiness in the motion, I expected one smooth movement up the screen, I sort of see two windscreens etc. Now I seem to recall that 25fps in video editing sees smooth motion as the human eye cant't perceive individual frames at that rate. What should I be doing to get a png to run smooth ?I tried doubling the fps and timeline length, it got a bit better, I kept doubling such and each time it improved, I hit the limit at 120fps. Its acceptable now but that seems wrong to have to do that, Timeline is going to be massive as actual movie to be 20 secs. Are there settings to be made somewhere to smooth things and use 24fps ?Png is 20kb, background image is 1.28Mb as a png. Envirographics

View 5 Replies

ActionScript 3.0 :: Drawing Border Around Arbitrary Shape?

Feb 12, 2009

Is it possible to draw a border around an arbitrary Shape (or Sprite) dynamically with ActionScript? From the IDE is really easy, just select the line color and click the Shape with the paint tool (S).

View 3 Replies

Professional :: Drawing Strokeless Shape With Pen Tool?

Sep 26, 2011

Is it possible to draw a strokeless shape with the pen tool (as in Illustrator)? It is quite tedious to have to go back and remove strokes from my shapes.... especially since I can't see how to do it without clicking on each segment and hitting "delete"!

View 2 Replies

ActionScript :: Drawing An Image In The Center Of A Shape?

Oct 20, 2011

I'm trying to draw an image in actionscript, I set it as a BitmapFill within a rectangle. The problem is that if I move the rectangle away from the origin(0,0), in my case I start drawing the rectangle at (20,35), the bitmap background doesn't follow along. The background is always drawn at (0,0) and then repeated, so I don't get a centered image but rather 2 halved images. Here's what my code looks like:

public class PageTileRenderer extends VBox
{
private var sp:Shape;

[Code]....

how to move the background fill origin. Or is there another solution to draw the image centered.

View 2 Replies

ActionScript 2.0 :: Drawing In MX Confined To Shape (not Square)

Jun 7, 2004

I've found a similar thread to this but my problem's a little different.I've never used the drawing function on Flash and I followed the fairly simple tute on it just recently.Is there any way to confine the drawing area to a specific shape. Mine's a rectangluar shape that's rotated. You can download my FLA with the background image here > url...I'd like to try and keep it confined to the notepad area.I think it might be a hitTest thing with if/else. My other thing would be to just rotate the notepad so that it's straight.Even still i'd like it confined to the area beginning with the corner of the notepad, not the corner of my movie.

View 2 Replies

ActionScript 3.0 :: Shape Tween 2 Drawing Object Using It Alone?

Oct 28, 2009

I have 2 shapes, in different color, and i would like to have this effect ( see the attached file ).

How can i achieve that by using pure actionscript 3, or using source like TweenLite, TweenMax etc...

View 4 Replies

Flash 9 :: Actionscript Viewing - Converting A Graphic To A Symbol Or Drawing A Pentagon On The Stage

Oct 8, 2008

Someone told me once that every function in Flash has some associated actionscript being executed behind the scenes, e.g. converting a graphic to a symbol or drawing a pentagon on the stage. This person also told me that there is somewhere in which you can view said ActionScript as it's being executed. How can I do this? I deem such a feature necessary to do the projects I have been given, especially having very little experience with AS.

View 1 Replies

Professional :: How To Animate Resizing And Moving Of Graphic Symbols

May 29, 2010

As the title says, how do you animate the resizing and moving of graphic symbols without making the other objects go invisible? I'm using Flash CS4. Here are the bizarre, unexplainable problems I've had before. First of all, here's my basic scene. It's 6 rectangles and 8 half-circles. [URL]. First thing I tried doing was applying a Classic Tween (since Motion Tween did nothing and Shape Tween was disabled). However, what that did was turn every object in the entire work space into one giant object for no reason at all, which certainly isn't what I wanted. [URL]. What I realized is that in order to avoid having all of the objects merged into one, I had to create a brand new file first. [URL].

Next, I added in a blank keyframe and a Classic Tween while the workspace is still empty. [URL]. Then finally copy/paste the objects into the first frame from the first file: [URL]. Now I paste those shapes again into the target frame and resize one of the diagonal shapes: [URL]. Then I moved that rectangle to a new position: [URL]. However, when I preview the animation, only the animating object shows up... everything else is invisible. [URL]. Also, if I try moving a different object, the rectangle will start spinning for no reason. [URL]. How can I animate this object without making everything else go invisible and keep the object from spinning out of control?

View 1 Replies

ActionScript 3.0 :: Drawing Irruglar Shape With Rounded Corners?

Jan 7, 2010

i have been tasked to create a rollover state that has dynamic irregular shapes that surround the movieclip target. The target is always a rectangle and the shapes will look roughly like:I think i will have to draw this old school without using the easy predfined shape classes. I first thought about doing two rounded rectangles to fake it, but the line cross over (pointing green arrow) will overlap. Anyone have ideas on how to approach this? If i go with the drawing api, is there a formula to working out the rounded curveTo angles on the corners to always be the same radius?

View 2 Replies

ActionScript 2.0 :: Using Drawing API Shape To Mask Another Movie Clip?

Nov 16, 2006

I have a movieclip that contains code for an API drawing shape. I can use it to mask a movieclip containing an image but not a moviclip that contains a dynamic gradient.

Code:
// CREATE MASK SHAPE WITH DRAWING API
// create empty movieclip

[code].....

View 3 Replies

ActionScript 2.0 :: Drawing In MX - Confined Area For Specific Shape

Jun 7, 2004

I've never used the drawing function on Flash and I followed the fairly simple tute on it just recently. Is there any way to confine the drawing area to a specific shape. Mine's a rectangluar shape that's rotated. You can download my FLA with the background image here > [URL]. I'd like to try and keep it confined to the notepad area. I think it might be a hitTest thing with if/else. My other thing would be to just rotate the notepad so that it's straight. Even still I'd like it confined to the area beginning with the corner of the notepad, not the corner of my movie.

View 2 Replies

ActionScript 3.0 :: Drawing Pill Shape Mask - Cannot Adjust Linestyle

Aug 31, 2011

I'm trying to draw a mask that's a pill shape but I can't seem to adjust the linestyle properly.
Code:
import flash.display.Sprite;
var pill:Sprite = new Sprite();
pill.graphics.beginFill(0xFF0000,1);
pill.graphics.lineStyle(1,0x000000,1,false,"normal","round","round");
pill.graphics.moveTo(0,6);
[Code] .....

View 3 Replies

ActionScript 3.0 :: Drawing Flow Chart Predefined Process Shape

Sep 21, 2011

Im giving a action script for drawing a predefined process shape that is used in flow chart. There are action script to draw a square, rectangle, circle and triangle. Can anyone in the forum give code for drawing the shape.

View 1 Replies

ActionScript 3.0 :: Rectangle / Trapezium - Drawing Bitmap Data Into Shape

Aug 8, 2011

If I draw a rectangle or trapezium, how might I go about drawing bitmap data into that shape? I need to give a slight perspective to a loaded photo. Native 3D rotations seem to leave the bitmap really blurry, and a full 3D engine is too heavy for this project.

View 3 Replies

ActionScript 2.0 :: Moving Graphic X Axis Only Threw Mouse Move Code Check?

Jun 2, 2003

basically this is the code i got from a kirupa tutorial and i just want the graphic to be moved on the x axis

onClipEvent (enterFrame) {
getlimits = _root.normalpic.getBounds(_root);
//get the limits of the normal pic movie

[code].....

View 3 Replies

Flash - Export A Drawing Made In Flash As A Transparent Png?

Jun 17, 2009

export a drawing made in flash as a transparent png in actionscript I know you can do it as a jpg with a white background but can you export the transparency?

View 3 Replies

ActionScript 2.0 :: Drawing Without Moving The Mouse?

May 24, 2005

What I'm trying to build is what you could call a scrolling drawing board - just like a drawing board but when the mouse comes close to the edge of the window, it scrolls and lets you continue your drawing. I have no problem creating a drawing board with API, but i can't make it scroll. Usually when i want to scroll a background image i make it move along with the mouse when the cursor is near the edge of the window (for example, if the mouse's coordinates are above a certain number, the background image starts moving in one direction so it "scrolls" in the other direction). So i wanted to do this with the movieclip of the drawing in a drawing board (make it move according to mouse's coordinates near the edge of the window), but when i scroll i have to stop the mouse at the edge of the window because i cant go any further :p so the drawing moves but it stops drawing. Or maybe what i need is some way to draw even when the mouse is not moving.

View 5 Replies

Flash :: Moving Symbol Around Drawing Objects?

Jul 3, 2010

I have imported a lot of paths from an Adobe Illustrator document right into a flash file. The paths exists as Drawing Objects inside the scene. Using pure actionscript, how can I move a symbol following each of the lines, without using predefined Motion Guides.

EDIT: I've attached the Flash file, full of drawing objects.

http:[url]....

The question is: Are these drawing objects accessible through AS3 or I should convert them to symbols / whatever format necessary.

View 3 Replies

ActionScript 2.0 :: Moving An Object Created With Drawing API?

Sep 26, 2009

This is one of those things that seems like it should be really simple but doesn't work.

I'm trying to create a movieClip using the drawing API, but once I do so I can't get it to move with ActionScipt. My code looks (basically) like this:

Code:
drawBox = function (options) {beginFill();
lineStyle(blah);
moveTo(blah);

[Code].....

View 2 Replies







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