Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

Commit 5571da0

Browse files
committed
added new snippets
1 parent a243755 commit 5571da0

File tree

3 files changed

+103
-2
lines changed

3 files changed

+103
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Change Log
2-
All notable changes to the "vscode-flex-snippets" extension will be documented in this file.
32

43

4+
### 0.0.3
5+
6+
- added new snippets: `LinkButton`, `BitmapImage`, `ViewStack`, `MX TabBar`, `Spark TabBar`, `Spark TabBar with tabs` and `TabNavigator`
7+
58
### 0.0.2
69

710
- added extension keywords

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,20 @@ Install extension in VSCode, start typing component name and select snippet.
176176

177177
`ZipCodeValidator`
178178

179+
`LinkButton`
180+
181+
`BitmapImage`
182+
183+
`ViewStack`
184+
185+
`MX TabBar`
186+
187+
`Spark TabBar`
188+
189+
`Spark TabBar with tabs`
190+
191+
`TabNavigator`
192+
179193
## How to create Flex projects in VSCode
180194

181195
Install [ActionScript & MXML extension for Visual Studio Code](https://as3mxml.com).

snippets/snippets.json

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,5 +618,89 @@
618618
"\t\t\t\t\t invalid=\"${9:ifInvalid}(${10:event})\"/>$0"
619619
],
620620
"description": "Creates a ZipCodeValidator"
621-
}
621+
},
622+
"LinkButton": {
623+
"prefix": "LinkButton",
624+
"body": [
625+
"<mx:LinkButton id=\"${1:linkButton}\" label=\"${2:Click me}\" click=\"${3:${1}_onClick}(event)\"/>$0"
626+
],
627+
"description": "Creates a LinkButton"
628+
},
629+
"BitmapImage": {
630+
"prefix": "BitmapImage",
631+
"body": [
632+
"<s:BitmapImage id=\"${bitmapImage}\" source=\"@Embed(source='${imageSource}')\"/>$0"
633+
],
634+
"description": "Creates a BitmapImage"
635+
},
636+
"ViewStack": {
637+
"prefix": "ViewStack",
638+
"body": [
639+
"<mx:ViewStack id=\"${1:myViewStack}\" width=\"${2:100%}\" height=\"${3:100%}\" borderStyle=\"${4|solid,none,inset,outset|}\">",
640+
"\t<s:NavigatorContent id=\"${5:first_nc}\" label=\"${6:First}\" width=\"${11:100%}\" height=\"${12:100%}\">",
641+
"\t\t<s:Label text=\"First Screen\"/> ",
642+
"\t</s:NavigatorContent>",
643+
"",
644+
"\t<s:NavigatorContent id=\"${7:second_nc}\" label=\"${8:Second}\" width=\"${11}\" height=\"${12}\">",
645+
"\t\t<s:Label text=\"Second Screen\"/> ",
646+
"\t</s:NavigatorContent>",
647+
"",
648+
"\t<s:NavigatorContent id=\"${9:third_nc}\" label=\"${10:Third}\" width=\"${11}\" height=\"${12}\">",
649+
"\t\t<s:Label text=\"Third Screen\"/> ",
650+
"\t</s:NavigatorContent>",
651+
"</mx:ViewStack>$0"
652+
],
653+
"description": "Creates a ViewStack"
654+
},
655+
"MX TabBar": {
656+
"prefix": "TabBar",
657+
"body": [
658+
"<mx:TabBar dataProvider=\"{${1:myViewStack}}\"/>$0"
659+
],
660+
"description": "Creates a MX TabBar"
661+
},
662+
"Spark TabBar": {
663+
"prefix": "TabBar",
664+
"body": [
665+
"<s:TabBar dataProvider=\"{${1:myViewStack}}\"/>$0"
666+
],
667+
"description": "Creates a Spark TabBar"
668+
},
669+
"Spark TabBar with tabs": {
670+
"prefix": "TabBar",
671+
"body": [
672+
"<s:TabBar dataProvider=\"{${1}}\"/>",
673+
"<mx:ViewStack id=\"${1:myViewStack}\" width=\"${2:100%}\" height=\"${3:100%}\" borderStyle=\"${4|solid,none,inset,outset|}\">",
674+
"\t<s:NavigatorContent id=\"${5:first_nc}\" label=\"${6:First}\" width=\"${11:100%}\" height=\"${12:100%}\">",
675+
"\t\t<s:Label text=\"First Screen\"/> ",
676+
"\t</s:NavigatorContent>",
677+
"",
678+
"\t<s:NavigatorContent id=\"${7:second_nc}\" label=\"${8:Second}\" width=\"${11}\" height=\"${12}\">",
679+
"\t\t<s:Label text=\"Second Screen\"/> ",
680+
"\t</s:NavigatorContent>",
681+
"",
682+
"\t<s:NavigatorContent id=\"${9:third_nc}\" label=\"${10:Third}\" width=\"${11}\" height=\"${12}\">",
683+
"\t\t<s:Label text=\"Third Screen\"/> ",
684+
"\t</s:NavigatorContent>",
685+
"</mx:ViewStack>$0"
686+
],
687+
"description": "Creates a Spark TabBar"
688+
},
689+
"TabNavigator": {
690+
"prefix": "TabNavigator",
691+
"body": [
692+
"<mx:TabNavigator id=\"${1:tabNavigator}\" width=\"${2:100%}\" height=\"${3:100%}\">",
693+
"\t<s:NavigatorContent width=\"100%\" height=\"100%\" label=\"Tab 1\">",
694+
"\t\t<s:Label text=\"This is tab 1\"/>",
695+
"\t</s:NavigatorContent>",
696+
"\t<s:NavigatorContent width=\"100%\" height=\"100%\" label=\"Tab 2\">",
697+
"\t\t<s:Label text=\"This is tab 2\"/>",
698+
"\t</s:NavigatorContent>",
699+
"\t<s:NavigatorContent width=\"100%\" height=\"100%\" label=\"Tab 3\">",
700+
"\t\t<s:Label text=\"This is tab 3\"/>",
701+
"\t</s:NavigatorContent>",
702+
"</mx:TabNavigator>$0"
703+
],
704+
"description": "Creates a TabNavigator with 3 tabs"
705+
}
622706
}

0 commit comments

Comments
 (0)