├── LICENSE.txt ├── README.txt ├── bin ├── ExtendedMadnessLib0_3_1.swc └── MadComponentsLib0_8_1.swc ├── doc ├── AC_OETags.js ├── all-classes.html ├── all-index-A.html ├── all-index-B.html ├── all-index-C.html ├── all-index-D.html ├── all-index-E.html ├── all-index-F.html ├── all-index-G.html ├── all-index-H.html ├── all-index-I.html ├── all-index-J.html ├── all-index-K.html ├── all-index-L.html ├── all-index-M.html ├── all-index-N.html ├── all-index-O.html ├── all-index-P.html ├── all-index-Q.html ├── all-index-R.html ├── all-index-S.html ├── all-index-T.html ├── all-index-U.html ├── all-index-V.html ├── all-index-W.html ├── all-index-X.html ├── all-index-Y.html ├── all-index-Z.html ├── asdoc.js ├── asfiles │ ├── AlertIcon.html │ ├── AltCursor.html │ ├── Bar.html │ ├── BarGraph.html │ ├── Cell.html │ ├── ClickButton.html │ ├── Cross.html │ ├── Cursor.html │ ├── GraphPalette.html │ ├── GraphSettings.html │ ├── GraphShape.html │ ├── HBar.html │ ├── HBarGraph.html │ ├── HintText.html │ ├── Line.html │ ├── LineGraph.html │ ├── MyButton.html │ ├── MyEvent.html │ ├── MyMenu.html │ ├── MyPopUp.html │ ├── MyTextMenu.html │ ├── Packet.html │ ├── PieGraph.html │ ├── PrintAt.html │ ├── ScatterGraph.html │ ├── ScrollBar.html │ ├── ScrollBarButton.html │ ├── ScrollBarSkins.html │ ├── ScrollBarSlider.html │ ├── ScrollBarStyle.html │ ├── ScrollBarTrack.html │ ├── Segment.html │ ├── SimplePalette.html │ ├── class-list.html │ └── package-detail.html ├── class-summary.html ├── com │ └── danielfreeman │ │ ├── extendedMadness │ │ ├── AlertMessage.html │ │ ├── DGModel.html │ │ ├── Star.html │ │ ├── UIBarChart.html │ │ ├── UICell.html │ │ ├── UICheckBox.html │ │ ├── UICutCopyPaste.html │ │ ├── UIDropWindow.html │ │ ├── UIFastDataGrid.html │ │ ├── UIField.html │ │ ├── UIHorizontalChart.html │ │ ├── UIIcons.html │ │ ├── UIImage9.html │ │ ├── UIImageX.html │ │ ├── UILabelFTE.html │ │ ├── UILine.html │ │ ├── UILineChart.html │ │ ├── UIListHorizontal.html │ │ ├── UIMenu.html │ │ ├── UIPageTurn.html │ │ ├── UIPanel.html │ │ ├── UIPieChart.html │ │ ├── UIProgressBar.html │ │ ├── UIRadialSlider.html │ │ ├── UIRadioButton.html │ │ ├── UIScatterChart.html │ │ ├── UIScreens.html │ │ ├── UIScrollBarHorizontal.html │ │ ├── UIScrollBarPanel.html │ │ ├── UIScrollBarVertical.html │ │ ├── UIScrollDataGrid.html │ │ ├── UIScrollDataGrids.html │ │ ├── UIScrollHorizontal.html │ │ ├── UIScrollTouchGrids.html │ │ ├── UIScrollXY.html │ │ ├── UISegmentedControl.html │ │ ├── UISimpleDataGrid.html │ │ ├── UISkin.html │ │ ├── UISlideOutNavigation.html │ │ ├── UISpecialDataGrid.html │ │ ├── UISplitView.html │ │ ├── UIStarRating.html │ │ ├── UISwitchX.html │ │ ├── UITabButtonRow.html │ │ ├── UITabPagesSliding.html │ │ ├── UITabPagesTop.html │ │ ├── UITable.html │ │ ├── UITextSlider.html │ │ ├── UITick.html │ │ ├── UITickList.html │ │ ├── UITickOneList.html │ │ ├── UITouch.html │ │ ├── UITreeNavigation.html │ │ ├── UIWheelMenu.html │ │ ├── UIe.html │ │ ├── class-list.html │ │ └── package-detail.html │ │ └── madcomponents │ │ ├── Attributes.html │ │ ├── Colour.html │ │ ├── IComponentUI.html │ │ ├── IContainerUI.html │ │ ├── MadMasking.html │ │ ├── MadSprite.html │ │ ├── Model.html │ │ ├── TinyJSON.html │ │ ├── UI.html │ │ ├── UIActivity.html │ │ ├── UIBackButton.html │ │ ├── UIBlueText.html │ │ ├── UIButton.html │ │ ├── UIButtonX.html │ │ ├── UICircular.html │ │ ├── UIContainerBaseClass.html │ │ ├── UIDividedList.html │ │ ├── UIForm.html │ │ ├── UIGroupedList.html │ │ ├── UIImage.html │ │ ├── UIImageLoader.html │ │ ├── UIInput.html │ │ ├── UIInputX.html │ │ ├── UILabel.html │ │ ├── UILabelX.html │ │ ├── UIList.html │ │ ├── UILongList.html │ │ ├── UINavigation.html │ │ ├── UINavigationBar.html │ │ ├── UINavigationPages.html │ │ ├── UIPages.html │ │ ├── UIPicker.html │ │ ├── UIPickerView.html │ │ ├── UIRefresh.html │ │ ├── UIRenderer.html │ │ ├── UIScrollVertical.html │ │ ├── UISearch.html │ │ ├── UISlider.html │ │ ├── UISliderX.html │ │ ├── UISpacer.html │ │ ├── UISwitch.html │ │ ├── UITabButton.html │ │ ├── UITabPages.html │ │ ├── UIViewFlipper.html │ │ ├── UIWindow.html │ │ ├── class-list.html │ │ └── package-detail.html ├── cookies.js ├── help.js ├── images │ ├── AirIcon12x12.gif │ ├── P_AlternativeMetadataIndicator_30x28_N.png │ ├── collapsed.gif │ ├── detailHeaderRule.jpg │ ├── detailSectionHeader.jpg │ ├── expanded.gif │ ├── inherit-arrow.gif │ ├── inheritedSummary.gif │ ├── logo.jpg │ ├── titleTableBottom.jpg │ ├── titleTableMiddle.jpg │ └── titleTableTop.jpg ├── index-list.html ├── index.html ├── override.css ├── package-frame.html ├── package-list.html ├── package-summary.html ├── print.css ├── style.css ├── title-bar.html └── validation_errors.log ├── examples ├── Chapter3Calculator.as ├── DataGridExample1.as ├── DataGridExample2.as ├── DataGridExample3.as ├── DataGridExample4.as ├── ExtendedMadnessDataGrid.as ├── ExtendedMadnessDetailList.as ├── ExtendedMadnessInWindow.as ├── ExtendedMadnessPureSegmented.as ├── ExtendedMadnessScreens.as ├── ExtendedMadnessScrollXY.as ├── ExtendedMadnessSplitView.as ├── ExtendedMadnessTabPagesNav.as ├── ExtendedMadnessTabPagesTop.as ├── ExtendedMadnessTickList.as ├── ExtendedMadnessTreeNavigation.as ├── ExtendedMadnessTreeNavigation2.as ├── GameTeamExample.as ├── MadComponents.as ├── MadComponents9Patch.as ├── MadComponentsAMF.as ├── MadComponentsDividedList.as ├── MadComponentsFragment0.as ├── MadComponentsFragment1.as ├── MadComponentsFragment2.as ├── MadComponentsFullPageTab.as ├── MadComponentsJSON.as ├── MadComponentsLongList.as ├── MadComponentsNavigation.as ├── MadComponentsNavigationPages.as ├── MadComponentsNavigationT0.as ├── MadComponentsNavigationT1.as ├── MadComponentsNavigationT2.as ├── MadComponentsPicker.as ├── MadComponentsViewFlipper.as ├── MadGroups.as ├── MadHelloWorld.as ├── MadImage.as ├── MadLists.as └── images │ ├── arrow.png │ ├── buddha.jpg │ ├── dragon.jpg │ ├── faces.jpg │ ├── list.png │ ├── monks.jpg │ ├── mp3_48.png │ ├── mp4_48.png │ ├── options.png │ ├── palm_48.png │ ├── psp_48.png │ ├── red.png │ ├── refresh.png │ ├── target.png │ ├── temple.jpg │ ├── thailand.png │ ├── usb_48.png │ ├── views.png │ └── zoomin.png └── src ├── asfiles ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── AlertIcon.as.svn-base │ │ ├── AltCursor.as.svn-base │ │ ├── Bar.as.svn-base │ │ ├── BarGraph.as.svn-base │ │ ├── Cell.as.svn-base │ │ ├── ClickButton.as.svn-base │ │ ├── Cross.as.svn-base │ │ ├── Cursor.as.svn-base │ │ ├── GraphPalette.as.svn-base │ │ ├── GraphSettings.as.svn-base │ │ ├── GraphShape.as.svn-base │ │ ├── HBar.as.svn-base │ │ ├── HBarGraph.as.svn-base │ │ ├── HintText.as.svn-base │ │ ├── Line.as.svn-base │ │ ├── LineGraph.as.svn-base │ │ ├── MyButton.as.svn-base │ │ ├── MyEvent.as.svn-base │ │ ├── MyEventBubbling.as.svn-base │ │ ├── MyMenu.as.svn-base │ │ ├── MyPopUp.as.svn-base │ │ ├── MyTextMenu.as.svn-base │ │ ├── Packet.as.svn-base │ │ ├── PieGraph.as.svn-base │ │ ├── PrintAt.as.svn-base │ │ ├── ScatterGraph.as.svn-base │ │ ├── ScrollBar.as.svn-base │ │ ├── ScrollBarButton.as.svn-base │ │ ├── ScrollBarSkins.as.svn-base │ │ ├── ScrollBarSlider.as.svn-base │ │ ├── ScrollBarStyle.as.svn-base │ │ ├── ScrollBarTrack.as.svn-base │ │ ├── Segment.as.svn-base │ │ ├── SimplePalette.as.svn-base │ │ └── TextMenu.as.svn-base ├── AlertIcon.as ├── AltCursor.as ├── Bar.as ├── BarGraph.as ├── Cell.as ├── ClickButton.as ├── Cross.as ├── Cursor.as ├── GraphPalette.as ├── GraphSettings.as ├── GraphShape.as ├── HBar.as ├── HBarGraph.as ├── HintText.as ├── Line.as ├── LineGraph.as ├── MyButton.as ├── MyEvent.as ├── MyEventBubbling.as ├── MyMenu.as ├── MyPopUp.as ├── MyTextMenu.as ├── Packet.as ├── PieGraph.as ├── PrintAt.as ├── ScatterGraph.as ├── ScrollBar.as ├── ScrollBarButton.as ├── ScrollBarSkins.as ├── ScrollBarSlider.as ├── ScrollBarStyle.as ├── ScrollBarTrack.as ├── Segment.as ├── SimplePalette.as └── TextMenu.as └── com └── danielfreeman ├── extendedMadness ├── .svn │ ├── all-wcprops │ ├── entries │ └── text-base │ │ ├── AlertMessage.as.svn-base │ │ ├── DGModel.as.svn-base │ │ ├── Star.as.svn-base │ │ ├── UIBarChart.as.svn-base │ │ ├── UICheckBox.as.svn-base │ │ ├── UIContainerBaseClass.as.svn-base │ │ ├── UICutCopyPaste.as.svn-base │ │ ├── UIDataGrid.as.svn-base │ │ ├── UIDetailList.as.svn-base │ │ ├── UIDropWindow.as.svn-base │ │ ├── UIField.as.svn-base │ │ ├── UIHorizontalChart.as.svn-base │ │ ├── UIIcons.as.svn-base │ │ ├── UIImage9.as.svn-base │ │ ├── UIImageX.as.svn-base │ │ ├── UILine.as.svn-base │ │ ├── UILineChart.as.svn-base │ │ ├── UIListHorizontal.as.svn-base │ │ ├── UIMenu.as.svn-base │ │ ├── UIPageTurn.as.svn-base │ │ ├── UIPanel.as.svn-base │ │ ├── UIPieChart.as.svn-base │ │ ├── UIPopUpButton.as.svn-base │ │ ├── UIProgressBar.as.svn-base │ │ ├── UIRadioButton.as.svn-base │ │ ├── UIScatterChart.as.svn-base │ │ ├── UIScrollBarHorizontal.as.svn-base │ │ ├── UIScrollBarPanel.as.svn-base │ │ ├── UIScrollBarVertical.as.svn-base │ │ ├── UIScrollHorizontal.as.svn-base │ │ ├── UIScrollXY.as.svn-base │ │ ├── UISegmentedControl.as.svn-base │ │ ├── UISkin.as.svn-base │ │ ├── UISlideOutNavigation.as.svn-base │ │ ├── UISplitView.as.svn-base │ │ ├── UIStarRating.as.svn-base │ │ ├── UITabButtonRow.as.svn-base │ │ ├── UITabPagesTop.as.svn-base │ │ ├── UITick.as.svn-base │ │ ├── UITickList.as.svn-base │ │ ├── UITickOneList.as.svn-base │ │ ├── UITouch.as.svn-base │ │ ├── UITreeNavigation.as.svn-base │ │ ├── UIWheelMenu.as.svn-base │ │ └── UIe.as.svn-base ├── AlertMessage.as ├── DGModel.as ├── Star.as ├── UIBarChart.as ├── UICell.as ├── UICheckBox.as ├── UICutCopyPaste.as ├── UIDropWindow.as ├── UIFastDataGrid.as ├── UIField.as ├── UIHorizontalChart.as ├── UIIcons.as ├── UIImage9.as ├── UIImageX.as ├── UILabelFTE.as ├── UILine.as ├── UILineChart.as ├── UIListHorizontal.as ├── UIMenu.as ├── UIPageTurn.as ├── UIPanel.as ├── UIPieChart.as ├── UIProgressBar.as ├── UIRadialSlider.as ├── UIRadioButton.as ├── UIScatterChart.as ├── UIScreens.as ├── UIScrollBarHorizontal.as ├── UIScrollBarPanel.as ├── UIScrollBarVertical.as ├── UIScrollDataGrid.as ├── UIScrollDataGrids.as ├── UIScrollHorizontal.as ├── UIScrollTouchGrids.as ├── UIScrollXY.as ├── UISegmentedControl.as ├── UISimpleDataGrid.as ├── UISkin.as ├── UISlideOutNavigation.as ├── UISpecialDataGrid.as ├── UISplitView.as ├── UIStarRating.as ├── UISwitchX.as ├── UITabButtonRow.as ├── UITabPagesSliding.as ├── UITabPagesTop.as ├── UITable.as ├── UITextSlider.as ├── UITick.as ├── UITickList.as ├── UITickOneList.as ├── UITouch.as ├── UITreeNavigation.as ├── UIWheelMenu.as ├── UIe.as └── UIe.as.cpgz └── madcomponents ├── Attributes.as ├── Colour.as ├── IComponentUI.as ├── IContainerUI.as ├── MadMasking.as ├── MadSprite.as ├── Model.as ├── TinyJSON.as ├── UI.as ├── UI.as.cpgz ├── UIActivity.as ├── UIBackButton.as ├── UIBlueText.as ├── UIButton.as ├── UIButtonX.as ├── UICircular.as ├── UIContainerBaseClass.as ├── UIDividedList.as ├── UIForm.as ├── UIGroupedList.as ├── UIImage.as ├── UIImageLoader.as ├── UIInput.as ├── UIInputX.as ├── UILabel.as ├── UILabelX.as ├── UIList.as ├── UILongList.as ├── UINavigation.as ├── UINavigationBar.as ├── UINavigationPages.as ├── UIPages.as ├── UIPicker.as ├── UIPickerView.as ├── UIRefresh.as ├── UIRenderer.as ├── UIScrollVertical.as ├── UISearch.as ├── UISlider.as ├── UISliderX.as ├── UISpacer.as ├── UISwitch.as ├── UITabButton.as ├── UITabPages.as ├── UIViewFlipper.as └── UIWindow.as /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Original Author: Daniel Freeman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | 22 | Licensed under The MIT License 23 | Redistributions of files must retain the above copyright notice. -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | User Interface components for Adobe AIR Mobile. Buttons, Labels, Image, Lists, List Navigation, View Flipper, Pages, Tab Pages etc. The layout is described using XML. The framework handles different screen sizes and resolutions. When the device orientation changes, the user interface is redrawn and adjusted for landscape or portrait viewing. 2 | 3 | The model feature enables connection of lists and forms to remote data services. 4 | You can download or check-out a code example from here. Download documentation from:- 5 | 6 | http://code.google.com/p/mad-components/downloads/list 7 | 8 | INTRODUCTION 9 | http://madskool.wordpress.com/2011/03/18/madcomponents-wow/ 10 | 11 | TUTORIAL SERIES 12 | 1. http://madskool.wordpress.com/2011/06/20/tutorial-1-fb-4-5-hello-world-done-the-madcomponents-way/ 13 | 2. http://madskool.wordpress.com/2011/06/23/tutorial-2-images-and-nine-patch-images-in-madcomponents/ 14 | 3. http://madskool.wordpress.com/2011/06/30/tutorial-3-lists-and-pickers/ 15 | 4. http://madskool.wordpress.com/2011/07/01/tutorial-4-building-a-mobile-twitter-client/ 16 | 5. http://madskool.wordpress.com/2011/07/13/tutorial-5-deploying-to-mobile-devices/ 17 | 6. http://madskool.wordpress.com/2011/07/18/tutorial-6-more-madcomponents/ 18 | 7. http://madskool.wordpress.com/2011/07/25/tutorial-7-madcomponents-amf-service-test-drive-for-mobile/ 19 | 20 | Michael Martinez' tutorials:- 21 | http://caffeineindustries.com/?p=221 22 | http://caffeineindustries.com/?p=234 23 | http://caffeineindustries.com/?p=283 24 | -------------------------------------------------------------------------------- /bin/ExtendedMadnessLib0_3_1.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danfreeman/MadComponents/fc3f1e5104b04b9a1ca93b533ded3f8ab42dd617/bin/ExtendedMadnessLib0_3_1.swc -------------------------------------------------------------------------------- /bin/MadComponentsLib0_8_1.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danfreeman/MadComponents/fc3f1e5104b04b9a1ca93b533ded3f8ab42dd617/bin/MadComponentsLib0_8_1.swc -------------------------------------------------------------------------------- /doc/asfiles/class-list.html: -------------------------------------------------------------------------------- 1 |
A | 19 |N | 20 |
B | 23 |O | 24 |
C | 27 |P | 28 |
D | 31 |Q | 32 |
E | 35 |R | 36 |
F | 39 |S | 40 |
G | 43 |T | 44 |
H | 47 |U | 48 |
I | 51 |V | 52 |
J | 55 |W | 56 |
K | 59 |X | 60 |
L | 63 |Y | 64 |
M | 67 |Z | 68 |
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
12 |
13 | Link toNon-frame version.
14 |
asfiles |
com.danielfreeman.extendedMadness |
com.danielfreeman.madcomponents |
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | package 26 | { 27 | import com.danielfreeman.extendedMadness.*; 28 | import com.danielfreeman.madcomponents.*; 29 | 30 | import flash.display.Sprite; 31 | import flash.display.StageAlign; 32 | import flash.display.StageScaleMode; 33 | import flash.events.Event; 34 | 35 | public class ExtendedMadnessTickList extends Sprite 36 | { 37 | protected static const DATA:XML = 38 |Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | 27 | package 28 | { 29 | import com.danielfreeman.madcomponents.*; 30 | 31 | import flash.display.Sprite; 32 | import flash.display.StageAlign; 33 | import flash.display.StageScaleMode; 34 | import flash.utils.getQualifiedClassName; 35 | 36 | public class MadComponents9Patch extends Sprite { 37 | 38 | [Embed(source="images/red.png", 39 | scaleGridTop="40", scaleGridBottom="200", 40 | scaleGridLeft="40", scaleGridRight="200")] 41 | protected static const RED:Class; 42 | 43 | protected static const LAYOUT:XML =Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package 27 | { 28 | import com.danielfreeman.madcomponents.*; 29 | 30 | import flash.display.Sprite; 31 | import flash.display.StageAlign; 32 | import flash.display.StageScaleMode; 33 | import flash.events.Event; 34 | 35 | public class MadComponentsLongList extends Sprite 36 | { 37 | protected static const NUMBER_OF_ROWS:int = 300; 38 | 39 | protected static const LAYOUT:XML =Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package 27 | { 28 | import com.danielfreeman.madcomponents.*; 29 | 30 | import flash.display.Sprite; 31 | import flash.display.StageAlign; 32 | import flash.display.StageScaleMode; 33 | import flash.events.Event; 34 | import flash.events.MouseEvent; 35 | 36 | 37 | public class MadComponentsNavigationT2 extends Sprite 38 | { 39 | protected static const DATA:XML = 40 |Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import com.danielfreeman.madcomponents.*; public class MadHelloWorld extends Sprite { protected static const HOME_VIEW:XML =Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | package 26 | { 27 | import com.danielfreeman.madcomponents.*; 28 | 29 | import flash.display.Sprite; 30 | import flash.display.StageAlign; 31 | import flash.display.StageScaleMode; 32 | import flash.events.MouseEvent; 33 | import flash.utils.getQualifiedClassName; 34 | 35 | public class MadImage extends Sprite 36 | { 37 | [Embed(source="images/mp3_48.png")] 38 | protected static const MP3:Class; 39 | 40 | [Embed(source="images/mp4_48.png")] 41 | protected static const MP4:Class; 42 | 43 | protected static const IMAGE:XML =Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | package 26 | { 27 | import com.danielfreeman.madcomponents.*; 28 | 29 | import flash.display.Sprite; 30 | import flash.display.StageAlign; 31 | import flash.display.StageScaleMode; 32 | 33 | public class MadLists extends Sprite 34 | { 35 | protected static const DATA:XML = 36 |Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.filters.BevelFilter; import flash.filters.DropShadowFilter; import flash.display.GradientType; public class AlertIcon extends Sprite { private const linecolour:uint=0xffdd66; private const fillcolour:uint=0xffec7f; private const gradcolour:uint=0xffee66; private const symbolcolour:uint=0xffffff; private const segangle:int=120; private const symbolwidth:int=5; private const symbolheight:int=22; private const st:int=22; private const offset:int=10; private const torad:Number=Math.PI/180; public function AlertIcon(screen:Sprite,xx:int,yy:int) { var myfilters:Array=new Array(); var j:int; screen.addChild(this);x=xx;y=yy; graphics.clear(); graphics.lineStyle(0,linecolour); graphics.beginGradientFill(GradientType.LINEAR,[gradcolour,fillcolour],[1,1],[0x00,0xff]); // graphics.beginFill(fillcolour); graphics.moveTo(0,st); for (j=0;j<3;j++) graphics.curveTo(st*2*Math.sin(torad*(j+.5)*segangle),st*2*Math.cos(torad*(j+.5)*segangle),st*Math.sin(torad*(j+1)*segangle),st*Math.cos(torad*(j+1)*segangle)); graphics.beginFill(symbolcolour); graphics.moveTo(0,-symbolheight/2-offset); for (j=0;j<3;j++) graphics.curveTo(symbolwidth*2*Math.sin(torad*(j+.5)*segangle),-symbolheight*Math.cos(torad*(j+.5)*segangle)-offset,symbolwidth*Math.sin(torad*(j+1)*segangle),-symbolheight/2*Math.cos(torad*(j+1)*segangle)-offset); graphics.drawCircle(0,symbolheight/2,symbolwidth); myfilters.push(new BevelFilter(0.5,45,0xffffff,1,0x666633,0.9,4,4,1,1,"outer")); // myfilters.push(new DropShadowFilter(3.0,45,0xcccccc,0.5)); filters=myfilters; } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/AltCursor.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.display.Stage; import flash.filters.DropShadowFilter; import flash.ui.Mouse; import flash.geom.Rectangle; import flash.events.MouseEvent; import com.danielfreeman.madcomponents.Colour; public class AltCursor extends Sprite { private const head:int=12; private const tail:int=16; private const slantx:int=3; private const slanty:int=2; public function AltCursor(colour:uint=0xeeeeee) { //screen:Sprite=null,xx:int=0,yy:int=0) { var myfilters:Array=new Array(); // x=xx;y=yy; // if (screen!=null) screen.addChild(this); mouseEnabled=false; graphics.clear(); graphics.lineStyle(0,Colour.darken(colour)); graphics.beginFill(colour); graphics.moveTo(0,0); graphics.lineTo(0,head); graphics.lineTo(slantx,head-slanty); graphics.lineTo(2*slantx,tail); graphics.lineTo(3*slantx,tail-slanty/2); graphics.lineTo(2*slantx,head-2*slanty); graphics.lineTo(3.5*slantx,head-2*slanty); graphics.lineTo(0,0); graphics.endFill(); myfilters.push(new DropShadowFilter(2.0,45,0x000000)); filters=myfilters; } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/Cross.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import com.danielfreeman.madcomponents.Colour; public class Cross extends GraphShape { private var bw:Number; private var wdth:int,h:int; public function Cross(screen:Sprite) { super(screen); } public function drawcross(wdth:Number,hght:Number, cell:Cell,soffset:Number,xx:int,c:uint,threed:Boolean=false,stack:Boolean=false,top:Boolean=false):void { h=-Math.round(hght*((cell!=null && cell.isvalue) ? cell.value : 0)); x=xx*wdth;y=soffset;this.cell=cell;colour=c; bw=0.7; // bw=0.7; if (threed && !stack) bw=0.6; // else if (stack && !threed) bw=bw+0.05; // if (threed) thick=bw*wdth/3; else thick=0; if (thick>8) thick = 8;trace('DRAWBAR thick='+thick); this.wdth=wdth; // setsizes(this.wdth=wdth,threed,stack); // graphics.clear(); // graphics.beginFill(c); // graphics.lineStyle(0,Colour.darken(c)); // graphics.drawRect(0,0,bw*wdth,h); cross(bw*wdth,h,c); } private function cross(xx:int,yy:int,colour:uint,size:int=5,wdth:int=2):void { graphics.clear(); graphics.lineStyle(1,Colour.darken(colour)); graphics.beginFill(colour); graphics.moveTo(xx+size,yy+size-wdth); graphics.lineTo(xx+size-wdth,yy+size); graphics.lineTo(xx,yy+wdth); graphics.lineTo(xx-size+wdth,yy+size); graphics.lineTo(xx-size,yy+size-wdth); graphics.lineTo(xx-wdth,yy); graphics.lineTo(xx-size,yy-size+wdth); graphics.lineTo(xx-size+wdth,yy-size); graphics.lineTo(xx,yy-wdth); graphics.lineTo(xx+size-wdth,yy-size); graphics.lineTo(xx+size,yy-size+wdth); graphics.lineTo(xx+wdth,yy); graphics.lineTo(xx+size,yy+size-wdth); } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/GraphSettings.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { public class GraphSettings { public static const SELECTED:String='GraphSettings.selected'; public static const THREED:String='GraphSettings.threed'; public static const STACK:String='GraphSettings.stack'; public static const SWAP:String='GraphSettings.swap'; public static const START:String='GraphSettings.start'; public static const RAINBOW:String='GraphSettings.rainbow'; public static const GREYSCALE0:String='GraphSettings.greyscale0'; public static const SUBTLE:String='GraphSettings.subtle'; public static const GREYSCALE1:String='GraphSettings.greyscale1'; public static const NEWMODE:String='GraphSettings.newmode'; public static const SHOW:String='GraphSettings.show'; public static const HIDE:String='GraphSettings.hide'; } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/GraphShape.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.display.Shape; import flash.text.TextField; import flash.text.TextFormat; import flash.text.TextFieldType; import flash.text.TextFieldAutoSize; import flash.ui.Mouse; import flash.events.MouseEvent; public class GraphShape extends Sprite { public var altcursor:AltCursor=new AltCursor(); public var cell:Cell; public var colour:uint; private var screen:Sprite; public var flabel:String=''; public function GraphShape(screen:Sprite) { (this.screen=screen).addChild(this); addEventListener(MouseEvent.MOUSE_OVER,mouseover); addEventListener(MouseEvent.MOUSE_OUT,mouseout); } public function mouseover(ev:MouseEvent):void { Cursor.changecursor(stage,altcursor); if (flabel!='') Cursor.cursorhint(stage,flabel); else Cursor.cursorhint(stage,cell!=null ? cell.text : '0'); if (cell!=null) {cell.backgroundColor=colour;cell.background=true;} } public function mouseout(ev:MouseEvent):void { Cursor.changecursor(stage); // stage.dispatchEvent(new MyEvent('cursor',null)); Cursor.cursorhint(stage); if (cell!=null) {cell.backgroundColor=0xffffff;cell.background=false;} } public function destructor():void { removeEventListener(MouseEvent.MOUSE_OVER,mouseover); removeEventListener(MouseEvent.MOUSE_OUT,mouseout); screen.removeChild(this); } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/HBar.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import flash.filters.BevelFilter; import flash.filters.DropShadowFilter; import com.danielfreeman.madcomponents.Colour; public class HBar extends GraphShape { private const bw:Number=0.90; private var h:int; private var fval:Number; public function HBar(screen:Sprite) { super(screen); } public function drawbar(wdth:Number,hght:Number,cell:Cell,soffset:Number,xx:int,c:uint,threed:Boolean=false,stack:Boolean=false,top:Boolean=false,fval:int=-1,flabel:String=''):void { var valu:String=(cell!=null) ? cell.text : '0'; var myfilters:Array=new Array(); if ((this.fval=fval)<0) h=Math.round(wdth*((cell!=null && cell.isvalue) ? cell.value : 0)); else {h=Math.round(wdth*fval);this.flabel=flabel+': '+fval;} y=xx*hght;x=soffset;this.cell=cell;colour=c; graphics.clear(); graphics.beginFill(c); graphics.lineStyle(0,Colour.darken(c)); graphics.drawRect(0,0,h,bw*hght); if (threed) { myfilters.push(new BevelFilter(bw*hght/4,90,0xffffff,0.6,0x000000,0.6)); myfilters.push(new DropShadowFilter(2.0,45,0x999999)); filters=myfilters; } else filters=null; } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/HBarGraph.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import flash.filters.BevelFilter; import flash.filters.DropShadowFilter; public class HBarGraph extends BarGraph { public function HBarGraph(screen:Sprite,xx:int,yy:int,select:Packet,ss:*=null,freq:Boolean=false) { super(screen,xx,yy,select,ss,freq);iam=3; } override public function plotbar(screen:Sprite,wdth:Number, hght:Number, soffset:Number, cell:Cell, i:int, xx:int, c:uint, top:Boolean, fval:int,flabel:String):void { var h:Number; if (swap) h=(datai==1 || stack) ? h=myheight/dataj : myheight/(dataj*(datai+1)-1); else h=(dataj==1 || stack) ? h=myheight/datai : myheight/(datai*(dataj+1)-1); if (bars[i]==null) bars[i]=new HBar(screen); bars[i].drawbar((srange==0) ? mywidth : (mywidth/srange),h,freq ? null : cell,sxoffset,xx,c,threed,stack,top,fval,flabel); } override public function gridbehind():void { var yy:int;//trace('step='+step+' swdth='+swdth); gridbe.graphics.clear(); gridbe.graphics.lineStyle(1,0xddddff); gridbe.graphics.moveTo(0,0); gridbe.graphics.lineTo(mywidth,0); gridbe.graphics.moveTo(0,myheight); gridbe.graphics.lineTo(mywidth,myheight); for (var i:int=0;i<=sintervals;i++) { yy=i*mywidth/sintervals; gridbe.graphics.moveTo(yy,0); gridbe.graphics.lineTo(yy,myheight); } } override public function drawaxis():void { drawax.graphics.clear(); drawax.graphics.lineStyle(2,0x666666); drawax.graphics.moveTo(sxoffset,0); drawax.graphics.lineTo(sxoffset,myheight); } override public function drawscale(screen:Sprite):void { } override public function dddaxis(x0:Number,x1:Number,neg:Boolean):void { } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/HintText.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.text.TextFormat; public class HintText extends PrintAt { public static var SIZE:int = 11; public function HintText(screen:Sprite) { super(screen,0,0,'',null,new TextFormat('Arial',SIZE)); background=border=true; borderColor=0xcccccc; backgroundColor=0xffffcc; } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/Line.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; public class Line extends GraphShape { private var wdth:Number,hght:Number,soffset:Number; private var cells:Array=new Array(); private var lg:LineGraph; public function Line(screen:Sprite,lg:LineGraph) { super(screen);this.lg=lg; } public function interpolate(xx:Number):String { var p:int=Math.floor(xx/wdth); var r:Number=(xx-p*wdth)/wdth; if (r<0.05) return '* '+lg.formatit(cellvalue(cells[p])); else if (r>0.95) return '* '+lg.formatit(cellvalue(cells[p+1])); return lg.formatit(Math.round(((1-r)*cellvalue(cells[p])+r*cellvalue(cells[p+1]))*100)/100); } private function cellvalue(cell:Cell):Number { return (cell!=null && cell.isvalue) ? cell.value : 0; } private function ycoord(cell:Cell):int { return soffset-hght*cellvalue(cell); } public function moveto(c:uint,soffset:Number,wdth:Number,hght:Number,cell:Cell):void { this.wdth=wdth;this.soffset=soffset;this.hght=hght; graphics.clear(); graphics.lineStyle(2,colour=c); graphics.moveTo(0,ycoord(cells[0]=cell)); } public function lineto(i:int,cell:Cell):void { graphics.lineTo(i*wdth,ycoord(cells[i]=cell)); } override public function mouseover(ev:MouseEvent):void { Cursor.changecursor(stage,altcursor); Cursor.cursorhint(stage,interpolate(mouseX)); addEventListener(MouseEvent.MOUSE_MOVE,mousemove); for (var i:int=0;iPermission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.events.Event; public class MyEvent extends Event { private var eventparams:Array=new Array(); public function MyEvent(what:String,... parameters) { eventparams=parameters; super(what); } public function get parameters():Array { return eventparams; } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/MyEventBubbling.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.events.Event; public class MyEventBubbling extends Event { private var eventparams:Array=new Array(); public function MyEventBubbling(what:String,... parameters) { eventparams=parameters; super(what,true); } public function get parameters():Array { return eventparams; } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/MyTextMenu.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.text.TextFormat; public class MyTextMenu extends MyPopUp { public static const SELECTED:String='selected'; protected var mnu:MyMenu; public var txt:PrintAt; protected var showop:Boolean; protected var val:int; public function MyTextMenu(screen:Sprite,xx:int,yy:int,options:Array,init:String="",hint:String=null,frmt:TextFormat=null,mfrmt:TextFormat=null,showop:Boolean=true,dontmove:Boolean=true) { this.showop=showop; buttonMode=useHandCursor=true; mnu=new MyMenu(options,mfrmt); txt=new PrintAt(this,0,0,(init!="" || options.length==0) ? init : options[0],null,frmt); super(screen,xx,yy,mnu,hint,dontmove); mnu.addEventListener(MyMenu.SELECTED,mnuselected); } override public function redraw(colour:uint = 0):void { } public function get value():int { return val; } public function get text():String { return txt.text; } public function enable(idx:int,onoff:Boolean,newlabel:String=''):void { if (idx<0) visible=onoff; else mnu.enable(idx,onoff,newlabel); } public function update(what:String):void { if (what==null) txt.text='----'; else txt.text=what; } public function set options(value:Array):void { mnu.options=value; } protected function mnuselected(ev:MyEvent):void { if (showop) txt.text=ev.parameters[1]; dispatchEvent(new MyEvent(SELECTED,val=ev.parameters[0],ev.parameters[1])); } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/PrintAt.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.text.TextField; import flash.text.TextFormat; import flash.text.TextFieldType; import flash.text.TextFieldAutoSize; import flash.events.MouseEvent; import flash.events.FocusEvent; import flash.events.TextEvent; public class PrintAt extends TextField { public function PrintAt(screen:Sprite,xx:int,yy:int,txt:String,algn:String=null,format:TextFormat=null) { screen.addChild(this);y=yy; mouseEnabled=multiline=selectable=false; type=TextFieldType.DYNAMIC; if (algn==null) autoSize=TextFieldAutoSize.LEFT; else autoSize=algn; if (format==null) format=new TextFormat('Arial',11,0x666666); defaultTextFormat=format;height=10; text=txt; if (autoSize==TextFieldAutoSize.CENTER) {y=yy-height/2;x=xx-width/2;} else if (autoSize==TextFieldAutoSize.RIGHT) x=xx-width; else x=xx; } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/ScatterGraph.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import flash.filters.BevelFilter; import flash.filters.DropShadowFilter; public class ScatterGraph extends GraphPalette { private var bars:Array = []; public function ScatterGraph(screen:Sprite,xx:int,yy:int,select:Packet,ss:*=null,stack:Boolean=false) { iam=4; super(screen,xx,yy,select,ss); // controls=new GraphControls(this,frame/2,frame/2,'scatter graph',false,false,swap=datai>1 && dataj>1); resize(wdth,hght); // controls.addEventListener(MouseEvent.CLICK,controlsclick); } public function plotcross(screen:Sprite,wdth:Number, hght:Number, soffset:Number, cell:Cell, i:int, xx:int, c:uint, top:Boolean):void { if (bars[i]==null) bars[i]=new Cross(screen); bars[i].drawcross(wdth,hght,cell,soffset,xx,c,threed,stack,top); } override public function bgredraw():void { var x0:int; var wdth:Number; if (dataj>1) if (swap) wdth = mywidth/(dataj*(datai+1)-1); else wdth = mywidth/(datai*(dataj+1)-1); else if (swap) wdth = mywidth/dataj; else wdth = mywidth/datai; // bw=0.7; for (var i:int = 0; iOriginal Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; public class ScrollBarSkins extends ScrollBarStyle { public var sb_track:ScrollBarTrack; public var sb_upbtn:ScrollBarButton; public var sb_downbtn:ScrollBarButton; public var sb_slider:ScrollBarSlider; protected var _buttons:Boolean; public function ScrollBarSkins(screen:Sprite,xx:int,yy:int,heigt:int=-1,buttons:Boolean = true) { screen.addChild(this); this.x=xx;y=yy; _buttons = buttons; if (heigt<0) heigt=hght; sb_track=new ScrollBarTrack(this,0,buttons ? wdth : 0,heigt+(buttons ? 0 : 2*wdth)); sb_slider=new ScrollBarSlider(this,-1,30); sb_upbtn=new ScrollBarButton(this,0,0); sb_downbtn=new ScrollBarButton(this,0,heigt,true); // graphics.clear(); // graphics.beginFill(0xcccccc); // graphics.drawRect(wdth+1,0,1,heigt+1); sb_track.addEventListener(MouseEvent.MOUSE_DOWN,sb_slider.mdown); } public function get sb_posn():int { return sb_slider.y-(_buttons ? wdth-1 : 0); } public function get range():int { return sb_track.height-sb_slider.height-2; } public function get position():Number { return sb_posn/range; } public function set sb_posn(v:int):void { sb_slider.y=((v<0) ? 0 : v)+(_buttons ? wdth-1 : 0); if (sb_slider.y>sb_track.height-sb_slider.height+(_buttons ? wdth-1 : 0)) sb_slider.y=sb_track.height-sb_slider.height+(_buttons ? wdth-1 : 0); } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/ScrollBarStyle.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; public class ScrollBarStyle extends Sprite { public function ScrollBarStyle() {} public const wdth:int=15; public const hght:int=256; public const kslht:int=128; public const crnr:Number=3; public const arsz:Number=2.5; public const offcolour:uint=0x222222; public const oncolour:uint=0xff9966; public const midcolour:uint=0x919191; public const normal:Array=[0xfefeff,0xebebf0]; // const normal:Array=[0xfefefe,0xebebeb]; public const active:Array=[0xd7efff,0x99d7ff]; public const rollov:Array=[0xfefefe,0xf4f4f4]; public const trough:Array=[0x9499a0,0xf5f5ff]; // const trough:Array=[0x94999b,0xf5f5f5]; public const linegr:Array=[0x4b4e4f,0x97989d]; // const linegr:Array=[0x5b5e5f,0xb7b8bd]; public const lindgr:Array=[0x585a5b,0x898b8d]; public const linacr:Array=[0x66ccff,0x99d7ff]; public const inacti:Array=[0xdddddd,0xf9f9fc,0xffffff]; } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/ScrollBarTrack.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import flash.display.Graphics; import flash.display.GradientType; import flash.filters.BevelFilter; import flash.geom.Matrix; public class ScrollBarTrack extends ScrollBarStyle { private var horizontal:Boolean; public function ScrollBarTrack(screen:Sprite,xx:int,yy:int,heigt:int,horiz:Boolean=false) { var myht:int=heigt-2*wdth;horizontal=horiz; var matr:Matrix=new Matrix(); var myfilters:Array=new Array(); var filling:Sprite=new Sprite(); var outline:Sprite=new Sprite(); x=xx;y=yy; filling.graphics.clear(); matr.createGradientBox(wdth, myht, 0, 0, 0); filling.graphics.beginGradientFill(GradientType.LINEAR,trough,[1,1],[0x00,0xff],matr); redraw(filling.graphics,matr,myht); if (horiz) { myfilters.push(new BevelFilter(3.0,horiz ? 0 : 90,0x666666,1.0,0xe8e8e8,1.0,1.0,5.0,1.0,1)); filling.filters=myfilters; } redraw(outline.graphics,matr,myht); addChild(filling); addChild(outline); screen.addChild(this); } public function redraw(graphics:Graphics,matr:Matrix,myht:int):void { graphics.lineStyle(1,lindgr[0]); graphics.lineGradientStyle(GradientType.RADIAL,lindgr,[1,1],[0x00,0xff],matr); graphics.moveTo(0,0); graphics.lineTo(wdth-crnr,0); graphics.curveTo(wdth,0,wdth,crnr); graphics.lineTo(wdth,myht-crnr); graphics.curveTo(wdth,myht,wdth-crnr,myht); graphics.lineTo(0,myht); graphics.lineTo(0,0); graphics.endFill(); } } } -------------------------------------------------------------------------------- /src/asfiles/.svn/text-base/TextMenu.as.svn-base: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.text.TextFormat; public class TextMenu extends MyPopUp { public var mnu:MyMenu; public var txt:PrintAt; public function TextMenu(screen:Sprite,xx:int,yy:int,options:Array,hint:String=null,frmt:TextFormat=null) { mnu=new MyMenu(options); txt=new PrintAt(this,0,0,options[0],null,frmt); super(screen,xx,yy,mnu,hint); } } } -------------------------------------------------------------------------------- /src/asfiles/AlertIcon.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.filters.BevelFilter; import flash.filters.DropShadowFilter; import flash.display.GradientType; public class AlertIcon extends Sprite { private const linecolour:uint=0xffdd66; private const fillcolour:uint=0xffec7f; private const gradcolour:uint=0xffee66; private const symbolcolour:uint=0xffffff; private const segangle:int=120; private const symbolwidth:int=5; private const symbolheight:int=22; private const st:int=22; private const offset:int=10; private const torad:Number=Math.PI/180; public function AlertIcon(screen:Sprite,xx:int,yy:int) { var myfilters:Array=new Array(); var j:int; screen.addChild(this);x=xx;y=yy; graphics.clear(); graphics.lineStyle(0,linecolour); graphics.beginGradientFill(GradientType.LINEAR,[gradcolour,fillcolour],[1,1],[0x00,0xff]); // graphics.beginFill(fillcolour); graphics.moveTo(0,st); for (j=0;j<3;j++) graphics.curveTo(st*2*Math.sin(torad*(j+.5)*segangle),st*2*Math.cos(torad*(j+.5)*segangle),st*Math.sin(torad*(j+1)*segangle),st*Math.cos(torad*(j+1)*segangle)); graphics.beginFill(symbolcolour); graphics.moveTo(0,-symbolheight/2-offset); for (j=0;j<3;j++) graphics.curveTo(symbolwidth*2*Math.sin(torad*(j+.5)*segangle),-symbolheight*Math.cos(torad*(j+.5)*segangle)-offset,symbolwidth*Math.sin(torad*(j+1)*segangle),-symbolheight/2*Math.cos(torad*(j+1)*segangle)-offset); graphics.drawCircle(0,symbolheight/2,symbolwidth); myfilters.push(new BevelFilter(0.5,45,0xffffff,1,0x666633,0.9,4,4,1,1,"outer")); // myfilters.push(new DropShadowFilter(3.0,45,0xcccccc,0.5)); filters=myfilters; } } } -------------------------------------------------------------------------------- /src/asfiles/AltCursor.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.display.Stage; import flash.filters.DropShadowFilter; import flash.ui.Mouse; import flash.geom.Rectangle; import flash.events.MouseEvent; import com.danielfreeman.madcomponents.Colour; public class AltCursor extends Sprite { private const head:int=12; private const tail:int=16; private const slantx:int=3; private const slanty:int=2; public function AltCursor(colour:uint=0xeeeeee) { //screen:Sprite=null,xx:int=0,yy:int=0) { var myfilters:Array=new Array(); // x=xx;y=yy; // if (screen!=null) screen.addChild(this); mouseEnabled=false; graphics.clear(); graphics.lineStyle(0,Colour.darken(colour)); graphics.beginFill(colour); graphics.moveTo(0,0); graphics.lineTo(0,head); graphics.lineTo(slantx,head-slanty); graphics.lineTo(2*slantx,tail); graphics.lineTo(3*slantx,tail-slanty/2); graphics.lineTo(2*slantx,head-2*slanty); graphics.lineTo(3.5*slantx,head-2*slanty); graphics.lineTo(0,0); graphics.endFill(); myfilters.push(new DropShadowFilter(2.0,45,0x000000)); filters=myfilters; } } } -------------------------------------------------------------------------------- /src/asfiles/Cross.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import com.danielfreeman.madcomponents.Colour; public class Cross extends GraphShape { private var bw:Number; private var wdth:int,h:int; public function Cross(screen:Sprite) { super(screen); } public function drawcross(wdth:Number,hght:Number, cell:Cell,soffset:Number,xx:int,c:uint,threed:Boolean=false,stack:Boolean=false,top:Boolean=false):void { h=-Math.round(hght*((cell!=null && cell.isvalue) ? cell.value : 0)); x=xx*wdth;y=soffset;this.cell=cell;colour=c; bw=0.7; // bw=0.7; if (threed && !stack) bw=0.6; // else if (stack && !threed) bw=bw+0.05; // if (threed) thick=bw*wdth/3; else thick=0; if (thick>8) thick = 8;trace('DRAWBAR thick='+thick); this.wdth=wdth; // setsizes(this.wdth=wdth,threed,stack); // graphics.clear(); // graphics.beginFill(c); // graphics.lineStyle(0,Colour.darken(c)); // graphics.drawRect(0,0,bw*wdth,h); cross(bw*wdth,h,c); } private function cross(xx:int,yy:int,colour:uint,size:int=5,wdth:int=2):void { graphics.clear(); graphics.lineStyle(1,Colour.darken(colour)); graphics.beginFill(colour); graphics.moveTo(xx+size,yy+size-wdth); graphics.lineTo(xx+size-wdth,yy+size); graphics.lineTo(xx,yy+wdth); graphics.lineTo(xx-size+wdth,yy+size); graphics.lineTo(xx-size,yy+size-wdth); graphics.lineTo(xx-wdth,yy); graphics.lineTo(xx-size,yy-size+wdth); graphics.lineTo(xx-size+wdth,yy-size); graphics.lineTo(xx,yy-wdth); graphics.lineTo(xx+size-wdth,yy-size); graphics.lineTo(xx+size,yy-size+wdth); graphics.lineTo(xx+wdth,yy); graphics.lineTo(xx+size,yy+size-wdth); } } } -------------------------------------------------------------------------------- /src/asfiles/GraphSettings.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { public class GraphSettings { public static const SELECTED:String='GraphSettings.selected'; public static const THREED:String='GraphSettings.threed'; public static const STACK:String='GraphSettings.stack'; public static const SWAP:String='GraphSettings.swap'; public static const START:String='GraphSettings.start'; public static const RAINBOW:String='GraphSettings.rainbow'; public static const GREYSCALE0:String='GraphSettings.greyscale0'; public static const SUBTLE:String='GraphSettings.subtle'; public static const GREYSCALE1:String='GraphSettings.greyscale1'; public static const NEWMODE:String='GraphSettings.newmode'; public static const SHOW:String='GraphSettings.show'; public static const HIDE:String='GraphSettings.hide'; } } -------------------------------------------------------------------------------- /src/asfiles/GraphShape.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.display.Shape; import flash.text.TextField; import flash.text.TextFormat; import flash.text.TextFieldType; import flash.text.TextFieldAutoSize; import flash.ui.Mouse; import flash.events.MouseEvent; public class GraphShape extends Sprite { public var altcursor:AltCursor=new AltCursor(); public var cell:Cell; public var colour:uint; private var screen:Sprite; public var flabel:String=''; public function GraphShape(screen:Sprite) { (this.screen=screen).addChild(this); addEventListener(MouseEvent.MOUSE_OVER,mouseover); addEventListener(MouseEvent.MOUSE_OUT,mouseout); } public function mouseover(ev:MouseEvent):void { Cursor.changecursor(stage,altcursor); if (flabel!='') Cursor.cursorhint(stage,flabel); else Cursor.cursorhint(stage,cell!=null ? cell.text : '0'); if (cell!=null) {cell.backgroundColor=colour;cell.background=true;} } public function mouseout(ev:MouseEvent):void { Cursor.changecursor(stage); // stage.dispatchEvent(new MyEvent('cursor',null)); Cursor.cursorhint(stage); if (cell!=null) {cell.backgroundColor=0xffffff;cell.background=false;} } public function destructor():void { removeEventListener(MouseEvent.MOUSE_OVER,mouseover); removeEventListener(MouseEvent.MOUSE_OUT,mouseout); screen.removeChild(this); } } } -------------------------------------------------------------------------------- /src/asfiles/HBar.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import flash.filters.BevelFilter; import flash.filters.DropShadowFilter; import com.danielfreeman.madcomponents.Colour; public class HBar extends GraphShape { private const bw:Number=0.90; private var h:int; private var fval:Number; public function HBar(screen:Sprite) { super(screen); } public function drawbar(wdth:Number,hght:Number,cell:Cell,soffset:Number,xx:int,c:uint,threed:Boolean=false,stack:Boolean=false,top:Boolean=false,fval:int=-1,flabel:String=''):void { var valu:String=(cell!=null) ? cell.text : '0'; var myfilters:Array=new Array(); if ((this.fval=fval)<0) h=Math.round(wdth*((cell!=null && cell.isvalue) ? cell.value : 0)); else {h=Math.round(wdth*fval);this.flabel=flabel+': '+fval;} y=xx*hght;x=soffset;this.cell=cell;colour=c; graphics.clear(); graphics.beginFill(c); graphics.lineStyle(0,Colour.darken(c)); graphics.drawRect(0,0,h,bw*hght); if (threed) { myfilters.push(new BevelFilter(bw*hght/4,90,0xffffff,0.6,0x000000,0.6)); myfilters.push(new DropShadowFilter(2.0,45,0x999999)); filters=myfilters; } else filters=null; } } } -------------------------------------------------------------------------------- /src/asfiles/HBarGraph.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import flash.filters.BevelFilter; import flash.filters.DropShadowFilter; public class HBarGraph extends BarGraph { public function HBarGraph(screen:Sprite,xx:int,yy:int,select:Packet,ss:*=null,freq:Boolean=false) { super(screen,xx,yy,select,ss,freq);iam=3; } override public function plotbar(screen:Sprite,wdth:Number, hght:Number, soffset:Number, cell:Cell, i:int, xx:int, c:uint, top:Boolean, fval:int,flabel:String):void { var h:Number; if (swap) h=(datai==1 || stack) ? h=myheight/dataj : myheight/(dataj*(datai+1)-1); else h=(dataj==1 || stack) ? h=myheight/datai : myheight/(datai*(dataj+1)-1); if (bars[i]==null) bars[i]=new HBar(screen); bars[i].drawbar((srange==0) ? mywidth : (mywidth/srange),h,freq ? null : cell,sxoffset,xx,c,threed,stack,top,fval,flabel); } override public function gridbehind():void { var yy:int;//trace('step='+step+' swdth='+swdth); gridbe.graphics.clear(); gridbe.graphics.lineStyle(1,0xddddff); gridbe.graphics.moveTo(0,0); gridbe.graphics.lineTo(mywidth,0); gridbe.graphics.moveTo(0,myheight); gridbe.graphics.lineTo(mywidth,myheight); for (var i:int=0;i<=sintervals;i++) { yy=i*mywidth/sintervals; gridbe.graphics.moveTo(yy,0); gridbe.graphics.lineTo(yy,myheight); } } override public function drawaxis():void { drawax.graphics.clear(); drawax.graphics.lineStyle(2,0x666666); drawax.graphics.moveTo(sxoffset,0); drawax.graphics.lineTo(sxoffset,myheight); } override public function drawscale(screen:Sprite):void { } override public function dddaxis(x0:Number,x1:Number,neg:Boolean):void { } } } -------------------------------------------------------------------------------- /src/asfiles/HintText.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.text.TextFormat; public class HintText extends PrintAt { public static var SIZE:int = 11; public function HintText(screen:Sprite) { super(screen,0,0,'',null,new TextFormat('Arial',SIZE)); background=border=true; borderColor=0xcccccc; backgroundColor=0xffffcc; } } } -------------------------------------------------------------------------------- /src/asfiles/Line.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; public class Line extends GraphShape { private var wdth:Number,hght:Number,soffset:Number; private var cells:Array=new Array(); private var lg:LineGraph; public function Line(screen:Sprite,lg:LineGraph) { super(screen);this.lg=lg; } public function interpolate(xx:Number):String { var p:int=Math.floor(xx/wdth); var r:Number=(xx-p*wdth)/wdth; if (r<0.05) return '* '+lg.formatit(cellvalue(cells[p])); else if (r>0.95) return '* '+lg.formatit(cellvalue(cells[p+1])); return lg.formatit(Math.round(((1-r)*cellvalue(cells[p])+r*cellvalue(cells[p+1]))*100)/100); } private function cellvalue(cell:Cell):Number { return (cell!=null && cell.isvalue) ? cell.value : 0; } private function ycoord(cell:Cell):int { return soffset-hght*cellvalue(cell); } public function moveto(c:uint,soffset:Number,wdth:Number,hght:Number,cell:Cell):void { this.wdth=wdth;this.soffset=soffset;this.hght=hght; graphics.clear(); graphics.lineStyle(2,colour=c); graphics.moveTo(0,ycoord(cells[0]=cell)); } public function lineto(i:int,cell:Cell):void { graphics.lineTo(i*wdth,ycoord(cells[i]=cell)); } override public function mouseover(ev:MouseEvent):void { Cursor.changecursor(stage,altcursor); Cursor.cursorhint(stage,interpolate(mouseX)); addEventListener(MouseEvent.MOUSE_MOVE,mousemove); for (var i:int=0;iPermission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.events.Event; public class MyEvent extends Event { private var eventparams:Array=new Array(); public function MyEvent(what:String,... parameters) { eventparams=parameters; super(what); } public function get parameters():Array { return eventparams; } } } -------------------------------------------------------------------------------- /src/asfiles/MyEventBubbling.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.events.Event; public class MyEventBubbling extends Event { private var eventparams:Array=new Array(); public function MyEventBubbling(what:String,... parameters) { eventparams=parameters; super(what,true); } public function get parameters():Array { return eventparams; } } } -------------------------------------------------------------------------------- /src/asfiles/MyTextMenu.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.text.TextFormat; public class MyTextMenu extends MyPopUp { public static const SELECTED:String='selected'; protected var mnu:MyMenu; public var txt:PrintAt; protected var showop:Boolean; protected var val:int; public function MyTextMenu(screen:Sprite,xx:int,yy:int,options:Array,init:String="",hint:String=null,frmt:TextFormat=null,mfrmt:TextFormat=null,showop:Boolean=true,dontmove:Boolean=true) { this.showop=showop; buttonMode=useHandCursor=true; mnu=new MyMenu(options,mfrmt); txt=new PrintAt(this,0,0,(init!="" || options.length==0) ? init : options[0],null,frmt); super(screen,xx,yy,mnu,hint,dontmove); mnu.addEventListener(MyMenu.SELECTED,mnuselected); } override public function redraw(colour:uint = 0):void { } public function get value():int { return val; } public function get text():String { return txt.text; } public function enable(idx:int,onoff:Boolean,newlabel:String=''):void { if (idx<0) visible=onoff; else mnu.enable(idx,onoff,newlabel); } public function update(what:String):void { if (what==null) txt.text='----'; else txt.text=what; } public function set options(value:Array):void { mnu.options=value; } protected function mnuselected(ev:MyEvent):void { if (showop) txt.text=ev.parameters[1]; dispatchEvent(new MyEvent(SELECTED,val=ev.parameters[0],ev.parameters[1])); } } } -------------------------------------------------------------------------------- /src/asfiles/PrintAt.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.text.TextField; import flash.text.TextFormat; import flash.text.TextFieldType; import flash.text.TextFieldAutoSize; import flash.events.MouseEvent; import flash.events.FocusEvent; import flash.events.TextEvent; public class PrintAt extends TextField { public function PrintAt(screen:Sprite,xx:int,yy:int,txt:String,algn:String=null,format:TextFormat=null) { screen.addChild(this);y=yy; mouseEnabled=multiline=selectable=false; type=TextFieldType.DYNAMIC; if (algn==null) autoSize=TextFieldAutoSize.LEFT; else autoSize=algn; if (format==null) format=new TextFormat('Arial',11,0x666666); defaultTextFormat=format;height=10; text=txt; if (autoSize==TextFieldAutoSize.CENTER) {y=yy-height/2;x=xx-width/2;} else if (autoSize==TextFieldAutoSize.RIGHT) x=xx-width; else x=xx; } } } -------------------------------------------------------------------------------- /src/asfiles/ScatterGraph.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import flash.filters.BevelFilter; import flash.filters.DropShadowFilter; public class ScatterGraph extends GraphPalette { private var bars:Array = []; public function ScatterGraph(screen:Sprite,xx:int,yy:int,select:Packet,ss:*=null,stack:Boolean=false) { iam=4; super(screen,xx,yy,select,ss); // controls=new GraphControls(this,frame/2,frame/2,'scatter graph',false,false,swap=datai>1 && dataj>1); resize(wdth,hght); // controls.addEventListener(MouseEvent.CLICK,controlsclick); } public function plotcross(screen:Sprite,wdth:Number, hght:Number, soffset:Number, cell:Cell, i:int, xx:int, c:uint, top:Boolean):void { if (bars[i]==null) bars[i]=new Cross(screen); bars[i].drawcross(wdth,hght,cell,soffset,xx,c,threed,stack,top); } override public function bgredraw():void { var x0:int; var wdth:Number; if (dataj>1) if (swap) wdth = mywidth/(dataj*(datai+1)-1); else wdth = mywidth/(datai*(dataj+1)-1); else if (swap) wdth = mywidth/dataj; else wdth = mywidth/datai; // bw=0.7; for (var i:int = 0; iOriginal Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; public class ScrollBarSkins extends ScrollBarStyle { public var sb_track:ScrollBarTrack; public var sb_upbtn:ScrollBarButton; public var sb_downbtn:ScrollBarButton; public var sb_slider:ScrollBarSlider; protected var _buttons:Boolean; public function ScrollBarSkins(screen:Sprite,xx:int,yy:int,heigt:int=-1,buttons:Boolean = true) { screen.addChild(this); this.x=xx;y=yy; _buttons = buttons; if (heigt<0) heigt=hght; sb_track=new ScrollBarTrack(this,0,buttons ? wdth : 0,heigt+(buttons ? 0 : 2*wdth)); sb_slider=new ScrollBarSlider(this,-1,30); sb_upbtn=new ScrollBarButton(this,0,0); sb_downbtn=new ScrollBarButton(this,0,heigt,true); // graphics.clear(); // graphics.beginFill(0xcccccc); // graphics.drawRect(wdth+1,0,1,heigt+1); sb_track.addEventListener(MouseEvent.MOUSE_DOWN,sb_slider.mdown); } public function get sb_posn():int { return sb_slider.y-(_buttons ? wdth-1 : 0); } public function get range():int { return sb_track.height-sb_slider.height-2; } public function get position():Number { return sb_posn/range; } public function set sb_posn(v:int):void { sb_slider.y=((v<0) ? 0 : v)+(_buttons ? wdth-1 : 0); if (sb_slider.y>sb_track.height-sb_slider.height+(_buttons ? wdth-1 : 0)) sb_slider.y=sb_track.height-sb_slider.height+(_buttons ? wdth-1 : 0); } } } -------------------------------------------------------------------------------- /src/asfiles/ScrollBarStyle.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; public class ScrollBarStyle extends Sprite { public function ScrollBarStyle() {} public const wdth:int=15; public const hght:int=256; public const kslht:int=128; public const crnr:Number=3; public const arsz:Number=2.5; public const offcolour:uint=0x222222; public const oncolour:uint=0xff9966; public const midcolour:uint=0x919191; public const normal:Array=[0xfefeff,0xebebf0]; // const normal:Array=[0xfefefe,0xebebeb]; public const active:Array=[0xd7efff,0x99d7ff]; public const rollov:Array=[0xfefefe,0xf4f4f4]; public const trough:Array=[0x9499a0,0xf5f5ff]; // const trough:Array=[0x94999b,0xf5f5f5]; public const linegr:Array=[0x4b4e4f,0x97989d]; // const linegr:Array=[0x5b5e5f,0xb7b8bd]; public const lindgr:Array=[0x585a5b,0x898b8d]; public const linacr:Array=[0x66ccff,0x99d7ff]; public const inacti:Array=[0xdddddd,0xf9f9fc,0xffffff]; } } -------------------------------------------------------------------------------- /src/asfiles/ScrollBarTrack.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.events.MouseEvent; import flash.display.Graphics; import flash.display.GradientType; import flash.filters.BevelFilter; import flash.geom.Matrix; public class ScrollBarTrack extends ScrollBarStyle { private var horizontal:Boolean; public function ScrollBarTrack(screen:Sprite,xx:int,yy:int,heigt:int,horiz:Boolean=false) { var myht:int=heigt-2*wdth;horizontal=horiz; var matr:Matrix=new Matrix(); var myfilters:Array=new Array(); var filling:Sprite=new Sprite(); var outline:Sprite=new Sprite(); x=xx;y=yy; filling.graphics.clear(); matr.createGradientBox(wdth, myht, 0, 0, 0); filling.graphics.beginGradientFill(GradientType.LINEAR,trough,[1,1],[0x00,0xff],matr); redraw(filling.graphics,matr,myht); if (horiz) { myfilters.push(new BevelFilter(3.0,horiz ? 0 : 90,0x666666,1.0,0xe8e8e8,1.0,1.0,5.0,1.0,1)); filling.filters=myfilters; } redraw(outline.graphics,matr,myht); addChild(filling); addChild(outline); screen.addChild(this); } public function redraw(graphics:Graphics,matr:Matrix,myht:int):void { graphics.lineStyle(1,lindgr[0]); graphics.lineGradientStyle(GradientType.RADIAL,lindgr,[1,1],[0x00,0xff],matr); graphics.moveTo(0,0); graphics.lineTo(wdth-crnr,0); graphics.curveTo(wdth,0,wdth,crnr); graphics.lineTo(wdth,myht-crnr); graphics.curveTo(wdth,myht,wdth-crnr,myht); graphics.lineTo(0,myht); graphics.lineTo(0,0); graphics.endFill(); } } } -------------------------------------------------------------------------------- /src/asfiles/TextMenu.as: -------------------------------------------------------------------------------- 1 | /** *Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package asfiles { import flash.display.Sprite; import flash.text.TextFormat; public class TextMenu extends MyPopUp { public var mnu:MyMenu; public var txt:PrintAt; public function TextMenu(screen:Sprite,xx:int,yy:int,options:Array,hint:String=null,frmt:TextFormat=null) { mnu=new MyMenu(options); txt=new PrintAt(this,0,0,options[0],null,frmt); super(screen,xx,yy,mnu,hint); } } } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/DGModel.as.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | *Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness { 27 | 28 | import com.danielfreeman.madcomponents.*; 29 | import flash.display.Sprite; 30 | 31 | public class DGModel extends Model { 32 | 33 | /** 34 | * Model tag for datagrid 35 | */ 36 | public function DGModel(parent:Sprite,xml:XML,sendXml:XML = null) { 37 | super(parent, xml, sendXml); 38 | } 39 | 40 | 41 | // override public function set xmlData(xml:XML):void { 42 | // var arrayCollectionGrid:Array = listData(xml,_schema); 43 | // UIDataGrid(_parent).data = to2dArray(arrayCollectionGrid,_schema); 44 | // } 45 | 46 | 47 | protected function to2dArray(arrayCollection:Array, schema:XML):Array { 48 | var descendents:XMLList = schema.descendants(); 49 | var max:int = -1; 50 | for each (var part:XML in descendents) { 51 | if (part.nodeKind() == "text") { 52 | if (String(part).substr(0,6) == "column") { 53 | var columnNumber:int = parseInt(String(part).substr(6)); 54 | if (columnNumber > max) { 55 | max = columnNumber; 56 | } 57 | } 58 | } 59 | } 60 | var result:Array = []; 61 | for each(var record:Object in arrayCollection) { 62 | var row:Array = []; 63 | for (var column:int=0; column<=max; column++) { 64 | var value:* = record["column"+column.toString()]; 65 | if (value == undefined) { 66 | row.push(""); 67 | } 68 | else { 69 | row.push(value); 70 | } 71 | } 72 | result.push(row); 73 | } 74 | return result; 75 | } 76 | 77 | } 78 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UIBarChart.as.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | *Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.Attributes; 29 | 30 | import flash.display.Sprite; 31 | import asfiles.BarGraph; 32 | import asfiles.Packet; 33 | 34 | /** 35 | * Bar chart component 36 | *37 | * <barChart 38 | * id = "IDENTIFIER" 39 | * colours = "#rrggbb, #rrggbb, ..." 40 | * render = "2d|2D|3d|3D" 41 | * stack = "true|false" 42 | * palette = "#rrggbb, #rrggbb, ..." 43 | * paletteStart = "n" 44 | * order = "rows|columns" 45 | * /> 46 | *47 | * */ 48 | public class UIBarChart extends UIPieChart 49 | { 50 | public function UIBarChart(screen:Sprite, xml:XML, attributes:Attributes) 51 | { 52 | super(screen, xml, attributes); 53 | } 54 | 55 | 56 | override protected function createGraph(packet:Packet):void { 57 | _graph = new BarGraph(this, 0, 0, packet); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UIContainerBaseClass.as.svn-base: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.extendedMadness 2 | { 3 | import com.danielfreeman.madcomponents.*; 4 | 5 | import flash.display.Sprite; 6 | import flash.display.DisplayObject; 7 | 8 | public class UIContainerBaseClass extends MadSprite implements IContainerUI { 9 | 10 | protected var _xml:XML; 11 | protected var _attributes:Attributes; 12 | 13 | 14 | public function UIContainerBaseClass(screen:Sprite, xml:XML, attributes:Attributes) { 15 | _xml = xml; 16 | _attributes = attributes; 17 | screen.addChild(this); 18 | drawComponent(); 19 | } 20 | 21 | 22 | public function layout(attributes:Attributes):void { 23 | _attributes = attributes; 24 | drawComponent(); 25 | } 26 | 27 | 28 | public function drawComponent():void { 29 | } 30 | 31 | 32 | public function get attributes():Attributes { 33 | return _attributes; 34 | } 35 | 36 | 37 | public function get xml():XML { 38 | return _xml; 39 | } 40 | 41 | 42 | public function findViewById(id:String, row:int = -1, group:int = -1):DisplayObject { 43 | return null; 44 | } 45 | 46 | 47 | public function clear():void { 48 | graphics.clear(); 49 | } 50 | 51 | 52 | public function get pages():Array { 53 | return []; 54 | } 55 | 56 | 57 | public function destructor():void { 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UIField.as.svn-base: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.extendedMadness 2 | { 3 | import com.danielfreeman.madcomponents.*; 4 | 5 | import flash.display.Sprite; 6 | import flash.text.TextFormat; 7 | 8 | public class UIField extends UIBlueText 9 | { 10 | protected static const FORMAT:TextFormat=new TextFormat('Arial',11,0x333333); 11 | protected static const BORDER_COLOUR:uint = 0x999999; 12 | 13 | public function UIField(screen:Sprite, xml:XML, attributes:Attributes) 14 | { 15 | border = true; 16 | borderColor = BORDER_COLOUR; 17 | attributes.parse(xml); 18 | super(screen, 0, 0, xml.@prompt, -1, FORMAT, xml.@prompt!="", UIBlueText.GREY); 19 | fixwidth = attributes.widthH; 20 | text = xml.toString(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UIHorizontalChart.as.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.Attributes; 29 | 30 | import flash.display.Sprite; 31 | import asfiles.HBarGraph; 32 | import asfiles.Packet; 33 | 34 | /** 35 | * Horizontal bar chart component 36 | *37 | * <horizontalChart 38 | * id = "IDENTIFIER" 39 | * colours = "#rrggbb, #rrggbb, ..." 40 | * render = "2d|2D|3d|3D" 41 | * stack = "true|false" 42 | * palette = "#rrggbb, #rrggbb, ..." 43 | * paletteStart = "n" 44 | * order = "rows|columns" 45 | * /> 46 | *47 | * */ 48 | public class UIHorizontalChart extends UIPieChart 49 | { 50 | public function UIHorizontalChart(screen:Sprite, xml:XML, attributes:Attributes) 51 | { 52 | super(screen, xml, attributes); 53 | } 54 | 55 | 56 | override protected function createGraph(packet:Packet):void { 57 | _graph = new HBarGraph(this, 0, 0, packet); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UILine.as.svn-base: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.extendedMadness 2 | { 3 | import com.danielfreeman.madcomponents.*; 4 | 5 | import flash.display.DisplayObject; 6 | import flash.display.Sprite; 7 | 8 | public class UILine extends UIContainerBaseClass { 9 | 10 | protected static const DARK:uint = 0x333333; 11 | protected static const LIGHT:uint = 0xFFFFFF; 12 | 13 | protected var _border:Boolean; 14 | 15 | 16 | public function UILine(screen:Sprite, xml:XML, attributes:Attributes) { 17 | _border = xml.@border != "false"; 18 | super(screen, xml, attributes); 19 | } 20 | 21 | 22 | override public function drawComponent():void { 23 | graphics.clear(); 24 | graphics.beginFill(_attributes.backgroundColours.length>0 ? _attributes.backgroundColours[0] : DARK); 25 | graphics.drawRect(_border ? 0 : -UI.PADDING, 0, _attributes.widthH + (_border ? 0 : 2 * UI.PADDING), 1); 26 | graphics.beginFill(_attributes.backgroundColours.length>1 ? _attributes.backgroundColours[1] : LIGHT); 27 | graphics.drawRect(_border ? 0 : -UI.PADDING, 1, _attributes.widthH + (_border ? 0 : 2 * UI.PADDING), 1); 28 | 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UILineChart.as.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.Attributes; 29 | 30 | import flash.display.Sprite; 31 | import asfiles.LineGraph; 32 | import asfiles.Packet; 33 | 34 | /** 35 | * Line chart component 36 | *37 | * <lineChart 38 | * id = "IDENTIFIER" 39 | * colours = "#rrggbb, #rrggbb, ..." 40 | * palette = "#rrggbb, #rrggbb, ..." 41 | * paletteStart = "n" 42 | * order = "rows|columns" 43 | * /> 44 | *45 | * */ 46 | public class UILineChart extends UIPieChart 47 | { 48 | public function UILineChart(screen:Sprite, xml:XML, attributes:Attributes) 49 | { 50 | super(screen, xml, attributes); 51 | } 52 | 53 | 54 | override protected function createGraph(packet:Packet):void { 55 | _graph = new LineGraph(this, 0, 0, packet); 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UIScatterChart.as.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.Attributes; 29 | 30 | import flash.display.Sprite; 31 | import asfiles.ScatterGraph; 32 | import asfiles.Packet; 33 | 34 | /** 35 | * Scatter chart component 36 | *37 | * <scatterChart 38 | * id = "IDENTIFIER" 39 | * colours = "#rrggbb, #rrggbb, ..." 40 | * render = "2d|2D|3d|3D" 41 | * palette = "#rrggbb, #rrggbb, ..." 42 | * paletteStart = "n" 43 | * order = "rows|columns" 44 | * /> 45 | *46 | * */ 47 | public class UIScatterChart extends UIPieChart 48 | { 49 | public function UIScatterChart(screen:Sprite, xml:XML, attributes:Attributes) 50 | { 51 | super(screen, xml, attributes); 52 | } 53 | 54 | 55 | override protected function createGraph(packet:Packet):void { 56 | _graph = new ScatterGraph(this, 0, 0, packet); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UITick.as.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness { 27 | 28 | import flash.display.Sprite; 29 | import com.danielfreeman.madcomponents.*; 30 | 31 | /** 32 | * MadComonents tick icon 33 | *34 | * <tick 35 | * id = "IDENTIFIER" 36 | * colour = "#rrggbb" 37 | * background = "#rrggbb, #rrggbb, ..." 38 | * alignH = "left|right|centre" 39 | * alignV = "top|bottom|centre" 40 | * visible = "true|false" 41 | * alt = "true|false" 42 | * clickable = "true|false" 43 | * /> 44 | *45 | */ 46 | public class UITick extends MadSprite { 47 | 48 | public static const SIZE:Number = 18.0; 49 | public static const HEAD:Number = 6.0; 50 | protected static const HEIGHT:Number = SIZE - HEAD + WIDTH; 51 | protected static const WIDTH:Number = 4.0; 52 | 53 | protected var _width:Number = WIDTH; 54 | 55 | 56 | public function UITick(screen:Sprite, xx:Number, yy:Number, colour:uint, alt:Boolean = false) { 57 | screen.addChild(this); 58 | x=xx;y=yy; 59 | clickable = mouseEnabled = false; 60 | if (alt) 61 | _width = 6; 62 | this.colour = colour; 63 | } 64 | 65 | /** 66 | * Set the colour of the tick 67 | */ 68 | public function set colour(value:uint):void { 69 | graphics.clear(); 70 | graphics.beginFill(value); 71 | graphics.moveTo(0, HEIGHT-HEAD); 72 | graphics.lineTo(0, HEIGHT-HEAD+_width); 73 | graphics.lineTo(HEAD, HEIGHT+_width); 74 | graphics.lineTo(SIZE, _width); 75 | graphics.lineTo(SIZE, 0); 76 | graphics.lineTo(HEAD, HEIGHT); 77 | graphics.lineTo(0, HEIGHT-HEAD); 78 | } 79 | 80 | /** 81 | * Set the visibility of the tick "true" or "false" 82 | */ 83 | public function set text(value:String):void { 84 | visible = value!="false"; 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UITickOneList.as.svn-base: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness { 27 | 28 | import flash.display.Sprite; 29 | import flash.display.DisplayObject; 30 | import flash.events.Event; 31 | import com.danielfreeman.madcomponents.*; 32 | 33 | /** 34 | * MadComponents tick one list. Only one row may be ticked. 35 | *36 | * <tickOneList 37 | * id = "IDENTIFIER" 38 | * colour = "#rrggbb" 39 | * background = "#rrggbb, #rrggbb, ..." 40 | * visible = "true|false" 41 | * gapV = "NUMBER" 42 | * gapH = "NUMBER" 43 | * border = "true|false" 44 | * autoLayout = "true|false" 45 | * lines = "true|false" 46 | * pullDownRefresh = "true|false" 47 | * pullDownColour = "#rrggbb" 48 | * sortBy = "IDENTIFIER" 49 | * index = "INTEGER" 50 | * mask = "true|false" 51 | * showPressed = "true|false" 52 | * highlightPressed = "true|false" 53 | * alignV = "scroll|no scroll" 54 | * tickColour = "#rrggbb" 55 | * /> 56 | *57 | */ 58 | public class UITickOneList extends UITickList { 59 | 60 | public function UITickOneList(screen:Sprite, xml:XML, attributes:Attributes) { 61 | super(screen, xml, attributes); 62 | } 63 | 64 | 65 | override protected function pressButton():DisplayObject { 66 | var lastPressedCell:int = _pressedCell; 67 | super.pressButton(); 68 | if (lastPressedCell != _pressedCell && _clickRow) { 69 | var lastTick:UITick = UITick(_slider.getChildByName("tick_"+lastPressedCell.toString())); 70 | if (lastTick) { 71 | lastTick.visible = false; 72 | } 73 | dispatchEvent(new Event(Event.CHANGE)); 74 | } 75 | return _pressButton; 76 | } 77 | 78 | 79 | } 80 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/.svn/text-base/UITouch.as.svn-base: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.extendedMadness 2 | { 3 | import com.danielfreeman.madcomponents.*; 4 | 5 | import flash.display.Sprite; 6 | import flash.events.MouseEvent; 7 | 8 | public class UITouch extends UIContainerBaseClass { 9 | 10 | protected var _up:UIForm; 11 | protected var _down:UIForm; 12 | 13 | public function UITouch(screen:Sprite, xml:XML, attributes:Attributes) { 14 | super(screen, xml, attributes); 15 | var childAttributes:Attributes = attributes.copy(xml); 16 | _up = new UI.FormClass(this,
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness { 27 | 28 | import com.danielfreeman.madcomponents.*; 29 | import flash.display.Sprite; 30 | 31 | public class DGModel extends Model { 32 | 33 | /** 34 | * Model tag for datagrid 35 | */ 36 | public function DGModel(parent:Sprite,xml:XML,sendXml:XML = null) { 37 | super(parent, xml, sendXml); 38 | } 39 | 40 | 41 | // override public function set xmlData(xml:XML):void { 42 | // var arrayCollectionGrid:Array = listData(xml,_schema); 43 | // UIDataGrid(_parent).data = to2dArray(arrayCollectionGrid,_schema); 44 | // } 45 | 46 | 47 | protected function to2dArray(arrayCollection:Array, schema:XML):Array { 48 | var descendents:XMLList = schema.descendants(); 49 | var max:int = -1; 50 | for each (var part:XML in descendents) { 51 | if (part.nodeKind() == "text") { 52 | if (String(part).substr(0,6) == "column") { 53 | var columnNumber:int = parseInt(String(part).substr(6)); 54 | if (columnNumber > max) { 55 | max = columnNumber; 56 | } 57 | } 58 | } 59 | } 60 | var result:Array = []; 61 | for each(var record:Object in arrayCollection) { 62 | var row:Array = []; 63 | for (var column:int=0; column<=max; column++) { 64 | var value:* = record["column"+column.toString()]; 65 | if (value == undefined) { 66 | row.push(""); 67 | } 68 | else { 69 | row.push(value); 70 | } 71 | } 72 | result.push(row); 73 | } 74 | return result; 75 | } 76 | 77 | } 78 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/UIBarChart.as: -------------------------------------------------------------------------------- 1 | /** 2 | *Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.Attributes; 29 | 30 | import flash.display.Sprite; 31 | import asfiles.BarGraph; 32 | import asfiles.Packet; 33 | 34 | /** 35 | * Bar chart component 36 | *37 | * <barChart 38 | * id = "IDENTIFIER" 39 | * colours = "#rrggbb, #rrggbb, ..." 40 | * render = "2d|2D|3d|3D" 41 | * stack = "true|false" 42 | * palette = "#rrggbb, #rrggbb, ..." 43 | * paletteStart = "n" 44 | * order = "rows|columns" 45 | * /> 46 | *47 | * */ 48 | public class UIBarChart extends UIPieChart 49 | { 50 | public function UIBarChart(screen:Sprite, xml:XML, attributes:Attributes) 51 | { 52 | super(screen, xml, attributes); 53 | } 54 | 55 | 56 | override protected function createGraph(packet:Packet):void { 57 | _graph = new BarGraph(this, 0, 0, packet); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/UICell.as: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.extendedMadness { 2 | 3 | /** 4 | * @author danielfreeman 5 | */ 6 | 7 | 8 | import com.danielfreeman.madcomponents.*; 9 | import flash.text.TextFormat; 10 | import flash.display.Sprite; 11 | import flash.text.TextFieldAutoSize; 12 | 13 | 14 | public class UICell extends UILabel { 15 | 16 | protected const FORMAT:TextFormat = new TextFormat('Arial', 13, 0x000066, true); 17 | 18 | public function UICell(screen:Sprite, xx:int, yy:int, txt:String = "", wdth:Number = 0, format:TextFormat=null, multiLine:Boolean = false, wordWrap:Boolean = false, borderColour:uint = 0x666666, border:Boolean = true) { 19 | if (!format) { 20 | format = FORMAT; 21 | format.leftMargin = 4.0; 22 | } 23 | super(screen, xx, yy, txt, format); 24 | this.border = border; 25 | borderColor = borderColour; 26 | multiline = multiLine; 27 | this.wordWrap = wordWrap; 28 | setTextFormat(format); 29 | defaultTextFormat = format; 30 | if (wdth > 0) { 31 | fixwidth = wdth; 32 | } 33 | } 34 | 35 | 36 | override public function set fixwidth(value:Number):void { 37 | autoSize = TextFieldAutoSize.NONE; 38 | super.fixwidth = value; 39 | // autoSize = TextFieldAutoSize.NONE; 40 | } 41 | 42 | 43 | public function set defaultColour(value:uint):void { 44 | background = (value != uint.MAX_VALUE); 45 | backgroundColor = value; 46 | } 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/UIField.as: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.extendedMadness 2 | { 3 | import com.danielfreeman.madcomponents.*; 4 | 5 | import flash.display.Sprite; 6 | import flash.text.TextFormat; 7 | 8 | public class UIField extends UIBlueText 9 | { 10 | protected static const FORMAT:TextFormat=new TextFormat('Arial',14,0x333333); 11 | protected static const BORDER_COLOUR:uint = 0x999999; 12 | 13 | protected var _xml:XML; 14 | 15 | public function UIField(screen:Sprite, xml:XML, attributes:Attributes) 16 | { 17 | _xml = xml; 18 | border = true; 19 | borderColor = BORDER_COLOUR; 20 | attributes.parse(xml); 21 | super(screen, 0, 0, xml.@prompt, -1, FORMAT, xml.@prompt!="", UIBlueText.GREY); 22 | fixwidth = attributes.widthH; 23 | text = xml.toString(); 24 | if (xml.@alignV == "fill") { 25 | fixheight = attributes.height; 26 | } 27 | } 28 | 29 | 30 | public function layout(attributes:Attributes):void { 31 | fixwidth = attributes.widthH; 32 | if (_xml.@alignV == "fill") { 33 | fixheight = attributes.height; 34 | } 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/UIHorizontalChart.as: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.Attributes; 29 | 30 | import flash.display.Sprite; 31 | import asfiles.HBarGraph; 32 | import asfiles.Packet; 33 | 34 | /** 35 | * Horizontal bar chart component 36 | *37 | * <horizontalChart 38 | * id = "IDENTIFIER" 39 | * colours = "#rrggbb, #rrggbb, ..." 40 | * render = "2d|2D|3d|3D" 41 | * stack = "true|false" 42 | * palette = "#rrggbb, #rrggbb, ..." 43 | * paletteStart = "n" 44 | * order = "rows|columns" 45 | * /> 46 | *47 | * */ 48 | public class UIHorizontalChart extends UIPieChart 49 | { 50 | public function UIHorizontalChart(screen:Sprite, xml:XML, attributes:Attributes) 51 | { 52 | super(screen, xml, attributes); 53 | } 54 | 55 | 56 | override protected function createGraph(packet:Packet):void { 57 | _graph = new HBarGraph(this, 0, 0, packet); 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/UILine.as: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.*; 29 | 30 | import flash.display.DisplayObject; 31 | import flash.display.Sprite; 32 | /** 33 | * MadComponents icons component 34 | *35 | * <icons 36 | * id = "IDENTIFIER" 37 | * highlightColour = "#rrggbb" 38 | * iconColour = "#rrggbb" 39 | * activeColour = "#rrggbb" 40 | * background = "#rrggbb, #rrggbb" 41 | * border = "true|false" 42 | * /> 43 | *44 | */ 45 | public class UILine extends MadSprite implements IComponentUI { 46 | 47 | protected static const DARK:uint = 0x333333; 48 | protected static const LIGHT:uint = 0xFFFFFF; 49 | 50 | protected var _border:Boolean; 51 | 52 | 53 | public function UILine(screen:Sprite, xml:XML, attributes:Attributes) { 54 | _border = xml.@border != "false"; 55 | super(screen, attributes); 56 | drawComponent(); 57 | } 58 | 59 | 60 | public function drawComponent():void { 61 | graphics.clear(); 62 | graphics.beginFill(_attributes.backgroundColours.length>0 ? _attributes.backgroundColours[0] : DARK); 63 | graphics.drawRect(_border ? 0 : -UI.PADDING, 0, _attributes.widthH + (_border ? 0 : 2 * UI.PADDING), 1); 64 | graphics.beginFill(_attributes.backgroundColours.length>1 ? _attributes.backgroundColours[1] : LIGHT); 65 | graphics.drawRect(_border ? 0 : -UI.PADDING, 1, _attributes.widthH + (_border ? 0 : 2 * UI.PADDING), 1); 66 | 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/UILineChart.as: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.Attributes; 29 | 30 | import flash.display.Sprite; 31 | import asfiles.LineGraph; 32 | import asfiles.Packet; 33 | 34 | /** 35 | * Line chart component 36 | *37 | * <lineChart 38 | * id = "IDENTIFIER" 39 | * colours = "#rrggbb, #rrggbb, ..." 40 | * palette = "#rrggbb, #rrggbb, ..." 41 | * paletteStart = "n" 42 | * order = "rows|columns" 43 | * increment = "NUMBER" 44 | * minimum = "NUMBER" 45 | * maximum = "NUMBER" 46 | * /> 47 | *48 | * */ 49 | public class UILineChart extends UIPieChart 50 | { 51 | public function UILineChart(screen:Sprite, xml:XML, attributes:Attributes) 52 | { 53 | super(screen, xml, attributes); 54 | } 55 | 56 | 57 | override protected function createGraph(packet:Packet):void { 58 | _graph = new LineGraph(this, 0, 0, packet); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/UIScatterChart.as: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.Attributes; 29 | 30 | import flash.display.Sprite; 31 | import asfiles.ScatterGraph; 32 | import asfiles.Packet; 33 | 34 | /** 35 | * Scatter chart component 36 | *37 | * <scatterChart 38 | * id = "IDENTIFIER" 39 | * colours = "#rrggbb, #rrggbb, ..." 40 | * render = "2d|2D|3d|3D" 41 | * palette = "#rrggbb, #rrggbb, ..." 42 | * paletteStart = "n" 43 | * order = "rows|columns" 44 | * increment = "NUMBER" 45 | * minimum = "NUMBER" 46 | * maximum = "NUMBER" 47 | * /> 48 | *49 | * */ 50 | public class UIScatterChart extends UIPieChart 51 | { 52 | public function UIScatterChart(screen:Sprite, xml:XML, attributes:Attributes) 53 | { 54 | super(screen, xml, attributes); 55 | } 56 | 57 | 58 | override protected function createGraph(packet:Packet):void { 59 | _graph = new ScatterGraph(this, 0, 0, packet); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/UITick.as: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness { 27 | 28 | import flash.display.Sprite; 29 | import com.danielfreeman.madcomponents.*; 30 | 31 | 32 | /** 33 | * MadComonents tick icon 34 | *35 | * <tick 36 | * id = "IDENTIFIER" 37 | * colour = "#rrggbb" 38 | * background = "#rrggbb, #rrggbb, ..." 39 | * alignH = "left|right|centre" 40 | * alignV = "top|bottom|centre" 41 | * visible = "true|false" 42 | * alt = "true|false" 43 | * clickable = "true|false" 44 | * /> 45 | *46 | */ 47 | public class UITick extends Sprite { 48 | 49 | public static const SIZE:Number = 18.0; 50 | public static const HEAD:Number = 6.0; 51 | protected static const HEIGHT:Number = SIZE - HEAD + WIDTH; 52 | protected static const WIDTH:Number = 4.0; 53 | 54 | protected var _width:Number = WIDTH; 55 | 56 | 57 | public function UITick(screen:Sprite, xx:Number, yy:Number, colour:uint, alt:Boolean = false) { 58 | screen.addChild(this); 59 | x=xx;y=yy; 60 | // clickable = 61 | mouseEnabled = false; 62 | if (alt) 63 | _width = 6; 64 | this.colour = colour; 65 | } 66 | 67 | /** 68 | * Set the colour of the tick 69 | */ 70 | public function set colour(value:uint):void { 71 | graphics.clear(); 72 | graphics.beginFill(value); 73 | graphics.moveTo(0, HEIGHT-HEAD); 74 | graphics.lineTo(0, HEIGHT-HEAD+_width); 75 | graphics.lineTo(HEAD, HEIGHT+_width); 76 | graphics.lineTo(SIZE, _width); 77 | graphics.lineTo(SIZE, 0); 78 | graphics.lineTo(HEAD, HEIGHT); 79 | graphics.lineTo(0, HEIGHT-HEAD); 80 | } 81 | 82 | /** 83 | * Set the visibility of the tick "true" or "false" 84 | */ 85 | public function set text(value:String):void { 86 | visible = value!="false"; 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/extendedMadness/UITouch.as: -------------------------------------------------------------------------------- 1 | /** 2 | *
Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS' OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.extendedMadness 27 | { 28 | import com.danielfreeman.madcomponents.*; 29 | 30 | import flash.display.Sprite; 31 | import flash.events.MouseEvent; 32 | 33 | public class UITouch extends UIContainerBaseClass { 34 | 35 | protected var _up:UIForm; 36 | protected var _down:UIForm; 37 | 38 | public function UITouch(screen:Sprite, xml:XML, attributes:Attributes) { 39 | super(screen, xml, attributes); 40 | var childAttributes:Attributes = attributes.copy(xml); 41 | _up = new UI.FormClass(this,Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package com.danielfreeman.madcomponents { /** * Some colour utilities */ public class Colour { static public function limit(n:int,hi:int,lo:int):uint { if (nOriginal Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.madcomponents { 27 | 28 | /** 29 | * Interface for MadComponents containers 30 | */ 31 | public interface IComponentUI { 32 | function layout(attributes:Attributes):void; 33 | function set clickable(value:Boolean):void; 34 | function get clickable():Boolean; 35 | function set includeInLayout(value:Boolean):void; 36 | function get includeInLayout():Boolean; 37 | function get attributes():Attributes; 38 | function destructor():void; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/IContainerUI.as: -------------------------------------------------------------------------------- 1 | /** 2 | *Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.madcomponents { 27 | 28 | import flash.display.DisplayObject; 29 | import flash.display.Sprite; 30 | 31 | /** 32 | * Interface for MadComponents containers 33 | */ 34 | public interface IContainerUI extends IComponentUI { 35 | function clear():void; 36 | function findViewById(id:String, row:int = -1, group:int = -1):DisplayObject; 37 | function get pages():Array; 38 | function get xml():XML; 39 | function drawComponent():void; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/MadSprite.as: -------------------------------------------------------------------------------- 1 | /** 2 | *Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.madcomponents 27 | { 28 | import flash.display.Sprite; 29 | 30 | /** 31 | * MadSprite adds clickable property 32 | */ 33 | public class MadSprite extends Sprite implements IComponentUI 34 | { 35 | protected var _clickable:Boolean = true; 36 | protected var _includeInLayout:Boolean = true; 37 | protected var _attributes:Attributes = null; 38 | 39 | 40 | public function MadSprite(screen:Sprite, attributes:Attributes = null) { 41 | if (screen) { 42 | screen.addChild(this); 43 | } 44 | if (attributes) { 45 | _attributes = attributes; 46 | } 47 | else { 48 | _attributes = new Attributes(); 49 | } 50 | } 51 | 52 | public function set clickable(value:Boolean):void { 53 | _clickable = value; 54 | } 55 | 56 | public function get clickable():Boolean { 57 | return _clickable; 58 | } 59 | 60 | public function set includeInLayout(value:Boolean):void { 61 | _includeInLayout = value; 62 | } 63 | 64 | public function get includeInLayout():Boolean { 65 | return _includeInLayout; 66 | } 67 | 68 | public function touchCancel():void { 69 | //override to implement scroll cancel 70 | } 71 | 72 | public function get attributes():Attributes { 73 | return _attributes; 74 | } 75 | 76 | public function layout(attributes:Attributes):void { 77 | _attributes = attributes; 78 | } 79 | 80 | public function get theWidth():Number { 81 | return width; 82 | } 83 | 84 | public function get theHeight():Number { 85 | return height; 86 | } 87 | 88 | public function set isVisible(value:Boolean):void { 89 | visible = value; 90 | } 91 | 92 | public function get isVisible():Boolean { 93 | return visible; 94 | } 95 | 96 | public function destructor():void { 97 | } 98 | } 99 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/UI.as.cpgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danfreeman/MadComponents/fc3f1e5104b04b9a1ca93b533ded3f8ab42dd617/src/com/danielfreeman/madcomponents/UI.as.cpgz -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/UIButtonX.as: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.madcomponents { 2 | import com.danielfreeman.madcomponents.UIButton; 3 | 4 | import flash.display.Sprite; 5 | 6 | /** 7 | * @author danielfreeman 8 | */ 9 | public class UIButtonX extends UIButton implements IComponentUI { 10 | 11 | public function UIButtonX(screen : Sprite, xml:XML, attributes:Attributes) { 12 | super(screen, attributes.x, attributes.y, xml.toString(), attributes.colour, attributes.backgroundColours, xml.@alt == "true", attributes.style7); 13 | _attributes = attributes; 14 | 15 | if (xml.@skin.length()>0) { 16 | skin = xml.@skin[0]; 17 | } 18 | 19 | if (attributes.fillH) { 20 | fixwidth = attributes.widthH; 21 | } 22 | if (attributes.fillV) { 23 | skinHeight = attributes.heightV; 24 | } 25 | 26 | if (xml.@curve.length()>0) { 27 | curve = parseFloat(xml.@curve); 28 | } 29 | 30 | setGoTo(xml.@goTo, xml.@transition); 31 | } 32 | 33 | 34 | override public function layout(attributes:Attributes):void { 35 | super.layout(attributes); 36 | if (attributes.fillV) { 37 | skinHeight = attributes.heightV; 38 | } 39 | if (attributes.fillH) { 40 | fixwidth = attributes.widthH; 41 | } 42 | } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/UIContainerBaseClass.as: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.madcomponents 2 | { 3 | 4 | import flash.display.Sprite; 5 | import flash.display.DisplayObject; 6 | 7 | public class UIContainerBaseClass extends MadSprite implements IContainerUI { 8 | 9 | protected var _xml:XML; 10 | 11 | 12 | public function UIContainerBaseClass(screen:Sprite, xml:XML, attributes:Attributes) { 13 | _xml = xml; 14 | // _attributes = attributes; 15 | // screen.addChild(this); 16 | super(screen, attributes); 17 | initialise(xml, attributes); 18 | drawComponent(); 19 | } 20 | 21 | 22 | override public function layout(attributes:Attributes):void { 23 | super.layout(attributes); 24 | drawComponent(); 25 | } 26 | 27 | 28 | protected function initialise(xml:XML, attributes:Attributes):void { 29 | } 30 | 31 | 32 | public function drawComponent():void { 33 | } 34 | 35 | 36 | public function get xml():XML { 37 | return _xml; 38 | } 39 | 40 | 41 | public function findViewById(id:String, row:int = -1, group:int = -1):DisplayObject { 42 | return getChildByName(id); 43 | } 44 | 45 | 46 | public function clear():void { 47 | graphics.clear(); 48 | } 49 | 50 | 51 | public function get pages():Array { 52 | return []; 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/UIInputX.as: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.madcomponents { 2 | 3 | import flash.events.FocusEvent; 4 | import flash.display.Sprite; 5 | 6 | /** 7 | * @author danielfreeman 8 | */ 9 | public class UIInputX extends UIInput implements IComponentUI { 10 | 11 | // protected var _altFocus:Boolean = false; 12 | // protected var _height:Number; 13 | 14 | public function UIInputX(screen : Sprite, xml:XML, attributes:Attributes) { 15 | super(screen, attributes.x, attributes.y, xml.toString(), attributes.backgroundColours, attributes.style7 != (xml.@alt == "true"), xml.@prompt.length()>0 ? xml.@prompt[0].toString() : "", xml.@promptColour.length()>0 ? UI.toColourValue(xml.@promptColour[0].toString()) : UIBlueText.GREY, attributes.style7); 16 | if (attributes.fillH) { 17 | fixwidth = attributes.widthH; 18 | } 19 | UIBlueText(inputField).password = xml.@password.length()>0 && xml.@password == "true"; 20 | } 21 | 22 | 23 | override public function layout(attributes:Attributes):void { 24 | super.layout(attributes); 25 | if (attributes.fillH) { 26 | fixwidth = attributes.widthH; 27 | } 28 | } 29 | 30 | 31 | /* public function altFocus():void { 32 | _altFocus = true; 33 | _height = _label.height; 34 | fullInput(); 35 | _label.addEventListener(FocusEvent.FOCUS_IN, focusIn); 36 | } 37 | 38 | 39 | protected function focusIn(event:FocusEvent):void { 40 | _label.x = _alt ? SIZE_ALT : SIZE_X; 41 | _label.y = (_alt ? SIZE_ALT : SIZE_Y) + 1; 42 | _label.fixwidth = width - 2 * (_alt ? SIZE_ALT : SIZE_X); 43 | _label.height = _height; 44 | } 45 | 46 | 47 | protected function fullInput():void { 48 | _label.x = 0; 49 | _label.y = 0; 50 | _label.width = width; 51 | _label.height = height - (_alt ? SIZE_ALT : SIZE_Y) - 1; 52 | } 53 | 54 | 55 | override protected function focusOut(event:FocusEvent):void { 56 | if (_altFocus) { 57 | fullInput() 58 | } 59 | super.focusOut(event); 60 | } 61 | 62 | 63 | override public function destructor():void { 64 | _label.removeEventListener(FocusEvent.FOCUS_IN, focusIn); 65 | super.destructor(); 66 | }*/ 67 | 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/UILabelX.as: -------------------------------------------------------------------------------- 1 | package com.danielfreeman.madcomponents { 2 | import flash.text.TextFieldAutoSize; 3 | import com.danielfreeman.madcomponents.UILabel; 4 | 5 | import flash.display.Sprite; 6 | import flash.text.TextFormat; 7 | 8 | /** 9 | * @author danielfreeman 10 | */ 11 | public class UILabelX extends UILabel implements IComponentUI { 12 | 13 | protected var _autoSize:Boolean; 14 | protected var _attributes:Attributes; 15 | protected var _xml:XML; 16 | protected var _clickable:Boolean = true; 17 | protected var _includeInLayout:Boolean = true; 18 | 19 | 20 | public function UILabelX(screen:Sprite, xml:XML, attributes:Attributes) { 21 | super(screen, attributes.x, attributes.y, xml.toString()); 22 | embedFonts = xml.@embedFonts == true; 23 | if (xml.@antiAliasType.length() > 0) { 24 | antiAliasType = xml.@antiAliasType; 25 | } 26 | assignToLabel(xml); 27 | if (xml.@height.length()>0) { 28 | fixheight = Number(xml.@height[0]); 29 | } 30 | if (attributes.fillH || xml.@height.length()>0) { 31 | fixwidth = attributes.widthH; 32 | var textAlign:String = attributes.textAlign; 33 | if (textAlign != "") { 34 | var format:TextFormat = new TextFormat(); 35 | format.align = textAlign; 36 | defaultTextFormat = format; 37 | } 38 | } 39 | _autoSize = xml.@autosize.length() > 0 && xml.@autosize != "false"; 40 | if (_autoSize) { 41 | autoSize = TextFieldAutoSize.LEFT; 42 | } 43 | // border = true; 44 | } 45 | 46 | 47 | protected function assignToLabel(xml:XML):void { 48 | if (xml.hasComplexContent()) { 49 | var xmlString:String = xml.toXMLString(); 50 | var htmlText:String = xmlString.substring(xmlString.indexOf(">")+1,xmlString.lastIndexOf("<")); 51 | xmlText = htmlText; 52 | } 53 | } 54 | 55 | 56 | public function layout(attributes:Attributes):void { 57 | _attributes = attributes; 58 | if (attributes.fillV) { 59 | fixheight = attributes.heightV; 60 | } 61 | if (attributes.fillH) { 62 | fixwidth = attributes.widthH; 63 | } 64 | if (_autoSize) { 65 | autoSize = TextFieldAutoSize.LEFT; 66 | } 67 | } 68 | 69 | 70 | public function set clickable(value:Boolean):void { 71 | _clickable = value; 72 | } 73 | 74 | public function get clickable():Boolean { 75 | return _clickable; 76 | } 77 | 78 | public function set includeInLayout(value:Boolean):void { 79 | _includeInLayout = value; 80 | } 81 | 82 | public function get includeInLayout():Boolean { 83 | return _includeInLayout; 84 | } 85 | 86 | public function touchCancel():void { 87 | //override to implement scroll cancel 88 | } 89 | 90 | public function get attributes():Attributes { 91 | return _attributes; 92 | } 93 | 94 | 95 | public function destructor():void { 96 | } 97 | 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/UIRefresh.as: -------------------------------------------------------------------------------- 1 | /** 2 | *Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.madcomponents 27 | { 28 | import flash.display.Sprite; 29 | import flash.text.TextFormat; 30 | 31 | /** 32 | * MadComponents "Pull down to refresh" item above lists 33 | */ 34 | public class UIRefresh extends Sprite 35 | { 36 | protected var _refresh:UIActivity; 37 | protected var _label:UILabel; 38 | 39 | public function UIRefresh(screen:Sprite, xx:Number, yy:Number, colour:uint, label:String) 40 | { 41 | screen.addChild(this); 42 | x=xx;y=yy; 43 | _refresh = new UIActivity(this, 0, 0, true); 44 | _refresh.scaleX = _refresh.scaleY = 0.3; 45 | _label = new UILabel(this, 16, -10, label,new TextFormat("Arial",14,colour)); 46 | } 47 | 48 | 49 | public function changeState(label:String, rotate:Boolean):void { 50 | _label.text = label; 51 | _refresh.rotate = rotate; 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/UISliderX.as: -------------------------------------------------------------------------------- 1 | /** 2 | *Original Author: Daniel Freeman
3 | * 4 | *Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions:
10 | * 11 | *The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software.
13 | * 14 | *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE.
21 | * 22 | *Licensed under The MIT License
23 | *Redistributions of files must retain the above copyright notice.
24 | */ 25 | 26 | package com.danielfreeman.madcomponents { 27 | 28 | import flash.display.Sprite; 29 | 30 | 31 | /** 32 | * The slider value has changed 33 | */ 34 | [Event( name="change", type="flash.events.Event" )] 35 | 36 | 37 | /** 38 | * MadComponent slider 39 | *40 | * <slider 41 | * id = "IDENTIFIER" 42 | * background = "#rrggbb, #rrggbb, ..." 43 | * alignH = "left|right|centre|fill" 44 | * alignV = "top|bottom|centre" 45 | * visible = "true|false" 46 | * clickable = "true|false" 47 | * width = "NUMBER" 48 | * alt = "true|false" 49 | * value = "NUMBER" 50 | * curve = "NUMBER" 51 | * /> 52 | *53 | */ 54 | 55 | public class UISliderX extends UISlider implements IComponentUI { 56 | 57 | public function UISliderX(screen : Sprite, xml:XML, attributes:Attributes) { 58 | super(screen, attributes.x, attributes.y, attributes.backgroundColours, xml.@alt == "true", attributes.style7); 59 | _attributes = attributes; 60 | 61 | if (attributes.fillH) { 62 | fixwidth = attributes.widthH; 63 | } 64 | if (xml.@value.length()>0) { 65 | value = Number(xml.@value); 66 | } 67 | } 68 | 69 | 70 | override public function layout(attributes:Attributes):void { 71 | super.layout(attributes); 72 | if (attributes.fillH) { 73 | fixwidth = attributes.widthH; 74 | } 75 | } 76 | 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/com/danielfreeman/madcomponents/UISpacer.as: -------------------------------------------------------------------------------- 1 | /** *
Original Author: Daniel Freeman
* *Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
* *The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
* *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE.
* *Licensed under The MIT License
*Redistributions of files must retain the above copyright notice.
*/ package com.danielfreeman.madcomponents { import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.DisplayObject; import flash.display.Sprite; import flash.display.Loader; import flash.geom.Point; import flash.geom.Rectangle; import flash.utils.getDefinitionByName; 2 | /** * Image placeholder ** <image * id = "IDENTIFIER" * alignH = "left|right|centre|fill" * alignV = "top|bottom|centre|fill" * visible = "true|false" * width = "NUMBER" * height = "NUMBER" * clickable = "true|false" * scale = "true|false" * border = "true|false|rounded" * background = "#rrggbb" * stretch = "true|false" * /> **/ public class UISpacer extends MadSprite implements IComponentUI { protected var _width:Number = 0; protected var _height:Number = 0; public function UISpacer(screen:Sprite, xml:XML, attributes:Attributes) { super(screen, attributes); if (xml.@width.length() > 0) { _width = parseFloat(xml.@width); } if (xml.@height.length() > 0) { _height = parseFloat(xml.@height); } } override public function get theWidth():Number { return _width - 2 * _attributes.paddingH; } override public function get theHeight():Number { return _height - 2 * _attributes.paddingV; } } } --------------------------------------------------------------------------------