Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
It's full of stars

Rene Rubalcava odoe

💭
It's full of stars
View GitHub Profile
View MapLayerList.as
package org.lacsd.components {
import com.esri.ags.Map;
import com.esri.ags.events.MapEvent;
import com.esri.ags.layers.Layer;
import flash.events.Event;
import mx.collections.ArrayCollection;
import mx.logging.ILogger;
View MyMap.as
package net.odoe.components {
import com.esri.ags.Map;
import mx.controls.Image;
// New logo looks cool, but position changed
// slightly from previous versions and now it's in my way.
// Extend the Map object to tweak it a bit
public class MyMap extends Map {
View LayerInfoDetailItemRenderer.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
autoDrawBackground="true">
<fx:Metadata>
[Event(name="visibleLayerID", type="org.lacsd.events.LayerInfoDetailsEvent")]
</fx:Metadata>
<fx:Script>
@odoe
odoe / IteratorUtil.as
Created Nov 18, 2010
Actionscript 3 implementation of Duff's Device. Seems to work well.
View IteratorUtil.as
package {
public class IteratorUtil {
public static function duffDeviceOptimized(ar:Array, process:Function):void {
var x:int = ar.length;
if (x > 0) {
var t:int = 0;
var n:int = x % 8;
while (n--) {
process(ar[t++]);
@odoe
odoe / MagnifyWindow.as
Created Dec 23, 2010
Component that will Magnify a source ESRI Map.
View MagnifyWindow.as
package org.lacsd.sf.view.components {
import com.esri.ags.Map;
import com.esri.ags.events.MapEvent;
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.layers.ArcGISDynamicMapServiceLayer;
import flash.events.Event;
import mx.collections.ArrayCollection;
import mx.logging.ILogger;
@odoe
odoe / MagnifyPopUpWindow.as
Created Dec 23, 2010
TitleWindow that holds MagnifyWindow.as
View MagnifyPopUpWindow.as
package org.lacsd.sf.view.components {
import spark.components.TitleWindow;
import spark.events.TitleWindowBoundsEvent;
public class MagnifyPopUpWindow extends TitleWindow {
public function MagnifyPopUpWindow() {
super();
this.addEventListener(TitleWindowBoundsEvent.WINDOW_MOVING, onWindowMove_handler, false, 0, true);
this.addEventListener(TitleWindowBoundsEvent.WINDOW_MOVE_END, onWindowMove_handler, false, 0, true);
@odoe
odoe / CollapseContainer.as
Created Jan 10, 2011
A skinnable container component for Flex 4, used with ESRI Map.
View CollapseContainer.as
package org.lacsd.sf.view.components
{
import com.esri.ags.Map;
import flash.events.Event;
import mx.states.State;
import spark.components.SkinnableContainer;
@odoe
odoe / CollapseContainerSkin.mxml
Created Jan 10, 2011
Skin for CollapseContainer.as
View CollapseContainerSkin.mxml
<?xml version="1.0" encoding="utf-8"?>
<!--
ADOBE SYSTEMS INCORPORATED
Copyright 2008 Adobe Systems Incorporated
All Rights Reserved.
NOTICE: Adobe permits you to use, modify, and distribute this file
in accordance with the terms of the license agreement accompanying it.
@odoe
odoe / PopUpWindow.as
Created Jan 24, 2011
TitleWindow designed to not be dragged outside Flex Application Area.
View PopUpWindow.as
package net.odoe.components
{
import flash.events.Event;
import mx.core.FlexGlobals;
import mx.events.CloseEvent;
import mx.events.FlexEvent;
import mx.logging.ILogger;
import mx.managers.PopUpManager;
@odoe
odoe / MyComp.as
Created Jan 27, 2011
Simple example of using NativeMappedSignal in a Flex Component
View MyComp.as
package net.odoe.nmsExample.components
{
import flash.events.MouseEvent;
import org.osflash.signals.natives.NativeMappedSignal;
import spark.components.Button;
import spark.components.TextInput;
import spark.components.supportClasses.SkinnableComponent;
public class MyComp extends SkinnableComponent
You can’t perform that action at this time.