Skip to content

Instantly share code, notes, and snippets.

View velara3's full-sized avatar

Judah Frangipane velara3

View GitHub Profile
@velara3
velara3 / gist:96794b56b836ecedaa9f
Last active August 29, 2015 14:27
Ace Editor for Flex desktop AIR with MXML Property Inspector
/**
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
package effects.supportClasses {
import com.flexcapacitor.effects.supportClasses.ActionEffectInstance;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.common.ByteMatrix;
import com.google.zxing.common.flexdatatypes.HashTable;
import flash.display.BitmapData;
@velara3
velara3 / gist:73d9e339ac09aa46bc9a
Created February 7, 2016 06:32
How to use AIR badge installer and updater for your AIR apps
How to use AIR badge installer and updater for your AIR apps
Using this class in your application:
https://github.com/monkeypunch3/flexcapacitor/blob/master/MainLibrary/src/com/flexcapacitor/effects/application/UpdateApplication.as
Add the FCLibrary.swc to your project and then add this code to your main application file:
<fx:Declarations>
<handlers:EventHandler eventName="initialize">
<local:UpdateApplication id="updateApplication"
switch(event.charCode)
{
case 90: // Z
case 122: // z
/* pre-Argo and on the mac then ignoreNextTextEvent */
if (!Configuration.playerEnablesArgoFeatures && isMac) {
ignoreNextTextEvent = true;
}
if (event.shiftKey) {
<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/flexjs/basic"
xmlns:local="*"
xmlns:models="models.*"
>
<fx:Style>
@namespace basic "library://ns.apache.org/flexjs/basic";
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:ns="http://flex.apache.org/experimental/ns"
>
<ns:RichTextEditor verticalCenter="0" horizontalCenter="0" width="300" height="300"/>
</s:WindowedApplication>
@velara3
velara3 / gist:fbe737b1060c4970f31cc0ebf803a585
Created June 23, 2016 22:29
How to loop through files and update the file name using Flex AIR WindowedApplication
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:ns="http://flex.apache.org/experimental/ns"
xmlns:file="com.flexcapacitor.effects.file.*"
>
<fx:Script>
<![CDATA[
@velara3
velara3 / MXMLLiveEditPlugin
Created February 13, 2017 22:11
The MXMLLiveEditPlugin in the target application
package
{
import flash.events.Event;
import flash.events.StatusEvent;
import flash.net.LocalConnection;
import org.apache.flex.core.IBead;
import org.apache.flex.core.IStrand;
import org.apache.flex.events.Event;
import org.apache.flex.states.AddItems;
@velara3
velara3 / MXMLLiveAgent
Created February 13, 2017 22:16
MXML Live Agent
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication 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()">
<fx:Script>
<![CDATA[
private var commandconnection:LocalConnection;