if someone can tell about the possible reason and something needs to pay attenation, it will be great helpful.
Add some code that checks the size and position of the displayobjects and
also their visible property.
Thanks for reply. However I am not sure whether it's UI component related. Since the problem isn't occured everytime. Sometime the content can be displayed under all tabs. And sometimes, the content of all modules under different tabs are blank . It looks more like all data can't be displayed correctly everytime in flash player.
In a ViewStack/TabNavigator, the views that haven't been made visible yet
can get funky sizes under certain conditions, especially when things that
would dictate their size like images and modules aren't loaded yet.
That's why I suggested looking there first.
I added some debug code to show the displayobject's visible property, size and position. They are same with the values when tabs are fulfilled with data. And beside this, I also do some testing :
1. Access single module (under single tab) by testing page, the result is successfully
So I am thinking the problem is module loading problem. Does there exist some known issue about tabnavigator ?
I don't know of any issue with TabNavigator and modules other than, like I
said, the display objects can get bad sizes. Are you using moduleLoader in
the TabNavigator? Check the child and its size and visibility.
yes, I am using moduleLoader to load swf modules in TabNavigator. I add event listener of moduleLoader , when the ready event happens, it will display the modueLoader's visible property and moduleLoader's child's visible property.
However, no matter whether the blank error happens or not, these visible property's value are all true.
I am thinking to force the module under single Tab refresh after loading data. But I try to change the page size and drag the browser, no change. So seems it's not about the single module's tab refresh problem.
Still not get the root cause. And not sure what to try next.
Keep walking through the child's size and its children's size and visibility
This time , I show all child's visible property, size and position property, there's no difference between empty tab and correct tabs. And the empty tab still occurs sometimes.
What I am thinking that,could it be a problem with flash player? As the data is loaded and flex UI component is initialized successfully?
1 person found this helpful
I doubt it is a flash player problem. Fundamentally, your app is setting up
a tree of display objects, and if you set all the properties correctly
(visible, x, y, width, height, alpha, scaleX, scaleY, etc) you will see what
you want. One or more of those properties and objects are not setup
Have you set up your debugging such that you can click on something when the
module is blank and dump the tree then? If you dump the tree based on some
event like show it might be ok then and get changed later.
yes, I build flex debug ENV using flex builder and debug version flash player. Regarding dumping tree, do you mean print the object status in memory ? The blank problem happens when first access the application. I mean, when accessing the flex client application, it will do some initial job including loading data, and display UI component. So do you have some suggestion abou to dump the tree? If we wan to dump the whole display tree, we need to add some debug code in TabNavigator page ,right ? But the data is loaded using some callback function, I am not sure whether the display object are created then.
Does there exist some tool can used to check the flash player problem ?
You can try FlexSPY.
I would just add a button that adds a mouseDown handler to the app. Then
click on the blank module and trace out properties based on the
Thanks for the suggestion. I add flexspy button in the first tab. And I moniter the property value tree when empty tab is met. All is same with the value when no errors happen. But I notice one thing:
1. only one canvas in the tab navigator visible=true at one time. i.e. currently A is the initial page, and you changed canvas b's visible property to true using FlexSPY , the display object of canva B will be overlapped with canvas A's object. This is the regular scenario, For the empty tab case, nothing change when you do above action..
So I am thinking whether there exist such a scenario:
as you know, when switching between tabs, the current canvas' visible property will change from false to true. And does there exist sometimes, only the visible property value changed , the display object isn't changed to display?
The action happened during first lanuching is :
1. get a list of tabs
2. create canvas based on above list and add to tabnavigator
3. then initial from the first canvas to last.
My application will create most UI component at the launch time
Navigators use the visible property to select which view to show.
I don't recall any issues with navigators not setting the visibility
property and having it work correctly.
Are you saying that when you change tabs, the new selected tab does not get
set to visible=true? What is the TabNav's selectedIndex when that happens?
It also occurred to me that if the module or its children get in an
invalidation loop they may never finish initializing and they will have
No, when you change tabs, the new selected tab will be set to visible=true.
I guess when switching tab , below action happens:
1. the selected tab's visible property is set to true
2. Some action to display the object
I am thinking whether there exist a scenario that 1st steps is done, and the displayobject is initialized but problems happens when display these project in the canvas.
Since the displayobject of selected tab 's visible property is set to true, I think the module's initialiation work should be ok.
I assume you have a TabNavigator with ModuleLoader children. You are saying
that the moduleLoader's visible=true as expected. Are you also claiming
that all children of the moduleLoader are the same whether blank or not? I
would make sure their visible properties are set correctly.
The tabnavigator will first create several canvas ,then as the next step , for every canvas, add moduleLoader as the children.
When switching tab, current tab's visible property will change from false to true. And for the moduleLoader and all displayobject in module , the visible property's value is always true.
Yes, all children of the moduleLoader are the same blank when blank happens.
So I think the problem should occur on the botton layer . what do you think ?
UIComponent wraps the visible property. That it reports may not be what the
player sees. There is an initialized property on UIComponents. If false,
then the visible property does not reflect what the player sees.
If you can reproduce the problem in a simple test case, post it.
Not sure how to check the initialized property value of UIComponent. I just monitered the initilized property of Canvas , moduleLoader etc., initialized=true when empty tab meets.
This problem occurs when maintance legacy code. One thing occured to me, is there one way to check flex compatibility? Since this is legacy code,I'd like to check it's compatible with flex sdk v3.2 I used.
You can dump out the SWF with SWFDump. There will be version tags in the
I use the debugger to check initialized properties.
Okay, I got what you mean. The value of initialized property is always true . So the possiblitiy you supposed don't exist
I also try to use swfdump to decompile swf file in installed build ENV, find string
slot 1: const <q>[namespace]http://www.adobe.com/2006/flex/mx/internal::VERSION:<q>[public]::String = 184.108.40.206
Does this mean my product is buit using flex 220.127.116.11?
Till now, two possibility comes into mind:
1. Some potential bug in flex sdk
2. Call flex sdk by mistake
However still can't narrow down the problem. Feel a little crazy about the problem. .After such long time discussion, do you have some possible reason ?
Finally we find the root cause ,when blank happens, the explictWidth and explictHeight property of canvas is 0 . After changing both value to NaN,now the blank problem is fixed. I am not sure whether there's some conflict in flex layout. Possible reason is accept. Thanks.