tag:blogger.com,1999:blog-4686657150124826716.post2143539262917878283..comments2023-10-16T04:02:52.545-07:00Comments on Flex and ActionScript Development Tips: Flex 4 Path BuilderChris Callendarhttp://www.blogger.com/profile/14461038089756851470noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-4686657150124826716.post-21885886526916200512016-04-28T04:45:21.535-07:002016-04-28T04:45:21.535-07:00This comment has been removed by a blog administrator.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-27767792787613011942013-12-18T12:24:38.413-08:002013-12-18T12:24:38.413-08:00No worries - all those numbers looked the same to ...No worries - all those numbers looked the same to me too :)Chris Callendarhttps://www.blogger.com/profile/14461038089756851470noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-45518113054310398192013-12-18T11:21:06.489-08:002013-12-18T11:21:06.489-08:00Thanks so much! I should've inspected more car...Thanks so much! I should've inspected more carefully after hitting update.Intoxopoxhttps://www.blogger.com/profile/18418420831253300885noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-74058614474446566212013-12-18T10:31:48.964-08:002013-12-18T10:31:48.964-08:00Hi Intoxopox,
There must be a bug in the Update co...Hi Intoxopox,<br />There must be a bug in the Update code - it changes your path so that it has the exact same bezier curve repeated ~10 times, instead of the one you pasted in.<br /><br />This is what yours should be (I manually put in Q's after every 4 numbers) - which draws a circular shape:<br />M 57.65 13.45 Q 61.3 20.2 61.05 26.9 Q 60.9 30.9 58.3 34.35 Q 55.85 37.55 52.3 39.05 Q 51.05 47.3 41.45 50.85 Q 36.6 52.65 30.95 52.2 Q 25.7 51.75 23 49.75 Q 19.15 50.55 15.05 49.6 Q 10.05 48.45 6.25 45 Q 1.45 40.7 0.35 33.2 Q -0.45 27.7 0.75 19 Q 1.2 15.75 24.7 8.75 Q 47.85 1.8 49.5 3.25 Q 54.6 7.8 57.65 13.45Chris Callendarhttps://www.blogger.com/profile/14461038089756851470noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-9155605073097552742013-12-18T10:19:40.718-08:002013-12-18T10:19:40.718-08:00Your swell tool was about to come in handy again f...Your swell tool was about to come in handy again for me, but my path data doesn't seem to be working. Don't suppose you see anything terribly amiss in the following:<br />M 57.65 13.45 Q 61.3 20.2 61.05 26.9 60.9 30.9 58.3 34.35 55.85 37.55 52.3 39.05 51.05 47.3 41.45 50.85 36.6 52.65 30.95 52.2 25.7 51.75 23 49.75 19.15 50.55 15.05 49.6 10.05 48.45 6.25 45 1.45 40.7 0.35 33.2 -0.45 27.7 0.75 19 1.2 15.75 24.7 8.75 47.85 1.8 49.5 3.25 54.6 7.8 57.65 13.45<br /><br />The above was taken from a fxg file and spaces were added around the M and <br />Q. Running update puts Qs where needed before every set of 4 coordinates. However, only the 1st qCurve seems to be drawn. Any thoughts?Intoxopoxhttps://www.blogger.com/profile/18418420831253300885noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-29852952779205599922013-05-05T17:42:39.402-07:002013-05-05T17:42:39.402-07:00Thanks, Chris, this is really cool!Thanks, Chris, this is really cool!Michaelnoreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-52766653477475163332013-04-26T14:19:01.204-07:002013-04-26T14:19:01.204-07:00Hi Michael,
I've updated the project above to...Hi Michael,<br /><br />I've updated the project above to include the source code.<br /><br />If you click on the image above, and then right click on the app you should see the "View Source" option. It has the same open source license listed on the right (LGPL).<br /><br />ChrisChris Callendarhttps://www.blogger.com/profile/14461038089756851470noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-79595516667746260222013-04-23T11:17:28.539-07:002013-04-23T11:17:28.539-07:00Really great! Any chance you'd open-source the...Really great! Any chance you'd open-source the application?Michaelnoreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-70399043995511093562013-02-19T22:24:30.778-08:002013-02-19T22:24:30.778-08:00This comment has been removed by a blog administrator.Rahul Vyashttps://www.blogger.com/profile/01844299601415848879noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-69829097547823999972012-12-12T22:14:42.986-08:002012-12-12T22:14:42.986-08:00This is really great! Thanks so much for sharing i...This is really great! Thanks so much for sharing it!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-79834512255537912622012-06-29T14:35:47.971-07:002012-06-29T14:35:47.971-07:00Hi Borek,
I agree that it would be nice to be abl...Hi Borek,<br /><br />I agree that it would be nice to be able to work on small graphics, currently there is no way to zoom the canvas.<br /><br />What I usually do is just design the path to be larger than I need, and when I import it into Flash Builder, I set the <b>scaleX</b> and <b>scaleY</b> to be 0.5 or similar to make it smaller. It's not the most efficient, but it works. <br /><br />Perhaps another option would be to allow the user to scale the values before exporting.<br /><br />Anyway, if you're really keen I can email you the source code. It's not in a public repository. If you succeed, then you're welcome to send it back to me and I'll update this blog post accordingly.<br /><br />ChrisChris Callendarhttps://www.blogger.com/profile/14461038089756851470noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-40385939429047184762012-06-18T05:02:21.730-07:002012-06-18T05:02:21.730-07:00Wow this is really a great tool! Is there a way to...Wow this is really a great tool! Is there a way to scale / zoom the canvas so that even tiny graphics like icons can be designed? If not, is this project hosted on GitHub or somewhere so that I could submit a patch?<br /><br />Thanks,<br />BorekBorek Bernardhttps://www.blogger.com/profile/08345665406069843365noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-66968909321844882192012-02-02T10:33:35.769-08:002012-02-02T10:33:35.769-08:00Hi Brian,
You are right, you can't add mouse l...Hi Brian,<br />You are right, you can't add mouse listeners to the Path directly. <br /><br />In the Path Builder code above, the only Mouse click event listeners are added to the start, end, and control points, which are a custom component called DragControl.mxml (extends Group).<br /><br />One thing you can do is create a Group with the property <b>mouseEnabledWhereTransparent="false"</b> and put a path inside the group, and add a MouseEvent.CLICK listener to the group and it will only be triggered when you click on the path - either on the stroke border, or the fill depending on your path.<br /><br />E.g.<br /><s:Group click="trace('triangle clicked')"<br /> mouseEnabledWhereTransparent="false"><br /> <s:Path data="H 40 V 40 Z"><br /> <s:stroke><br /> <s:SolidColorStroke color="#336699"<br /> weight="3"/><br /> </s:stroke><br /> </s:Path><br /></s:Group><br /><br />Clicking on the border of the triangle will trigger the click event, clicking anywhere else won't.Chris Callendarhttps://www.blogger.com/profile/14461038089756851470noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-78156063645379781162012-02-02T09:11:29.842-08:002012-02-02T09:11:29.842-08:00Hi
How do you add click event listeners to the Pa...Hi<br /><br />How do you add click event listeners to the Path (which is a primitive, and I thought could not have click event)?? Would love to know:(<br /><br />Brian BishopBrianhttp://www.bbishop.orgnoreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-715394018479101672012-01-14T06:14:46.601-08:002012-01-14T06:14:46.601-08:00I have found a no of people having the same issue ...I have found a no of people having the same issue but then here http://www.futurehardware.com/pc-softwares-applications/118.htm are some solutions that you can try out, just check it outtechytohelphttps://www.blogger.com/profile/13708622308598338387noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-39267619742060961132011-09-27T12:55:15.331-07:002011-09-27T12:55:15.331-07:00Oh I see. Okay, I'll see what I can do. I ho...Oh I see. Okay, I'll see what I can do. I hope to have a new version some time in the next week or two.<br /><br />FXG is a good idea, I'll do that too.Chris Callendarhttps://www.blogger.com/profile/14461038089756851470noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-7604681322593132722011-09-27T12:24:35.156-07:002011-09-27T12:24:35.156-07:00Right. No cubic curve support. I'm just lookin...Right. No cubic curve support. I'm just looking for support for pasting in the commands vector and data vector expected by graphics.drawPath. That would be rad. Also would be super rad to spit out a FXG from this stuff.<br />Hope that makes sense.Intoxopoxhttps://www.blogger.com/profile/18418420831253300885noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-50182420159596350712011-09-27T11:21:57.936-07:002011-09-27T11:21:57.936-07:00Hey Intoxopox - what are you looking for in terms ...Hey Intoxopox - what are you looking for in terms of support for AS3 graphic paths? A window that shows the AS3 commands for drawing the Path?<br />e.g. <br />var path:GraphicsPath = new GraphicsPath();<br />path.moveTo(x1, y1);<br />path.lineTo(x2, y2);<br />...<br />graphics.drawPath(path.commands, path.data, path.winding);<br /><br />Or something else? Also as far as I can see the GraphicsPath stuff doesn't support cubic curves though (2 control points), only quadratic curves (1 control point).<br /><br />ChrisChris Callendarhttps://www.blogger.com/profile/14461038089756851470noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-79615318653889104632011-09-27T10:48:56.453-07:002011-09-27T10:48:56.453-07:00Nice! Would be rad if it also supported as3-only g...Nice! Would be rad if it also supported as3-only graphics.drawPath vectors.Intoxopoxhttps://www.blogger.com/profile/18418420831253300885noreply@blogger.comtag:blogger.com,1999:blog-4686657150124826716.post-79114012795246699862011-09-23T03:52:46.254-07:002011-09-23T03:52:46.254-07:00Hey Dear,,,
Thanks for sharing a informative post....Hey Dear,,,<br />Thanks for sharing a informative post. Its really helpful post..flex developerhttp://flex-developers-india.blogspot.com/noreply@blogger.com