[flexcoders] Setting a ViewStack.selectedIndex in States
Hello flexcoders! I have had a little break since working with Flex1.5 but now I am back. And I must say: Flex2.0 is great. But there are still some issues which confuse me... States and ViewStacks is one of it. Please have a look at the following code, and maybe you can tell me whether I have'nt understand the States stuff right or what's going on. The Problem: There are two state, in which both do the same: Set the selectedIndex of a ViewStack to 1. But when you execute them one after another. The second to be executed always sets the selectedIndex to 0 ! You probably ask yourself why I want do something like this. The complete code is a bit more complicated, where I have two ViewStacks(v1,v2) and got three states: v1SetTo1, v2SetTo1, v1AndV2SetTo1. It did not work and I could isolate the problem to the following code. Did I do something wrong, or is this a bug? Thanks for your help! Christoph ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; verticalAlign=middle mx:states mx:State name=s1 id=s1 mx:SetProperty target={appViews} name=selectedIndex value=1 / /mx:State mx:State name=s2 id=s2 mx:SetProperty target={appViews} name=selectedIndex value=1 / /mx:State /mx:states mx:TextInput id=stateField/ mx:Button label=Set State from TextField click=currentState=stateField.text / mx:Text htmlText=State s1 and s2 should do the same!lt;brgt;Set ViewStack.selectedIndex to 2, which is Panel 2 (p2). width=200 / !-- setting a state -- mx:Button label=Set State s1 click=currentState='s1' / mx:Button label=Set State s2 click=currentState='s2' / mx:Button label=Set BaseState click=currentState='' / mx:ViewStack id=appViews width=100% height=200 change=txtDebug.text=txtDebug.text+ ','+appViews.selectedIndex mx:Panel title=Panel 1 id=p1 width=100% height=100% mx:Text text=Panel 1 / /mx:Panel mx:Panel title=Panel 2 id=p2 width=100% height=100% backgroundColor=#ff mx:Text text=Panel 2 / /mx:Panel /mx:ViewStack mx:TextArea creationComplete=txtDebug.text = 'appViews.selectedIndex=' + appViews.selectedIndex id=txtDebug width=400 height=100%/ /mx:Application
[flexcoders] flex 2.0 beta 3 - createionPolicy is none but still there is some space...
Hi, I have got a problem with the creationPolicy. I am creating components dynamically so I wanted to use the creationPolicy. It is set to none on box1 is none but it occupies some space in front of box2. But I think it should look like box3. Setting width=0 and paddingLeft/Right=0 does not help either... Is this a bug or am I doing something wrong??? Christoph mx:VBox mx:HBox width=100% mx:HBox width=100% creationPolicy=none id=" box1" mx:NumericStepper / /mx:HBox mx:HBox width=100% id="box2" mx:NumericStepper / /mx:HBox /mx:HBox mx:HBox width=100% mx:HBox width=100% id="box3" mx:NumericStepper / /mx:HBox /mx:HBox /mx:VBox __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
[flexcoders] Object.registerClass and createChild with custom components - man ifest.xml ??
Hi, I am using Flex 1.5 and I am creating custom components dynamically from its classnames like this: // got a class name var windowName:String = TitleWindowData; //create a instance of this title window var oInitObj:Object = new Object(); oInitObj.title = Title Window Data; oInitObj.width = 600; oInitObj.height = 200; var titleWindowInstance:Object = TitleWindow(PopUpManager.createPopUp(this, mx.utils.ClassUtil.findClass(windowName), false, oInitObj, false)); titleWindowInstance.centerPopUp(this); I know I have to register a class like this before I create an instance like: Object.registerClass(TitleWindowTest, TitleWindowData); Now I look for a way to safe this step. Is there a way? I was wondering, if it would be helpful to create a SWC and mymanifest.xml of TitleWindowData.mxml with the compc.exe and set it in the flex-config.xml like this: .. namespace uri=http://www.top21.de/2005/mxml/brochureConf; manifest/WEB-INF/flex/brochureConf-manifest.xml/manifest /namespace .. But I still have to call Object.registerClass before I can create an instance, although the file should be known to the flex application already. Did I miss something? Is there no way to get rid of the Object.registerClass() call for every component I want to create dynamically out of classnames ??? Cheers, Christoph -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Flex1.5 - Focus Question
Hi at all, I have got a component(moveThis) on a canvas(canContent), which I want to move on the canvas by clicking the arrow keys. That works pretty good, as long as the canvas has got no scrollbars! If canContent has scrollbars and I click at first on moveThis to set the focus, pressing an arrow key causes the scrollbars to move as well!!! Only if I click on canContent first and than click on moveThis it works instantly... That is strange, because I call setFocus() explicitly to the component... and so I have no idea why the scrollbars move ??? Has anyone a idea? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml xmlns=* mx:Script ![CDATA[ var keyMoveAddValue = 10; var keyListener:Object; function doKeyMove(event){ //mx.controls.Alert.show( test ); //mx.controls.Alert.show(moveThis.getFocus() + moveThis.getFocus().id); if (moveThis.getFocus() == moveThis){ if (Key.getCode() == (Key.LEFT)){ moveThis.x -= keyMoveAddValue; }else if(Key.getCode() == (Key.UP)){ moveThis.y -= keyMoveAddValue; }else if(Key.getCode() == (Key.RIGHT)){ moveThis.x += keyMoveAddValue; }else if(Key.getCode() == (Key.DOWN)){ moveThis.y += keyMoveAddValue; } } } ]] /mx:Script mx:Canvas id=canContent width=500 height=500 minHeight=0 backgroundColor=#ff mouseDown=canContent.setFocus() mx:Canvas id=moveThis width=20 height=20 backgroundColor=#aa keyDown=doKeyMove() mouseDown=moveThis.setFocus() / mx:Canvas id=bigThing x=200 y=100 width=20 height=600 backgroundColor=#00aa00 / /mx:Canvas /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
AW: [flexcoders] Handles for resizing?
Maybe this might help? http://www.flexdaddy.info/2005/03/06/resizable-and-collapsable-titlewindow-f lex-15/ -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Mink, Joseph Gesendet: Freitag, 2. Dezember 2005 14:02 An: flexcoders@yahoogroups.com Betreff: [flexcoders] Handles for resizing? Hi all, I have a rectangle that I'm drawing with the flex drawing API, and I want to allow the user to resize it (grab the bottom-right corner and change the dimensions). I've seen this done in flash many times...does anyone know of an example that might shed some light on the way to go about doing this? I recently solved the problem of using Flash's startDrag and stopDrag, which was a bit awkward because using Flex-style eventListeners seemed to interfere with startDrag and stopDrag. So I had to make sure I did everything with the Flash mouse handling methods. I assume this resizing trick will put me up against the same kind of wierdness? Thanks, Joey Mink [Software Engineer @ Solers, Inc.] Voice: 703 480 2450 Fax: 703 263 2663 [EMAIL PROTECTED] -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS * Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:flexcoders- [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . Yahoo! Groups Sponsor ~-- AIDS in India: A lurking bomb. Click and help stop AIDS now. http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
AW: [flexcoders] instanceof on Object
I needed cloning with inheritance one time. I did it this way. Worked perfectly... *** ValueObject class ValueObject{ public function clone (parent:ValueObject):ValueObject{ var clone:ValueObject= new ValueObject(); return cloneParams(clone,parent); } public function cloneParams (clone:ValueObject, parent:ValueObject):ValueObject{ clone.setParent(parent); return clone; } private function cloneValueObjectArray (arrVOs:Array, parent:ValueObject){ var cloneArray = undefined; if (arrVOs != undefined){ cloneArray = new Array(); for (var i=0;iarrVOs.length;i++) { if (arrVOs[i] != undefined){ var voClone:ValueObject = ValueObject(arrVOs[i]).clone(parent); cloneArray.push(voClone); }else{ cloneArray.push(arrVOs[i]); } } } return cloneArray; } } *** And in a subclass you do something like this: ** SubClass: ... public function clone(parent:ValueObject):ValueObject{ var clone:ValueObject= new SubClass(); return cloneParams(clone,parent); } public function cloneParams (clone:ValueObject,parent:ValueObject):ValueObject{ clone = SubClass(super.cloneParams(clone,parent)); SubClass (clone).type = this.type; SubClass (clone).name = this.name; SubClass (clone).productID = this.productID; SubClass (clone).pages = cloneValueObjectArray(arrValueObjects,clone); return clone; } ... -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von JesterXL Gesendet: Donnerstag, 1. Dezember 2005 16:17 An: flexcoders@yahoogroups.com Betreff: Re: [flexcoders] instanceof on Object I just wrote clone methods. I need a true copy, so ensured each was made correctly. Easy for the simple ones (like Flex 2 events), harder for ones with arrays full of objects. I haven't figured out inheritanced yet, but since these VO's are strictly for the server guy and I to effectively communicate, they work well enough. Inheritance is for another day... class VO { public var id:String; public var name:String; public function clone():VO { var vo:VO = new VO(); vo.id = id; vo.name = name; return vo; } } One for arrays: class Item { public var id:String; public var itemLabel:String; public function clone():Item { var i:Item = new Item(); item.id = id; item.itemLabel = itemLabel; return item; } } class MajorVO { public var otherLabel:String; public var item_array:Array; public function clone():MajorVO { var mvo:MajorVO = new MajorVO(); mvo.otherLabel = otherLabel; var i:Number = item_array.length; mvo.item_array = []; while(i--) { var old:Item = Item(item_array[i]); var ni:Item = old.clone(); mvo.item_array[i] = ni; } return mvo; } } - Original Message - From: Clint Modien mailto:[EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, December 01, 2005 9:51 AM Subject: Re: [flexcoders] instanceof on Object hey Jess... interested to know about the solution you went with on this... On 11/30/05, Paul Frantz [EMAIL PROTECTED] wrote: Hmm might be missing something here but Joe's suggestion in http://www.mail-archive.com/flexcoders@yahoogroups.com/msg09275.html works ok. eg.. Fred.as http://fred.as/ class Fred { public function Fred() {} } App.mxml mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml http://www.macromedia.com/2003/mxml xmlns=* initialize=myInitialize() mx:Script ![CDATA[ import Fred; var f:Fred; function myInitialize():Void { f = new Fred(); var g = Object(f); var _t; _t = new g.__constructor__(); trace(_t instanceof Fred = + (_t instanceof Fred)); } ]] /mx:Script /mx:Application ... produces 'true' for me. Cheers, Paul. -Original Message- From: JesterXL [mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Thursday, 1 December 2005 05:55 To: flexcoders@yahoogroups.com
RE: [flexcoders] RTF Editor Integrated into Flex
Check THIS out :) Flex 1.5 - RichText Editor Found it once. I think it was in this group. Works pretty good. Thanks for that. import mx.core.UIComponent; import mx.controls.Button; import mx.controls.TextArea; import mx.controls.ComboBox; import mx.utils.Delegate; //import com.avsa._general.components.editor.*; //import com.avsa._general.components.colorpicker.*; //class com.avsa._general.components.editor.Editor extends UIComponent { class TextEditor extends UIComponent { static var symbolName:String=TextEditor; static var symbolOwner:Object = TextEditor; var className:String = TextEditor; function TextEditor() { } function init():Void { super.init(); invalidate(); } var start:Number; var end:Number; var btBold:Button; var btItalic:Button; var btUnderline:Button; var btLeft:Button; var btCenter:Button; var btRight:Button; var cComboSize:ComboBox; var cComboFont:ComboBox; var cText:TextArea; var cTempField:TextField; var cTempFormat:TextFormat; //var cColor:ColorPicker; //temp var focusListener:Object function createChildren():Void { // // Buttons // createClassObject(Button, btBold, 11, {label:B}); createClassObject(Button, btItalic, 12, {label:I}); createClassObject(Button, btUnderline, 13, {label:U}); createClassObject(Button, btLeft, 14, {label:L}); createClassObject(Button, btCenter, 15, {label:C}); createClassObject(Button, btRight, 16, {label:R}); btBold.addEventListener(click, this); btItalic.addEventListener(click, this); btUnderline.addEventListener(click, this); btLeft.addEventListener(click, this); btCenter.addEventListener(click, this); btRight.addEventListener(click, this); btBold.move(0,0); btItalic.move(50,0); btUnderline.move(100,0); btLeft.move(0,20); btCenter.move(50,20); btRight.move(100,20); // // Combos // var aSizes:Array = new Array(8,10,12,14,16,18,20,22,24,26,28,30,32,34); createClassObject(ComboBox, cComboSize, 21, {dataProvider:aSizes}); var aFont:Array = new Array(Arial,Courier,Times New Roman,Verdana); createClassObject(ComboBox, cComboFont, 22, {dataProvider:aFont}); cComboSize.move(-200,0); cComboFont.move(-200,20); cComboSize.addEventListener(change, this); cComboFont.addEventListener(change, this); // // TEXT AREA // createClassObject(TextArea, cText, 4, {html: true, id:cText, editable : false, htmlText : test test}); cText.width = 300; cText.height = 150; cText.move(0,50); cText.addEventListener(keyUp, this); cText.addEventListener(mouseUp, this); cText.addEventListener(mouseOut, this); // // TEXT FIELDS // createTextField(cTempField, 5, 100, 100, 1, 1); cTempField.type = Input; cTempField.multiline = true; cTempField.move(0,250); cTempField.border = true; cTempField.html = true; cTempField.text = Ola; cTempField.visible= true; // // TEXT FORMAT // cTempFormat = new TextFormat(); //
RE: [flexcoders] Cyclical reference error
Hi, I had this error to. I worked around it by omitting the types of a variable. Example: Change var test:CyclicalClass = ... test.someFunction(); to var test = ... test.someFunction(); everything (e.g: function calls on the instance) still works. Only the compiler will not check anymore whether you use your instance of CyclicalClass correctly... -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Abdul Qabiz Gesendet: Mittwoch, 12. Oktober 2005 19:11 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] Cyclical reference error Hi, This might also happen if two MXML files reference each other indirectly. Can you please post samples-but-complete-code for the same. -abdul From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan Sent: Wednesday, October 12, 2005 9:24 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cyclical reference error Hello, We've been getting a strange error recently When compiling for the first time after starting JRUN / Flex, we get an error similar to: Cyclical reference to class Two MXML Files cannot reference each other as child tags. As far as I can tell, no MXML files are referencing each other. The really strange thing is that we are able to correct the issue by commenting out the MXML for the offending class, compiling, and then uncommenting and compiling again. Flex doesn't complain at all and compiles fine until the next time we restart the server. Has anyone experienced this? Is there anything that could be causing this or that can be done about it? Best. Jim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS * Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:flexcoders- [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . Yahoo! Groups Sponsor ~-- Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] PopupManager.createPopUp - varying the className argument
Hi Derrick, Maybe this helps you? You can construct class instances dynamically by getting the constructor for a class with mx.utils.ClassUtil.findClass(aClassName:String); But before you can do it, you have to register a class like this: Object.registerClass(TitleWindowTest, TitleWindowTest); Try the following example: ### TitleWindowTestCreator.mxml - File: ### ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; horizontalAlign=left mx:Script![CDATA[ import mx.containers.TitleWindow; import mx.managers.PopUpManager; private function showTitleWindow():Void { Object.registerClass(TitleWindowTest, TitleWindowTest); var testWindowName : String = TitleWindowTest; var oInitObj:Object = new Object(); oInitObj.title = Title Window Data; oInitObj.width = 600; oInitObj.height = 200; var titleWindowInstance:Object = TitleWindow(PopUpManager.createPopUp(this, mx.utils.ClassUtil.findClass(testWindowName), false, oInitObj, false)); titleWindowInstance.centerPopUp(this) } ]]/mx:Script mx:Button label=ShowTitleWindow click=showTitleWindow()/ /mx:Application ### TitleWindowTest.mxml - File: ### ?xml version=1.0 encoding=utf-8? mx:TitleWindow xmlns:mx=http://www.macromedia.com/2003/mxml; closeButton=true click=this.deletePopUp(); creationComplete= mx:HBox mx:Label text=Test Label width=150 / /mx:HBox /mx:TitleWindow -Ursprüngliche Nachricht- Von: Derrick Grigg [mailto:[EMAIL PROTECTED] Im Auftrag von Derrick Grigg Gesendet: Freitag, 7. Oktober 2005 20:13 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] PopupManager.createPopUp - varying the className argument Thanks Matt and Jester No luck though. The background of my app goes white the first time this function gets called, and the app completely disappears the second time. If I put hard codeed class names in everything works. I have come up another solution that seems to work. Each option that calls the loadWin function is based on a class so instead of dispatching an event to loadWin I am having the class use popupmanager to open it's respective window. var win1: views.elements.image; var win2: views.elements.swf; var win3: views.elements.text; function loadWin(event){ var cn:String = views.elements.+ event.target.type; var initObj = { helpButton: true, stateButton: true, resizeButton: true, closeButton: true } var win = mx.managers.PopUpManager.createPopUp( _root, _global[cn], true, initObj, false ); win.centerPopUp(_root); } Thanks for the help though. From: flexcoders@yahoogroups.com on behalf of Matt Chotin Sent: Fri 07/10/2005 10:44 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className argument Also you need to make sure that the class still gets linked into your app. Create some dummy variables of the potential types that could be loaded: Var linkhelper1:MyWindow1; Var linkhelper2:MyWindow2; Etc. Matt From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Friday, October 07, 2005 7:38 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] PopupManager.createPopUp - varying the className argument Close! var yourClass:String = Pooki; PopUpManager.createPopUp(this, _global[yourClass], false); - Original Message - From: Derrick Grigg [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, October 07, 2005 10:04 AM Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className argument Tried the string idea, no luck. The switch/if looks like the only way. I was hoping not to have to do that since I want to have a lot of variability on the user's window options but not luck apparenetly. Thanks. From: flexcoders@yahoogroups.com on behalf of Mink, Joseph Sent: Fri 07/10/2005 9:48 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className argument I would guess you could use a string...like, instead of ...createPopUp( _root, SomeClass, true, initObj, false ); maybe you could do createPopUp( _root, SomeClass, true, initObj, false ); But I
AW: [flexcoders] PopupManager.createPopUp - varying the className argument
Hi Derrick, Maybe this helps you? You can construct class instances dynamically by getting the constructor for a class with mx.utils.ClassUtil.findClass(aClassName:String); But before you can do it, you have to register a class like this: Object.registerClass(TitleWindowTest, TitleWindowTest); Try the following example: ### TitleWindowTestCreator.mxml - File: ### ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; horizontalAlign=left mx:Script![CDATA[ import mx.containers.TitleWindow; import mx.managers.PopUpManager; private function showTitleWindow():Void { Object.registerClass(TitleWindowTest, TitleWindowTest); var testWindowName : String = TitleWindowTest; var oInitObj:Object = new Object(); oInitObj.title = Title Window Data; oInitObj.width = 600; oInitObj.height = 200; var titleWindowInstance:Object = TitleWindow(PopUpManager.createPopUp(this, mx.utils.ClassUtil.findClass(testWindowName), false, oInitObj, false)); titleWindowInstance.centerPopUp(this) } ]]/mx:Script mx:Button label=ShowTitleWindow click=showTitleWindow()/ /mx:Application ### TitleWindowTest.mxml - File: ### ?xml version=1.0 encoding=utf-8? mx:TitleWindow xmlns:mx=http://www.macromedia.com/2003/mxml; closeButton=true click=this.deletePopUp(); creationComplete= mx:HBox mx:Label text=Test Label width=150 / /mx:HBox /mx:TitleWindow -Ursprüngliche Nachricht- Von: Derrick Grigg [mailto:[EMAIL PROTECTED] Im Auftrag von Derrick Grigg Gesendet: Freitag, 7. Oktober 2005 20:13 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] PopupManager.createPopUp - varying the className argument Thanks Matt and Jester No luck though. The background of my app goes white the first time this function gets called, and the app completely disappears the second time. If I put hard codeed class names in everything works. I have come up another solution that seems to work. Each option that calls the loadWin function is based on a class so instead of dispatching an event to loadWin I am having the class use popupmanager to open it's respective window. var win1: views.elements.image; var win2: views.elements.swf; var win3: views.elements.text; function loadWin(event){ var cn:String = views.elements.+ event.target.type; var initObj = { helpButton: true, stateButton: true, resizeButton: true, closeButton: true } var win = mx.managers.PopUpManager.createPopUp( _root, _global[cn], true, initObj, false ); win.centerPopUp(_root); } Thanks for the help though. From: flexcoders@yahoogroups.com on behalf of Matt Chotin Sent: Fri 07/10/2005 10:44 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className argument Also you need to make sure that the class still gets linked into your app. Create some dummy variables of the potential types that could be loaded: Var linkhelper1:MyWindow1; Var linkhelper2:MyWindow2; Etc. Matt From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Friday, October 07, 2005 7:38 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] PopupManager.createPopUp - varying the className argument Close! var yourClass:String = Pooki; PopUpManager.createPopUp(this, _global[yourClass], false); - Original Message - From: Derrick Grigg [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, October 07, 2005 10:04 AM Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className argument Tried the string idea, no luck. The switch/if looks like the only way. I was hoping not to have to do that since I want to have a lot of variability on the user's window options but not luck apparenetly. Thanks. From: flexcoders@yahoogroups.com on behalf of Mink, Joseph Sent: Fri 07/10/2005 9:48 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] PopupManager.createPopUp - varying the className argument I would guess you could use a string...like, instead of ...createPopUp( _root, SomeClass, true, initObj, false ); maybe you could do createPopUp( _root, SomeClass, true, initObj, false ); But I
[flexcoders] mx:Model - XML with keywords like new
Hello again, does anyone about problems using keywords within a mx:Model ? For example, if I've got a XML-file like this: menubar file newtrue/new /file /menubar And try to load it into an mx:Model like: mx:Model id=testXML source=test.xml /mx:Model I get a Compilation Error like: Error main.mxml:7 Expected a field name after '.' operator. Which is not very helpful. But after I changed new to newitem it works again. My assumption is, that because new is a keyword it can't be used as an attribute name... Am I right? Is there a way to use an new element anyway? With namespaces for example? Any suggestions??? Cheers Christoph Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
AW: [flexcoders] Re: Number(011) = 9 ????
Well sorry, I haven't been specific enough. Here it comes: I have got Strings of the form 009, 010, 011,..., 999 which I expect to be a decimal number, and so I was confused, that the output of Number(011) is 9. I didn't know that a 0 in front of literal is a specifier for octal literals. So parseInt(011,10) does exactly what I want to do. It interprets 011 as the decimal 11. My last question was only, whether there is a way to use the Number class to produce this output, because I thought that it is not the most object-oriented way to use the global function parseInt(...)... Thanks for the replies Christoph -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Gordon Smith Gesendet: Dienstag, 4. Oktober 2005 20:05 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] Re: Number(011) = 9 If you do parseInt(011, 10), I'm pretty sure what happens is this: 1. The octal literal 011 is compiled as the decimal Number 9. 2. It is converted at runtime to the string 9, because parseInt expects to parse a string. 3. parseInt parses 9 to produce 9. Obviously, this is a waste of time. 011 already *is* 9 at compile time. It is just a different way of writing it, just like 0x09 is a different way of writing it. For example, try this: trace(011 - 1); The output is 8. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Abdul Qabiz Sent: Tuesday, October 04, 2005 10:29 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Number(011) = 9 Hi, What do you want to do? Convert 011 to decimal 11 Or convert octal(11) to decimal(9) parseInt(..) is a global function and first argument is an expression, so you can pass number also: parseInt(011, 10) - 9 (decimal) You can look at Flash Player ActionScript on: http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/htm l/wwhelp.htm?href=Part_ASLR.html -abdul -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Christoph Diefenthal Sent: Tuesday, October 04, 2005 7:34 PM To: 'flexcoders@yahoogroups.com' Subject: AW: [flexcoders] Re: Number(011) = 9 Ok thank you all, I workaround (or isn't it a workaround??) this problem by using parseInt(011, 10) to get the decimal-system value. How can I use the Number-class to convert the values? Is there a Number.parseInt() function? There is no such function mentioned in the Flex ActionScript Language Reference... can you provide me with a better API? Cheers Christoph -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Philippe Maegerman Gesendet: Dienstag, 4. Oktober 2005 12:24 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] Re: Number(011) = 9 If they are all octal numbers, you can use mx.controls.Alert.show( + Number(011).toString(8)); Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jamiebadman Sent: mardi 4 octobre 2005 11:34 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Number(011) = 9 It's performing an octal to decimal conversion. You can use the Number class to convert between various different number bases. Jamie. --- In flexcoders@yahoogroups.com, Christoph Diefenthal [EMAIL PROTECTED] wrote: Does anyone know why this happens??? Try it on your own server : mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Button label=Value Of String click=valueOfString () / mx:Script ![CDATA[ import mx.controls.Button; public function valueOfString():Void { // the result is 9 ? mx.controls.Alert.show( + Number(011)); } ]] /mx:Script /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail- archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+si te+design+developmentw2=Computer+software+developmentw3=Software+design+ and+developmentw4=Macromedia+flexw5=Software+development+best+practicec =5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software development http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+ site+design+developmentw2=Computer+software+developmentw3=Software+desig n+and+developmentw4=Macromedia+flexw5=Software+development+best+practice c=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw Software design and development http://groups.yahoo.com/gads?t=msk
[flexcoders] Number(011) = 9 ????
Does anyone know why this happens??? Try it on your own server : mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Button label=Value Of String click=valueOfString() / mx:Script ![CDATA[ import mx.controls.Button; public function valueOfString():Void { // the result is 9 ? mx.controls.Alert.show( + Number(011)); } ]] /mx:Script /mx:Application Yahoo! Groups Sponsor ~-- Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
AW: [flexcoders] Re: Number(011) = 9 ????
Ok thank you all, I workaround (or isn't it a workaround??) this problem by using parseInt(011, 10) to get the decimal-system value. How can I use the Number-class to convert the values? Is there a Number.parseInt() function? There is no such function mentioned in the Flex ActionScript Language Reference... can you provide me with a better API? Cheers Christoph -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Philippe Maegerman Gesendet: Dienstag, 4. Oktober 2005 12:24 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] Re: Number(011) = 9 If they are all octal numbers, you can use mx.controls.Alert.show( + Number(011).toString(8)); Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jamiebadman Sent: mardi 4 octobre 2005 11:34 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Number(011) = 9 It's performing an octal to decimal conversion. You can use the Number class to convert between various different number bases. Jamie. --- In flexcoders@yahoogroups.com, Christoph Diefenthal [EMAIL PROTECTED] wrote: Does anyone know why this happens??? Try it on your own server : mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Button label=Value Of String click=valueOfString () / mx:Script ![CDATA[ import mx.controls.Button; public function valueOfString():Void { // the result is 9 ? mx.controls.Alert.show( + Number(011)); } ]] /mx:Script /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+si te+design+developmentw2=Computer+software+developmentw3=Software+design+ and+developmentw4=Macromedia+flexw5=Software+development+best+practicec =5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software development http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+ site+design+developmentw2=Computer+software+developmentw3=Software+desig n+and+developmentw4=Macromedia+flexw5=Software+development+best+practice c=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw Software design and development http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=We b+site+design+developmentw2=Computer+software+developmentw3=Software+des ign+and+developmentw4=Macromedia+flexw5=Software+development+best+practi cec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ Macromedia flex http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+de velopmentw2=Computer+software+developmentw3=Software+design+and+developm entw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.si g=OO6nPIrz7_EpZI36cYzBjw Software development best practice http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1 =Web+site+design+developmentw2=Computer+software+developmentw3=Software+ design+and+developmentw4=Macromedia+flexw5=Software+development+best+pra cticec=5s=166.sig=f89quyyulIDsnABLD6IXIw YAHOO! GROUPS LINKS * Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:flexcoders- [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . -- **STATEMENT OF CONFIDENTIALITY** This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited. We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus. -- Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http
RE: [flexcoders] mouse-right-click-event?
You are right. It works in Version 8! Thanks ! -Ursprüngliche Nachricht- Von: Christoph Diefenthal Gesendet: Freitag, 30. September 2005 10:42 An: 'flexcoders@yahoogroups.com' Betreff: RE: [flexcoders] mouse-right-click-event? Thanks everybody, This example is pretty cool, but it still does not work with dynamic created components (not even within the Application Tag), like ... var test = canTest.createChild(mx.containers.Canvas,canTestChild, { width : 50 , height : 50 , backgroundColor : #ee}); test[menu] = my_cm; // - no effect ... To bad So I probably have to do it by setting the _root.menu by checking mouseOver/mouseOut on my dynamic components. Or is there any other idea? Cheers Christoph -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Philippe Maegerman Gesendet: Freitag, 30. September 2005 09:38 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] mouse-right-click-event? Been fixed in player 8 :) Couldn't find the example that was posted a few weeks ago ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; creationComplete=myInit() mx:Script ![CDATA[ function myInit(){ var my_cm = new ContextMenu(); my_cm.hideBuiltInItems() my_cm.customItems.push(new ContextMenuItem(Top Button context menu, function(){})); btn_1['menu'] = my_cm; var my_cm2 = new ContextMenu(); my_cm2.customItems.push(new ContextMenuItem(Bottom Button context menu, function(){})); btn_2['menu'] = my_cm2; } ]] /mx:Script mx:Button id=btn_1 label=Context Menu without built-in items click=alert('rightClick on me')/ mx:Button id=btn_2 label=ContextMenu click=alert('rightClick on me')/ /mx:Application Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of David Harris Sent: jeudi 29 septembre 2005 20:47 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] mouse-right-click-event? The other thing to remember... The right click can only be used on the Main MXML file, and not any nested views. Limitations in the flash player has this changed for flash 8, any one know? On 9/30/05, Tracy Spratt [EMAIL PROTECTED] wrote: Here is a solution from Manish: http://www.cflex.net/showfiledetails.cfm?ObjectID=195 Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Modien Sent: Thursday, September 29, 2005 2:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] mouse-right-click-event? I've seen a work around for this somewhere in this group it involved catching using the mouseOver event to determine which component the mouse is over and editing the context menu before the menu is shown... never done it but it might be something to try? Can search this group here... *no wildcards tho*... kind of sucks... but it's better than anything else i've seen... http://www.mail-archive.com/flexcoders@yahoogroups.com/ On 9/29/05, Tracy Spratt [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: http://www.cflex.net/showfaq.cfm?Object=faqchannelID=1faqtype=def ault fields=defaultValues=#Question396 Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Christoph Diefenthal Sent: Thursday, September 29, 2005 11:05 AM To: 'flexcoders@yahoogroups.com' Subject: [flexcoders] mouse-right-click-event? Hi people, Is there a possibility to process a mouse-right-click-event instead of opening the flash-menu? Cheers Christoph -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail- archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail
RE: [flexcoders] mouse-right-click-event?
Thanks everybody, This example is pretty cool, but it still does not work with dynamic created components (not even within the Application Tag), like ... var test = canTest.createChild(mx.containers.Canvas,canTestChild, { width : 50 , height : 50 , backgroundColor : #ee}); test[menu] = my_cm; // - no effect ... To bad So I probably have to do it by setting the _root.menu by checking mouseOver/mouseOut on my dynamic components. Or is there any other idea? Cheers Christoph -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Philippe Maegerman Gesendet: Freitag, 30. September 2005 09:38 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] mouse-right-click-event? Been fixed in player 8 :) Couldn't find the example that was posted a few weeks ago ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; creationComplete=myInit() mx:Script ![CDATA[ function myInit(){ var my_cm = new ContextMenu(); my_cm.hideBuiltInItems() my_cm.customItems.push(new ContextMenuItem(Top Button context menu, function(){})); btn_1['menu'] = my_cm; var my_cm2 = new ContextMenu(); my_cm2.customItems.push(new ContextMenuItem(Bottom Button context menu, function(){})); btn_2['menu'] = my_cm2; } ]] /mx:Script mx:Button id=btn_1 label=Context Menu without built-in items click=alert('rightClick on me')/ mx:Button id=btn_2 label=ContextMenu click=alert('rightClick on me')/ /mx:Application Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of David Harris Sent: jeudi 29 septembre 2005 20:47 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] mouse-right-click-event? The other thing to remember... The right click can only be used on the Main MXML file, and not any nested views. Limitations in the flash player has this changed for flash 8, any one know? On 9/30/05, Tracy Spratt [EMAIL PROTECTED] wrote: Here is a solution from Manish: http://www.cflex.net/showfiledetails.cfm?ObjectID=195 Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Clint Modien Sent: Thursday, September 29, 2005 2:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] mouse-right-click-event? I've seen a work around for this somewhere in this group it involved catching using the mouseOver event to determine which component the mouse is over and editing the context menu before the menu is shown... never done it but it might be something to try? Can search this group here... *no wildcards tho*... kind of sucks... but it's better than anything else i've seen... http://www.mail-archive.com/flexcoders@yahoogroups.com/ On 9/29/05, Tracy Spratt [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: http://www.cflex.net/showfaq.cfm?Object=faqchannelID=1faqtype=def ault fields=defaultValues=#Question396 Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Christoph Diefenthal Sent: Thursday, September 29, 2005 11:05 AM To: 'flexcoders@yahoogroups.com' Subject: [flexcoders] mouse-right-click-event? Hi people, Is there a possibility to process a mouse-right-click-event instead of opening the flash-menu? Cheers Christoph -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail- archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail- archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+si te+design+developmentw2=Computer+software+developmentw3=Software+design+ and+developmentw4=Macromedia+flexw5
RE: [flexcoders] ComboBox selectedItem comparison
Have not done it yet, but there is a function getSelectedItem( ) in ComboBox... tried that? -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von fowleryj Gesendet: Donnerstag, 29. September 2005 15:23 An: flexcoders@yahoogroups.com Betreff: [flexcoders] ComboBox selectedItem comparison Hello, I'm trying to determine whether a user's selection within a ComboBox is a valid one for the task that is being carried out. How do I do a comparison with a ComboBox? I've tried selectedItem, selectedItem.data, selectedItem.label, and selectedIndex-- selectedItem returns an [object Object], and selectedItem.data, selectedItem.label, and selectedIndex return undefined. Since my ComboBox is populated, I don't know what to make of the undefined. Any ideas on how to determine exactly what the user has selected, so that I can compare it with the values I *don't* want them to have selected for this particular task? Thanks -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] mouse-right-click-event?
Hi people, Is there a possibility to process a mouse-right-click-event instead of opening the flash-menu? Cheers Christoph Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] mouse-right-click-event?
Ok, I figured out, how to set a ContextMenu on a component. Works fine... with STATIC components like below . But with dynamic components If I change the initThis function below to this function initThis(){ //var my_cm = new _global[ContextMenu](); var my_cm :ContextMenu = new ContextMenu(); my_cm.hideBuiltInItems(); my_cm.customItems.push(new ContextMenuItem(Hello, itemHandler)); var test = canTest.createChild( mx.containers.Canvas,canTestChild, { width : 50 , height : 50 , backgroundColor : #ee}); var contextOver = String( test.id ); mx.core.Application.application[ contextOver ].menu = my_cm; } ...it does not work anymore... HELP!! ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns=* initialize=initThis() mx:Canvas id=canTest width=50 height=50 backgroundColor=#ff / mx:Script ![CDATA[ var showItem = true; var my_cm:ContextMenu; function initThis(){ var my_cm = new _global[ContextMenu](); //var my_cm :ContextMenu = new ContextMenu(); my_cm.hideBuiltInItems(); my_cm.customItems.push(new ContextMenuItem(Hello, itemHandler)); var contextOver = String( canTest.id ); mx.core.Application.application[ contextOver ].menu = my_cm; mx.controls.Alert.show(mx.core.Application.application[ contextOver ]); //canTest.menu = my_cm; } function menuHandler(obj, menuObj) { if (showItem == false) { menuObj.customItems[0].enabled = false; } else { menuObj.customItems[0].enabled = true; } } function itemHandler(obj, item) { //...put code here... mx.controls.Alert.show(selected!); } ]] /mx:Script /mx:Application -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Christoph Diefenthal Gesendet: Donnerstag, 29. September 2005 17:05 An: 'flexcoders@yahoogroups.com' Betreff: [flexcoders] mouse-right-click-event? Hi people, Is there a possibility to process a mouse-right-click-event instead of opening the flash-menu? Cheers Christoph -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
AW: [flexcoders] KeyDown event in mx:Application tag
Hi Maybe this helps. It works directly without pressing any Buttons... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns:cm=module.customModules.* xmlns:inc=indexIncludes.* backgroundColor=#FF initialize=initThis() mx:Script ![CDATA[ function initThis(){ var keyListener:Object = new Object(); keyListener.onKeyDown = function() { mx.controls.Alert.show(DOWN - Code: +Key.getCode()+\tACSII: +Key.getAscii()+\tKey: +chr(Key.getAscii())); }; keyListener.onKeyUp = function() { //mx.controls.Alert.show(UP - Code: +Key.getCode()+\tACSII: +Key.getAscii()+\tKey: +chr(Key.getAscii())); }; Key.addListener(keyListener); } ]] /mx:Script /mx:Application Cheers, Christoph -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Shanmuga Raja Gesendet: Dienstag, 27. September 2005 16:44 An: flexcoders@yahoogroups.com Betreff: Re: [flexcoders] KeyDown event in mx:Application tag Hi, Any idea why the KeyDown event in the mx:Application Level is not trapped properly. Here is the code snippet. Please find a detailed explanation of the problem in this chain of mails. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; keyDown=keyEvt(event) mx:Script ![CDATA[ function keyEvt(event) { alert('Key Event Trapped'); if( Key.isDown(112) ) { alert('F1 pressed'); } } ]] /mx:Script mx:Canvas width=550 height=200 backgroundColor=#0099FF mx:TextInput id=tBox x=177 y=44/ mx:Button label=Hullo id=but x=227 y=86 / /mx:Canvas /mx:Application Thanks Warn Regards, Raja On 9/26/05, Abdul Qabiz [EMAIL PROTECTED] wrote: You can not trap all function keys if your flex application is running in browser. There are various JavaScript hacks, which can trap keyboard shortcuts reserved by various browsers. But it is not pretty straight forward. -abdul From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shanmuga Raja Sent: Monday, September 26, 2005 6:41 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] KeyDown event in mx:Application tag Hi, I am trying to use KeyDown event in mx:Application level to trap Function Keys (F1,F2,etc.). I have the following 2 problems: 1. The KeyDown event does not get triggered the first time page is loaded, but after I click on the button the key events are triggered. I have attached event.mxml which has this problem. The same code works properly if I use mouseDown instead. The mouse events are triggered and trapped properly. Please help me out if I had done something wrong in this! 2. I want to trap all the Function keys and override the default actions of the Browser. For example I want to Set focus to a textinput on click of F1 key. I am able to get handle to the function key event in the actionscript but the Windows Help page also loads in IE. Is there any way using Actionscripts to override this behaviour? Thanks Warm Regards, Raja -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail- archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS *Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. *To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:flexcoders- [EMAIL PROTECTED] *Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+si te+design+developmentw2=Computer+software+developmentw3=Software+design+ and+developmentw4=Macromedia+flexw5=Software+development+best+practicec =5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software development http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+ site+design+developmentw2=Computer+software+developmentw3=Software+desig
[flexcoders] container - child : height=100% - layout problem
Hi @all, I have got a problem with my layout... I want my Application to fit into the browser window. A VBox (vBxContent) should fit into this Application and be as high as possible, wherefore I set its height to 100%. But if a child (canContent) within vBxContent is higher then the screen it pushes the vBxContent.height to canContent's height. How can I assure, that the vBxContent height will not get bigger? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; width=100% height=100% backgroundColor=#AA mx:VBox id=vBxContent width=100% height=100% backgroundColor=#66 verticalAlign=middle horizontalAlign=center mx:Canvas id=canContent backgroundColor=#ff width=200 height=1188 / /mx:VBox mx:Canvas id=canAnotherComponent backgroundColor=#ff width=100 height=100/ /mx:Application Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
AW: [flexcoders] Re: container - child : height=100% - layout pr oblem
Thanks these are good idea, but actually I want something different. I should have been more specific. I want the child to be scrollable within vBxContent, without setting vBXxContent.height to a fixed size as you can see in my following little ASCII screenshot :) | __ | | | _|^| | | | | | | | | | | | | | | | | | | | | | | | |__|_|___|v| | | | The problem is, that vBxContent does not implicitly goes to scrollmode. I tried the following, what sets the size of vBxContent to the Applications.height: mx:VBox id=vBxContent width=100% height={this.height} That works, but only as long as there is no other component before or after vBxContent (like canAnotherComponent in the example)... Then I would have to do something like height={this.height- canAnotherComponent.height } That's not useful if I don't know how many components are following Is there no easy way not to allow a component not to grow bigger than its parent?? Cheers, Christoph -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von bhaq1972 Gesendet: Donnerstag, 22. September 2005 13:24 An: flexcoders@yahoogroups.com Betreff: [flexcoders] Re: container - child : height=100% - layout problem just some ideas 1) look at scaleY property for your child canvas. 2) a general approach might be ovveride vBxContent layoutChildren() method something like this (untested) function layoutChildren() { super.layoutChildren(); //loop all children and and chge width if neccessary for(var i=0;inumChildren;i++) { var obj1 = getChildAt(i); if( obj1.layoutHeight this.layoutHeight) { obj1.layoutHeight = this.layoutHeight; // i'm sure theres more to do like scaling - but its a start } } } --- In flexcoders@yahoogroups.com, Christoph Diefenthal [EMAIL PROTECTED] wrote: Hi @all, I have got a problem with my layout... I want my Application to fit into the browser window. A VBox (vBxContent) should fit into this Application and be as high as possible, wherefore I set its height to 100%. But if a child (canContent) within vBxContent is higher then the screen it pushes the vBxContent.height to canContent's height. How can I assure, that the vBxContent height will not get bigger? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; width=100% height=100% backgroundColor=#AA mx:VBox id=vBxContent width=100% height=100% backgroundColor=#66 verticalAlign=middle horizontalAlign=center mx:Canvas id=canContent backgroundColor=#ff width=200 height=1188 / /mx:VBox mx:Canvas id=canAnotherComponent backgroundColor=#ff width=100 height=100/ /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links Yahoo! Groups Sponsor ~-- Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] height=100% layout problem
Hi @all, I have got a problem with my layout... I want my Application to fit into the browser window. A VBox (vBxContent) should fit into this Application and be as high as possible, wherefore I set its height to 100%. But if a child (canContent) within vBxContent is higher then the screen it pushes the vBxContent.height to canContent's height. How can I assure, that the vBxContent height will not get bigger? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; width=100% height=100% backgroundColor=#AA mx:VBox id=vBxContent width=100% height=100% backgroundColor=#66 verticalAlign=middle horizontalAlign=center mx:Canvas id=canContent backgroundColor=#ff width=200 height=1188 / /mx:VBox mx:Canvas id=canAnotherComponent backgroundColor=#ff width=100 height=100/ /mx:Application Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
AW: [flexcoders] Re: container - child : height=100% - layout pr oblem
Yep tried that to. mx:VBox id=vBxContent width=100% height=100% maxHeight={this.height} backgroundColor=#66 verticalAlign=middle horizontalAlign=center has no effect. mx:VBox id=vBxContent width=100% height=100% maxHeight=100% backgroundColor=#66 verticalAlign=middle horizontalAlign=center does not even work because you can set maxHeight only to a number and not to a percent value. I would set it to a number, but I don't have the number, because I want the vBxContent to be dynamic within its parent... -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Philippe Maegerman Gesendet: Donnerstag, 22. September 2005 16:02 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] Re: container - child : height=100% - layout problem have you tried 'maxHeight' and 'maxWidth' ? Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Christoph Diefenthal Sent: jeudi 22 septembre 2005 15:52 To: 'flexcoders@yahoogroups.com' Subject: AW: [flexcoders] Re: container - child : height=100% - layout problem Thanks these are good idea, but actually I want something different. I should have been more specific. I want the child to be scrollable within vBxContent, without setting vBXxContent.height to a fixed size as you can see in my following little ASCII screenshot :) | __ | | | _|^| | | | | | | | | | | | | | | | | | | | | | | | |__|_|___|v| | | | The problem is, that vBxContent does not implicitly goes to scrollmode. I tried the following, what sets the size of vBxContent to the Applications.height: mx:VBox id=vBxContent width=100% height={this.height} That works, but only as long as there is no other component before or after vBxContent (like canAnotherComponent in the example)... Then I would have to do something like height={this.height- canAnotherComponent.height } That's not useful if I don't know how many components are following Is there no easy way not to allow a component not to grow bigger than its parent?? Cheers, Christoph -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von bhaq1972 Gesendet: Donnerstag, 22. September 2005 13:24 An: flexcoders@yahoogroups.com Betreff: [flexcoders] Re: container - child : height=100% - layout problem just some ideas 1) look at scaleY property for your child canvas. 2) a general approach might be ovveride vBxContent layoutChildren() method something like this (untested) function layoutChildren() { super.layoutChildren(); //loop all children and and chge width if neccessary for(var i=0;inumChildren;i++) { var obj1 = getChildAt(i); if( obj1.layoutHeight this.layoutHeight) { obj1.layoutHeight = this.layoutHeight; // i'm sure theres more to do like scaling - but its a start } } } --- In flexcoders@yahoogroups.com, Christoph Diefenthal [EMAIL PROTECTED] wrote: Hi @all, I have got a problem with my layout... I want my Application to fit into the browser window. A VBox (vBxContent) should fit into this Application and be as high as possible, wherefore I set its height to 100%. But if a child (canContent) within vBxContent is higher then the screen it pushes the vBxContent.height to canContent's height. How can I assure, that the vBxContent height will not get bigger? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; width=100% height=100% backgroundColor=#AA mx:VBox id=vBxContent width=100% height=100% backgroundColor=#66 verticalAlign=middle horizontalAlign=center mx:Canvas id=canContent backgroundColor=#ff width=200 height=1188 / /mx:VBox mx:Canvas id=canAnotherComponent backgroundColor=#ff width=100 height=100 / /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail- archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http
AW: [flexcoders] height=100% layout problem
Unbelievable! That works!!! Thanks very much! How did you get that fancy idea? Does not look right this way, does it? -Ursprüngliche Nachricht- Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Mercer, Dustin Gesendet: Donnerstag, 22. September 2005 16:35 An: flexcoders@yahoogroups.com Betreff: RE: [flexcoders] height=100% layout problem Try setting minHeight=0 and minWidth=0 on vBxContent. I had the same problem with some of my layouts and that fixed :-) From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Christoph Diefenthal Sent: Thursday, September 22, 2005 3:01 AM To: 'flexcoders@yahoogroups.com' Subject: [flexcoders] height=100% layout problem Hi @all, I have got a problem with my layout... I want my Application to fit into the browser window. A VBox (vBxContent) should fit into this Application and be as high as possible, wherefore I set its height to 100%. But if a child (canContent) within vBxContent is higher then the screen it pushes the vBxContent.height to canContent's height. How can I assure, that the vBxContent height will not get bigger? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; width=100% height=100% backgroundColor=#AA mx:VBox id=vBxContent width=100% height=100% backgroundColor=#66 verticalAlign=middle horizontalAlign=center mx:Canvas id=canContent backgroundColor=#ff width=200 height=1188 / /mx:VBox mx:Canvas id=canAnotherComponent backgroundColor=#ff width=100 height=100 / /mx:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+si te+design+developmentw2=Computer+software+developmentw3=Software+design+ and+developmentw4=Macromedia+flexw5=Software+development+best+practicec =5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ Computer software development http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=Web+ site+design+developmentw2=Computer+software+developmentw3=Software+desig n+and+developmentw4=Macromedia+flexw5=Software+development+best+practice c=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw Software design and development http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=We b+site+design+developmentw2=Computer+software+developmentw3=Software+des ign+and+developmentw4=Macromedia+flexw5=Software+development+best+practi cec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ Macromedia flex http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+de velopmentw2=Computer+software+developmentw3=Software+design+and+developm entw4=Macromedia+flexw5=Software+development+best+practicec=5s=166.si g=OO6nPIrz7_EpZI36cYzBjw Software development best practice http://groups.yahoo.com/gads?t=msk=Software+development+best+practicew1 =Web+site+design+developmentw2=Computer+software+developmentw3=Software+ design+and+developmentw4=Macromedia+flexw5=Software+development+best+pra cticec=5s=166.sig=f89quyyulIDsnABLD6IXIw YAHOO! GROUPS LINKS * Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:flexcoders- [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . Yahoo! Groups Sponsor ~-- Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/