# Calling variables using dataProvider values

**URL:** <https://forum.kirupa.com/t/calling-variables-using-dataprovider-values/263164>\
**Category:** flash\
**Created:** [June 13, 2008, 1:02am UTC](https://forum.kirupa.com/t/calling-variables-using-dataprovider-values/263164 "2008-06-13T01:02:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![theHollow](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thehollow/32/106_2.png) [@theHollow](https://forum.kirupa.com/u/theHollow)\
**Post date:** [June 13, 2008, 1:02am UTC](https://forum.kirupa.com/t/calling-variables-using-dataprovider-values/263164/1 "2008-06-13T01:02:24Z")

</div>

Hi,

I have a few embedded swfs in my AS code. In my xml file, each record has an icon attribute which is the name of one of the embedded swfs (the var name). I’m using the xml as the dataProvider in a Repeater but I can’t get it to call the swf. Basically I have a heap of these:

[Embed(source=“TO900\_R\_ALT.swf”)]  
[Bindable]  
public var TO900\_R\_ALT:Class;

In my XML file, each item node has an icon attribute, so icon=“TO900\_R\_ALT”. What I want to do is have this:

\<mx:Image source="{repeater.currentItem.icon}"/\>

which actually sets the source to the embedded swf, but I can’t get it to work.

Any help is appreciated.

Thanks,  
Brendan.

---

<div class="post-metadata">

**Author:** ![theHollow](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thehollow/32/106_2.png) [@theHollow](https://forum.kirupa.com/u/theHollow)\
**Post date:** [June 13, 2008, 8:52am UTC](https://forum.kirupa.com/t/calling-variables-using-dataprovider-values/263164/2 "2008-06-13T08:52:19Z")

</div>

The value is showing without me using the @.

I’ve tried to second one and it’s giving me an error saying the variable is not defined.
