Tony,

Good morning - yes indeed you need to import the class at the
beginning.
Are you working in an .as / class file?
Or are you working in the flash IDE?
What I mean to ask is - what are you using to write your code?

        import flash.text.StyleSheet;
        import flash.text.TextField;
        import flash.text.TextFormat;

You will definately need to import the StyleSheet class
and probably also the TextField and TextFormat classes as well.


On Apr 3, 2:20 am, tony <[email protected]> wrote:
> hi,
>
> I've tried it but nothing at all! maybe i have to import the class at
> the beginning of the code?
>
> Tony
>
> On Apr 2, 10:25 pm, Arothian <[email protected]> wrote:
>
> > Try
> > windowStyle.setStyle("fontFamily", "verdana");
>
> > On Apr 2, 12:53 pm, "A.Sale - CbsNet" <[email protected]> wrote:
>
> > > hi,
>
> > > thanks for your reply, unfortunately it does'nt apply the change!
>
> > > Tony
>
> > >   ----- Original Message -----
> > >   From: Arothian
> > >   To: Google Maps API For Flash
> > >   Sent: Thursday, April 02, 2009 5:18 PM
> > >   Subject: [SPAM] Re: content style
>
> > >   IYou should be able to do something like this:
>
> > >   var windowStyle:StyleSheet = new StyleSheet();
> > >   windowStyle.setStyle("font-family", "verdana");
>
> > >   marker.addEventListener(MapMouseEvent.CLICK, function
> > >   (e:MapMouseEvent):void {;
> > >   marker.openInfoWindow(new InfoWindowOptions({contentHTML:html,
> > >   contentStyleSheet: windowStyle}));
> > >   });
>
> > >   Hope that helps!
>
> > >   On Apr 2, 9:45 am, tony <[email protected]> wrote:
> > >   > hello Mrs. Fox,
>
> > >   > i'm an italian web designer and i'm using a flash actioscript sample
> > >   > of google map on my website. I just need help for a little problem i'm
> > >   > facing. The code below let me place markers taking them from an xml
> > >   > file. Now i'd like to set the style of the text inside the window that
> > >   > opens when you click on the marker(i'd like to use verdana). Could you
> > >   > please help me in doing that?
>
> > >   > thank you
>
> > >   > Tony
>
> > >   > //CODE
> > >   > import com.google.maps.LatLng;
> > >   > import com.google.maps.LatLngBounds;
> > >   > import com.google.maps.Map;
> > >   > import com.google.maps.MapEvent;
> > >   > import com.google.maps.MapMouseEvent;
> > >   > import com.google.maps.MapType;
> > >   > import com.google.maps.controls.MapTypeControl;
> > >   > import com.google.maps.MapTypeOptions;
> > >   > import com.google.maps.controls.OverviewMapControl;
> > >   > import com.google.maps.overlays.Marker;
> > >   > import com.google.maps.overlays.MarkerOptions;
> > >   > import com.google.maps.InfoWindowOptions;
> > >   > import com.google.maps.styles.FillStyle;
> > >   > import com.google.maps.controls.ZoomControl;
>
> > >   > var categories:Object =
> > >   > { "omicidio": {
> > >   > "color": 0xFF0000,
> > >   > "markers": []},
> > >   > "rapina": {
> > >   > "color": 0x0000FF,
> > >   > "markers": []},
> > >   > "furto": {
> > >   > "color": 0xFFFF00,
> > >   > "markers": []},
> > >   > "altri": {
> > >   > "color": 0xFF00FF,
> > >   > "markers": []}
>
> > >   > };
>
> > >   > var map:Map = new Map();
> > >   > map.key = "Api Key";
> > >   > map.x = 96;
> > >   > map.y = 2;
> > >   > map.setSize(new Point(stage.stageWidth -100, stage.stageHeight));
> > >   > map.addEventListener(MapEvent.MAP_READY,onMapReady);
> > >   > this.addChild(map);
>
> > >   > omicidioCheckbox.addEventListener(MouseEvent.CLICK, function(e:Event)
> > >   > {;
> > >   > toggleCategory("omicidio");;});
>
> > >   > rapinaCheckbox.addEventListener(MouseEvent.CLICK, function(e:Event) {;
> > >   > toggleCategory("rapina");;});
>
> > >   > furtoCheckbox.addEventListener(MouseEvent.CLICK, function(e:Event) {;
> > >   > toggleCategory("furto");;});
>
> > >   > altriCheckbox.addEventListener(MouseEvent.CLICK, function(e:Event) {;
> > >   > toggleCategory("altri");;
>
> > >   > });
>
> > >   > function onMapReady(event:Event):void {
> > >   > map.enableScrollWheelZoom();
> > >   > map.enableContinuousZoom();
> > >   > map.setCenter(new LatLng(41.1261, 16.8693), 12);
> > >   > map.addControl(new ZoomControl());
> > >   > map.addControl(new MapTypeControl());
> > >   > map.addControl(new OverviewMapControl());
>
> > >   > var xmlString:URLRequest = new URLRequest("bari.xml");
> > >   > var xmlLoader:URLLoader = new URLLoader(xmlString);
> > >   > xmlLoader.addEventListener("complete", readXml);
>
> > >   > }
>
> > >   > function readXml(event:Event):void {
> > >   > var markersXML:XML = new XML(event.target.data);
> > >   > var markers:XMLList = markersXML..marker;
> > >   > var markersCount:int = markers.length();
>
> > >   > for (var i:Number = 0; i < markersCount; i++) {
> > >   > var marker:XML = markers[i];
> > >   > var reato:String = mark...@reato;
> > >   > var luogo:String = mark...@luogo;
> > >   > var data:String = mark...@data;
> > >   > var address:String = mark...@address;
> > >   > var regione:String = mark...@regione;
> > >   > var dettaglio:String = mark...@dettaglio;
> > >   > var type:String = mark...@type;
> > >   > var latlng:LatLng = new LatLng(mark...@lat, mark...@lng);
> > >   > createMarker(latlng, reato, luogo, data, address, regione, dettaglio,
> > >   > type);
>
> > >   > }
> > >   > }
>
> > >   > function createMarker(latlng:LatLng, reato:String, luogo:String,
> > >   > data:String, address:String, regione:String, dettaglio:String,
> > >   > type:String):void {
> > >   > var markerOptions:MarkerOptions = new MarkerOptions({});
> > >   > var fillStyle:FillStyle = new FillStyle({color: categories
> > >   > [type].color});
> > >   > markerOptions.fillStyle = fillStyle;
>
> > >   > var marker:Marker = new Marker(latlng, markerOptions);
> > >   > var html:String = "" + reato + "
> > >   > " + luogo + "
> > >   > " + address + "
> > >   > " + regione + "
> > >   > " + dettaglio + "
> > >   > " + data + "
> > >   > "
> > >   > marker.addEventListener(MapMouseEvent.CLICK, function
> > >   > (e:MapMouseEvent):void {;
> > >   > marker.openInfoWindow(new InfoWindowOptions({contentHTML:html}));});
>
> > >   > categories[type].markers.push(marker);
> > >   > map.addOverlay(marker);}
>
> > >   > function toggleCategory(type:String):void {
> > >   > for (var i:Number = 0; i < categories[type].markers.length; i++) {
> > >   > var marker:Marker = categories[type].markers[i];
> > >   > if (!marker.visible) {
> > >   > marker.visible = true;} else {
>
> > >   > marker.visible = false;
>
> > >   > }
> > >   > }
> > >   > }- Hide quoted text -
>
> > - Show quoted text -
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to