Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
flash mx pro 2004 label,dataset, action script, and button

flash mx pro 2004 label,dataset, action script, and button

2004-04-09       - By Muzak

 Back
Reply:     1     2  

Can you explain the setup a bit more?
Does the dataset hold all the loaded XML data or just a portion (one item)?

Usually the data in a dataset is stored in the 'items' property and can be
reached through the 'dataProvider' property.
So, have you bound the incoming XML results (or a sub node) to the 'items'
property of the DataSet?

If so, you can get the correct data by specifying the correct index
(dataProvider is an Array of Objects), something like this:

data1_ds.dataProvider.getItemAt(index).p_firstname;
data1_ds.dataProvider.getItemAt(index).p_lastname;

Where 'index' is a number representing which thumb has been clicked, which
means each thumbnail will have to have an index which
corresponds with a data item in the dataProvider.
If none of this makes sense, let me know and I'll throw a sample together.

Also note that in most cases, you don't really need the DataSet.
You can get the data from the XMLConnector directly.

regards,
Muzak

-- -- Original Message -- --
From: "lostnspace2004" <lostnspace2004@(protected)>
To: <FLASHmacromedia@(protected)>
Sent: Thursday, April 08, 2004 6:03 AM
Subject: [FLASHmacromedia] flash mx pro 2004 label,dataset, action script, and
button problem


> Hello,
>
> I have an fla where if you release a button (in the form of a
> thumbnail image)in a scrollpane it changes the image(jpg) in the
> imgholder MC of the main stage.  I need to populate labels with data
> from an XML file at the same time.
>
> I get the XML connector connected to the XML just fine.  I get the
> dataset to hold the data ok and I get the label to be bound to the
> data set ok.
>
> I can't seem to figure out how to code the action script correctly
> to get the data field information from the dataset sent to the label
> at the same time I load the new jpg by releasing the thumbnail
> button.
>
> my dataset is data1_ds, with fields p_firstname, p_lastname, for
> example.  When I release the thumbnail in the scrollpane, I want the
> label box p_firstname_txt to get the correct information from the
> dataset where another field say P_pix = "xyz.jpg" and returns the
> correct first name from the data set.
>
> I've probably made this a lot harder than it is.  Any help will be
> appreciated.
>




-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Server geeks, take heart! If you're sick of wading through
animation & graphics instruction for relevant info., then
Nate Weiss' Macromedia Flash MX Professional 2004 for Server
Geeks is for you. Leave designing to designers and dig into
core concepts to create rich user interfaces, online
advertising, and more.  See www.peachpit.com for more info.
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/FLASHmacromedia/

<*> To unsubscribe from this group, send an email to:
    FLASHmacromedia-unsubscribe@(protected)

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/