2 Replies Latest reply on Jul 13, 2009 1:02 PM by Flex harUI

    help with loading in the <mx:html tag please

    Tsailor

      Hi everyone,

      I have just started working on this air application, it is for a online comic site and will be used to upload the comics.  We alredy have html files for each of the sections and want to link to them, so far i have tried to do this using <mx:html ... and this works but only after you have clicked on one of the buttons, not on the first load.   Any ideas why??

       

      The source code is :

       

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >

      <mx:Sequence id="overview_b_sequence" duration="400">

      <mx:Resize targets="{[messages,ideas,last_upload,all_comics,upload_comics]}"  widthTo="0" heightTo="0"/>

      <mx:Move targets="{[ideas,last_upload,all_comics,upload_comics,messages]}" xTo="320" yTo="270"/>

      <mx:Resize targets="{[messages,ideas,last_upload,all_comics,upload_comics]}" duration="100" widthTo="20" heightTo="10"/>

      <mx:Pause duration="100" />

      <mx:Parallel duration="400" >

      <mx:Move target="{messages}" xTo="470.95" yTo="245.1" duration="100" />

      <mx:Move target="{ideas}" xTo="470" yTo="38" duration="100" />

      <mx:Move target="{last_upload}" xTo="10" yTo="38" duration="100" />

      <mx:Move target="{all_comics}" xTo="267.05" yTo="453.1" duration="100" />

      <mx:Move target="{upload_comics}" xTo="10" yTo="453.1" duration="100" />

      </mx:Parallel>

      <mx:Pause duration="100" />

      <mx:Parallel duration="400">

      <mx:Resize target="{messages}" widthTo="250" heightTo="200"/>

      <mx:Resize target="{ideas}" widthTo="250" heightTo="200"/>

      <mx:Resize target="{last_upload}" widthTo="452.95" heightTo="407.1"/>

      <mx:Resize target="{all_comics}" widthTo="452.95" heightTo="200"/>

      <mx:Resize target="{upload_comics}" widthTo="249.05" heightTo="200"/>

      </mx:Parallel>

      </mx:Sequence>

       

      <mx:Sequence id="messages_b_sequence">

      <mx:Resize targets="{[ideas,last_upload,all_comics,upload_comics]}" widthTo="0" heightTo="0"/>

      <mx:Move target="{messages}" xTo="10" yTo="38"/>

      <mx:Resize target="{messages}" widthTo="710" heightTo="615"/>

      </mx:Sequence>

       

      <mx:Sequence id="upload_comics_b_sequence">

      <mx:Resize targets="{[ideas,last_upload,all_comics,messages]}" widthTo="0" heightTo="0"/>

      <mx:Move target="{upload_comics}" xTo="10" yTo="38"/>

      <mx:Resize target="{upload_comics}" widthTo="710" heightTo="615"/>

      </mx:Sequence>

       

      <mx:Sequence id="share_ideas_b_sequence">

      <mx:Resize targets="{[upload_comics,last_upload,all_comics,messages]}" widthTo="0" heightTo="0"/>

      <mx:Move target="{ideas}" xTo="10" yTo="38"/>

      <mx:Resize target="{ideas}" widthTo="710" heightTo="615"/>

      </mx:Sequence>

       

      <mx:Sequence id="last_upload_b_sequence">

      <mx:Resize targets="{[upload_comics,ideas,all_comics,messages]}" widthTo="0" heightTo="0"/>

      <mx:Move target="{last_upload}" xTo="10" yTo="38"/>

      <mx:Resize target="{last_upload}" widthTo="710" heightTo="615"/>

      </mx:Sequence>

       

      <mx:Sequence id="all_comics_b_sequence">

      <mx:Resize targets="{[upload_comics,ideas,last_upload,messages]}" widthTo="0" heightTo="0"/>

      <mx:Move target="{all_comics}" xTo="10" yTo="38"/>

      <mx:Resize target="{all_comics}" widthTo="710" heightTo="615"/>

      </mx:Sequence>

       

       

      <mx:Panel width="750" height="700" layout="absolute" horizontalCenter="0" top="182" backgroundColor="#879DA8">

       

      <mx:Panel x="10" y="38" width="452.95" height="407.1" layout="absolute" title="Last uploaded comic 01" id="last_upload">

      </mx:Panel>

       

      <mx:Panel width="250" height="199.1" layout="absolute" fontFamily="verdana" title="Ideas" id="ideas" x="470.95" y="38">

          <mx:HTML id="full" width="100%" height="100%" location="http://www.adobe.com/"  />

          <mx:ViewStack x="0" y="0" id="ideas_vs" width="100%" height="100%">

              <mx:Canvas label="ideafull" width="100%" height="100%" id="ideafull">

              </mx:Canvas>

              <mx:Canvas label="ideasmall" width="100%" height="100%" id="ideasmall">

              <mx:HTML id="main" width="100%" height="100%" location="http://www.google.com/" />

              </mx:Canvas>

       

      </mx:ViewStack>

      </mx:Panel>

      <mx:Panel x="267.05" y="453.1" width="452.95" height="200" layout="absolute" title="All Comics" id="all_comics">

      </mx:Panel>

       

      <mx:ApplicationControlBar width="100%" fillAlphas="[1.0, 1.0]" fillColors="[#234863, #234863]" height="30">

      <mx:Button label="Overview" id="overview_button" click="overview_b_sequence.play();  ideas_vs.selectedChild=ideasmall;"/>

      <mx:Button label="Messages" id="messages_button"  click="messages_b_sequence.play();"/>

      <mx:Button label="Upload Comics" id="upload_comics_button" click="upload_comics_b_sequence.play();"/>

      <mx:Button label="All Comics" id="all_comics_b" click="all_comics_b_sequence.play();"/>

      <mx:Button label="Share Ideas" id="share_ideas_button" click="share_ideas_b_sequence.play(); ideas_vs.selectedChild=ideafull; "/>

      <mx:Button label="Log Out" id="log_out_button"/>

      </mx:ApplicationControlBar>

       

      <mx:Panel x="470.95" y="245.1" width="250" height="200" layout="absolute" title="Messages" id="messages" alpha="1.0">

       

       

      </mx:Panel>

      <mx:Panel x="10" y="453.1" width="249.05" height="200" layout="absolute" title="Upload Comics" id="upload_comics">

      </mx:Panel>  

      </mx:Panel>

       

      <mx:Image y="44" horizontalCenter="0" width="750">

      <mx:source>Pics/header.png</mx:source>

      </mx:Image>

      </mx:WindowedApplication>

       

      I have colourd what i think are the crutial bits, if anyone wants me to post the .air installer then i will gladly.

       

      Any surgestions are welcomed greatfully.

       

      Thanks

       

      TOM