Re: [flexcoders] Is it possible to add Flex components to the Stage?
Flex is a complete framework and each and every component follows the rules of the framework. Without the framework running in the background its probably impossible to get a component working unless you do a lot of work to make it work. Perhaps much easier to write a separate AS3 component. On Thu, Sep 22, 2011 at 11:22 PM, Jeffry Houser jef...@dot-com-it.comwrote: ** addElement is only defined in spark components; that will just throw a compile time error. I'm not sure why you want to add a Flex Component directly to the stage. I suppose in theory you could; but that would bypass all the Flex Framework code to position and size the component. You'd, in essence, need to write your own layout manager. that performs the same functionality as the Flex Layout manager. In the context of Flex; it probably isn't a good idea to access the stage directly. On 9/22/2011 2:33 PM, grimmwerks wrote: Try stage.addElement rather than addChild? On Sep 22, 2011, at 2:30 PM, Hogs Haven wrote: From everything I've read, Flex components can only be added to Flex Components (ie: VBox to Application, VGroup to Panel, etc) I'm working in an AS3 view library (no Flex, just Sprites) where I need to add a Scrollable container component to the Stage on a click event. There's no way to do this as I see it unless I write my own Scroll container, use Flex SDK (don't think this works), or use fl.containers.ScrollPane (which is not an option since we're not using a .fla) So basically, I'm trying to accomplish this, as simple runnable example, but it fails silently and nothing appears...any ideas? Thanks. ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx creationComplete=application1_creationCompleteHandler(event) fx:Script ![CDATA[ import mx.containers.Panel; import mx.core.UIComponent; import mx.events.FlexEvent; protected function application1_creationCompleteHandler(event:FlexEvent):void { addEventListener(Event.ADDED_TO_STAGE, onAdded); } private function onAdded(e:Event):void { var myPanel : Panel = new Panel(); myPanel.width=100; myPanel.height=100; stage.addChild(myPanel); //nothing happens } ]] /fx:Script fx:Declarations/fx:Declarations /s:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo%21Groups Links Garry Schafer grimmwerks gr...@grimmwerks.com portfolio: www.grimmwerks.com/ -- Jeffry Houser Technical Entrepreneur203-379-0773 --http://www.flextras.com?c=104 UI Flex Components: Tested! Supported! Ready! --http://www.theflexshow.comhttp://www.jeffryhouser.comhttp://www.asktheflexpert.com -- Part of the DotComIt Brain Trust -- Regards, Ganaraj P R
[flexcoders] Form field validation - required property not working
I have a TextInput control in my form that is required only when a RadioButtonGroup has a certain selected value. There is a RegExpValidator defined that is tied to the TextInput source property. Here's the validator: mx:RegExpValidator id=employeeEmailValidator source={formEmail} property=text flags=g expression={emailRegex} noMatchError=Invalid Email Address format required={formNoticesGroup.selectedValue == 'yes'}/ With the radio button set so that the field is required, I can focus in and then focus out of the TextInput and I get the red box border. But if I go change the radio button selection so that the field isn't required, the red box remains and I still see the toolTip indicating that the field is required. It's not until I focus in and focus out of the TextInput again that I see that styling go away. I tried putting the following into the RadioButton definition: change={employeeEmailValidator.validate();} but it didn't seem to help. I would think that binding the required property of the RegExpValidator would be enough, but it's not changing the apparent required indicator until the TextInput gains and loses focus (which I assume triggers the default valueCommit event). Any thoughts on what I can do? When I save the form the validator works OK and I don't have any issues if it isn't required, but the user is still going to get confused when filling out the form.
Re: [flexcoders] Re: Is it possible to add Flex components to the Stage?
if for some reason you don't want or can't use Flex, then you try some of the pure AS component libraries: * ASDPC : http://sibirjak.com/osflash/projects/as-dataprovider-controls/ * AsWing : http://www.aswing.org/ and there are more. Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Thu, Sep 22, 2011 at 11:06 PM, Hogs Haven e_ba...@yahoo.com wrote: ** Thanks Alex for the reply. Yea, with systemManager being a Flex component I guess I'm out of luck. OK, refactor time. --- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote: Flex components cannot be added to the Stage. You can add them to SystemManager and get pretty much the same effect. On 9/22/11 11:56 AM, Hogs Haven e_baggg@... wrote: Thanks, but flash.display.Stage is not a Flex component; therefore it only has addChild(). addElement() is part of the spark Flex classes. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , grimmwerks grimm@ wrote: Try stage.addElement rather than addChild? On Sep 22, 2011, at 2:30 PM, Hogs Haven wrote: From everything I've read, Flex components can only be added to Flex Components (ie: VBox to Application, VGroup to Panel, etc) I'm working in an AS3 view library (no Flex, just Sprites) where I need to add a Scrollable container component to the Stage on a click event. There's no way to do this as I see it unless I write my own Scroll container, use Flex SDK (don't think this works), or use fl.containers.ScrollPane (which is not an option since we're not using a .fla) So basically, I'm trying to accomplish this, as simple runnable example, but it fails silently and nothing appears...any ideas? Thanks. ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx creationComplete=application1_creationCompleteHandler(event) fx:Script ![CDATA[ import mx.containers.Panel; import mx.core.UIComponent; import mx.events.FlexEvent; protected function application1_creationCompleteHandler(event:FlexEvent):void { addEventListener(Event.ADDED_TO_STAGE, onAdded); } private function onAdded(e:Event):void { var myPanel : Panel = new Panel(); myPanel.width=100; myPanel.height=100; stage.addChild(myPanel); //nothing happens } ]] /fx:Script fx:Declarations/fx:Declarations /s:Application -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links Garry Schafer grimmwerks grimm@ portfolio: www.grimmwerks.com/ -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] How to detect change of mobile orientation ? portrain
on CreationComplete, add addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChanged); you can debug out the rest On Fri, Sep 23, 2011 at 5:34 AM, j2me_soul j2me_s...@163.com wrote: How to detect change of mobile orientation ? portrain or landscape
[flexcoders] 3D Tree and flex 4.5
I'm getting this error when I click on an item from the 3D found at http://activeden.net/item/3d-tree-20/full_screen_preview/15727 ArgumentError: Error #2109: Frame label Open not found in scene Open. at flash.display::MovieClip/gotoAndStop() at com.zerofractal::tree3D/openFolder() at com.zerofractal::tree3D/onItemPress() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at org.papervision3d.core.utils::InteractiveSceneManager/dispatchObjectEvent() at org.papervision3d.core.utils::InteractiveSceneManager/handleMousePress() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924] This error didn't occur when using Flex 3. Are there known issues 'argument error 2109' and flex 4.5? Thanks, Philip
RE: [flexcoders] 3D Tree and flex 4.5
And is there a way to workaround this error? To: flexcoders@yahoogroups.com From: loudj...@hotmail.com Date: Fri, 23 Sep 2011 18:41:18 + Subject: [flexcoders] 3D Tree and flex 4.5 I'm getting this error when I click on an item from the 3D found at http://activeden.net/item/3d-tree-20/full_screen_preview/15727 ArgumentError: Error #2109: Frame label Open not found in scene Open. at flash.display::MovieClip/gotoAndStop() at com.zerofractal::tree3D/openFolder() at com.zerofractal::tree3D/onItemPress() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at org.papervision3d.core.utils::InteractiveSceneManager/dispatchObjectEvent() at org.papervision3d.core.utils::InteractiveSceneManager/handleMousePress() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924] This error didn't occur when using Flex 3. Are there known issues 'argument error 2109' and flex 4.5? Thanks, Philip
[flexcoders] exclude certain classes from debugging session
Hi All When debugging some code and stepping through or stepping over some code, is it possible to configure flex to not include certain classes in the debugging session or at least to entirely skip those classes from begin included in the debugging session(but they still need to execute, just don't want to see it) The reason for this is that sometimes I'm stepping though some code and there are certain classes just dont' want to know about (for instance tweening classes or robotlegs) Anyone know if this is possible? Thanks Wouter
[flexcoders] Re: Trying to pass a value to the mxml/swf file from java(android).How?
Hi Rohini, Is the part of the code above mxml in android(in androidmanifest.xml file).PLz elaborate , i would like to know more about what you have posted. Best rgds and Thanks in advance Saurabh --- In flexcoders@yahoogroups.com, Shunmuga msrohini@... wrote: you can pass the arguments to swf file by using Flashvars: FlashVars=arg1=valarg2=val2 string htmlUrl = object width=\550\ height=\400\ param name=\movie\ value=\file:///android_asset/sample.swf\ embed src=\file:///android_asset/sample.swf\ FlashVars=arg1=valarg2=val2 width=\550\ height=\400\ /embed/object; In MXML file: var flashVarsObj:Object = Application.application.parameters as Object; arg1 = flashVarsObj.arg1; arg2 = flashVarsObj.arg2; Thanks, Rohini. --- In flexcoders@yahoogroups.com, rawat rawatsaurabh@ wrote: HI, I have been trying to pass the values to the mxml file(whose output is .swf file) via android (java code) , But i am unable to do this.Here is my problem, I think tht .SWF file is a binary file(like exe , .out or .dll or .iso) which runs on flash platforms(browser, mobile phone supporting flash).Now i want the output of the .swf to be dependent on some values which I want to pass thourgh the android code. Other way is that I put the mxml files itself inside the eclipse(android project IDE) and pass the values to it (don't know how) compile it using mxmlc.exe compiler and link(don't know how ) with the android project and generate the final output file(we call it apk) and run it.Please suggest me which way to go even though my study is still partial but I am at the cross roads of confusion.Please suggest me which way to go and how. Rgds, Saurabh
[flexcoders] LCDS Secure Server Services config issue - some channels work, other's don't
Hi, I'm trying to get all the various ways to connect to LCDS working and running into an issue with some secure ones. I have it working for secure-http but can't get it to work for secure-nio-http, secure-nio-amf, etc. If I go to https://{server.name}:2443/secureniohttp directly in the browser it's not showing up. Any ideas as to why it isn't starting up but the others are fine? Thank you! Here's bits of my services-config file... THIS ONE DOES NOT WORK channel-definition id=secure-nio-http class=mx.messaging.channels.SecureHTTPChannel endpoint url=https://{server.name}:2443/secureniohttp; class=flex.messaging.endpoints.SecureNIOHTTPEndpoint/ server ref=secure-server/ properties add-no-cache-headersfalse/add-no-cache-headers polling-enabledfalse/polling-enabled /properties /channel-definition THIS ONE DOES channel-definition id=my-nio-http class=mx.messaging.channels.HTTPChannel endpoint url=http://{server.name}:2080/niohttp; class=flex.messaging.endpoints.NIOHTTPEndpoint/ server ref=my-nio-server/ properties polling-enabledfalse/polling-enabled /properties /channel-definition THIS ONE DOES channel-definition id=my-secure-http class=mx.messaging.channels.SecureHTTPChannel endpoint url=https://{server.name}:{server.port}/{context.root}/messagebroker/securehttp; class=flex.messaging.endpoints.SecureHTTPEndpoint/ server ref=secure-server/ properties add-no-cache-headersfalse/add-no-cache-headers /properties /channel-definition I USE SAME SECURE ERVER INFO server id=secure-server class=flex.messaging.socketserver.SocketServer properties httpcross-domain-pathcrossdomain.xml/cross-domain-path/http keystore-file{context.root}/WEB-INF/flex/fxlcds.JKS.keystore/keystore-file keystore-password*/keystore-password idle-timeout-minutes20/idle-timeout-minutes /properties /server
[flexcoders] Re: How to detect change of mobile orientation ? portrain
This will add an event listener so that your event handler will be called when the orientation is changed: Stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler); Also take a look at StageOrientationEvent.ORIENTATION_CHANGING -- Tom --- In flexcoders@yahoogroups.com, j2me_soul j2me_soul@... wrote: How to detect change of mobile orientation ? portrain or landscape