[Flashcoders] [AS3] how to tell Loader on which clip you are going to load?
Hello everyone! I wrote a little class extending the AS3 Loader class. In my new loader I've added a reference to the clip to which attach my content, so that I can write myLoader.loadImage(url, clip:MovieClip) where loadImage is a static method; in an ideal world myLoader will always load an image, and will fire an Event.INIT when the image has been loaded; I have defined a listener for this event, like this: function onLoadSuccessful(myEvent:Event) { trace(myEvent.target.loader.myClip); } where myEvent.target is the loaderInfo property in my event, and myEvent.target.loader is an instance of the myLoader object; myEvent.target.loader.myClip will thus be the reference to the clip on which I will attach my image. The problem is: when the image doesn't exist, I would listen for an IOError. In this case, I have defined another listener: function onLoadError(myEvent:IOEvent) { trace(myEvent.target.loader.myClip); } But this raises an exception if the image fails to load (because the file doesn't exist), and tells me that the loader is not accessible because the event was fired too early to access the loaderInfo property. How can I access the myClip property in the onLoadError event? Thanks in advance. Leonardo ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Video has no mouseEnabled, help (AS3)
Hello Matthias, Load the video(component) into a Sprite instance and you can attach Mouse events to it HTH Cor -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Matthias Dittgen Verzonden: vrijdag 25 januari 2008 15:07 Aan: Flash Coders List Onderwerp: [Flashcoders] Video has no mouseEnabled, help (AS3) Hello, I have a Sprite listening for MouseEvents below a Video. Video overlaps half the Sprite. The Sprite only receives mouseEvents where it is not overlapped by the Video. If Video was a Sprite, too, I could mouseEnable = false it, but Video doesn't have this property. Any suggestion? Matthias ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.11/1244 - Release Date: 25-1-2008 19:44 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.11/1244 - Release Date: 25-1-2008 19:44 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.11/1244 - Release Date: 25-1-2008 19:44 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Event Handling in ActionScript 3
Hello. I'm new to AS3. I'm using Flash CS3.I've been reading recent posts about event handling, EventDispatcher, and the Delegate class which used in AS2. I've read the documentation about the EventDispatcher class, and learnt how to use it in Flash. How ever I can't seem to fin a way to do what I used to do in AS2. I didn't use Delegate. I did something like this: import org.guybrush.MySuperFeaturedClass; class MyWrapperClass { var mySuperObject:MySuperFeaturedClass; function whatever( n:String ):void{ this.mySuperObject = new MySuperFeaturedClass(); this.mySuperObject.mDoSomeAsynchronousTask( n ); var self:MyWrapperClass = this; *this.mySuperObject.mOnTaskCompleted = function ( type:String, arg2:String ){* switch(type){ case one: trace(ok, task returned 'one'); break; case red: trace(look! task returned 'red'); break; case bananas: trace(wel... task returned 'bananas'); break; default: trace(oh! task returned + type); break; } }; } } I know how to achieve the same with addEventListener. The thing is, doing it that way I always need to create handling function for each event I'm registering. And the other disadvantage is that when the class I'm consuming is a custom class coded by my self, I need to either make it a subclass of EventDispatcher, or implement its interface somehow. So basically, my question is: *how can I do what I used to to in AS2, now in AS3?* Thanks in advance for any replies, Guybrush ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Event Handling in ActionScript 3
Hi, If you dont like the as3 event mechanism, you can write your own, but looking at your code, there are a number of things I wouldn't do: - setting local variables on the activation stack, it leads to memory waste - executing the asynchronoustask before setting the callback handlers - prepending everything with m - using simple strings as type instead of static public event types - using the callback mechanism (overriding the onTasketc method) combined with the event types and required params So to be honest I wouldnt port this way of working to AS3 , I'd take it as an opportunity to do it better this time around. We're not on monkey island you know;-) greetz JC On Sat, Jan 26, 2008 at 3:48 PM, Guybrush Threepwood [EMAIL PROTECTED] wrote: Hello. I'm new to AS3. I'm using Flash CS3.I've been reading recent posts about event handling, EventDispatcher, and the Delegate class which used in AS2. I've read the documentation about the EventDispatcher class, and learnt how to use it in Flash. How ever I can't seem to fin a way to do what I used to do in AS2. I didn't use Delegate. I did something like this: import org.guybrush.MySuperFeaturedClass; class MyWrapperClass { var mySuperObject:MySuperFeaturedClass; function whatever( n:String ):void{ this.mySuperObject = new MySuperFeaturedClass(); this.mySuperObject.mDoSomeAsynchronousTask( n ); var self:MyWrapperClass = this; *this.mySuperObject.mOnTaskCompleted = function ( type:String, arg2:String ){* switch(type){ case one: trace(ok, task returned 'one'); break; case red: trace(look! task returned 'red'); break; case bananas: trace(wel... task returned 'bananas'); break; default: trace(oh! task returned + type); break; } }; } } I know how to achieve the same with addEventListener. The thing is, doing it that way I always need to create handling function for each event I'm registering. And the other disadvantage is that when the class I'm consuming is a custom class coded by my self, I need to either make it a subclass of EventDispatcher, or implement its interface somehow. So basically, my question is: *how can I do what I used to to in AS2, now in AS3?* Thanks in advance for any replies, Guybrush ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Event Handling in ActionScript 3
Hi, You probably want to do something like this: 1. Create a custom event class that extends flash.events.Event and allows you to add pass variables - see myEvent below 2. In your class that dispatches events, extend flash.events.EventDispatcher (or implement IEventDispatcher interface) - all descendents of DisplayObject get this for free so Sprites MovieClips can call dispatchEvent without implementing extra code, 3. Use addEventListener in the class that will receive events - you should not need to use Delegate in AS3 - not sure what happens with timeline based code, but in classes, the scope issue is not a problem like AS2. See your code example extended a bit below... HTH Glen import org.guybrush.MySuperFeaturedClass; import org.guybrush.events.myEvent; import flash.events.Event; class MyWrapperClass { private var mySuperObject:MySuperFeaturedClass; function whatever( n:String ):void{ mySuperObject = new MySuperFeaturedClass(); mySuperObject.addEventListener(myEvent.MY_EVENT_1, eventHandler)); mySuperObject.addEventListener(myEvent.MY_EVENT_2, eventHandler)); mySuperObject.addEventListener(myEvent.MY_EVENT_3, eventHandler)); mySuperObject.mDoSomeAsynchronousTask( n ); } private function eventHandler(event:Event):Void { var arg1:String = event.arg1; switch(event.type){ case myEvent.MY_EVENT_1: trace(ok, task returned ...'); break; case myEvent.MY_EVENT_2: trace(look! task returned ...); break; case myEvent.MY_EVENT_3: trace(wel... task returned ...); break; default: trace(oh! task returned + event.type); break; } } } } package org.guybrush.events { //Simple event class that allows you to extend Event and add variables // constants to make it easier... import flash.events.Event; public class MyEvent extends Event { public var arg1:String; public static const MY_EVENT_1:String = eventType1; public static const MY_EVENT_2:String = eventType2; public static const MY_EVENT_3:String = eventType3; public function MyEvent(type:String, arg1:String = null) :void { super(type); this.arg1 = arg1; } override public function clone():Event { return new MyEvent(this.type, this.arg1); } } } } package org.guybrush { import org.guybrush.events.myEvent; import flash.events.EventDispatcher; public class MySuperFeaturedClass extends EventDispatcher { public function mDoSomeAsynchronousTask(arg:Object):void { // ... //... //task finished switch(result) { case one: dispatchEvent(new myEvent(myEvent.MY_EVENT_1, hello from arg1)); break; case red: dispatchEvent(new myEvent(myEvent.MY_EVENT_2, hello from arg1)); break; default: dispatchEvent(new myEvent(myEvent.MY_EVENT_2, hello from arg1)); break; } } } } Guybrush Threepwood wrote: Hello. I'm new to AS3. I'm using Flash CS3.I've been reading recent posts about event handling, EventDispatcher, and the Delegate class which used in AS2. I've read the documentation about the EventDispatcher class, and learnt how to use it in Flash. How ever I can't seem to fin a way to do what I used to do in AS2. I didn't use Delegate. I did something like this: import org.guybrush.MySuperFeaturedClass; class MyWrapperClass { var mySuperObject:MySuperFeaturedClass; function whatever( n:String ):void{ this.mySuperObject = new MySuperFeaturedClass(); this.mySuperObject.mDoSomeAsynchronousTask( n ); var self:MyWrapperClass = this; *this.mySuperObject.mOnTaskCompleted = function ( type:String, arg2:String ){* switch(type){ case one: trace(ok, task returned 'one'); break; case red: trace(look! task returned 'red'); break; case bananas: trace(wel... task returned 'bananas'); break; default: trace(oh! task returned + type); break; } }; } } I know how to achieve the same with addEventListener. The thing is, doing it that way I always need to create handling function for each event I'm registering. And the other disadvantage is that when the class I'm consuming is a custom class coded by my self, I need to either make it a subclass of
[Flashcoders] Flash and Database Issue - Need Advice
Alright, it's been two years since I begun developing flash websites, but only now I understand the benefits of a database driven Flash online application. I am trying to figure out the different techniques, advantages and disadvantages of how Flash, Flex and AIR can connect to a database, and hence read - write data to it on run time. I've read a lot concerning this issue and what I need is some advice from you flash experts, seen you have obviously more experience than me. What I've understand is that: 1 - Flash can only connect to database using a serverside script such as php; 2 - Flex can connect to database using serverside scripts and can connect to database directly (Flex 3), but it is a very bad idea since the swf files can be decompliled and hence, the data can be accessed by anyone; 3 - AIR can connect to a local Database (SQLite), or can connect to an online database using serverside Scripts. At this point, I've approached two ways to process database data with Flash... The first one is to Post data from flash to a php file, (with LoadVar) -- PHP connects to the database, executes the queries, and returns to the SWF a data string (using print or echo). The second way (and apparently the most used) is to let php print or echo the data queried from the database, in an XML format that flash Processes using the XML Class or whatsoever. Now here is the question... Which one is best, of those two methods? What are the advantages, and disadvantages of each one? Which one can I use to bulid a CMS based Application? Thanks for your Time. And Best Regards. -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and Database Issue - Need Advice
- Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, January 26, 2008 8:23 PM Subject: [Flashcoders] Flash and Database Issue - Need Advice Alright, it's been two years since I begun developing flash websites, but only now I understand the benefits of a database driven Flash online application. I am trying to figure out the different techniques, advantages and disadvantages of how Flash, Flex and AIR can connect to a database, and hence read - write data to it on run time. I've read a lot concerning this issue and what I need is some advice from you flash experts, seen you have obviously more experience than me. What I've understand is that: 1 - Flash can only connect to database using a serverside script such as php; Generally true, though there is FlashSQL (just google it) - that's not an endorsment. 2 - Flex can connect to database using serverside scripts and can connect to database directly (Flex 3), but it is a very bad idea since the swf files can be decompliled and hence, the data can be accessed by anyone; Flex produces AS3 and from what I hear is currently resilient to decomoilation. Since Flex produces AS3 code, Flash is as vulnerable to decompilation as Flex, and definitely more so in pre AS3 versions. Generally speaking, it's far safer having a server side component than giving a Flex or Flash program direct access to a database (again, there is FlexSQL). Although Flex 3 has database support, my understanding is that it still requires server side scripting/database components - it's not accessing the database directly from the client. 3 - AIR can connect to a local Database (SQLite), or can connect to an online database using serverside Scripts. Correct. At this point, I've approached two ways to process database data with Flash... The first one is to Post data from flash to a php file, (with LoadVar) -- PHP connects to the database, executes the queries, and returns to the SWF a data string (using print or echo). The second way (and apparently the most used) is to let php print or echo the data queried from the database, in an XML format that flash Processes using the XML Class or whatsoever. Now here is the question... Which one is best, of those two methods? What are the advantages, and disadvantages of each one? Which one can I use to bulid a CMS based Application? I would go the XML route. You can use XML in both directions if you wish. For an CMS application I would use Flex every time. Whatever you fear about security using Flex is equally applicable to Flash. Paul Thanks for your Time. And Best Regards. -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and Database Issue - Need Advice
What do you mean by Whatever you fear about security using Flex is equally applicable to Flash. ? On Jan 26, 2008 10:57 PM, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, January 26, 2008 8:23 PM Subject: [Flashcoders] Flash and Database Issue - Need Advice Alright, it's been two years since I begun developing flash websites, but only now I understand the benefits of a database driven Flash online application. I am trying to figure out the different techniques, advantages and disadvantages of how Flash, Flex and AIR can connect to a database, and hence read - write data to it on run time. I've read a lot concerning this issue and what I need is some advice from you flash experts, seen you have obviously more experience than me. What I've understand is that: 1 - Flash can only connect to database using a serverside script such as php; Generally true, though there is FlashSQL (just google it) - that's not an endorsment. 2 - Flex can connect to database using serverside scripts and can connect to database directly (Flex 3), but it is a very bad idea since the swf files can be decompliled and hence, the data can be accessed by anyone; Flex produces AS3 and from what I hear is currently resilient to decomoilation. Since Flex produces AS3 code, Flash is as vulnerable to decompilation as Flex, and definitely more so in pre AS3 versions. Generally speaking, it's far safer having a server side component than giving a Flex or Flash program direct access to a database (again, there is FlexSQL). Although Flex 3 has database support, my understanding is that it still requires server side scripting/database components - it's not accessing the database directly from the client. 3 - AIR can connect to a local Database (SQLite), or can connect to an online database using serverside Scripts. Correct. At this point, I've approached two ways to process database data with Flash... The first one is to Post data from flash to a php file, (with LoadVar) -- PHP connects to the database, executes the queries, and returns to the SWF a data string (using print or echo). The second way (and apparently the most used) is to let php print or echo the data queried from the database, in an XML format that flash Processes using the XML Class or whatsoever. Now here is the question... Which one is best, of those two methods? What are the advantages, and disadvantages of each one? Which one can I use to bulid a CMS based Application? I would go the XML route. You can use XML in both directions if you wish. For an CMS application I would use Flex every time. Whatever you fear about security using Flex is equally applicable to Flash. Paul Thanks for your Time. And Best Regards. -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and Database Issue - Need Advice
- Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, January 26, 2008 9:39 PM Subject: Re: [Flashcoders] Flash and Database Issue - Need Advice What do you mean by Whatever you fear about security using Flex is equally applicable to Flash. ? You were concerned about decompilers being used to reverse-engineer the code and therefore compromise security. I think it's known that there are Flash decompilers for AS1/2. I haven't heard about an AS3 decompiler yet. If you compare Flex and Flash (CS3/AS3) vulnerability to decompilation, since both are working with thye same language I would think there's little between them as regards susceptibility to decompilation. IF you consider other security risks, for example interception of data en-route to a database, there are essentially three mechanisms by which that can be done 1) The client passes data between the client machine and a server (typically via a http request of one form or another). There's no difference between the vulnerability of Flash or Flex in this respect since both would use the same kind of mechanisms. Besides plain HTTP you have socket server and proprietary formats such as AMF, but both Flash and Flex have access to these mechanisms equally. 2) The client (Flex or Flash) can use HTTPS to encrypt the data, so there's little difference between Flex and Flash here. 3) Unusually a Flash or Flex client could use an SQL library to directly make calls to a remote database. In this case the security is dependent on the safety of the database protocols used and the ability to reverse engineer the application. The database is publicly exposed to allow the clients access. 4) I understand that SQL server does allow direct XML socket access, thereby enabling Flash or Flex to directly access the database. This is rather similar to 3. So essentially there's little to choose security-wise between Flex and Flash CS3/AS3. The most secure model involves a good server-side component that controls access to the database and enforces security. In terms of a CMS application though, I think Flex wins hands down. It's features for developing user interfaces are way ahead of Flash, particularly with the ability to read and manipulate XML data and generate and layout data-driven interfaces. I know Flash now has E4x in AS3, but Flex goes beyond that. Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and Database Issue - Need Advice
So to create an CMS I should use Flex... But it is possible to do it in flash too? I mean if I want to make more Interactive Interfaces, and transitions... On Jan 27, 2008 12:21 AM, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, January 26, 2008 9:39 PM Subject: Re: [Flashcoders] Flash and Database Issue - Need Advice What do you mean by Whatever you fear about security using Flex is equally applicable to Flash. ? You were concerned about decompilers being used to reverse-engineer the code and therefore compromise security. I think it's known that there are Flash decompilers for AS1/2. I haven't heard about an AS3 decompiler yet. If you compare Flex and Flash (CS3/AS3) vulnerability to decompilation, since both are working with thye same language I would think there's little between them as regards susceptibility to decompilation. IF you consider other security risks, for example interception of data en-route to a database, there are essentially three mechanisms by which that can be done 1) The client passes data between the client machine and a server (typically via a http request of one form or another). There's no difference between the vulnerability of Flash or Flex in this respect since both would use the same kind of mechanisms. Besides plain HTTP you have socket server and proprietary formats such as AMF, but both Flash and Flex have access to these mechanisms equally. 2) The client (Flex or Flash) can use HTTPS to encrypt the data, so there's little difference between Flex and Flash here. 3) Unusually a Flash or Flex client could use an SQL library to directly make calls to a remote database. In this case the security is dependent on the safety of the database protocols used and the ability to reverse engineer the application. The database is publicly exposed to allow the clients access. 4) I understand that SQL server does allow direct XML socket access, thereby enabling Flash or Flex to directly access the database. This is rather similar to 3. So essentially there's little to choose security-wise between Flex and Flash CS3/AS3. The most secure model involves a good server-side component that controls access to the database and enforces security. In terms of a CMS application though, I think Flex wins hands down. It's features for developing user interfaces are way ahead of Flash, particularly with the ability to read and manipulate XML data and generate and layout data-driven interfaces. I know Flash now has E4x in AS3, but Flex goes beyond that. Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and Database Issue - Need Advice
Flex makes it easy to use XML. It also makes it easy to layout an interface and you can skin it. You can do all this in Flash, but it will take longer. Flex has excellent support for transitions. You really need to check out Flex. I'm feeling guilty about banging on about flex on this list, so I probably should stop now. Ask the same question on flexcoders. Paul - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, January 26, 2008 11:06 PM Subject: Re: [Flashcoders] Flash and Database Issue - Need Advice So to create an CMS I should use Flex... But it is possible to do it in flash too? I mean if I want to make more Interactive Interfaces, and transitions... On Jan 27, 2008 12:21 AM, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, January 26, 2008 9:39 PM Subject: Re: [Flashcoders] Flash and Database Issue - Need Advice What do you mean by Whatever you fear about security using Flex is equally applicable to Flash. ? You were concerned about decompilers being used to reverse-engineer the code and therefore compromise security. I think it's known that there are Flash decompilers for AS1/2. I haven't heard about an AS3 decompiler yet. If you compare Flex and Flash (CS3/AS3) vulnerability to decompilation, since both are working with thye same language I would think there's little between them as regards susceptibility to decompilation. IF you consider other security risks, for example interception of data en-route to a database, there are essentially three mechanisms by which that can be done 1) The client passes data between the client machine and a server (typically via a http request of one form or another). There's no difference between the vulnerability of Flash or Flex in this respect since both would use the same kind of mechanisms. Besides plain HTTP you have socket server and proprietary formats such as AMF, but both Flash and Flex have access to these mechanisms equally. 2) The client (Flex or Flash) can use HTTPS to encrypt the data, so there's little difference between Flex and Flash here. 3) Unusually a Flash or Flex client could use an SQL library to directly make calls to a remote database. In this case the security is dependent on the safety of the database protocols used and the ability to reverse engineer the application. The database is publicly exposed to allow the clients access. 4) I understand that SQL server does allow direct XML socket access, thereby enabling Flash or Flex to directly access the database. This is rather similar to 3. So essentially there's little to choose security-wise between Flex and Flash CS3/AS3. The most secure model involves a good server-side component that controls access to the database and enforces security. In terms of a CMS application though, I think Flex wins hands down. It's features for developing user interfaces are way ahead of Flash, particularly with the ability to read and manipulate XML data and generate and layout data-driven interfaces. I know Flash now has E4x in AS3, but Flex goes beyond that. Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and Database Issue - Need Advice
Now here is the question... Which one is best, of those two methods? What are the advantages, and disadvantages of each one? Which one can I use to bulid a CMS based Application? None ;-) Remoting (and/or WebServices) is the way to go if you're serious about CMS type applications. And in that case I'd advise you to dump Flash and see what Flex has to offer. It just doesn't get any easier than this: mx:WebService id=ws useProxy=false showBusyCursor=true wsdl=http://domain.com/service.cfc?wsdl; / mx:RemoteObject id=ro destination=ColdFusion source=path.to.remoting.Service showBusyCursor=true / And if you want to take it a step further, look into LCDS (LiveCycle DataServices) and/or BlazeDS http://www.adobe.com/products/livecycle/dataservices/ http://www.adobe.com/products/livecycle/dataservices/faq.html http://labs.adobe.com/technologies/blazeds/ Remoting comes in different flavors (ColdFusion, Java, PHP, .NET, etc..). Google Flex remoting to get all the info you need. ColdFusion has remoting built in and the latest version (ColdFusion 8) also comes with LCDS (w00h00). Since you mentioned PHP, look into AMFPHP: http://amfphp.org/ For use with Flex you'll need the latest version, which is AMFPHP 1.9 http://www.5etdemi.com/blog/archives/2006/12/amfphp-19-beta-get-it-now/ http://www.5etdemi.com/blog/archives/2007/01/amfphp-19-beta-2-ridiculously-faster/ WebOrb has remoting versions for PHP, .NET, JAVA. http://www.themidnightcoders.com/weborb/ So to create an CMS I should use Flex... But it is possible to do it in flash too? I mean if I want to make more Interactive Interfaces, and transitions... What makes you think Interactive is limited to Flash? Oooh, transitions.. as in? http://livedocs.adobe.com/flex/201/html/transitions_080_01.html Have a look at these if you haven't already: http://www.adobe.com/devnet/flex/samples/code_explorer/ http://www.adobe.com/devnet/flex/samples/flex_store_v2/ http://www.adobe.com/devnet/flex/samples/style_explorer/ regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, January 26, 2008 9:23 PM Subject: [Flashcoders] Flash and Database Issue - Need Advice Alright, it's been two years since I begun developing flash websites, but only now I understand the benefits of a database driven Flash online application. I am trying to figure out the different techniques, advantages and disadvantages of how Flash, Flex and AIR can connect to a database, and hence read - write data to it on run time. I've read a lot concerning this issue and what I need is some advice from you flash experts, seen you have obviously more experience than me. What I've understand is that: 1 - Flash can only connect to database using a serverside script such as php; 2 - Flex can connect to database using serverside scripts and can connect to database directly (Flex 3), but it is a very bad idea since the swf files can be decompliled and hence, the data can be accessed by anyone; 3 - AIR can connect to a local Database (SQLite), or can connect to an online database using serverside Scripts. At this point, I've approached two ways to process database data with Flash... The first one is to Post data from flash to a php file, (with LoadVar) -- PHP connects to the database, executes the queries, and returns to the SWF a data string (using print or echo). The second way (and apparently the most used) is to let php print or echo the data queried from the database, in an XML format that flash Processes using the XML Class or whatsoever. Now here is the question... Which one is best, of those two methods? What are the advantages, and disadvantages of each one? Which one can I use to bulid a CMS based Application? Thanks for your Time. And Best Regards. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and Database Issue - Need Advice
Another Small Question... Can I Include MovieClips created in Flash inside a Flex Application? On Jan 27, 2008 7:34 AM, Omar Fouad [EMAIL PROTECTED] wrote: Oh My God! :D Ok I Really think I'll Jump To Flex... Can Someone give me some Tutes links for Flex? Thanks. On Jan 27, 2008 5:44 AM, Muzak [EMAIL PROTECTED] wrote: Now here is the question... Which one is best, of those two methods? What are the advantages, and disadvantages of each one? Which one can I use to bulid a CMS based Application? None ;-) Remoting (and/or WebServices) is the way to go if you're serious about CMS type applications. And in that case I'd advise you to dump Flash and see what Flex has to offer. It just doesn't get any easier than this: mx:WebService id=ws useProxy=false showBusyCursor=true wsdl= http://domain.com/service.cfc?wsdl; / mx:RemoteObject id=ro destination=ColdFusion source= path.to.remoting.Service showBusyCursor=true / And if you want to take it a step further, look into LCDS (LiveCycle DataServices) and/or BlazeDS http://www.adobe.com/products/livecycle/dataservices/ http://www.adobe.com/products/livecycle/dataservices/faq.html http://labs.adobe.com/technologies/blazeds/ Remoting comes in different flavors (ColdFusion, Java, PHP, .NET, etc..). Google Flex remoting to get all the info you need. ColdFusion has remoting built in and the latest version (ColdFusion 8) also comes with LCDS (w00h00). Since you mentioned PHP, look into AMFPHP: http://amfphp.org/ For use with Flex you'll need the latest version, which is AMFPHP 1.9 http://www.5etdemi.com/blog/archives/2006/12/amfphp-19-beta-get-it-now/ http://www.5etdemi.com/blog/archives/2007/01/amfphp-19-beta-2-ridiculously-faster/ WebOrb has remoting versions for PHP, .NET, JAVA. http://www.themidnightcoders.com/weborb/ So to create an CMS I should use Flex... But it is possible to do it in flash too? I mean if I want to make more Interactive Interfaces, and transitions... What makes you think Interactive is limited to Flash? Oooh, transitions.. as in? http://livedocs.adobe.com/flex/201/html/transitions_080_01.html Have a look at these if you haven't already: http://www.adobe.com/devnet/flex/samples/code_explorer/ http://www.adobe.com/devnet/flex/samples/flex_store_v2/ http://www.adobe.com/devnet/flex/samples/style_explorer/ regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, January 26, 2008 9:23 PM Subject: [Flashcoders] Flash and Database Issue - Need Advice Alright, it's been two years since I begun developing flash websites, but only now I understand the benefits of a database driven Flash online application. I am trying to figure out the different techniques, advantages and disadvantages of how Flash, Flex and AIR can connect to a database, and hence read - write data to it on run time. I've read a lot concerning this issue and what I need is some advice from you flash experts, seen you have obviously more experience than me. What I've understand is that: 1 - Flash can only connect to database using a serverside script such as php; 2 - Flex can connect to database using serverside scripts and can connect to database directly (Flex 3), but it is a very bad idea since the swf files can be decompliled and hence, the data can be accessed by anyone; 3 - AIR can connect to a local Database (SQLite), or can connect to an online database using serverside Scripts. At this point, I've approached two ways to process database data with Flash... The first one is to Post data from flash to a php file, (with LoadVar) -- PHP connects to the database, executes the queries, and returns to the SWF a data string (using print or echo). The second way (and apparently the most used) is to let php print or echo the data queried from the database, in an XML format that flash Processes using the XML Class or whatsoever. Now here is the question... Which one is best, of those two methods? What are the advantages, and disadvantages of each one? Which one can I use to bulid a CMS based Application? Thanks for your Time. And Best Regards. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly