Go Back   CodingForums.com > :: Client side development > Flash & ActionScript > Adobe Flex

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-24-2009, 06:22 PM   PM User | #1
loki421
Regular Coder

 
Join Date: Feb 2009
Location: Worcester
Posts: 172
Thanks: 13
Thanked 6 Times in 6 Posts
loki421 is an unknown quantity at this point
Getting the value from an Array?

Hi all,

I've got 2 arrayCollections, one populates a list control, the other lies dormant until a user selects something from the list, an event is triggered which basically gets the image data from a sperate database holding the image info.

So, if a user selects something, it brings up all the details of the object they selected, but the image data isn't stored in that database. A RemoteObject request is submitted and passes the 'model' argument to CF where it then selects the image from imageTable where model = #arguments.model#. This works fine. But it gets returned as an arrayCollection or an array, how can i access the data using dot notation?

i have a bindable var called imageData which is the resultHandler's arrayCollection from the ro.seeImage.

Here's the code:
Code:
 private function displayInfo(event:Event):void
     {
	myDetails = new Object();
	myDetails = event.currentTarget.selectedItem;// get details from the selected item
	var modelPic:String = details.model;// set the model info to string
	ro.seeImage(modelPic);// send the info to the remote object
	model.text = details.model;
	make.text = details.make;
	image.load('assets/temp/' + //whatever the dot notation is or var from the arraycollection i have set up in the resultHandler?);
     }
i've tried imageData.image, imageData.getIndex([0]), i've tried to create a new object from the imageData var but i need some way of triggering it or selecting it??d

Hope i've explained this ok?

Really hope someone can help with this
loki421 is offline   Reply With Quote
Old 09-22-2009, 01:13 PM   PM User | #2
nikos101
Senior Coder

 
nikos101's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 1,004
Thanks: 58
Thanked 10 Times in 10 Posts
nikos101 is an unknown quantity at this point
Thumbs up

hi , try this:

Code:
 private function displayInfo(event:ResultEvent):void
     {
	myDetails = new Object();
	myDetails = event.currentTarget.selectedItem;// get details from the selected item
	var modelPic:String = details.model;// set the model info to string
	ro.seeImage(modelPic);// send the info to the remote object
	model.text = details.model;
	make.text = details.make;
	image.load('assets/temp/' + myResultArray[0].data//whatever the dot notation is or var from the arraycollection i have set up in the resultHandler?);
     }
__________________

nikos101 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:21 AM.


Advertisement
Log in to turn off these ads.