Hi,

Its very simple.....you can make a custom-function in Action-Script 3. In that 
function pass a integer-as-a-paramter, that paramter will be the Image-No.(Ur 
image id)..now use that image-id to activate/deactivate your component. 
Further....it will make it very simple as it will call only 
1-conditional-code-of-block....for 'n' no. of image-compnents.

for ex-
public function myFun-Visible(i:uint):void {
  image[i].visible = true;
}

public function myFun-InVisible(i:uint):void {
  image[i].visible = false;
}

I hope it will solve your problem.


Regards
Abhinav Mehta
MSRIT- Bangalore

----- Original Message ----- 
  From: cholid ridwan 
  To: [email protected] ; [email protected] 
  Sent: Sunday, October 04, 2009 1:45 PM
  Subject: [flex_india:25629] alternatife if else function


  Hi all
  i want to ask something about alternatif if else function

  i've 100 checkbox that  the syntax

  if(data.d[1] == '1')
        image1.visible = true;
                  else
        image1.visible = false;
  if(data.d[1] == '1')
         image2.visible = true;
                  else
        image2.visible = false;
  and   i must writer until 100 times

  how to make it more simple?
  Thanks
  cholid.r

  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to