Comments on: flexwires updated to 1.1.0 https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/ Archive of older blog posts written by Josh Tynjala about Flash, Flex, and ActionScript Wed, 26 Jun 2013 02:52:46 +0000 hourly 1 https://wordpress.org/?v=4.9.9 By: Josh Tynjala https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-3070 Wed, 26 Jan 2011 18:37:06 +0000 http://joshblog.net/?p=935#comment-3070 When you use the source code from Github, you should build the SWC from it. The reason for this is that Flex needs to include defaults.css, which sets the initial styles for the components. Alternatively, you might be able to include defaults.css manually without building the SWC, but I’ve never tried that.

You can use the Ant build.xml to create the SWC. Create files build.local.properties and/or sdk.local.properties to override locations of the Flex SDK that you want to use.

]]>
By: Dan https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-3060 Wed, 26 Jan 2011 14:07:37 +0000 http://joshblog.net/?p=935#comment-3060 Hi Josh!
First, kudos for an awesome lib.
However, I’m having some issues (FlashBuilder + flex 4):
when I use the swc form the ZIP, all works OK but there’s a problem with the wire cutting. I place a wire between two jacks and it works OK, but when I cut the wire, the jacks remain “taken” (a dot shows).
I tried using the up-to-date code from git, but it will break with the exception:

TypeError: Error #1007: Instantiation attempted on a non-constructor.
at com.flextoolbox.controls::WireJack/viewSkinForState()[C:…\flexwires\source\com\flextoolbox\controls\WireJack.as:719]
at com.flextoolbox.controls::WireJack/viewSkin()[C:…\flexwires\source\com\flextoolbox\controls\WireJack.as:708]
at com.flextoolbox.controls::WireJack/commitProperties()[C:…\flexwires\source\com\flextoolbox\controls\WireJack.as:603]

any ideas?

]]>
By: Josh Tynjala https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-1664 Thu, 28 Oct 2010 02:53:40 +0000 http://joshblog.net/?p=935#comment-1664 gembin, you can create custom wires by implementing the interface IWireRenderer (or extending BaseWireRenderer). When the data property changes (or better yet, when the object passed to the data property dispatches an event), you could start or stop the animation.

]]>
By: gembin https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-1663 Thu, 28 Oct 2010 02:13:45 +0000 http://joshblog.net/?p=935#comment-1663 Do you have any idea to add animation to the wires when they are connected?

here is an example: (electronics is moving in the wires)

http://www.aswing.org/wp-content/uploads/2007/02/dcaclab-300×218.jpg

http://www.dcaclab.com/?option=com_content&view=article&id=49&Itemid=53&lang=en

]]>
By: gembin https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-1662 Sun, 24 Oct 2010 10:10:24 +0000 http://joshblog.net/?p=935#comment-1662 thank you for your suggestion for multi-data format solution.

As for being unable to connect multiple wires issue:

i also use WireSurface and passed into wirejacks. And my usecase is:

UI_A contains a WireJack_A, and UI_B contains a WireJack_B.
UI_A and UI_B are created dynamically.
if WireSurface placed before UI and WireJack, it works properly, BUT,
the part of the wire within the UI are covered by UI. so i put WireSurface after UI and WireJack, so maybe thats why it dosen’t work?

]]>
By: Josh Tynjala https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-1661 Sat, 23 Oct 2010 18:30:33 +0000 http://joshblog.net/?p=935#comment-1661 WireJack only supports a single data format restriction. I guess you could extend it to add new properties that accept Vector.<String> with multiple data formats, then modify the code that uses dataFormat and acceptedDataFormat to loop through each item in the Vector.<String>.

As for being unable to connect multiple wires, I can’t be certain. Maybe you’re using the default wire manager, which is placed on the PopUpManager. This makes it hard to connect more than one wire because the first wire covers most or all of the WireJack. I always create a WireSurface somewhere under my WireJacks and pass that into each one as a replacement wireManager.

]]>
By: gembin https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-1660 Sat, 23 Oct 2010 16:05:51 +0000 http://joshblog.net/?p=935#comment-1660 hi,again.

i want to have a custom WireJack which is able to accept several dataFormats and connect to several WireJacks.

So how to do? extends WireJack class and … ?

BTW: i changed maxConnection of InputWireJack, but still cannot connect to several WireJacks. any other things should be updated?

]]>
By: gembin https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-1659 Fri, 03 Sep 2010 06:34:33 +0000 http://joshblog.net/?p=935#comment-1659 That’s great! thank you very much for your quick reply!

]]>
By: Josh Tynjala https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-1658 Thu, 02 Sep 2010 17:57:59 +0000 http://joshblog.net/?p=935#comment-1658 gembin, you probably need to implement IWireRenderer in a new class or extend the default wire renderer implementation to add color changes.

If you’re running the latest code from Github, you should be able to call getWireBetween() on the wire manager and then call setStyle(“fillColor”, newColor) on the wire to change the color.

]]>
By: gembin https://joshblog.net/2010/07/01/flexwires-open-source-library-updated-for-flex-4/#comment-1657 Thu, 02 Sep 2010 15:53:02 +0000 http://joshblog.net/?p=935#comment-1657 hi, how to use different colors for different wires?

because i want to change the color at runtime.

for example,

WireJack A wire to WireJack B, the wire is in red.
WireJack C wire to WireJack D, the wire is in blue.

thank you in advance!

]]>