PDA

View Full Version : HTML display in actionscript2.0??


polaj
05-20-2007, 08:40 AM
Hi all,first posting on the forum....
I'm trying to create a form (that has checkboxes) using HTML.
This form is supposed to be scrollable because of the length.Also,its supposed to be on a mobile device,so I'm using FlashLite2.x and a Nokia 6680 emulator.
Now, I've selected the "Render as HTML" button in the property
section of my text area (which is called story) and used the ff. codes
in actionscript:


stop ();
// Scroll continuously up at frame rate of movie
function continuousScrollUp2() {
this.onEnterFrame = function() {
if (story.scroll > 0) {
story.scroll--;
}
}
}
// Scroll continuously down at frame rate of movie
function continuousScrollDown2() {
this.onEnterFrame = function() {
if (story.scroll < story.maxscroll) {
story.scroll++;
}
}
}


story.htmlText ="<font color=\"#0000FF\"><b>The privacy policy of the different websites</b><br /><b>you may be visiting will vary concerning</b><br /><b>the use of your personal information.</b><br /><br /><b>Select preferred level of privacy</b><br /><form><input type=\"checkbox\" value=\"Low\"/>Low<br /><input type=\"checkbox\" value=\"Medium\"/ >Medium<br /><input type=\"checkbox\" name=\"Level\" value=\"High\" />High</form><br /> <br /><b>Would you like pShopper to ask for your</b><br /><b>permission before receiving promotional</b><br /><b>adverts from websites?</b><br /><form><input type=\"checkbox\" name=\"permission\" value=\"Yes\" />Yes<br /><input type=\"checkbox\" name=\"permission\" value=\"No\" >No<br /><input type=\"checkbox\" name=\"permission\" value=\"Maybe\" >Maybe</form><br /> <br /><b>Specify preferred time of the day to receive adverts</b><br /><form><input type=\"checkbox\" name=\"time\" value=\"Morning\" >Morning<br /><input type=\"checkbox\" name=\"time\" value=\"Afternoon\" >Afternoon<br /><input type=\"checkbox\" name=\"time\" value=\"Evening\" >Evening<br /><input type=\"checkbox\" name=\"time\" value=\"Anytime\" >Anytime</form><br /><br /><frame><b><i>PERSONAL INFORMATION(name,address,etc)</i></b><br /><p>Reject promotional adverts from websites that:</p><br /><form><input type=\"checkbox\" name=\"reject1\" value=\"Share my personal information with other websites without my full knowledge and consent\" >Share my personal information with other websites<br /> without my full knowledge and consent<br /><br /><input type=\"checkbox\" name=\"reject1\" value=\"Do not allow me to unsubscribe from their mailing list\" >Do not allow me to unsubscribe from their mailing list<br /><br /><input type=\"checkbox\" name=\"reject1\" value=\"Do not explicitly highlight their data-sharing practices\" >Do not explicitly highlight their data-sharing practices<br /><br /><input type=\"checkbox\" name=\"reject1\"value=\"Do not allow me to find out what data they have about me\">Do not allow me to find out what data they have about me</form><br /><br /><b><i>ENVIRONMENTAL INFORMATION</i></b><br /><p>Reject promotional adverts from websites that:</p><br /><form><input type=\"checkbox\" name=\"reject2\" value=\"Do not explicitly highlight their environmental/carbon practices\" >Do not explicitly highlight their environmental/carbon practices<br /><br /><input type=\"checkbox\" name=\"reject2\" value=\"Do not market 'green' products\" >Do not market 'green' products<br /><br /><input type=\"checkbox\" name=\"reject2\" value=\"Do not practice Fair Trade\" >Do not practice Fair Trade<br /></form><br /><br /><b><i>LOCATION/GPS INFORMATION</i></b><br /><p>Reject promotional adverts from websites that track<br />my location and then use my GPS data:</p><br /><form><input type=\"checkbox\" name=\"reject3\" value=\"For illegitimate disclosure to individuals<br />and other companies/third parties\" >For illegitimate disclosure to individuals<br />and other companies/third parties<br /><br /><input type=\"checkbox\" name=\"reject3\" value=\"To obtain other information from my personal device\" >To obtain other information from my personal device<br /><br /><input type=\"checkbox\" name=\"reject3\" value=\"To analyze my pattern of movement\" >To analyze my pattern of movement<br /><br /><input type=\"checkbox\" name=\"reject3\" value=\"Without allowing me to opt-out\" >Without allowing me to opt-out<br /><br /><input type=\"checkbox\" name=\"reject3\" value=\"Without prior consent from me\" >Without prior consent from me</form><br /><br /><b><i>PURCHASE INFORMATION</i></b><br /><p>Reject promotional adverts from websites that use information<br />about my purchases:</p><br /><form><input type=\"checkbox\" name=\"reject4\" value=\"To share with individuals<br />and other companies/third parties\" >To share with individuals<br />and other companies/third parties<br /><br /> <input type=\"checkbox\" name=\"reject4\" value=\"To analyze my habits and determine what adverts I see\" >To analyze my habits and determine what adverts I see</form></frame><br /><br /><button> SUBMIT </button></font>";


However, during runtime, only the first portion of the form is visible and
I dont see any checkboxes.Does anyone have any idea how to get around this??

jsonchiu
05-20-2007, 08:50 AM
textfields don't support checkboxes. use the checkbox component instead and build the form in flash, and not using html.

polaj
05-22-2007, 09:27 AM
Thanx jsonchiu,
the problem I have with building the form in Flash8 is that
it is quite a lengthy form and since I'm building for a mobile
device with a small screen (and testing with Flashlite) I have
to make it scrollable. I dont know how possible this is,but will
welcome any help.

jsonchiu
05-23-2007, 12:54 AM
construct the form first, and then put the entire thing into a movieclip.
Then, use the scroll pane component.