When I try to use our logo, I get an error message when building the application:unable to resolve 'assets/images/NEW_ITRE_LOGO1.png' for transcodingCan anybody tell me what this error means? Thanks.
private function gotoMyURL(evt:Event):void { var myURL:URLRequest = new URLRequest("http://www.yahoo.com"); navigateToURL(myURL); evt.stopImmediatePropagation(); }
<?xml version="1.0" encoding="utf-8"?> <!-- //////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2010 ESRI // // All rights reserved under the copyright laws of the United States. // You may freely redistribute and use this software, with or // without modification, provided you include the original copyright // and use restrictions. See use restrictions in the file: // <install location>/License.txt // //////////////////////////////////////////////////////////////////////////////// --> <s:SkinnableContainer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init()" height="100%" skinClass="com.esri.viewer.skins.MapManagerSkin" width="100%"> <fx:Metadata> [ResourceBundle("ViewerStrings")] </fx:Metadata> <fx:Script> <![CDATA[ import com.esri.ags.Graphic; import com.esri.ags.Map; import com.esri.ags.SpatialReference; import com.esri.ags.TimeExtent; import com.esri.ags.events.DrawEvent; import com.esri.ags.events.ExtentEvent; import com.esri.ags.events.FlareEvent; import com.esri.ags.events.FlareMouseEvent; import com.esri.ags.events.GraphicEvent; import com.esri.ags.events.LayerEvent; import com.esri.ags.events.MapEvent; import com.esri.ags.geometry.Extent; import com.esri.ags.layers.ArcGISDynamicMapServiceLayer; import com.esri.ags.layers.ArcGISImageServiceLayer; import com.esri.ags.layers.ArcGISTiledMapServiceLayer; import com.esri.ags.layers.FeatureLayer; import com.esri.ags.layers.GraphicsLayer; import com.esri.ags.layers.Layer; import com.esri.ags.layers.supportClasses.StaticLayer_m_esriLogo; import com.esri.ags.layers.supportClasses.StaticLayer_m_globe; import com.esri.ags.tools.DrawTool; import com.esri.ags.tools.NavigationTool; import com.esri.ags.virtualearth.VETiledLayer; import com.esri.viewer.AppEvent; import com.esri.viewer.BaseWidget; import com.esri.viewer.ConfigData; import com.esri.viewer.IInfowindowTemplate; import com.esri.viewer.ViewerContainer; import com.esri.viewer.components.InfoPopup; import flash.utils.setInterval; import mx.collections.ArrayCollection; import mx.containers.Canvas; import mx.controls.Alert; import mx.core.UIComponent; // This is needed to change ESRI logo to ITRE logo import mx.events.CloseEvent; import mx.resources.ResourceManager; import mx.controls.Image; // This is needed to change ESRI logo to ITRE logo import spark.components.Group; /* skin section */ [SkinPart(required="false")] public var managerView:Group; [SkinPart(required="false")] public var map:Map; [Bindable] public var mapLeft:Number = 0; [Bindable] public var mapRight:Number = 0; [Bindable] public var mapTop:Number = 0; [Bindable] public var mapBottom:Number = 0; [SkinState("decorated")] [SkinState("resized")] [SinkState("normal")] private var configData:ConfigData; private var defaultstatus:String; //[SkinPart(required="false")] private var infoPopup:InfoPopup; private var navTool:NavigationTool; private var drawTool:DrawTool; private var drawEndFunction:Function; private var fullExtent:Extent; private var _manManagerSate:String = "resized"; private var proxyEnabled:Boolean = false; private var optLayerTable:Array = new Array(); [Embed(source="assets/images/i_wind.png")] private var myLogo:Class; // This is the code to change the ESRI logo to ITRE's logo. In addition to this function, two import statements are needed. // Also, this function should be called from the mapLoadComplete() function. private function changeESRILogo(map:Map):void { for (var i:int=0; i<map.staticLayer.numChildren; i++){ var component:UIComponent = map.staticLayer.getChildAt(i) as UIComponent; if(component.className == "Image"){ var img:Image = component as Image; if (img.source.toString().indexOf("logo") > 0){ img.source = myLogo; img.addEventListener(MouseEvent.MOUSE_DOWN ,gotoMyURL,false,1000); return; } } } } private function gotoMyURL(evt:Event):void { var myURL:URLRequest = new URLRequest("http://vams.itre.ncsu.edu"); navigateToURL(myURL); evt.stopImmediatePropagation() } //init private function init():void { ViewerContainer.addEventListener(AppEvent.CONFIG_LOADED, config); ViewerContainer.addEventListener(AppEvent.SET_MAP_NAVIGATION, changeNavigationbyMenu); ViewerContainer.addEventListener(AppEvent.BASEMAP_SWITCH, basemapMenuClicked); ViewerContainer.addEventListener(AppEvent.SET_MAP_ACTION, enableMapAction); ViewerContainer.addEventListener(AppEvent.SHOW_INFOWINDOW, widgetShowInfo); ViewerContainer.addEventListener(AppEvent.MAP_RESIZE, resizeMap); ViewerContainer.addEventListener(AppEvent.DATA_OPT_LAYERS, sendOptlayers); ViewerContainer.addEventListener(AppEvent.MAP_LAYER_VISIBLE, changeLayerVisible); } protected override function partAdded(partName:String, instance:Object):void { super.partAdded(partName, instance); if (instance == map) { map.zoomSliderVisible = false; map.addEventListener(MapEvent.LOAD, mapLoadComplete); // This call changes the ESRI logo to ITRE's logo changeESRILogo(map); } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.