GraphicRiver

Can I add icons to combo box in as3?

1540 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • India
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
rahulbist says

hi everyone,

do anyone know if its possible to add icons to combo box in as3?

if yes, please help me.

thanks in advance.

1277 posts
  • Bought between 50 and 99 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Interviewed on the Envato Notes blog
  • Referred between 100 and 199 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+2 more
rondog says

It sure is..

import fl.data.DataProvider;

var dataProviderArr = new DataProvider();
for (var i:int = 0; i < 10; i++)
{
    dataProviderArr.addItem({label:"my label " + i, iconClass:new MyIcon()})
}

cb.dropdown.iconField = 'iconClass';
cb.dataProvider = dataProviderArr;

MyIcon is just the linkage name I gave a movie clip

144 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Exclusive Author
sajjadcheraghi says

hi rahulbist

how u use the animated icon on your profile?

the setting not alow me to use gif icon

723 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Netherlands
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
BigZ says

only special people can :D

7343 posts
  • Attended a Community Meetup
  • Community Moderator
  • Has been a member for 5-6 years
  • United Kingdom
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
  • Contributed a Blog Post
  • Beta Tester
  • Bought between 50 and 99 items
+4 more
MSFX moderator says

hi rahulbist

how u use the animated icon on your profile?

the setting not alow me to use gif icon

he’s had it for quite a while, maybe they’ve changed it to stop flashing annoying gifs :)

144 posts
  • Sold between 10 000 and 50 000 dollars
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Exclusive Author
sajjadcheraghi says

i tryed to use gif for avatar

and site sended

Warning :

JUST USE JPG FILE . NO gifgifgifgifgifgifgifgifgifgifgifgifgifgifgifgifgifgifgifgifgifgifgifgif!

then i be >>>>> :zipped:

1540 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • India
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
rahulbist says

It sure is..
import fl.data.DataProvider;

var dataProviderArr = new DataProvider();
for (var i:int = 0; i < 10; i++)
{
    dataProviderArr.addItem({label:"my label " + i, iconClass:new MyIcon()})
}

cb.dropdown.iconField = 'iconClass';
cb.dataProvider = dataProviderArr;
MyIcon is just the linkage name I gave a movie clip

thanks rondog. it helped me. :)

guys, I got another problem.

problem is , I have 120 icons in the library. each of them given a linkage ID.

I stored linkage ID in a array. Now, problem is of importing it to stage.

I know if you have one icon you can easily import it to stage.

e.g. var ic:icon = new icon();

but, I have stored the linkage ID in an array. then, how can I import icons to stage now?

see what I am doing

for(var i:Number = 0; i < array.length;i++)

{

var ob:Bitmap = new array[i]();
addChild(ob);

}

but, it is giving me errors :(

do anyone know, how to do it. base class is BitmapData.

1277 posts
  • Bought between 50 and 99 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Interviewed on the Envato Notes blog
  • Referred between 100 and 199 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+2 more
rondog says

So you set the linkage on the bitmap itself? How are they stored in an array?

If you have the linkage set on the bitmap itself, it will complain of missing args so you have to make sure you do:

new YourBitmapIcon(0,0);

1540 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • India
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
rahulbist says

So you set the linkage on the bitmap itself? How are they stored in an array?

If you have the linkage set on the bitmap itself, it will complain of missing args so you have to make sure you do:

new YourBitmapIcon(0,0);

I stored all 120 linkages in an one dimensional array, because, I need to show only one icon at a time.

but, now problem is that , the linkage’s name is stored in array.

so, I cannot do such as , new icon(0,0);

I have to get the name of linkage from array, but don’t know how to get it.

I tried , var ic:Object = new Object(array[i]);

but, it is also not working.

1277 posts
  • Bought between 50 and 99 items
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 5-6 years
  • Interviewed on the Envato Notes blog
  • Referred between 100 and 199 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+2 more
rondog says

send me the fla. I dont understand what you mean

by
by
by
by
by