Click on Exchange of objects between the button tilelists
I have an application that allows users to Exchange items between the two tilelists and then save the changes they made or reset all changes.
What I want now however is for users to be able to click on the 'Add selected link' and 'Unlink selected' buttons and whatever point they have currently selected in the component tilelist will be moved to the other tilelist. By example, if a user clicks on an item in the left hand tilelist and then click on the button 'Add the selected link' while the item is always selected this point will then be on in hand right tilelist. I don't know if this is possible without drag each item well.
Basically, I want to advance the application so that it includes this feature as well as drag and drop. The reason of all, it is that my application will be installed on a system and some versions of this system will be used by a TV as remote so obviously drag / drop would be difficult without a mouse so it comes to propose an alternative.
<? XML version = "1.0" encoding = "utf-8"? > < mx:Application
' xmlns:mx = ' http://www.Adobe.com/2006/MXML "layout =" " absolute "creationComplete ="initprofile1NewsAndSportSO ();"
>
< mx:Script >
<! [CDATA]
import
MX. Collections.*;
import
flash.net.SharedObject;
public var
profile1NewsAndSportSO:SharedObject;
private var profile1NewsAndSportaddLinksFullAC:ArrayCollection = new
ArrayCollection([) {link:}
"www.bbcnews.com" , label: "BBC News" , icon: "image7" , largeImage: "assets/images/bbcnews_small.png" , title: "BBC News" , description: "BBC News description will go here"
}, {link:}
"www.itv.com/" , label: "ITV" , icon: "picture5" , largeImage: "assets/images/itv_small.png" , title: "ITV" , description: "ITV Description will go here"
}, {link:}
"www.skynews.com" , label: "Sky News" , icon: "image10" , largeImage: "assets/images/skynews_small.png" , title: "Sky News" , description: "Sky News Description will go here"
} ]);
private var profile1NewsAndSportaddLinksAC:ArrayCollection = new
ArrayCollection([) {link:}
"www.bbcnews.com" , label: "BBC News"
}, {link:}
"www.itv.com/" , label: "ITV"
}, {link:}
"www.skynews.com" , label: "Sky News"
} ]);
private function profile1NewsAndSportReset():Sub
{ resetprofile1NewsAndSportAC(); profile1NewsAndSportAddLinksTilelist.DataProvider = profile1NewsAndSportaddLinksAC; profile1NewsAndSportLinkChoice.DataProvider =
New
ArrayCollection ([]); }
private function resetprofile1NewsAndSportAC():Sub
{ profile1NewsAndSportaddLinksAC.RemoveAll ();
for every()var obj:Object in
profile1NewsAndSportaddLinksFullAC) {} profile1NewsAndSportaddLinksAC.AddItem (obj); } }
private function initprofile1NewsAndSportSO():Sub
{ profile1NewsAndSportSO = SharedObject.getLocal)
'profile1NewsAndSport '.
);
If
(profile1NewsAndSportSO.size > 0) {
If
(profile1NewsAndSportSO.data.profile1NewsAndSportaddList) {}
if (profile1NewsAndSportSO.data.profile1NewsAndSportaddList! = 'empty' )
){
var profile1NewsAndSportaddList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportaddList.split (',' )
);
var profile1NewsAndSporttempAC1:ArrayCollection = new
ArrayCollection();
for every()var str:String in
profile1NewsAndSportaddList) {}
for every()var obj1:Object in
profile1NewsAndSportaddLinksAC) {}
If
(str is obj1.label) { profile1NewsAndSporttempAC1.AddItem (obj1);
continue
; } } }
If
(profile1NewsAndSporttempAC1.length > 0) { profile1NewsAndSportAddLinksTilelist.DataProvider = profile1NewsAndSporttempAC1; } } }
If
(profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList) {}
var profile1NewsAndSportchoiceList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList.split (',' )
);
var profile1NewsAndSporttempAC2:ArrayCollection = new
ArrayCollection();
for every()var str2:String in
profile1NewsAndSportchoiceList) {}
for every()var obj2:Object in
profile1NewsAndSportaddLinksAC) {}
If
(str2 is obj2.label) { profile1NewsAndSporttempAC2.AddItem (obj2);
continue
; } } }
If
(profile1NewsAndSporttempAC2.length > 0) { profile1NewsAndSportLinkChoice.DataProvider = profile1NewsAndSporttempAC2; } } }
on the other
{ profile1NewsAndSportReset(); } }
private function saveprofile1NewsAndSport(event:MouseEvent):Sub
{
var profile1NewsAndSportaddList:string = ""
;
If
(profile1NewsAndSportAddLinksTilelist.dataProvider) {}
If
(Collection ArrayCollection (profile1NewsAndSportAddLinksTilelist.dataProvider) .length > 0) {
for every()var obj1:Object in
profile1NewsAndSportAddLinksTilelist.DataProvider) {} profile1NewsAndSportaddList += obj1.label +.
","
; } }
on the other
{ profile1NewsAndSportaddList =
'empty '.
; } } profile1NewsAndSportSO.data.profile1NewsAndSportaddList = profile1NewsAndSportaddList;
var profile1NewsAndSportchoiceList:string = ""
;
for every()var obj2:Object in
profile1NewsAndSportLinkChoice.DataProvider) {} profile1NewsAndSportchoiceList += obj2.label +.
","
; } profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList = profile1NewsAndSportchoiceList; profile1NewsAndSportSO.Flush (); } []] >
< / mx:Script >
< mx:Button click = "profile1NewsAndSportReset ()" id =" " Reset
" Label ="
Reset " y=" 5 "height = » 25 " x=" 5 "
/ >
< mx:TileList id=" profile1NewsAndSportLinkChoice "fontWeight =" " "BOLD"
" dragEnabled ="
true "dragMoveEnabled =" " true "dropEnabled =" " true "height =" " 129
" width ="
650 "top =" 5 "left =" 521 "columnCount =" 5 "rowHeight =" 145 ""
" columnWidth ="
125 "backgroundColor =" #000000 "color =" #FFFFFF "" "
/ >
< mx:TileList id=" profile1NewsAndSportAddLinksTilelist "fontWeight =" " "BOLD"
" dragEnabled ="
true "dragMoveEnabled =" " true "dropEnabled =" " true "height =" " 129
" width ="
385 "top =" 5 "left =" 128 "columnCount =" 3 "rowHeight =" 145 "columnWidth =" 125 "" "
" backgroundColor ="
#000000 "color =" " #FFFFFF "
/ >
< mx:Button click = "saveprofile1NewsAndSport (event)" id =" " Save "label =" " Save the changes
" x = »
5 " y=" 38 "width = » 113 "height = » 25.5 "
/ >
< mx:Button x=" 269 "y =" 142 "label =" Add link selected "id =" profile1NewsAndSportAddLinkButton " "
/ >
< mx:Button x=" 774 "y =" 142 "label =" remove the link selected "id =" profile1NewsAndSportRemoveLinkButton " "
/ >
< / mx:Application >
You pasted the code of an AIR application? The code I provided works fine for me.
Tags: Flex
Similar Questions
-
Remove the spacing between the buttons of Menu Widget - Muse CC 2015
Hello
I seem to have found a slight problem with deletion of the spacing or gutters between the buttons of menu widget.
I add a widget menu at design time either horizontal or a vertical menu.
Remove the border of each button and then I'm going to change the gutters to put the buttons close together so that there is no space between them, but the parameters and the values of gutter do not allow me.For some reason any gutter V is always grayed out and cannot be changed and the gutter H is set to zero, but there is still a gap between the buttons horizontally
Is there a way to remove Vertical and Horizontal gutter now?
Right then I was told that I'm going about this all wrong.
What I do is not use the menu button and try to change the values of the gutter, but instead, I have to select the menu it self and then change the values of the gutter.
I think it's the same for the kids meals don't click the button but select the menu rather than change the gutter to zero values. -
Hello
I have a screen that is shown in the image below.
as you can see the call button and the Conference have a gap between the two... No matter what I can't seem to make the same gap between the buttons of the Conference and the cat...
any help pls?
The buttons are generated using the code (specifically the lines in red)...
SerializableAttribute public class RightFieldsManager extends HorizontalFieldManager {}
public RightFieldsManager (fields [], int rWidth) {}
This.right_width = rWidth;
bField = new Geils (this.right_width);
Add (bField);for (int i = 0; i)
Add (Fields [i]);
This.Fields = fields;
}}
First of all, there is nothing in your code that would cause gaps between the buttons. If you want to, you will need the following:
(1) setMargin on each button (do not use setPadding - its purpose is different)
(2) add some fields of empty but taking screen between the buttons space (what's your Geils like that?) For example
for( int i=0; i
(3) create your own Manager (extends Manager, not HorizontalFieldManager) and write your own sublayout Simon suggested. It is the more difficult path, but it has its merits - you can have control over the most beautiful layout of your screen in this way.
-
Is it normal that the screen SE iPhone packed between the vibration switch and the positive volume button?
If it was the impact, where the screen would break. It is normal for a screen to break at the point of impact.
-
Exchange of data between the internal and external labview code
Sorry for a simple question.
I have a TestStand sequence that uses units/tests written in LabVIEW. The sequence is extermnally began with a stand alone LabVIEW program. I need to establish simple exchanges of information between units of the sequence LabVIEW and LabVIEW external code.
Information are simple strings will eventually be sent in both directions.
Please advice what commumnication path needs to be implemented.
Unfortunately, arttempts to search OR site Internet (or Internet) result in a large number of irrelevant information. Probably, I can't shape appropriate keywords. There is therefore a need for your help.
Thank you
_Y_ wrote:
[...] It takes by presenting some initial information (e.g. username) in the sequence [...]Use a Message from the user interface of query for the data (data available in the user interface, executing sequence requires it).
_Y_ wrote:
[...] and view the status of intermediate/final level in the user interface.Use a Message from the user interface to transmit these data to the display (data available in the execution of sequences, Which requires it)
Norbert
EDIT: Btw, you should use TestStand user to nicks track management. This gives you more options and security than some custom stuff implemented in the user interface.
-
Sir / Madam,.
I want to do a mailing that affects when you click on would lock all fields so that no change is possible... and if user clicks on the button submit then again he should ask password to unlock all the fields for editing... and again user can edit the required fields.
Hope you got what I'm trying to say.
I guess you don't know what an anonymous JavaScript function, and this is why you set one inside the "if" statement Such an anonymous function allows you to create a private field of the variables, which would otherwise eventually be global. If you want to use this mechanism, you can shoot on the definition of function to the next level. In addition, your code defined the fields of writing, regardless of the entered password. I moved a few small things around, and it works for me:
(function() { var isReadOnly = this.getField("Text4").readonly; if (isReadOnly) { // Get one of the fields in the group var f = getField("Text4"); // Determine new readonly state, which // is the opposite of the current state var readonly = !f.readonly; var readonly_desc = readonly ? "deactivate" : "activate"; // Ask user for password var resp = app.response({ cQuestion: "To " + readonly_desc + " the fields, enter the password:", cTitle: "Enter password", bPassword: true, cLabel: "Password" }); switch (resp) { case "123": // Your password goes here for (var i = 0; i < this.numFields; i++) { var fieldName = this.getNthFieldName(i); if (fieldName != event.target.name) { this.getField(fieldName).readonly = false; } } app.alert("The fields are now " + readonly_desc + "d.", 3); break; case null: // User pressed Cancel button break; default: // Incorrect password app.alert("Incorrect password.", 1); break; } } else { for (var i = 0; i < this.numFields; i++) { var fieldName = this.getNthFieldName(i); if (fieldName != event.target.name) { this.getField(fieldName).readonly = true; } } } })();
-
How can I change the color of the spaces between the buttons of menu
Hello
I have problems by changing the color of the spaces between the menu buttons.
The spaces between the color buttons lighter must be the same color as the buttons.
Please note that some buttons are voluntarily lighter, some are darker.
Help would be greatly appreciated.
Thank you.
Dmitry
Select the Menu container. Open the control panel of the spacing. The horizontal gutter value 0.
You can always add padding for menu items to create extra space.
David
-
Why do I need to click on it twice will display the buttons?
Hello
First of all I don't see the buttons (buttons - this is a clip) on stage. When I click on the button display using the following code, I can see my buttons. But first, I have to click twice for the buttons. While the second time there is no problem. How to solve the problem?
This. Buttons.Visible = false;
Import fl.controls.Button;var myButton:Button = new Button();
myButton.label = 'Show in Menu';
myButton.name = "btn1";
myButton.toggle = true;
myButton.move (55, 95);
addChild (myButton);myButton.addEventListener (Event.CHANGE, changeHandler);
function changeHandler (event: Event): void {}
If (event.currentTarget.selected == false) {}
Buttons.Visible = true;
myButton.label = "Hide Menu";
} else {}
Buttons.Visible = false;
myButton.label = 'Show in Menu';
}
}Thank you and best regards,
use:
function changeHandler (event: Event): void {}
If {(event.currentTarget.selected)
Buttons.Visible = true;
myButton.label = "Hide Menu";
} else {}
Buttons.Visible = false;
myButton.label = 'Show in Menu';
}
} -
space appearing between the buttons of the menu
Hello
I have a table with the buttons in the menu. There's no padding or anything in there, but a couple of the buttons seem to have a space between them, while the rest are fine. When I look in Dreamweaver, it looks fine, but when I saw, or publish, space appears (between classes & personal training). Can someone tell me why?
(the pictures are just here to show my friend how it could look - they are just copied from the internet and will be deleted)
Thank you very much
Nicola
There is a line 1 pixel wide transparant below the classesoff.gif in the gif itself file. So, it has to do with the photo of your button and nothing to do with html.
Friend
-
How can I configure my keyboard back to normal so that it is not a gap between the buttons
I need to put my keyboard back to normal
Please don't set not normal.
If the provision has split or your keyboard has been moved to the center of the screen, hold your finger on the button with the symbol keyboard and choose "join" or "anchor" to the lower part of the screen.
-
Exchange of data between the main VI and sub - VI
It is my first attempt to build a comprehensive program and hope you can help me.
The idea is to load a set of data and to perform several calculations and operations on them, find themselves in the creation of a report file.
What I want to do is to build a main VI which contains the data, and several sub - vi to do the math, dynamically loaded in a subgroup of experts (for the simple user interface). I thought about this architecture because I'm sure I'll have to change the calculation of VI, and I don't know how I'm going to need, so I can just add an another calc VI to the plugin dir and load it. The thing is, I have to keep moving data back from the main VI to the Subvi and maybe even between sub - vi. Is there an easy (or not so hard) how? I thought about queues, but sometimes the data is to be sent to more than a subvi, and I can't have a queue for each. The idea that I get is like a network producer-consumer mode BOX: the main VI produce some data and all those interested in this data use. Then they send the results back (as a "producer") and all stakeholders in the response it consumes.
Attached, is a "skeleton" of what I intend to do.
There are several ways you can accomplish this. First of all, you can use the Start Asychronous Call, which will provide a component of connector for you. So, it is easy to wire the reference to it. You could also implement a global functional (also known as a motor of action) to access the event reference. It is the approach we use for our shared events. If you have lines between the main VI and ths Subvi you to format a particular message reference. However, I don't think that this approach would correspond to what you are doing.
-
(3) connection objects between the Explorer objects &; Panel
LookoutDirect 4.5
(3) in the object browser, I can see all the name of the object, but how can I quickly find out which object in the Control Panel, it is, or vice versa? It is quite difficult to check one by one from a long list.
It is also a new feature of 6.2.
So I think that the solution for you is to open a copy of the file .lks by the text editor and search for the location of the object from the source file.
-
Components: Communication between the buttons on the component and Application
It's probably much easier I have do it be... but I'm totally stuck, so that's:
I have a component separate that acts as a container for a group of buttons. The container is scrollable vertically and has arrows at the top and bottom to activate the scroll effect. If the id is "scroll_arrow".
Here's my problem: I need to fill a datagrid with id = "patient_stream" with the data from a table collection that is specific to the particular key that I am pressing on.
The component cannot 'see' the items in demand, so I can't apply functions directly on the buttons.
I tried this:
Again, "scroll_arrow" is the component. "first_responder" is the button. "patient_stream" is the datagrid control. "head_area" is the Arraycollection collection.
public function load(event:MouseEvent):void { if (scroll_arrow.first_responder.selected == true) { patient_stream.dataProvider = head_area; } }
However, I have no way to activate the function 'load', because the component of the island and the application are separated.
I enclose the code for the component so that you can get a better idea of what I'm trying to do.
Does anyone have a better solution on this manipulation?
COMPONENT:
<?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" direction="vertical" mouseWheel="onMouseWheel(event)" horizontalScrollPolicy="off" horizontalAlign="center" verticalScrollPolicy="off" paddingRight="3" borderThickness="1" borderColor="#333333"> <mx:Script> <![CDATA[ import flash.utils.clearInterval; import flash.utils.setInterval; import mx.effects.easing.Exponential; import mx.effects.AnimateProperty; private var fx:AnimateProperty = new AnimateProperty(); private var index:uint; private function onMouseWheel(e:MouseEvent):void { doMove(-1*e.delta*100); } private function doDown():void { index = setInterval(doMove,300,100); doMove(100); } private function doUp():void { index = setInterval(doMove,300,-100); doMove(-100); } private function clear():void { clearInterval(index); } private function doMove(direction:Number):void { fx.stop(); fx.property = "verticalScrollPosition"; fx.easingFunction = Exponential.easeOut; fx.toValue = box.verticalScrollPosition + direction; fx.play([box]); } ]]> </mx:Script> <mx:Button upSkin="@Embed(source='/images/query_up_1.png')" overSkin="@Embed(source='images/query_up_1.png')" downSkin="@Embed(source='images/query_up_2.png')" mouseDown="doUp()" mouseUp="clear()" doubleClickEnabled="true" color="#F5F8F9" width="258"/> <mx:VBox id="box" width="280" height="{height - 250}" horizontalScrollPolicy="off" horizontalAlign="center" verticalScrollPolicy="off"> <mx:Button label="1RSP First Responder – Medical" width="261" height="29" labelPlacement="left" textAlign="left" fontSize="10" id="first_responder"/> <mx:Button width="261" height="29" label="BAS Battalion Aid Station" textAlign="left" fontSize="10"/> <mx:Button width="261" height="29" label="FRSS Pre-op" textAlign="left" fontSize="10"/> <mx:Button width="261" height="29" label="FRSS Operating Room" textAlign="left" fontSize="10"/> <mx:Button width="261" height="29" label="FRSS Post-op" textAlign="left" fontSize="10"/> <mx:Button width="261" height="29" label="SC Operating Room" textAlign="left" fontSize="10"/> <mx:Button width="261" height="29" label="SC Ward" fontSize="10" textAlign="left" fontFamily="Verdana"/> <mx:Button width="261" height="29" label="SC X-ray" fontSize="10" textAlign="left"/> <mx:Button width="261" height="29" label="SC Laboratory" textAlign="left" fontSize="10"/> <mx:Button width="261" height="29" label="Operating Room Equipment" textAlign="left" fontSize="10"/> <mx:Button width="261" height="29" label="Operating Room Consumables" textAlign="left" fontSize="10"/> <mx:Button width="261" height="29" label="Field Dental Operatory" textAlign="left"/> <mx:Button width="261" height="29" label="NBC Individual" textAlign="left"/> <mx:Button width="261" height="29" label="NBC Unit" textAlign="left"/> <mx:Button width="261" height="29" label="Aid Station Sick Call" textAlign="left"/> <mx:Button width="261" height="29" label="1st Resp - Consumable" textAlign="left"/> <mx:Button width="261" height="29" label="1RE 1st Resp - Equipment" textAlign="left"/> <mx:Button width="261" height="29" label="PMM" textAlign="left"/> <mx:Button width="261" height="29" label="PMT" textAlign="left"/> <mx:Button width="261" height="29" label="OEHS" textAlign="left"/> <mx:Button width="261" height="29" label="ENTO" textAlign="left"/> <mx:Button width="261" height="29" label="BEC BAS ERC - Consumable" textAlign="left"/> </mx:VBox> <mx:Button width="258" upSkin="@Embed(source='/images/query_down_1.png')" overSkin="@Embed(source='images/query_down_1.png')" downSkin="@Embed(source='images/query_down_2.png')" mouseDown="doDown()" mouseUp="clear()" /> </mx:VBox>
In some cases, you can, or may have to, use parentApplication.varName or parentDocument.varName.
-
dragable object between the slider and button/mc
I created an activity that involves a drag and drop activity. I set dragItems and dragTargets. The dragTargets have rollover events that are triggered when the cursor passes over it.
However, this is of course never triggered when I'm dragging a dragItem above them. Is there a workaround solution that generates the same visual confirmation that the cursor is currently on a dragTarget when I'm dragging a dragItem?
Thanks in advance
Oops... you must use _root._xmouse in the clipEvent. Try this code:
--
onClipEvent (enterFrame) {}
If (this.hitTest (_root._xmouse, _root._ymouse)) {}
If (! this.mouseover) {}
mouse is on the target, the function of turning here
trace ("rollover");
This.MouseOver = true;
}
}
ElseIf (this.mouseover) {}
This.MouseOver = false;
trace ("Rollout");
}
}
--
It behaves like a button, the bearing is fired once when the mouse enters the MC and deployment is triggered when he leaves.see you soon,
blemmo -
Switch between the buttons when a widget is open
Hello to all I am struggling with the release of the glossary widget and HTML5... I had posted this problem last week here: http://forums.adobe.com/message/5298569. Shekhar from Adobe has helped solve the problem (thanks) but not 100% optimal. So I will ask a question that can bring me satisfaction and closing
I want to open a glossary widget with a button 'open '. When the widget is open, the Open button will change to a close"" button. Basically, the controls will be in the same place, but open widget made toggle buttons. Is it possible to do this without too much savvy programming...? Yet once, I need HTML5 output because half of my students are running courses on ipad or other handheld computers...
Thank you
Daniel
Hi Lilybiri,
Thank you. Your idea of scenario 4 worked perfectly. A small problem that I'm starting to wonder if I'm doing something which is apparently not related... I still don't see my glossary pop up in HTML5... However, the toggle function works perfectly when using the F4/F12. Button is a large spacesaver and thanks for the idea. Do you have ideas on the exit of HTML5...? Once again, thanks a lot!
Dan
Maybe you are looking for
-
How to open my GMail on Firefox. Using Win XP PRO SP 3.0 32 bit
I use WIN XP PRO SP 3.0, 32-bitHow to access my account GMail using Firefox?I tend to forget all about my GMail, so need to read, a lot of emails, he...Please, I'm a novice user step by step pleaseThank you very muchSylvia
-
I would like to know why the lone daily challenge is always won by someone who solves it generally lower then thirty seconds and around 100 shots or less? I noticed that on average it is resolved at a pace a little more than 3 moves a second. It is s
-
Why is it so slow? This was my first purchase of laptop in 4 years and I think the NEW Lenovo is slower than my last (an hp computer that cost $300). I got this x140e recommended by a computer scientist at my college, after the death of my old laptop
-
Cannot install update kb976321
When I tryto install security update for microsoft I can not download
-
I have Microsof Office Professional Edition 2003 that I used on my computer. I want to get a new computer and I was wondering if I can install it on my new computer. I have the disks to install, with a product key on the back of the package. Is it