-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclipper.mxml
More file actions
56 lines (48 loc) · 1.65 KB
/
clipper.mxml
File metadata and controls
56 lines (48 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0" encoding="utf-8"?>
<!-- mxml\HellowWorld.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="initVars()">
<fx:Script>
<![CDATA[
import mx.core.FlexGlobals;
[Bindable]
public var clipperText:String;
[Embed('assets/button_up.png')]
public var iconUp: Class
[Embed('assets/button_over.png')]
public var iconOver: Class
[Embed('assets/button_down.png')]
public var iconDown: Class
private function initVars():void {
clipperText = FlexGlobals.topLevelApplication.parameters.text;
main_button.setStyle('icon', iconUp);
}
protected function main_button_click():void {
flash.system.System.setClipboard(clipperText);
}
protected function main_button_over():void {
main_button.setStyle('icon', iconOver);
}
protected function main_button_out():void {
main_button.setStyle('icon', iconUp);
}
protected function main_button_down():void {
main_button.setStyle('icon', iconDown);
}
protected function main_button_up():void {
main_button.setStyle('icon', iconUp);
}
]]>
</fx:Script>
<s:Button id="main_button"
width="14"
height="14"
click="main_button_click()"
mouseOver="main_button_over()"
mouseOut="main_button_out()"
mouseDown="main_button_down()"
mouseUp="main_button_up()"
/>
</s:Application>