0
votes

I'm totally new to flex and tried to create helloWorld app unsuccessfully. Steps:

1) Create flex project within flash builder;
2) Added <s:Label text="Hello World" x="100" y="100" /> to HelloWorld.mxml file in default package;
3) runned project with Flash Builder;
4) saw an empty flash page in browser window;

Did I miss something?

HelloWorld.mxml:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark" 
           xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Label text="Hello World" x="100" y="100" />
</s:Application>

P.S.
- Flash Builder 4.6;
- SDK 4.5.1;
- Other flash page do work correctly in browser (Chrome);

1
Do you mean that you used Flash Builder 4.6? Is "Build Automatically" selected from the project menu? If not; you may have to manually build the project after adding the label. You can do this from the project menu using "Build All". You may also try "Clean" from the project menu. I see no reason why this code wouldn't work. - JeffryHouser
@www-flextras-com, yes, 4.6; "Build Automatically" is selected; - ted
do you see your label in edition mode ? are you sure you see a flash empty page or just a html page ? (right click -> flash parameters) - Majid Laissi
1)did you try to open this swf in different browser? 2)Make sure to clear browser cache when your swf is not opened anywhere, and you can try to delete files manually.3)Sometimes it's easy to forget to save edited file, this isn't your case, is it? 4)Reliable approach to see if your swf is updated or not is to Alert.show('version') or to draw big red line across your app with graphics. - user1875642
I would try to select another browser (if you have any others) in menu Window-Preferences-General-Browser. I suppose it's a problem with it. The code is no doubt correct. - Anton

1 Answers

0
votes

Ok, reposted from comment.

  1. Did you try to open this swf in different browser?

  2. Make sure to clear browser cache when your swf is not opened anywhere, and you can try to delete files manually.

  3. Sometimes it's easy to forget to save edited file, this isn't your case, is it?

  4. Reliable approach to see if your swf is updated or not is to Alert.show('version') or to draw big red line across your app with graphics.