Hi GUYS,

                I have 3 canvas, I'm adding 1 image on all 3 canvas's
at runtime by
"displayValue"(image:Image,...) which is running fine and the images
are visible.
I also ANOTHER such  methods which do same functionality but at some
other runtime as per the user visit that functionality.

My problem is all 2 methods are working fine but when 1 method add
images on all the canvass,
the other  add's images but are not visible but they are present in
the canvas when checked the childs of the canvas even their height n
width are proper, also their  "x" n "y" co-ordinates are fine.

I have also end up using the

TmpCurrentFrame.createComponentsFromDescriptors(true);
                                 TmpCurrentFrame.validateNow();
                                 tImageOne.validateNow();
FUNCTIONS after adding but no success.

When I'm using the other  method only image is added on the canvas
which is on display SCREEN
The other 2 canvas are in arraycollection and are visible as per the
user wants to view it.

I cannot post the complete code.
But the 2 methods of image adding, which is enough to clear the
scenario.
Here it is............
//////////////////////////////////// THIS METHOD IS COMMON CALLED BY
DIFFERENT RUNTIME
private function displayValue
(event:Event,TmpCurrentFrame:Canvas,tmpImage:Image,e:DragEvent):void
                {

                        if(popupwin.chkAll.selected==true)
                        {
                                for(var i:int=0;i<objAllFrameArray.length;i++)
                                {
                                        var tImage:Image=new Image();
                                        trace(tImage.id+":");
                                        tImage.id="tImage"+(objAllFrameArray[i] 
as Canvas).numChildren;
                                        tImage.source=tmpImage.source;
                                          if( (tmpImage.source as 
String).substr((tmpImage.source as
String).length-3,(tmpImage.source as String).length)=="swf")
                                        {
                                                
tImage.height=tmpImage.height;tImage.width=tmpImage.width;
                                        }

                                        
addResizableImage(tImage,(objAllFrameArray[i] as Canvas),e);
                                        (objAllFrameArray[i] as 
Canvas).createComponentsFromDescriptors
(true);
                                        (objAllFrameArray[i] as 
Canvas).validateNow();
                                        tImage.validateNow();
                                }
                                PopUpManager.removePopUp(popupwin);
                        }
                        else if(popupwin.chkSelected.selected==true)
                        {
                                var tImageOne:Image=new Image();
                                
tImageOne.id="tImageOne"+TmpCurrentFrame.numChildren;
                                tImageOne.source=tmpImage.source;
                                 addResizableImage(tImageOne,TmpCurrentFrame,e);
                                 PopUpManager.removePopUp(popupwin);
                                 
TmpCurrentFrame.createComponentsFromDescriptors(true);
                                 TmpCurrentFrame.validateNow();
                                 tImageOne.validateNow();
                        }
                }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//this is in switch case
case  "objSheelfCall":          if(!(objSheelfCall_dirty))
                                        {
                                                         for(var
i:int=0;i<objAllFrameArray.length;i++)
                                                             {
                                                                      var 
ccInternal:Image=new Image();
                                                                      
ccInternal.id="ccInternal"+i;
                                                                      
ccInternal.source="images/
clicktocall.png";

                                                                      
ccInternal.setStyle("horizontalCenter",0);
                                                                      
ccInternal.setStyle("bottom",5);
                                                                      
if((objAllFrameArray[i] as
Canvas).numChildren>0)
                                                                      {
                                                                   
(objAllFrameArray[i] as
Canvas).addChildAt(ccInternal,(objAllFrameArray[i] as
Canvas).numChildren-1);
                                                                       }
                                                                       else
                                                                       {
                                                                         
(objAllFrameArray[i] as
Canvas).addChildAt(ccInternal,0);
                                                                       }
                                                                  
(objAllFrameArray[i] as
Canvas).validateNow();
                                                             }
                                                     objSheelfCall_dirty=true;
                                              }
                                             break;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CAN ANYONE TELL ME WHY I ACHIEVE SUCCESS AT EITHER CASE??
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to