Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Using the List Smart Clip.
From: Helen Triolo
Date: Wed, 15 Nov 2000 17:18:45 GMT

Daryn Nakhuda wrote:
>
> Does anyone have experience using the list smart clip in F5?
>
> I want to use it along with some actionscript to create a dynamic dropdown
> menu. I can get it to work fine if I populate the items array manually,
> but can't figure out how/when to reference it to populate it dynamically.
>
> here's what i tried:
> 1. I dragged the clip from the library to the stage
> 2. named the instance "mcname"
> 3. a. tried mcname.items[i] = "xxx" (in a loop of i)
> b. tried myarray[i] = "xxx" for the loop, then mcname.items = myarray
>
> I tried this in a frame action, and then also in the onClipEvent(Load) for
> the list clip.
>

Daryn,

It should work if you put it in the onClipEvent(load) routine (not sure
why it didn't for you since what you say above sounds like the right way
-- maybe you don't have an onmenu function defined?) I used a dropdown
menu to populate a textfield with the selected value (values assigned at
runtime) with this code on the menu instance:

onClipEvent (load) {

function onMenu (item, label) {
_root.selectedValue = label; // this was to display the result
in a textfield
}
this.items[0] = "first choice";
this.items[1] = "second choice";
this.items[2] = "third choice";
this.items[3] = "fourth choice";
this.items[4] = "fifth choice";
}

I wasn't successful in later changing these values without creating a
whole new instance of the smartclip and putting new values into it's
onClipEvent(load) routine, but it sounds like you'd just be setting it
once, so this shouldn't be an issue.

Regards,
Helen
-----------------------------------------------------
i-Technica � http://i-technica.com � 301.424.6037
developer resources: http://i-technica.com/whitestuff

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Using the List Smart Clip., Daryn Nakhuda

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]