1

I'm working on a blank template flex 4.5 mobile project. I am using states, to move on to the next page on mobile solution.

I have a background image on 'State 1' which should be removed on 'state 2' and other states.

I have tried everything, and I can't find a solution, as I am new to flex.

Please Suggest to me any link, or help me with code that works.

ShaunOReilly
  • 2,186
  • 22
  • 34
Dinesh
  • 179
  • 1
  • 2
  • 11

2 Answers2

1

Say, I have 2 states.I have 2 skin mxml files where I have 2 bgimages specified on each skin. In the main app file, I specified skinClass.state1="skins.bgskin1" and skinClass.state2="skins.bgskin2" on the top View tag which worked with me!!!

Dinesh
  • 179
  • 1
  • 2
  • 11
0

Select State 2 on the right hand side of Flash Builder, and then set the Background image to nothing, and save the project.

Look at what it did to the code, and you will see how the state changes are defined in each component.

ShaunOReilly
  • 2,186
  • 22
  • 34
  • When I right click on State 2, I just get three options.. 1.New, 2.Edit and 3.Delete. – Dinesh Jan 24 '12 at 07:36
  • Do not right-click on it. just select it, and then make changes in the designer, and then save the file. You can then see what it did in the mxml. – ShaunOReilly Jan 24 '12 at 08:35
  • I clicked on my desired state and i dont find backgroundImage property in Properties window.But I got a solution. Say, I have 2 states.I have 2 skin mxml files where I have 2 bgimages specified on each skin. In the main app file, I called skinClass.state1="skins.bgskin1" and skinClass.state2="skins.bgskin2". this works perfect for me to change my background image on states. Thanks for your suggestion which took me a way to find out this solutions. If your suggestion works with you, I would like to know the exact way so that I can have another solution for this problem. Sorry,i didn't get you. – Dinesh Jan 24 '12 at 09:54