Converting HTML to Work as Actionscript in Flash

I have HTML from mapquest that allows users to get directions to a specific loaction.  How do I convert the below HTML  to work in a Flash file as actionscript?

<form action="" method="get">
<div align="center">
<input type="hidden" name="go" value="1">
<input type="hidden" name="2a" value="">
<input type="hidden" name="2c" value="">
<input type="hidden" name="2s" value="">
<input type="hidden" name="2z" value="">
<input type="hidden" name="2y" value="">
<table border="0" cellpadding="0" cellspacing="0" style="font: 11px Arial,Helvetica;">
<tr><td colspan="2" style="font-weight: bold;"><div align="center"><a href=""><img border="0" src="" alt="MapQuest"></a></div></td></tr>
<tr><td colspan="2" style="font-weight: bold;">FROM:</td></tr>
<tr><td colspan="2">Address or Intersection: </td></tr>
<tr><td colspan="2"><input type="text" name="1a" size="22" maxlength="30" value=""></td></tr>
<tr> <td colspan="2">City: </td></tr>
<tr> <td colspan="2"><input type="text" name="1c" size="22" maxlength="30" value=""></td></tr>
<td> ZIP Code:</td></tr>
<tr><td><input type="text" name="1s" size="4" maxlength="2" value=""></td><td>
<input type="text" name="1z" size="8" maxlength="10" value=""></td></tr>
<tr><td colspan="2">Country:</td></tr>
<tr><td colspan="2"><select name="1y"><option value="CA">Canada</option><option value="US" selected>United States</option></select></td></tr>
<tr> <td colspan="2" style="text-align: center; padding-top: 10px;"><input type="submit" name="dir" value="Get Directions" border="0"></td></tr>
<input type="hidden" name="CID" value="lfddwid">

I also have other code to convert into actionscript.  This code allows me list a stock price of a company.  How can I use this code in Flash??

function go()
  dim xml, text
  Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
  xml.Open "GET", "", False
  xml.Send ""
  text = xml.ResponseText
  If Len(text) > 0 Then
    go = text
    Response.Write "404 - File not found..."
  End If
  Set xml = Nothing
end function

dim quote, columns, i
columns = Array("Symbol","Last Trade","Date","Time","Change")
quote = split(replace(go(),chr(34),""),",")

<table cellpadding="0" cellspacing="0" width="250">
<td class="stockheading" align="center" valign="bottom" width="40">Symbol</td><td class="stockheading" align="center" valign="top" width="40">Last<br>Trade</td><td class="stockheading" align="center" valign="bottom" width="45">Change</td><td class="stockheading" align="center" valign="bottom" width="70">Date</td><td class="stockheading" align="center" valign="bottom" width="55">Time</td>
<td valign="top" class="stock">
<table cellpadding="0" cellspacing="0">
<td class="stock" align="center" width="40"><%=quote(0)%></td><td class="stock" align="center" width="40"><%=quote(1)%></td>

<% dim plusminus %>
<% plusminus = trim(quote(4)) %>

<% if Left(plusminus, 1) = "-" then %>
<td class="stockred" align="center" width="45"><%=quote(4)%></td>
<% else %>
<td class="stockgreen" align="center" width="45"><%=quote(4)%></td>
<% end if %>

<td class="stock" align="center" width="70"><%=quote(2)%></td>

<% dim pmam %>
<% pmam = Right(quote(3), 2) %>
<% pmoram = Ucase(pmam) %>
<% pmsorams = Replace(quote(3), pmam, " " & pmoram) %>

<td class="stock" align="center" width="55"><%=pmsorams%></td>
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MontoyaProcess Improvement MgrCommented:
You will not be able to use most of that code inside of flash.

All you can do is try to do work arounds with components and variables. Based on the value of the variable, you can send the user to a different url. Html in flash is limited pretty much to the basic tags <a>, <b>, <p>, <ul>, <u>, <li>, etc... Check out help for a complete list.

So, after all that, you would only have the choice of duplicating the functionality in flash, but it won't be by use of translating html. Sorry to be the bearer of bad news.

mikesandraAuthor Commented:
Well, since this is a 500 point question can someone help me to figure out how I can incorporate this into actionscript and make it work?
MontoyaProcess Improvement MgrCommented:
mikesandra, the points are not important, because it cannot be done. However, if there's something particular effect you're trying to achieve, then please describe that, and I, or one of us, will help you with it.

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

mikesandraAuthor Commented:
What I am trying to achieve are 2 things.  I want to be able to have a user type in their starting address and they click submit and it brings them into a mapquest page with the directions to a specific location.

The other thing I want to do within Flash as show a stock price 20 minutes delayed.  Is this something someone can help me with?
MontoyaProcess Improvement MgrCommented:

Consider the following: It looks difficult, but it is not.

These are directions from a fictitious location in Florida to another.
All you have to do is collect the address city state and zip from the user and substitute the entries above in a getURL statement. so would put on a button:
getURL("" +  myAddress + "&1c=" + myCity    .... and so on.

If you'll notice, mapquest wants plus signs instead of spaces in your street, for example. Also, you would have to complete the rest of the text by using the destination address. This is accomplished in very much the same way, except it is easier because you can pre-code the destination, if that is your goal.

Unfortunately, I don't have anything for you on your second question.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mikesandraAuthor Commented:
Let me play with this.  I'll let you know how it turns out.
mikesandraAuthor Commented:

I created a form and a submit button in Flash so they can connect with Mapquest.  I want what the user types into field 1a to get passed to the getURL function.  Something like this.

getURL(""+1a+"&1c=Oakland&1s=NJ&1z=07436&dir=Get+Directions&CID=lfddwid", "_blank");

But its not working.  I get the following error;

Scene=Scene 1, Layer=Basic Info, Frame=1: Line 2: ')' or ',' expected
     getURL(""+1a+"&1c=Oakland&1s=NJ&1z=07436&dir=Get+Directions&CID=lfddwid", "_blank");

Scene=Scene 1, Layer=Basic Info, Frame=1: Line 3: Unexpected '}' encountered

I don't know what I'm doing wrong.  Can you help me?
Dushan De SilvaTechnology ArchitectCommented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.