Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Getting Moveto,lineto,etc Points From Vector Image


ok, heres a question for you all. if i where to draw an image in the flash IDE ... for example, an arrow, is there anyway to get the points from flash in order to make it programatically? (and yes, i've already done it manually - holding the mouse over each point.) what i am looking for is raw vectors.

-E




KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 08-24-2006, 04:24 PM


View Complete Forum Thread with Replies

Sponsored Links:

MoveTo And LineTo
Hi,

I'm using the functions moveTo and lineTo to plot a line graph. The thing is, the graph appears ontop of everything else and stays there even when I change frames. How can I get it to appear behind certain objects and to only appear on a certain frame?

cheers,

dwo

PS: I'm using the call

_root.createEmptyMovieClip("graph", 2);

and plotting the lines inside this movieclip using

with (_root.graph) {
moveTo(a, b);
etc
}

View Replies !    View Related
LineTo And MoveTo
ok hi all..
first of all lets post my AS here


PHP Code:



_root.createEmptyMovieClip("lijn", 1);
_root.lijn.lineStyle(2, 0xFCE443, 100);
var from_x = _root.a._x;
var from_y = _root.a._y;

var to_x = _root.b._x;
var to_y = _root.b._y;


this.onEnterFrame = function() {
if (_root.block.hitTest(_root.lijn)) {
_root.lijn.lineTo(to_x, to_y);
_root.lijn.lineTo(to_x, 100);
// trace("test");
} else {
_root.lijn.moveTo(from_x, from_y);
_root.lijn.lineTo(to_x, to_y);
}
}




i have made 2 MC's calles a and b and a block.
a line will be created from a to b but if something blocks the line, let the line go arrouund the block.

have no idea how to do this..
would be very very thankfull if someone could help me..

View Replies !    View Related
MoveTo, LineTo
hai guys,

i m just trying to draw a square using "moveTo" and "lineTo", but i m not able to understand the parameters of this command, i.e , how give the x value and y value, can any body clearly explain how to draw a sqaure using these command

thx
maggi

View Replies !    View Related
[help] LineTo , MoveTo, Clear()
I have a clip that I want a line to go from to where the mouse is? This is what I am using and it does that:
code:
createEmptyMovieClip("Line", 1);
w = 1;
c = 0x000000;
a = 100;
Line.lineStyle(w, c, a);

onMouseMove = function () {
line.moveTo(start._x, start._y);
line.lineTo(_xmouse, _ymouse);
};

But, it doesn't remove the previous line, it adds a new one. I searched this topic but I can't seem to use the clear() properly. Any help would be great. Thanks.

View Replies !    View Related
LineTo/moveTo Buggy?
I'm drawing some very simple shapes, but keep running into problems with lineTo and moveTo. They don't seem to respect the co-ordinates I give them. I've reduced the problem to the following:


Code:
var shape:Shape = new Shape();
shape.graphics.lineStyle(1,0x000000);
shape.graphics.moveTo(99,99);
shape.graphics.lineTo(99,0);
shape.graphics.moveTo(99,99);
shape.graphics.lineTo(0,99);
addChild(shape);
In my world of logics this should draw two connected lines. It doesn't. The pixel at 99,99 is missing.

See demonstration at http://gathering.itm.mh.se/~joepal/bug/Demo.html

If I instead do


Code:
var shape:Shape = new Shape();
shape.graphics.lineStyle(1,0x000000);
shape.graphics.moveTo(99,0);
shape.graphics.lineTo(99,99);
shape.graphics.lineTo(0,99);
addChild(shape);
then the lines connect, but this only works as long as all lines are actually possible to draw in a row, which isn't the case in my drawing.

Can anyone explain this phenomenon? Are the locations of lineTo and/or moveTo exclusive somehow?

(I'm compiling the above with mxmlc used directly on the .as source file if it makes any difference)

View Replies !    View Related
[F8] Drawing (lineTo, MoveTo, Etc) Withing An Mc?
I have an image generated with lineTo and moveTo calls, but so far I can only get it working if I draw to the root stage; I'd like to be able to draw just within an mc. And I'd rather not have to set arbitrary boundaries mimicking an mc because I have the same mc on multiple frames with different perspectives, so I'd have to change everything for each instance.

View Replies !    View Related
Plot Pixel/point - MoveTo/lineTo Etc Flash4/5
Hi All,
I'm new to flash actionscript, and am learning with flashMX...I was reading on the internet that drawing lines, using moveTo(..) and lineTo(..) only works with Flash6, is this true?
Is there another way to plot simple pixels and draw simple lines using dynamic actionscript for flash4 and 5?

Thanks,

Ben

View Replies !    View Related
Trigonometry - Drawing API - Find Rotated Points X,y With Radians. LineTo
First I would like to say thanks to everyone for keeping this a great forum. I have been comming here for years to ask questions and post answers, and I am always happy with the time I spend here.

PROBLEM:
I need to rotate a drawing API object BEFORE it is drawn. Rotating the clip will not work in my situation. (I am writing source for a PDF file with the help of blazePDF component). I have tried a dozen ways with radians, cos(r*len), atan2, etc. I cannot get the trig correct. I have made a small example below, with a very basic shape. The var "r" being passes to the method needs to facilitate rotating the object. All of the lineTo(x,y) points need modified based on the radians.

Will someone more versed in Trig lend a hand? Thanks for any help you could offer.

--mm


Code:
// draw a box that is rotated 45 degrees
var r:Number = 45*(Math.PI/180);
drawBox(r);
/*
* Draw a box
*
* @paramrA number in radians to rotate the object
*/
function drawBox(r:Number){
_root.createEmptyMovieClip("pdf",1);
pdf.lineStyle(2, 0x0000FF, 100);

pdf.moveTo(100,100);
pdf.lineTo(200,100);
pdf.lineTo(200,200);
pdf.lineTo(100,200);
pdf.lineTo(100,100);

}

View Replies !    View Related
Tweening Vector Points?
So I have been trying to learn Flash on and off for years, and this is one thing I have never understood.

Let's say I have a 180 px X 20 px rectange with a dashed outline. Over about 20 frames I want the rectange to grow from 20 px high to 300 px high. The way I would THINK it would work would be to simply create a keyframe 19 frames later, drag my vector points down to the desired height, and then tween the frames inbetween.

Unfortunately, it doesn't work this way. How else would I do something like this? It seems like it should be easy. Same thing goes for any shape really where all I want to do is animate the points moving around.

View Replies !    View Related
Flash Adds Vector Points
Hi,

In the process of animating a shape I noticed that Flash likes to add vector points to shapes. I made a circular object out of 4 anchor points and when I moved it to another location and selected it again it had 8 anchor points.

I tried Optimizing it but the shape remained with 8 points.
Also tried changing the Editing Preferences with no luck.

Is there a remedy to this? I'm trying to make the shape transform into something else and don't want to manipulate more points than I need.

Some help or at least a comment that I have to live with it would be appreciated.

Thanks

View Replies !    View Related
Vector Points/shape Tweening
1 - how does flash deals with variable number of vector points when creating in between shapes/images between to drawings. say we have a drawn line that flash has defined with 20 points, and a second drwn line that flash has defined with 5 points. what happens to the missing points. and in the reverse case, 5 in the first line, and 20 in the second. how again does it deal with the different number of points in corresponding each line

2 - how does flash "decide" which vector point from the first line corresponds to which one on the second one? is it solely by it's position?

3 - why aren't "hints" attached to vector points?

4 - what information is included in a vector point apart from the position?

View Replies !    View Related
Shape Tween Vector Points
i would like to understand (if possible) how flash deals with shape tweens?
does it try and recognize shapes in order to find what it's common between two shapes or does it more simply try to establish a link between vector points according to the closest corresponding position?
is there no way of, say, switching off the attempt of shape recognition?
why aren't hints automatically attached to vector points within a same layer?
thx - p

View Replies !    View Related
[CS3] Adding Image Object Causes LineTo Lines To Disappear?
I am playing with the spline code from nuran.org, but whenever I try to add what I believe to be a background image, the lines connecting the nodes get covered up. However, if I manipulate the image so that it doesn't cover the entire frame the lines will show up in the exposed areas. Is there a way to send an image to the back of an animation dynamically?

View Replies !    View Related
How Do You Make An Image A Vector Image?
yea the title pretty much say it all, but how do you vectorise and image??

View Replies !    View Related
Vector Image
Is there a good progy to use to convert a pic into a vector so that it will resize well with the flash movie itself?

View Replies !    View Related
Vector Image
hi guys

i am using illustrator and i want to create a vector of the image..which is a set of dj earphones..i have no idea how to do that. the reason for this is that i want to import it into swift 3d and create a rotatating image. i just don't know how to vector the image.

thanks in advance

View Replies !    View Related
Vector Image
I want to take an image object from a fla that i created and put it onto a website, but only that image not the whole screen.
Is there a way to export it?

View Replies !    View Related
Rip A Vector Image From Swf... ?
Hi all...

Was just wondering if anyone can offer some advice. I have built a movie which creates images by randomly putting clips all over the stage (generated on mouse click) I would like to be able to generate a composition and then save it as a scalable vector image (rather than hitting printscreen and getting a 72 dpi raster)

Because the compositions are actionscript generated, none of the built in export options in Flash help.

Any 3rd Parties or tricks guys?

Thanks in advance....

View Replies !    View Related
Convert Image To Vector?
Hi folks, complete flash idiot here... Can someone tell me if there is a way to take a jpg or gif and convert it to a vector graphic? I want to be able to use it in a swish project... Possible? Thanks very much!

View Replies !    View Related
Export Vector Image In RGB
I have problems with exporting a Vector composition to a vector image format with the same RGB colours. Whatever I do, currently the eps/ai files are all in CMYK. Is there any way to overcome this problem? Thanks a lot !

View Replies !    View Related
Bitmap To A Vector Image ?
can anyone tell me how to change a bitmap into a vector graphic using flash mx
i am familiar with photoshop but still at the newbie level with flash mx..
i would like to learn how to do this a tutorial or any help would be great.
is it possible to trace and image or bitmap and recreate it in flash as thats what i am trying to do.

thanks.

View Replies !    View Related
Vector Image Handling
Hey guys and gals,

Does anyone know how vectors are handled within a SWF flie? I know that sounds vague.. Let me try to ********-

If I have a USB plotter (like a vinyl cutter), and I were to print from a SWF, as long as I have the appropriate print drivers, will it see the vectors as actual vectors, or will they be converted to bitmaps?

I hope that's clear enough. I'd be more than happy to elaborate if this is way to vague of a question.

View Replies !    View Related
GetPixel() From A Vector Rather Than Image?
Hi, I have found a good tutorial on how to "getPixel" from a bitmap image, but I can't figure out how to do that from a Vector drawing.

Basically I've drawn a "height-map" in vector, so when my character walks around I want actionscript to know which height-map-pixel he (his registration-point) stands on so that I can determine his depth.

So is there any way to do getPixel (or something else) with a Vector, or am I forced to make my depth-map with a bitmap instead?

Attached is a example of the background I want to paint depth into.

View Replies !    View Related
Vector Image Of The Continents
hi,
hope this is in the right forum.
has anyone got a vector image of the continents? or even the globe (but especially just the continents)?
cheers
- D

View Replies !    View Related
Help: Vector Image Published Weird
Howdy,
This is probaby a piece of cake for someone. I can't figure it out. Why in the hell is the "slider" (the tilted oval) of the volume slider .fla (attached file) distort when it is published?

Notice in the .fla the "slider" graphic is smooth and looks great. When I publish the movie the "slider" graphic deforms for some reason. What gives?

Thanks,
mperla

View Replies !    View Related
To Create Vector Image From Running Swf
Hi,

This is vinay, I am developing a flash program which takes value from xml file and create lines using lineto function, i need To create vector image after creating lines from xml data.

please help me out,

thanking u,

vinay

View Replies !    View Related
Exporting A Vector Image With Flash/PHP/whatever...
i am trying to create a simple online paint program where a blank canvas sits next to a menu of vector objects, of which you can drag/drop on the canvas. my goal is that once you are satisfied with it, you click the 'publish' button, and the vector-based drawing would be sent to an email address in a vector format (.ai, eps) instead of the jpg format.

any ideas? thx.!

View Replies !    View Related
Output Vector Image From Flash
Hi,
I need to develop an interactive mat designer where the user can make custom designs using the flash interface.

He can also upload a photo and include it in the design. I need to send it to the server-side script (asp.net) and save it in any vector format so that i can resize it later as per the needs.

Any idea?

Thanx in advance...

View Replies !    View Related
Converting A Vector Into An Image Via Actionscript
Ok I was just wondering,
wouldn't it be great, to save swf filesize, if you could, at the start of the frame, change some vector movieclips into images.

This would save massive amounts of filesize because you don't need to embed the images, and also I/you could change your vector in flash without having to re-import the image...

Is there a way to do it with BitmapData or copying a movieclipt to a bitmap or something?

Is this possible and if so, how can i acheive it?
-Jacob

View Replies !    View Related
Create A Vector Image File?
Is there anything equivalent to com.adobe.images.PNGEncoder for vector-based images?

I'm making an Air application that I want to generate an image file, which I know how to do for a bitmap-based image using PNGEncoder, but I don't know how I could do it for a vector-based image.

View Replies !    View Related
Automatically Break Apart A Vector Image
Hey all. I am aware of Flash's ability to import a vector image and then you can simply go to modify --> break apart to create many different objects. I was wondering if it's possible to somehow automate this process. For example, lets assume I've already let a user load in the image, is there any way to break apart the image and automatically assign each section to a movieclip instance or something similar?

Is something like this possible? Thanks in advance.

View Replies !    View Related
Mask A Vector Image Slow?
I've noticed that if I'm masking a vector image (Trace Bitmap), it is slower than when the vector image wasn't there. What can be done, am I doing something wrong?

Cheers

View Replies !    View Related
Exporting Generated .swf As A Vector Image
Hi all,

I was wondering what the best way of importing a generated swf file into illustrator is, so i can mess around with the elements, add in backgrounds etc

thanks!

View Replies !    View Related
Mask A Vector Image Slow?
I've noticed that if I'm masking a vector image (Trace Bitmap), it is slower than when the vector image wasn't there. What can be done, am I doing something wrong?

Cheers

View Replies !    View Related
Wrapping An Image Between 4 Points
I have made a cube which you can turn around by moving with the mouse(see it here), and now i want to make an image on each side of it. I don't want to have the sides coloured in, i can do that myself. But i want to do it with an imported Bitmap. So does anyone know how to crop each corner of an image to a specified point?

View Replies !    View Related
Image Compressor / Converter (raster To Vector)
Hi there,
Does any one know a free softwares which compressed the size of a scanned images or a jpeg file so that if i import it on flash the file is already small for my .fla & .swf cause right now im having a problem on huge file size.
How about a free softwares that will convert an image file from raster graphics to vector graphics with a very least of time and very small file size.
Thanks for reading my thread!!!

View Replies !    View Related
Import Image With Vector Outline + Type?
I made this website right before last summer and now I found this site, so now I plan on fixing some problems.

www.jonathankruse.com
The problem is I had a photo I touched up in photoshop and imported it into Flash. The outline was really weak so I wanted the vector outline that I made with the pen tool in photoshop. I was able to import it into Flash but the sizing was messed up and when I tried to line it up I never got it perfect. I also used Illustrator, and I am really not sure what the best way to bring in vector files to Flash is. How can I bring both images, the vector, and pixel, together in Flash so they line up prefectly?

The other question is simple
What is the best way to import images?
I resize them to the size they are going to be in Flash, and I save them as high quality files. Is the best format to do this in .bmp or is there something else I should be using?

what should I use for images with transparencys?
I heard to save them as .png files in photoshop, in the save for web option and just high quality. Is this the best way?

Another question is actually about Dreamweaver if any one can help. I know almost nothing about this program, and when I preview my file it tries to connect to my server, it can't, then it won't show the preview.

View Replies !    View Related
Vector Animation Jerks/slows When Placed On An Image
Hi there,

I have a small vector animation movie clip of continuously emitting rings. Very simple and small. When it is placed on the stage with a flat colour, it plays very smoothly. But when the same movie clip is placed on an 4 colour image as a base. It starts jerking / slows down in certain parts. The movie FPS is set to 30.

Why it could be happening ? Solution/Suggestions required please. You can also mail me on kams201275@yahoo.com

Thanks
Kamlesh

View Replies !    View Related
Vector Image Causing Flash To Crash
Hi there,
I have been trying to use a vector map in Flash which I have imported from Illustrator. But the image appears to be far too large for Flash 8 to handle. Flash has been crashing consistently if not just running really slowly. I've even tried to use the Modify - Optimise tool in Flash but this also causes the application to crash before being able to view the results. Is there anyway around this? Can I optimise this complex graphic in Illustrator or has anyone had experience with building an interactive world map in Flash? My .fla file is already 572 KB and haven't even started yet. Please help!
Thanks in advance

View Replies !    View Related
Export .wmf Or Any Vector Image From Flash At Run Time
Hello to all

I am working on Flash 8 . operating system windows XP.
I want to generate wmf image or any vector image from Flash at runtime. I have read number of articles but did not get any solution till now. I have also seen Quasimondo's script to generate jpg,png,bmp files at http://www.quasimondo.com/archives/000572.php and sephiroth's script to generate jpg images. at http://www.sephiroth.it/tutorials/flashPHP/print_screen/index.php

Is there any possibility to generate vector image in SVG format??

I am confused. I need to genertate my output in vector format either in wmf or any .

Waiting in response
Inder

View Replies !    View Related
Gloss Effect For Vector Drawn Image
Hi,
How does one go about giving a glossy effect to an arbitrary vector drawn image (say a square)?

I tried this : gradient fill the square . Have a rounded rectangle shape (filled white) with alpha 0.3 cover portion of the original square. Didn't work satisfactorily. How does one go about these? (In other words i am asking how does one accomplish algorithmically similar effect done in photoshop, i suppose).

The problem i am trying to overcome is the vector drawn images that i have to deal with look very geometrical and not life like... Even an approximation will do (doesn't have to be photorealistic).

tia,
-jlogan

View Replies !    View Related
Ability To Zoom In, Out, Move Around Vector Image In Flash
Hey Everyone,

For a project that's due in a couple of months, I have many floor plans, which are all vector images. I know that if I were to paste the image into flash, and publish / show it in a web page, the image can be zoomed into, and out of by right clicking, and it also has the ability that when it's zoomed in, the image can be moved around(by dragging around the mouse) .

This is great for what I need, but the issue is the fact that the user has to right click in order to select if they want to zoom in and out. Is it possible to incorporate this into two buttons that will be displayed, so the user only has to select a button, instead of having to right click, and select what they want to do from a menu?

The only issue I could see with this is when the flash movie is zoomed into, the buttons may dissapear, or appear larger, since the flash file zoomed in. Is is possible to make this, so the vector image I have can be zoomed in/out and moved around, yet the buttons stay static?

Thanks A Lot

View Replies !    View Related
Making Flash Appear To Draw A Vector Image On The Screen
I have a vector image made up of black lines. I'd like to create an animation sequence where it appears that Flash is drawing the image. Is there an easier way to do this than breaking up the vector and deleting out everything except the next little piece for each keyframe? I've tried the shape tween but it's not really following the pattern of the lines (as some are jagged or curved)... any other ideas?

View Replies !    View Related
How To Define Colors In A Vector Image Via An External File
Alright....

Thaat was a mouthful!
But this is what I am trying to do.

Say I have an image. We'll call it "vectorman". It is a liner gardient in flash that has say "f5f5f5" as the top color and a gradient down to "ff9900". I then turn "vectorman" into a graphic, then into a movie. Now he sits on the main stage with the same colors all the time... poor vectorman. I would like the ability to control those 2 colors of vectorman via an XML file. Is that possible?

I know XML can control css and dynamic text fields, but how do I control the color of an graphic?

This is brand spanking new to me. So any leads or help would be awesome!

View Replies !    View Related
How To Define Colors In A Vector Image Via An External File
Alright....

Thaat was a mouthful!
But this is what I am trying to do.

Say I have an image. We'll call it "vectorman". It is a liner gardient in flash that has say "f5f5f5" as the top color and a gradient down to "ff9900". I then turn "vectorman" into a graphic, then into a movie. Now he sits on the main stage with the same colors all the time... poor vectorman. I would like the ability to control those 2 colors of vectorman via an XML file. Is that possible?

I know XML can control css and dynamic text fields, but how do I control the color of an graphic?

This is brand spanking new to me. So any leads or help would be awesome!

View Replies !    View Related
How To Sync Image Slides To Video Cue Points?
Hi, I'm working in AS3. What is the best way to sync some image slides to cue points I have embedded in a video? Ideally the video would play and and the image will change according to the cue points.

View Replies !    View Related
Can We Save Image Modifications With Vector Data? Tricky Thing...
hey all,

i am developing application since a long time.
which let you load an image and then change its brightness,
contrast, flip , scale and tint and alpha,

you can draw on it too,

i was confused about saving these all data in an image,

Musicman and jerryscript helped a lot in there replies about
my questions in this forum

about saving vector data.

but how can i save all these modifications of image along with
all the vector paint done on it?

this is the toughest i guess...

any HELP ???

View Replies !    View Related
Can We Save Image Modifications With Vector Data? Tricky Thing...
hey all,

i am developing application since a long time.
which let you load an image and then change its brightness,
contrast, flip , scale and tint and alpha,

you can draw on it too,

i was confused about saving these all data in an image,

Musicman and jerryscript helped a lot in there replies about
my questions in this flashkit forum

about saving vector data.

but how can i save all these modifications of image along with
all the vector paint done on it?

this is the toughest i guess...

any HELP ???

View Replies !    View Related
Dynamic Image Skewing/moving Corner Points
Hi guys,
Just a question of possibility....after I load an external image into a movieclip, is it possible to dynamically skew it? For example I'd like to be able to set X,Y coords for each of the four corners of the movieclip... thus taking a square movieclip and dynamically changing it to a parallelogram or whatever I need.
Hope this makes sense...

View Replies !    View Related
Gif Image To Vector Image
hello!

am i doing it correctly if i'd like to convert gif image to vector one?

firstly i've imported my image to FlashMX,
then i've converted this image to synbol as Graphic.
and then i broke it apart.

View Replies !    View Related
[F8] MoveTo Function
Hello,

I am working on a simple eportfolio for one of my college classes. I am trying to made one movieclip (instance: main) move horizontally when you click on buttons. I have two buttons one of the left side of the the stage (Instance: show) that slides "main" to the right; and one of the right side of the stage (instace: hide) that slides "main" to the left.

Problem:

According to my script now, I can only move the movie once to a defines x-value. How can I get it so when the button is clicked it continues to move "main" multiple times?

Code:

Code:
function MoveTo (clip, fadeType, xTo, yTo, speed) {
clip.onEnterFrame = function () {
this._x += (xTo -this._x) * speed;
this._y += (yTo - this._y) * speed;
if (fadeType == "in" && this._alpha <100){
this._alpha += 5;
}else if (fadeType == "out" && this._alpha >0) {
this.alpha -=5;
}
};
}

show.onPress = function () {
MoveTo (main, "in", 160, 40, 0.3);
};

hide.onPress = function () {
MoveTo (main, "out", -450, 40, 0.3);
};

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved