1
votes

I opened up flash builder, made a new Flex project, and then inserted that label into the mxml file.

<?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">

    <s:Label id="label" text="myLabel"/>

</s:Application>

Now I run this (Using either Internet Explorer or Google Chrome) and I see a simple white screen with nothing on it (http://i101.photobucket.com/albums/m59/plinios/Untitled-4_zps1ef1127d.png).

Is it just me being silly? I've looked everywhere and I could not find a solution. This seems to be a very very simple problem. Why is the label not showing up?

EDIT:

I restarted my PC and re-installed Flash builder. I then tried the simple code above and it still displayed a white screen for Chrome and IE. Interestingly enough, I put a panel for the label to rest on and it displayed in IE, but not in Chrome.

<s:Panel x="41" y="36" width="250" height="200">
    <s:Label id="label" x="10" y="-20" text="myLabel"/>
</s:Panel>

EDIT:

When right-clicking the screen, I get a flash menu, not an HTML menu.

Would using the Windows 8 operating system affect this in anyway? I don't see any other reason as to why it wouldn't be showing up normally.

1
Looks like there's something wrong with your embed code rather than the application itself. - RIAstar
I've seen this before, it's likely not a problem w/the embed code. Right click on the "blank" page -- you will either get the regular context menu for an HTML page (indicating something is wrong w/your embed code), or you will get Flash Player's context menu (indicating something is wrong w/Flash itself). The circumstance I'm referring to is usually the latter, and since I'm using the built in embed code that Flash Builder provides in it's HTML template (and because I see the Flash Player context menu when right-clicking), I know it's a Flash problem. - Sunil D.
Fully quitting out of the browser and restarting it usually fixes the issue for me. But the fact that you're seeing this in two different browsers may point to a problem outside of Flash. Since we can assume (w/99% certainty) that your simple Flex code is not the issue, I'm still inclined to believe that Flash Player is misbehaving. I don't use IE or Windows, so perhaps this problem has different symptoms on Windows. I'd recommend restarting your browsers and OS, and ruling out this weird Flash issue that happens (to me) from time to time. - Sunil D.
Try loading just the SWF. Do not embed it in the page, just load the SWF separately. If you see the label, it is definitely an issue with the embed. Also of note: Chrome does not play well with Debug versions of SWFs with their custom Flash plugin - Josh
Since you see the Flash context menu when right clicking, you can rule out a problem w/the embed code. - Sunil D.

1 Answers

1
votes

I have solved this issue. The first thing to realize is that only IE will display this correctly. When you start coding, you need to wrap everything in a Spark Group. That's it!