Finally the way to di it:
// link
var urlTextFormat:TextFormat = new TextFormat();
urlTextFormat.url = "some url";
urlTextFormat.target = "_blank";
var urlTextField:TextField = new TextField();
urlTextField.text = "some text"
urlTextField.setTextFormat(urlTextFormat);
bg.addChild(urlTextField);
On Dec 15, 2:58 pm, Elisheva <[email protected]> wrote:
> Hi,
>
> Somehow...it does not work,
>
> I added both textfield with href and link button.
>
> The text field does not behave like a link
>
> The link button is not displayed.
>
> I am attaching my source code - hopefully someone can solve this.....
>
> MXML FILE:
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> layout="absolute"
> width="100%" height="100%" creationComplete="startMap(event)">
> <mx:Script>
> <![CDATA[
> import mx.collections.ArrayCollection;
> import mx.states.SetProperty;
> import mx.effects.easing.*
> //google Map
> import com.google.maps.LatLng;
> import com.google.maps.LatLngBounds;
> import com.google.maps.controls.MapTypeControl;
> import com.google.maps.controls.PositionControl;
> import com.google.maps.controls.ZoomControl;
> import com.google.maps.InfoWindowOptions;
> import com.google.maps.controls.ZoomControlOptions;
> //GClientGeocoder
> import com.google.maps.services.ClientGeocoder;
> import com.google.maps.services.ClientGeocoderOptions;
> import com.google.maps.services.GeocodingEvent;
> import flash.events.Event;
> import com.google.maps.MapEvent;
> import com.google.maps.Map;
> import com.google.maps.MapType;
> import com.google.maps.LatLng;
> // markers
> import com.google.maps.styles.FillStyle;
> import com.google.maps.styles.StrokeStyle;
> import com.google.maps.overlays.MarkerOptions;
> import com.google.maps.overlays.Marker;
> // infoWindow
> import com.google.maps.InfoWindowOptions;
> import com.google.maps.MapMouseEvent;
> import mx.controls.Alert;
> import classes.mapWindowInfo;
>
> private var map:Map;
> private var geocoder:ClientGeocoder;
> private var infoSprite:DisplayObject;
>
> private var categories:Object = {
> "food": {
> "markers": []},
> "shop": {
> "markers": []},
> "sport": {
> "markers": []},
> "fun": {
> "markers": []},
> "sites": {
> "markers": []},
> "emergency": {
> "markers": []}
> };
>
> [Bindable]
> public var attractions_lbl:String = "Attractions";
>
> [Bindable]
> public var historical_lbl:String = 'Site Seeing';
>
> [Bindable]
> public var food_lbl:String = 'Restaurants';
>
> [Bindable]
> public var fun_lbl:String = 'Fun';
>
> [Bindable]
> public var shop_lbl:String = 'Shop';
>
> [Bindable]
> public var sport_lbl:String = 'Sport';
>
> [Bindable]
> public var emergency_lbl:String = 'Emergency';
>
> [Bindable]
> public var events_lbl:String = 'Local Events';
>
> [Bindable]
> public var transport_lbl:String = 'Transportation';
>
> [Bindable]
> public var attractionsModel:XML = <pinpoints>
> <sites>
> <pin id="0006" locationID="0851"
> name="Opera House"
> long="151.214876" lat="-33.858362">
> <address>23 shimon st. San
> Francisco</address>
> <description>Sydney Opera
> house is world famous for it's
> architecture.</description>
> <image
> url="$location/images/attractions/sites/sydney_opera"/>
> <link
> url="http://www.sydneyoperahouse.com"/>
> </pin>
> <pin id="0006" locationID="0851"
> name="Sydney Circular Quay"
> long="151.212445" lat="-33.861466">
> <address>Central NSW
> 2000</address>
> <description>Nestled between
> the City Business District, the
> Rocks, the Opera House and the Royal Botanical Gardens, it is a main
> transport terminus for Sydney ferries, trains, buses and taxis. From
> here you can visit historical Parramatta, Sydney Olympic Park, Darling
> Harbour, Taronga Zoo by ferry via the ever beautiful Sydney Harbour.
> Multitude of Harbour Cruises available.</description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> url="http://www.pizzapoppy.com"/>
> </pin>
> <pin id="0006" locationID="0851"
> name="Fort Denison"
> long="151.2256354" lat="-33.8549539">
> <address>110 George
> St</address>
> <description>Situated
> strategically in the middle of Sydney
> Harbour, this fort was a key part of the 1800s defense network of
> Sydney. Originally known as Pinchgut Island, this was the punishment
> place for recalcitrant convicts who misbehaved during the very early
> days of the colony. .</description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> url="http://www.nationalparks.nsw.gov.au"/>
> </pin>
> <pin id="0006" locationID="0851"
> name="Government House"
> long="150.656413" lat="-33.750821">
> <address>Macquarie St.,
> Botanic Gardens Central</address>
> <description>Government House
> was constructed between
> 1837-1845. It is the most sophisticated example of a Gothic Revival
> building in New South Wales.</description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> url="http://www.hht.net.au"/>
> </pin>
> <pin id="0006" locationID="0851"
> name="The Mint"
> long="150.880329" lat="-33.952202">
> <address>Queens Square -
> Macquarie St. Central</address>
> <description>The Mint,
> constructed between 1811-1816 as the
> southern wing of the Sydney Hospital, is one of the oldest extant
> buildings in central Sydney. A Mint was established there in 1854</
> description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> url="http://www.hht.nsw.gov.au/fmuseums.html"/>
> </pin>
> <pin id="0006" locationID="0851"
> name="Hyde Park Barracks"
> long="151.212789" lat="-33.863743">
> <address>Queens Square -
> Macquarie St.Central</address>
> <description>Hyde Park
> Barracks, designed by Francis Greenway,
> was a home to convicts and place of punishment until 1848..</
> description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> url="http://www.hht.net.au"/>
> </pin>
> </sites>
> <food>
> <pin id="0001" locationID="0851"
> name="Big Brekky"
> long="151.180075" lat="-33.913425">
> <address>corner of Albert St
> and Stanmore Rd</address>
> <description>As the name
> implies, this café specialises in that
> all important meal in the mornings with large portions for the hungry</
> description>
> <image
> url="$location/images/attractions/food/0001"/>
> <link
> url="http://www.pizzapoppy.com"/>
> </pin>
> <pin id="0002" locationID="0851"
> name="Bill’s" long="151.222678"
> lat="-33.878691">
> <address>433 Liverpool
> St</address>
> <description>Athe food is
> imaginative and simply delish</
> description>
> <image
> url="$location/images/attractions/food/0002"/>
> <link
> url="http://www.pizzapoppy.com"/>
> </pin>
> </food>
> <fun>
> <pin id="0006" locationID="0851"
> name="Taronga Park Zoo"
> long="151.048531" lat="-33.998425">
> <address>Bradley’s Head
> Road</address>
> <description>Taronga lets
> children visit up close with some of
> Australia’s most spectacular and exotic creatures - native koalas, of
> course, but also kangaroos, dingoes, Tasmanian devils and wombats.</
> description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> url="http://www.pizzapoppy.com"/>
> </pin>
> <pin id="0006" locationID="0851"
> name="Bondi Beach"
> long="151.274856" lat="-33.890542">
> <address>Sydney Bondi
> beach</address>
> <description>Home to the one
> of the world’s oldest surf life
> saving clubs, if not the oldest, this beautiful beach is the closest
> to the Sydney city centre (8kms).</description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> url="http://www.pizzapoppy.com"/>
> </pin>
> <pin id="0006" locationID="0851"
> name="The Luna Park"
> long="151.227405" lat="-33.842551">
> <address>Milson's
> point</address>
> <description>Built in 1935,
> modeled after Coney Island’s Luna
> Park and set against the backdrop of Sydney Harbour, this is an
> energetic amusement park that features a variety of classic rides.
> Visitors enter beneath the ghastly, grinning face of a painted clown,
> who has evolved alongside the park’s collection of attractions.</
> description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> url="http://www.pizzapoppy.com"/>
> </pin>
> </fun>
> <shop>
> <pin id="0006" locationID="0862"
> name="Pitt Street Mall"
> long="151.208218" lat="-33.87077">
> <address>Pitt Street</address>
> <description>Pitt Street in
> the city centre has a great
> collection of stores and shopping arcades, including the Strand,
> Skygarden and the Glasshouse.</description>
> <image
> url="$location/images/attractions/shop/0006"/>
> <link
> url="http://www.kmart.com"/>
> </pin>
> <pin id="0006" locationID="0851"
> name="Darling Harbour -
> Harbourside" long="151.1985174" lat="-33.8703933">
> <address>Darling
> Harbour</address>
> <description>Offers not only
> a great shopping experience, but
> entertainment, food, things to do for the whole family and national
> attractions. Shopping includes well known and select Australian and
> world wide brands. Just the place to look for that special Australian
> gift</description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> url="http://www.pizzapoppy.com"/>
> </pin>
> </shop>
> <sport>
> <pin id="0006" locationID="0851"
> name="Rugby" long="151.219357"
> lat="-33.893632">
> <address>Gold Members Car
> Park Sydney Football Stadium Moore
> Park, NSW, 2001 </address>
> <description>Formed in 1908
> the Sydney Roosters are proud to be
> the only club to have played every year in the nation’s top Rugby
> League competition. Our club has produced more Australian
> International players and won more games than any other club in
> Australian Rugby League history. </description>
> <image
> url="$location/images/attractions/food/0006"/>
> <link
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---