root/trunk/projects/HTMLURL/src/HTMLURL.mxml @ 40

Revision 40, 2.2 KB (checked in by judah, 5 years ago)

committed HTMLURL example project

Line 
1<?xml version="1.0" encoding="utf-8"?>
2<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
3        layout="absolute"
4        xmlns:fc="com.drumbeatinsight.controls.*"
5        xmlns:local="*"
6        xmlns:filters="flash.filters.*"
7        minWidth="1005"
8        backgroundColor="#FFFFFF">
9
10        <mx:Style source="styles.css"/>
11       
12        <!-- Notice we use the fixTextFieldFocus to hide the cursor when the TextInput gets focus.
13        This is needed for some browsers when an iframe has a textfield -->
14       
15        <!-- We also use the promptOnUnload to prevent the user from navigating to another page
16        Reload the page and you see the message. -->
17               
18        <filters:DropShadowFilter id="drop1" distance="3" blurX="6" blurY="6" alpha=".6"/>
19       
20        <mx:Label id="headerLabel" x="10" y="10" text="HTML COMPONENT"
21                fontSize="35" fontWeight="bold" color="#000000" filters="{[drop1]}"/>
22        <mx:Button x="434" y="193" label="2"
23                click="{myframe.source = 'html/pages/testpage2.html'}" />
24        <mx:Button x="386" y="193" label="1"
25                click="{myframe.source = 'html/pages/testpage.html'}"/>
26
27        <mx:TextInput x="45" y="193" width="200"
28                text="http://www.google.com/webhp" id="sourceText" borderStyle="solid"/>
29       
30        <fc:HTML source="html/pages/testpage2.html?g=16" id="myframe" filters="{[drop1]}"
31                borderStyle="solid" borderThickness="4" width="674" x="10" y="223" height="300"
32                fixTextFieldFocus="true" />
33       
34        <local:PropertyInspector y="22" componentId="myframe" right="20"/>
35       
36        <!-- Internet Explorer does not always display files when viewed from the file system. Put them on local host or your domain -->
37        <mx:Label x="332" y="195" text="Presets"/>
38        <mx:Button
39                click="{myframe.source = sourceText.text}"
40                x="252" y="192" icon="@Embed('images/navigateURL.png')" width="30"/>
41        <mx:Label x="10" y="194" text="URL" color="#000000" fontWeight="bold"/>
42       
43        <mx:Text x="10" y="66" height="99" width="487">
44        <mx:htmlText>
45<![CDATA[In this example we are setting the HTML Component source property to a URL.
46Presets 1 and 2 load files from the server while the URL field loads from google.com.
47
48Fit to Content height will resize the HTML Component to the height of the content.
49But it will not, actually cannot resize the component if the content is from another domain.]]>
50        </mx:htmlText>
51        </mx:Text>
52
53</mx:Application>
Note: See TracBrowser for help on using the browser.