ActionScript 2.0 :: Line Manipulation Tool - Handle Coordinates
Jun 3, 2003
The below script allows for line point adjustment, this works by dragging the yellow handles to new positions as you can see. Now the problem is when you click and drag the circular handle it drags the whole line like its supposed to but the other handles don't reposition on the ends of the lines. Take a look at the script and you will see that the handle coordinates are stored in objs in the form {x: y ,.
View 14 Replies
Similar Posts:
Mar 11, 2010
I have a request to create a "flash-like" app that is connected to a MS Access Database (DB). The customer has built up a product configurator in Access and wants to know if I can do anything with it. Is this what Flex is good for? I still really do not understand what Flex is all about.
Anyway, I thought of exporting the DB out to an XML file and importing that to a flash app and then using the data there. The problem with that is that I would have to recreate all of the logic (e.g. if you choose "model A" you can only choose "colors 1, 2, or 3") that manipulates the elements in the DB and also the client would not be able to easily manipulate/edit/update the DB without having to export it to XML, etc...What would be a smart way for me to access/manipulate a MS Access Database through a flash front end?
View 1 Replies
Mar 12, 2010
I want to create a line tool exactly like flash line tool. But the code that I am using shows the line when we release the mouse button. How can I show the lines while it is drawing
Code:
this.createEmptyMovieClip("drawing_mc",this.getNextHighestDepth());
drawing_mc.lineStyle(1,100);
[code].....
View 1 Replies
Jul 3, 2009
I'm in the process of teaching myself the components of the CS4 Design Premium package using the Adobe Classroom in a Book series. I'm currently going through the Flash CIAB and i've started using the pen tool. The task involves creating a wave like design across the stage. Whilst this in itself is simple, the final instruction is to click on the first anchor point to close the shape. In the illustration, the closed shape seems to automatically extend around the stage, however when I click on the first anchor point, the line automatically connects between the two points in a straight line.
Am I doing something wrong? The next step is to fill this area, but with the straight line effect that I am getting, this becomes impossible. I should point out that the instruction states that the pen tool line should extend off the stage. I have done this, but even then on clicking on the first anchor point the shape is closed incorrectly.
View 2 Replies
Mar 12, 2010
I want to create a line tool exactly like flash line tool. But the code that I am using shows the line when we release the mouse button. How can I show the lines while it is drawing[code]...
View 4 Replies
Sep 22, 2011
As a developer I don't really follow the updates in the CS5 tooling progression. I have been asked to 'take care' or getting some adobe licenses for the Flash IDE.So, my question is this. With the recent announcement of Flash 11, does that mean the CS5.5 author tool will be updated to handle output to Flash 11? Or will there be a CS6 out shortly to handle this.Does anyone have a rough idea or when CS6 is likely to be released (just a quarterly estimate will be fine)..
View 1 Replies
Jan 14, 2012
I draw a shape with the pen or line tool. If i did not draw it perfectly connecting the dots, i cannot fill it with the paint buck fill tool. How can you tell it to just close the structure
View 3 Replies
Jun 28, 2011
I store the htmlText property of a RichTextEditor in the database.I retrieve it in another instance and I want to show the user the first line of it as plain textSo I let Flex handle the conversion by using a function like this
var editor:TextField = new TextField();
editor.htmlText = htmlTextFromDb;
var converted:String = editor.text;
[code].....
View 1 Replies
Aug 27, 2009
I try to connect a line object between 2 draggable movie clips. If either MC changes position, the line will follow and still connect to it. The first version I got is as following: (works smooth but takes high CPU and computer resources if there are thousands of objects duplicated)[code]...
View 7 Replies
Jan 26, 2009
right now i can create a straight line from mouse down to mouse up. what i cant quite get is a preview of that line. does anyone know of a simple way to show a preview of the line while the mouse is still down and the user is moving the mouse?what i have now:
Code:
var clip:Shape = new Shape();
addChild(clip);[code]......
View 2 Replies
Jun 24, 2005
I have 2 balls, which i connect with a drawn line using the following code.
[Code]....
This code works great except the line I draw has the wrong x coordinates....The line is drawn to the correst y value but the X is at least 300px off? Does it have to do with my anchor point or reg point?
View 1 Replies
Feb 10, 2010
When using a simple line shape graphic (that was created in Flash) to supply Deco Tool > Symmetry Brush > Rotate Around, the line looses it's thickness along the rotation. See attached image. I'm following chapter 2 in Flash CS4 Classroom In A Book, and the visuals from the book do not match what is happening on my computer.
View 1 Replies
Oct 9, 2009
I'd like to create cool lines and bars charts dynamically, from xml data. Since I'm not an expert in Flash, I wanted to get a tool to accomplish this. So far, I've tried Flex Builder 3, but I can't figure how to draw the chart dynamically, as the xml data is constantly changing. I just see examples on the internet with xml like "Orange, Banana, Apple", when what I'd like to see is something like "......" and get each item's value and attributes to show in the chart.
View 1 Replies
Sep 16, 2008
How do shape tween shapes that I created using the line tool? when I try to tween it, it changes into some random shape during the tween.
View 1 Replies
Jan 26, 2009
Right now I can create a straight line from mouse down to mouse up. What I can't quite get is a preview of that line. does anyone know of a simple way to show a preview of the line while the mouse is still down and the user is moving the mouse?
What I have now:
Code:
var clip:Shape = new Shape();
addChild(clip);
stage.addEventListener(MouseEvent.MOUSE_DOWN, startLine);
stage.addEventListener(MouseEvent.MOUSE_UP, drawLine);
function startLine(evt:MouseEvent) {
clip.graphics.moveTo(mouseX, mouseY);
} function drawLine(evt:MouseEvent) {
clip.graphics.lineTo(mouseX, mouseY);
clip.graphics.lineStyle(1, 0xff9933);
}
View 2 Replies
Mar 28, 2009
Is there a way in as3 to manually call one of the preset line stroke styles? I need to call one of the stroke styles given in the pull down menu (6th down actually) in the line drawing tool. I.E. I'd like to be able to draw the exact same line via manual calls in as3 that I can draw with the line took in the GUI.
View 1 Replies
Jan 16, 2012
I'm new to Flex, I've tried to do this using a CartesianDataCanvas inside backgroundElements in mxml, then using ActionScript to draw lines on the data canvas using moveTo(x1,y1) and lineTo(x2,y2), which draws a line between (x1,y1) and (x2,y2).
The problem with the above method is the tick mark length is a function of the chart area (which depends on the browser window size).
What I need is a method that:
(1) starts at a data coordinate (e.g. moveTo(x1,y1) works fine for this)
(2) draws a line to a screen coordinate (e.g. lineTo(x_screen, y_screen) where x_screen and y_screen are screen coordinates).
Is there anything that can accomplish this in Flex/AS3?
Alternatively, could I use screen coordinates for both steps above? If so, how to convert between screen and data coordinates? For example, is the upper right corner of the screen always a fixed data coordinate that I could reference is creating such a conversion?
Alternatively, could I save a five-pixel line in Illustrator and simply paste that image in the chart somehow? If so, how to paste it exactly at a data coordinate?
View 1 Replies
Feb 10, 2010
When using the Pencil Tool in Flash CS4 the line does not appear until after I've released the left mouse button or Wacom Pen nib. In other words you can write on a blank page the letter A but it only becomes visible after releasing the mouse button. It's invisible inkThe same problem occurs on my other machine with the only difference being an Intuos compared with Intuos 4 tablet - however it has same problem with a USB mouse, so it doest appear to be a Wacom issue.I've found a (kindof) fix.Open the Wacom Tablet properties panel either from the Start Menu or Control Menu - leave it open while using the Pencil Tool in Flash CS4 and it all works fine!I would be interested to know if anyone else has the same issue - might only be relevent to Windows 7 - 64 bit (i've not tested 32 bit). All was fine in Windows XP.Windows 7 - 64 bit (2009)Flash CS4 10.0.2Wacom Driver pro612-5_int - the new driver 613 made the pen go into Quick Point mode randomly so I'm using the older 612.5 drivers.
View 16 Replies
May 5, 2010
Flash 8, CS3 and CS4 on Windows XP. The issue is that seemingly randomly, when I draw with the pencil tool, the line starts to zigzag and squirm, even though my mouse/wacom tablet is moving steadily. It's little tiny squirms that go in all different random directions. It's pretty much impossible to draw anything when this is going on, and I usually have to do something else for a while and hope it's still not doing it when I come back.
View 1 Replies
Feb 6, 2010
I'm creating a scrollbar gallery from a tutorial on this site. Though I've completed the tutorial, and customised the gallery to my own needs, however I'm trying to make a very small change to it - and no matter what I do, keep running into problems. I'm trying to replace the rectangular handle with my own customised handle - a (20 x 20) 'circular' png image that I've imported into Flash, made a graphic and stored in the library (though I understand it can be imported using actionscript, like the other images in the gallery).
[Code]....
View 7 Replies
Oct 29, 2008
I'm wondering, is it possible to access shape data with actionscript. I want to draw simple lines with "line tool"somewhere in my movieclip and then to access information about my lines with actionscript to get startX, startY and endX endY of every line.
View 1 Replies
Mar 4, 2010
I want to draw line from button A to button B using pen tool. The user presses button A and starting drawing until on release button B, drawing stop.
View 2 Replies
Dec 19, 2011
I was trying to convert global coordinates to local coordinates of a UIComplenent in my flex project using below code using below code
var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point
uic is UIComponent in which I have subclass of Sprite for drawing something I have set the sprite's mouseEnabled and mouseChildren to false to not interrupt the mouse event. above code is within uic's mousemove event where I was tracing the gp and lp gp was giving correct value and suprisingly lp was giving negetive values. when I move the move to the top left corner of uic i expect lp to be 0,0 but it is giving the -width of of uic. I broke my head for hours and ended up finding an alternate by using offsets. Infact my original code was much simpler like this which was same issue
var lp:Point = new Point(e.localX,e.localY);
I am not sure what exactly is causing this problem. the workaround had lot of issues and it creating a mess in my rest of the algorithms.Just now I found even more interesting thing (which is actually weird). for some reason I went and create a new lp2
var lp2:Point = new Point(e.localX,e.localY);
now surprisingly it was giving correct values as expected and I went back and changed the code as
var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point
var lp2:Point = new Point(e.localX,e.localY);
var lp2:Point = uic.globalToLocal(gp);
now it is expected to have all the lp, lp2 and lp3 variables to be same but weiredly lp two is giving wrong value and lp2 and lp3 were giving correct. I am suspecting using the variable lp has something to do. I am not sure about that but above proves it so right now I am using lp2.
View 1 Replies
May 6, 2009
I found that .fla files do not save in Flash CS4 when the Deco tool or Spray Brush tool is selected. Is this a bug? Or is there a workaround to this issue.
View 3 Replies
Jul 6, 2009
Working with senocular Transform Tool - How to remove/disable tool for objects Im new to AS3, and i have to use it for my current project. I have used the AS2 Transform tool extensively, but needless to say, the AS3 version works entirely differently.
The way i understand it, the tool applies to and every Sprite , movieclip on stage
[Code]...
View 2 Replies
May 21, 2007
I was reading the 'Isometric Transformations' tutorial by Danko Kozar and I have a few questions. I understand what all the code does, but not how it does it. First of all, how does the following code work:
transforms x,y,z coordinates into Flash x coordinate
xFla = function (x, y, z) {
// cartesian coordinates[code].....
I understand that it converts 3d coordinates to 2d coordinates, but I don't understand how. What numbers whould be punched into x, y, and z to acquire certain desired effects?Also, what's the difference between moveTo and lineTo:
red line
style(1, "0xFF0000", 100);
plot(0, 0, 0);
draw(200, 0, 0);
View 4 Replies
May 3, 2010
Im making a little app in flash using papervision I want to make a regular movieClip show up in the same place as a papervision object. The coordinates seem like perspective is affecting the number displayed.
View 2 Replies
Oct 29, 2009
im making a bone animating system in flash but then i want to give it a more vital animation by manipulating its z y x position how is it possible using the 3d tool?im doing everything needed but when i get to that point nothing seems to work,i dont get 3d tool options.
View 2 Replies
Dec 17, 2009
i have an xml file and i want my code in flash to read it line by line but its only showing the first line out of 5 lines.Below is the code:
var NigeriaNumber:Number;
var stateName:String;
var year:String;
[code].....
View 0 Replies
Oct 3, 2006
Using AS2 or 3, is there a way to create my own file format? I would like to create a game.And when users play the game, they can create a GAME-SAVE-FILE.So, let's say that player 1 is playing... He get's to level 22 and has to sign off.He clicks save my GAME-SAVE-FILE to my computer.He names the file MyGame and saves it to his desktop.So now on his desktop he has MyGame.gsf. Next time he visits, he can click on UpLoad My Saved Game.He selects his previously saved MyGame.gsf And bammo... all the information was stored in his file and now he can play on.
I need to know how I would put together the format for my own file-type / extension.I need to know how I would access, write, and edit my own file-type / extension.Since Flash can do this type of File Manipulation with PNG's and JPG's.So surely it can be done with any desired custom format.
View 2 Replies