[flexcoders] LocalConnection quirks with AVM1-AVM2 communication?
I have an application developed in Flex 2 that loads another application built in Flash 8. Since they need to send some small data back and forth, I am using two LocalConnections - one for sending data from the Flex app to the Flash 8 app, and one for the reverse. Each uses a hard-coded name for simplicity's sake. All the data sent are intrinsics (Strings and Numbers) So far, so good. Both sides send and receive the communications and the correct method calls are executed, but I've noticed some quirks with the arguments received by the functions on either side. On the Flex side, the client functions that take no parameters receive an argument array that looks like Array[Array[]] (an array of a single item which is an empty array), which throws a runtime error. On the Flash side, I've noted problems with the String objects where Flash cannot properly execute String methods on them. Also, in a function taking two String parameters (param1:String, param2:String), it is receiving param1='param1,param2' and param2=undefined from the LocalConnection. I've included sample code (including my workarounds) for all these cases below. I've been unable to find any documentation or discussion mentioning any of these issues. Although they have fairly simple workarounds, it seems odd to find no mention of anything like this. Does anyone know if these are known issues, or am I missing something? Thank you, Heidi Hunter // Sample Flex code class LocalConnectionReceiver{ // only one of these exists at any time private var connection:LocalConnection; function LocalConnectionReceiver(){ connection = new LocalConnection(); connection.client = this; connection.connect(flexLCListener); } // workaround for empty args array, I previously had // function onFlashResize():void{ function onFlashResize(...arguments):void{ // do something } } class LocalConnectionSender{ // used by any Flex component needing to communicate with the Flash app private var connection:LocalConnection; public function send(method:String, ...arguments):void{ connection.send(flash8LCListener,method,arguments); } } // Flash8/AS 2 code class FlexConnector extends LocalConnection{ function FlexConnector(){ super(); connect(flash8LCListener); } // I want to do : // function setInfo(param1:String, param2:String):Void { // but my workaround is: function setInfo( params:String ):Void{ // I want to do: // var split:Array = params.split(,); // but I get split = undefined // workaround: var paramString:String = String(params); var split:Array = paramString.split(,); var param1:String = split[0]; var param2:String = split[1]; // do something with param1 param2 } function sendToFlex(method:String):Void{ var sendConnection:LocalConnection = new LocalConnection(); sendConnection.send(flexListener,method,arguments.slice(1)); } } -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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] Re: Application does not finish loading
An addendum to my message: This morning we realized that the loader is not showing when the page displays, which would explain why the creationComplete event isn't handled. What might I be able to tap into in the loader to workaround this? /Heidi Yahoo! Groups Sponsor ~-- See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/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] Application does not finish loading
I have an application that loads several components at startup that are invisible initially, then in its creationComplete event handler chooses which to display. We recently noticed that sometimes, the final initializations done by the creationComplete handler were not being executed for some of the people on our dev team when they load the app the first time - they have to do a manual refresh in the browser (IE) to get the completed application. Some of us had never seen this problem while others see it 100% of the time. The application is currently built with the GMC2 version of Flex builder, and we are all using the player version from the same release. The only difference we have detected so far is a variation in the IE version or service pack. We have tried several workarounds including embedding the swf in various ways and even forcing an automatic page refresh with javascript, to no avail. I have not seen anything like this in the chatter about the recent ActiveX control changes. Has anyone seen behavior like this with an application not executing its creationComplete event handler? Thanks /Heidi Yahoo! Groups Sponsor ~-- See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/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] Spacing of repeater objects
I am laying out HBox in a Repeater, and I would like them to be completely contiguous, but there seems to be a small space between them. I have set the border,left,right,top,bottom and padding on the HBoxes to zero, however they are still spaced. How can I get rid of this space? Thanks, /Heidi -- 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] Meaning of xmlns=*?
Hello, I'm relatively new to Flex, and I'm editing some code in an existing project where these xmlns=* declarations are scattered about in our components in addition to our own namespace declarations. To the best of my knowledge, all our our custom components are qualified with their namespace names in the mxml files. Being so, is this declaration necessary, and what exactly does it mean? The global namespace? Thanks, /Heidi -- 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.