Re: [Flashcoders] Scoping Issue with a Function - Help, please
Hello :) use mx.utils.Delegate class :) [code] myButton.onPress = Delegate.create(_root, _root.action) ; [/code] With Delegate.create method you can create a virtual method with your scope and your method. EKA+ :) 2006/5/22, Loren R. Elks [EMAIL PROTECTED]: Hi: Can someone help me with a scoping issue? SWF A is being loaded into SWF B. Currently, there's a function located in SWF A that is triggered by a user clicking on a movieclip in SWF A. Basically, I am trying to make it trigger from a button in SWF B, instead of triggering by a button in SWF A. When a user clicks Button B (located on SWF B), I would like it to call the function located in SWF A. This function cause a menu to slide from the left side. Could you please cc: me directly as well on your reply: [EMAIL PROTECTED] Thanks, Loren The only real mistake is the one from which we learn nothing. - John Powell ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Getting the class name?
Hello :) i think it's more easy to use my class :) [code] import vegas.util.ConstructorUtil ; import myPackage.MyConstructor ; var instance = new MyConstructor() ; var name:String = ConstructorUtil.getName( instance ) ; trace(class name : + name) ; // output : 'MyClass' var package:String = ConstructorUtil.getPackage(instance) ; trace(class package : + package) ; // output : 'myPackage' var path:String = ConstructorUtil.getPath(instance) ; trace(class path : + path) ; // output : 'myPackage.MyConstructor' [/code] EKA+ :) 2006/5/25, mike cann [EMAIL PROTECTED]: so you could do: var myClassName:String; var xx= new myClass(); if (xx instanceof myClass){myClassName=myClass;} else if (xx instanceof someOtherClass){myClassName=someOtherClass;} maybe? On 25/05/06, Arul Prasad [EMAIL PROTECTED] wrote: instanceof does not return anything - It is not a method, but an operator. You can use instanceof only to compare - like this: var xx:XML = new XML(); trace (xx instanceof XML); // output will be true. ~Arul Prasad. On 5/25/06, mike cann [EMAIL PROTECTED] wrote: im not entirely sure but can you use instanceof against a switch statement to check if its of a particular class? On 25/05/06, eka [EMAIL PROTECTED] wrote: Hello :) you can use my ContructorUtil class with the statics getName, getPackage and getPath methods : http://live.burrrn.com/browser/projects/VEGAS/AS2/trunk/src/vegas/util/ConstructorUtil.as More precision in http://osflash.org/vegas to install VEGAS with SVN :) you can read in french my TRAC : http://live.burrrn.com/wiki/VEGAS now for the custom object's serialization you can use EDEN : http://live.burrrn.com/wiki/eden EKA+ :) 2006/5/25, Merrill, Jason [EMAIL PROTECTED]: You mean the Class type then - for a custom class, I think you would have to create a property to hold that. class MyClass extends MovieClip{ public var type:String = MyClass } class MyOtherClass extends MovieClip{ public var type:String = MyOtherClass } In Flash: var a:MyClass = new MyClass(); var b:MyClass = new MyOtherClass(); trace(a.type) trace(b.type) Name usually refers to the instance name. Jason Merrill Bank of America Learning Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Skoglund Sent: Thursday, May 25, 2006 9:17 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Getting the class name? Yes, i know that the class name is MyClass when writing the code, but does the object know what class it is constucted from at runtime? I want to save out scene objects to a XML-file and need to save what class the objects are constructed from (or their linkage ID in set in the Flash IDE). /David - Original Message - From: Merrill, Jason [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, May 25, 2006 2:56 PM Subject: RE: [Flashcoders] Getting the class name? Given: class MyClass extends MovieClip { function MyClass (){ trace (this.className) } The name of the class is MyClass - or do you mean the instance name? Jason Merrill Bank of America Learning Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software
Re: [Flashcoders] Getting the class name?
??? you speak about my ConstructorUtil class ? :) My methods search in the _global object the instance and this Constructor and build a little private property __path__. I use a pattern of reflexion and a storage of the result to avoid seeking the name and the namespace of the class each time. It's automatic :) For me the method of macromedia is not at all functional and clean ;) I Use this method in all toString() methods with an enormous framework and it's perfect. EKA+ :) 2006/5/25, Arul Prasad [EMAIL PROTECTED]: :) that will work - but won't be feasible, unless you are checking against a selected set of classes. If they are classes that you write, the best thing to do would be have a variable inside ur class right away called 'ClassName' and use it. ( like how macromedia did in V2 component classes ;-) ) ~Arul Prasad. On 5/25/06, mike cann [EMAIL PROTECTED] wrote: so you could do: var myClassName:String; var xx= new myClass(); if (xx instanceof myClass){myClassName=myClass;} else if (xx instanceof someOtherClass){myClassName=someOtherClass;} maybe? On 25/05/06, Arul Prasad [EMAIL PROTECTED] wrote: instanceof does not return anything - It is not a method, but an operator. You can use instanceof only to compare - like this: var xx:XML = new XML(); trace (xx instanceof XML); // output will be true. ~Arul Prasad. On 5/25/06, mike cann [EMAIL PROTECTED] wrote: im not entirely sure but can you use instanceof against a switch statement to check if its of a particular class? On 25/05/06, eka [EMAIL PROTECTED] wrote: Hello :) you can use my ContructorUtil class with the statics getName, getPackage and getPath methods : http://live.burrrn.com/browser/projects/VEGAS/AS2/trunk/src/vegas/util/ConstructorUtil.as More precision in http://osflash.org/vegas to install VEGAS with SVN :) you can read in french my TRAC : http://live.burrrn.com/wiki/VEGAS now for the custom object's serialization you can use EDEN : http://live.burrrn.com/wiki/eden EKA+ :) 2006/5/25, Merrill, Jason [EMAIL PROTECTED]: You mean the Class type then - for a custom class, I think you would have to create a property to hold that. class MyClass extends MovieClip{ public var type:String = MyClass } class MyOtherClass extends MovieClip{ public var type:String = MyOtherClass } In Flash: var a:MyClass = new MyClass(); var b:MyClass = new MyOtherClass(); trace(a.type) trace(b.type) Name usually refers to the instance name. Jason Merrill Bank of America Learning Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Skoglund Sent: Thursday, May 25, 2006 9:17 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Getting the class name? Yes, i know that the class name is MyClass when writing the code, but does the object know what class it is constucted from at runtime? I want to save out scene objects to a XML-file and need to save what class the objects are constructed from (or their linkage ID in set in the Flash IDE). /David - Original Message - From: Merrill, Jason [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, May 25, 2006 2:56 PM Subject: RE: [Flashcoders] Getting the class name? Given: class MyClass extends MovieClip { function MyClass (){ trace (this.className) } The name of the class is MyClass - or do you mean the instance name? Jason Merrill Bank of America Learning Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http
Re: [Flashcoders] Getting the class name?
better yes :) search in AS3 reference : http://livedocs.macromedia.com/labs/1/flex20beta3/langref/index.html in package flash.utils, the methods : getQualifiedClassName(o) , getQualifiedSuperclassName and describeType(o):XML describeType method returns a XML object ... I'm not a XML's FAN... but it's a native method !! EKA+ :) 2006/5/25, Ian Thomas [EMAIL PROTECTED]: Having googled to find your code - that's a really nice way of doing it. Well done! (Does anyone know if AS3 has a better reflection system than AS2..?) Ian On 5/25/06, eka [EMAIL PROTECTED] wrote: Hello :) i think it's more easy to use my class :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Disable all buttons
Hello ;) Si tu peux parler français (vu ta signature) cela sera + simple pour moi pour t'aider :) Tu peux stocker tous tes boutons avec une référence de chacun d'eux dans un tableau : var buttonList = new Array() ; Ensuite tu ajoutes tes boutons dedans à chaque fois que tu as un bouton sur ta scène Le mieux est d'utiliser un attachMovie pour générer ton interface graphique pour tous les boutons de façon dynamique et du coup tu les places tous dans cette liste au fur et à mesure (dans le tableau tu as juste des raccourcis vers les clips... ou bouton) Ensuite pour activer ou désactiver tes boutons il te reste plus qu'à parcourir le tableau avec une boucle for par exemple :) Il est possible de cibler un clip et de parcourir son contenu avec un for..in également, mais la technique est un peu plus bordellique :) EKA+ :) 2006/5/26, Éric Thibault [EMAIL PROTECTED]: Hi all Is there a rapid way to disable all the buttons present in my movie at once or do I have to iterate through them all? like Button.enabled = false; A+ :-) -- === Éric Thibault Programmeur analyste Réseau de valorisation de l'enseignement Université Laval, pavillon Félix-Antoine Savard Québec, Canada Tel.: 656-2131 poste 18015 Courriel : [EMAIL PROTECTED] === Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia de confidencialidad http://www.rec.ulaval.ca/lce/securite/confidentialite.htm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Can Variables have listeners?
Hello :) open Flash help (F1) and search in the actionscript dictionnary Object.watch and Object.unwatch :) EKA+ :) 2006/5/26, Mike Anderson [EMAIL PROTECTED]: Hello All, I have a ton of components scattered throughout my application, and most of them react to changes of a specific variable. It's getting really old, having to manually write code - that updates all these controls with the new value of a specific variable, when a specific variable changes. It would be nice to just have ONE function, that propagates all the changes to all my controls, and then have an active listener applied to a variable which automatically triggers that specific function. Am I overlooking something, or is there a better way to do something like this? Thank you all in advance, for any suggestions you can throw my way. Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Which eventBroadcaster is most widely used and-or reccomended?
Hello :) you can try my EventDispatcher class in my VEGAS framework : http://www.osflash.org/vegas You can see ''vegas.events' package and all examples in the SVN's project :) src : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/ (vegas/events) examples : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/events/(install framework first !) My Event model respect all W3C features ... More information about W3C : http://www.w3.org/TR/DOM-Level-2-Events/ and http://www.w3.org/TR/DOM-Level-2-Events/events.html You can use Bubbling events, Capturing events, FrontController ... and more :) EKA+ :) 2006/5/30, Manuel Saint-Victor [EMAIL PROTECTED]: I'm looking at adding an EventBraodcaster to my project and was wondering if anyone was aware of which of the current classes out there was more reccomended for use in applications. Mani ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] dispatching events
Hello :) your code is very light :) try this : import mx.events.EventDispatcher ; class com.test.mvc.AbstractView{ // ---o Constructor private function AbstractView() { // Abstract Class !! } // o Init EventDispatcher static private var __initDispatcher = EventDispatcher.initialize( AbstractView.prototype) ; public var addEventListener:Function; public var removeEventListener:Function; public var dispatchEvent:Function; // o You Methods etc... } import mx.utils.Delegate ; class com.test.app.SampleView extends AbstractView{ // o Constructor public function SampleView() { // your code in the constructor } // o Constants static public var LOAD_SOMETHING:String = onLoadSomething ; static private var __ASPF__ = _global.ASSetPropFlags(SampleView, [LOAD_SOMETHING], 7, 7) ; // o Public Properties public var test_mc:MovieClip ; // o Public Methods public function load_something(t):Void { test_mc = t.attachMovie(test_mc.jpg, test_mc, t.getNextHighestDepth()); test_mc.onPress = Delegate.create(this, _onPress) ; // ---o Dispatch event var e = { type: LOAD_SOMETHING, target:this } ; dispatchEvent( { type: LOAD_SOMETHING , target:this} ); // test 1 } // o Private Methods private function _onPress():Void { var e = { type: LOAD_SOMETHING, target:test_mc } ; dispatchEvent ( e ) ; // test 2 } } or show more code please ;) EKA+ :) 2006/6/8, Sam [EMAIL PROTECTED]: Hi, Is it possible to dispatch events from a simple call to a method? I have a view class that extends an abstract view class that contains the EventDispatcher class. I don't have a problem dispatching events from onPress and other handler, but what if I want to dispatch an event when simply calling a method? class com.test.mvc.AbstractView{ public var addEventListener:Function; public var removeEventListener:Function; public var dispatchEvent:Function; } class com.test.app.SampleView extends AbstractView{ public function load_something(t) { test_mc = t.attachMovie(test_mc.jpg, test_mc, t.getNextHighestDepth()); dispatchEvent({type:onLoadSomething}); //this does not work test_mc.onPress = function(){ this._parent._parent.dispatchEvent ({type:onLoadSomething, target:this});//this works } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] dispatching events
Hello :) With ASSetPropFlags you can change the properties in an object :) (read only ? write or not... etc...) With this hack my property static LOAD_SOMETHING is a real constant like Math.PI for example :) In AS3 you can use the keyword const... in AS2 you can do a constant with ASSetPropFlags ! ;) EKA+ :) 2006/6/8, Sam [EMAIL PROTECTED]: Hi, Thanks, sorry I quickly stripped the classes down for posting here. Can you explain this portion of your code: static private var __ASPF__ = _global.ASSetPropFlags(SampleView, [LOAD_SOMETHING], 7, 7) ; On Jun 8, 2006, at 2:06 PM, eka wrote: Hello :) your code is very light :) try this : import mx.events.EventDispatcher ; class com.test.mvc.AbstractView{ // ---o Constructor private function AbstractView() { // Abstract Class !! } // o Init EventDispatcher static private var __initDispatcher = EventDispatcher.initialize( AbstractView.prototype) ; public var addEventListener:Function; public var removeEventListener:Function; public var dispatchEvent:Function; // o You Methods etc... } import mx.utils.Delegate ; class com.test.app.SampleView extends AbstractView{ // o Constructor public function SampleView() { // your code in the constructor } // o Constants static public var LOAD_SOMETHING:String = onLoadSomething ; static private var __ASPF__ = _global.ASSetPropFlags(SampleView, [LOAD_SOMETHING], 7, 7) ; // o Public Properties public var test_mc:MovieClip ; // o Public Methods public function load_something(t):Void { test_mc = t.attachMovie(test_mc.jpg, test_mc, t.getNextHighestDepth()); test_mc.onPress = Delegate.create(this, _onPress) ; // ---o Dispatch event var e = { type: LOAD_SOMETHING, target:this } ; dispatchEvent( { type: LOAD_SOMETHING , target:this} ); // test 1 } // o Private Methods private function _onPress():Void { var e = { type: LOAD_SOMETHING, target:test_mc } ; dispatchEvent ( e ) ; // test 2 } } or show more code please ;) EKA+ :) 2006/6/8, Sam [EMAIL PROTECTED]: Hi, Is it possible to dispatch events from a simple call to a method? I have a view class that extends an abstract view class that contains the EventDispatcher class. I don't have a problem dispatching events from onPress and other handler, but what if I want to dispatch an event when simply calling a method? class com.test.mvc.AbstractView{ public var addEventListener:Function; public var removeEventListener:Function; public var dispatchEvent:Function; } class com.test.app.SampleView extends AbstractView{ public function load_something(t) { test_mc = t.attachMovie(test_mc.jpg, test_mc, t.getNextHighestDepth()); dispatchEvent({type:onLoadSomething}); //this does not work test_mc.onPress = function(){ this._parent._parent.dispatchEvent ({type:onLoadSomething, target:this});//this works } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] dispatching events
ooops i forget :) ... if you want use an Event Model AS3 compatible... you can use my framework VEGAS and the vegas.events package : http://osflash.org/vegas You can use my EventDispatcher class : - http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/events/EventDispatcher.as you can try this examples here : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/events/ Install Vegas and Asgard with Tortoise SVN and try it if you want :) EKA+ :) 2006/6/8, eka [EMAIL PROTECTED]: Hello :) With ASSetPropFlags you can change the properties in an object :) (read only ? write or not... etc...) With this hack my property static LOAD_SOMETHING is a real constant like Math.PI for example :) In AS3 you can use the keyword const... in AS2 you can do a constant with ASSetPropFlags ! ;) EKA+ :) 2006/6/8, Sam [EMAIL PROTECTED] : Hi, Thanks, sorry I quickly stripped the classes down for posting here. Can you explain this portion of your code: static private var __ASPF__ = _global.ASSetPropFlags(SampleView, [LOAD_SOMETHING], 7, 7) ; On Jun 8, 2006, at 2:06 PM, eka wrote: Hello :) your code is very light :) try this : import mx.events.EventDispatcher ; class com.test.mvc.AbstractView{ // ---o Constructor private function AbstractView() { // Abstract Class !! } // o Init EventDispatcher static private var __initDispatcher = EventDispatcher.initialize ( AbstractView.prototype) ; public var addEventListener:Function; public var removeEventListener:Function; public var dispatchEvent:Function; // o You Methods etc... } import mx.utils.Delegate ; class com.test.app.SampleView extends AbstractView{ // o Constructor public function SampleView() { // your code in the constructor } // o Constants static public var LOAD_SOMETHING:String = onLoadSomething ; static private var __ASPF__ = _global.ASSetPropFlags(SampleView, [LOAD_SOMETHING], 7, 7) ; // o Public Properties public var test_mc:MovieClip ; // o Public Methods public function load_something(t):Void { test_mc = t.attachMovie(test_mc.jpg, test_mc, t.getNextHighestDepth()); test_mc.onPress = Delegate.create(this, _onPress) ; // ---o Dispatch event var e = { type: LOAD_SOMETHING, target:this } ; dispatchEvent( { type: LOAD_SOMETHING , target:this} ); // test 1 } // o Private Methods private function _onPress():Void { var e = { type: LOAD_SOMETHING, target:test_mc } ; dispatchEvent ( e ) ; // test 2 } } or show more code please ;) EKA+ :) 2006/6/8, Sam [EMAIL PROTECTED]: Hi, Is it possible to dispatch events from a simple call to a method? I have a view class that extends an abstract view class that contains the EventDispatcher class. I don't have a problem dispatching events from onPress and other handler, but what if I want to dispatch an event when simply calling a method? class com.test.mvc.AbstractView{ public var addEventListener:Function; public var removeEventListener:Function; public var dispatchEvent:Function; } class com.test.app.SampleView extends AbstractView{ public function load_something(t) { test_mc = t.attachMovie(test_mc.jpg, test_mc, t.getNextHighestDepth()); dispatchEvent({type:onLoadSomething}); //this does not work test_mc.onPress = function(){ this._parent._parent.dispatchEvent ({type:onLoadSomething, target:this});//this works } } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders
Re: [Flashcoders] how to decode base64 data and display in flash
hello :) In AS1 or AS2 ... with flash 8 or ... you can't use directly Base64 picture :) Only with AS3 you can with Binary objects ! If you want transform base64 data ... you must use PHP or other and after load picture with MovieClipLoader.loadClip or MovieClip.loadMovie methods. EKA+ :) 2006/6/9, Santhakumar K [EMAIL PROTECTED]: Flashcoders, In my application I received image data inform of base64. I have to decode that data and display in flash using actionscript 2.0. I cannot able to do it. I try to to use this class http://ostermiller.org/*Base64.ashttp://ostermiller.org/Base64.as * but it dosent works. Thanks, --Santhakumar K Chennai India http://www22.brinkster.com/zkumar/main.html ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] The Delegate class ...
Hello :) you can show your mx package in Flash installation : C:\Program Files\Macromedia\Flash 8\en\First Run\Classes In this directory you find mx.utils.Delegate class ! Now in flash you can use this class : [code] import mx.utils.Delegate ; var o = {} ; o.toString = function () { return myCustomScope ; } var action:Function = function () { trace( + this + : action) ; } // test1 - scope is the _root action() ; // test2 - scope is o your custom scope. var myAction:Function = Delegate.create(o, action) ; myAction() ; // test3 - scope is a MovieClip with mc this instance's name mc.onRelease = action ; // if you release your mc, use action with mc scope (classic) mc.onPress = Delegate.create(o, action) ; // if you press your mc, use custom scope [/code] EKA+ :) 2006/6/14, Stephen Ford [EMAIL PROTECTED]: Hello All, Can anyone confirm that the Delegate class is only helpful when using components ? Or should it also be used for events outside the component framework ? No doubt it depends on what your trying to achieve, but just generally speaking, what do you think. Thanks, Stephen. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Accessing non-interface methods from an object of an interface type
Hello :) you must use Transtype if you use a method defined in your class but not in the interface :) [code] import ConcreteClass; import Interface; var tmp:Interface = new ConcreteClass(); tmp.foo(); // Works ConcreteClass(tmp).bar(); // Works with methods not implemented in interface. [/code] EKA+ :) 2006/6/14, Mark Lapasa [EMAIL PROTECTED]: /// // Inside Interface.as // /// interface Interface { public function foo():Void; } /// // Inside ConcreteClass.as // /// import Interface; class ConcreteClass implements Interface { public function foo():Void { trace(Foo was fired);}; // As required by the interface public function bar():Void { trace(Bar was fired);}; } /// // Inside the Test.FLA // /// import ConcreteClass; import Interface; var tmp:Interface = new ConcreteClass(); tmp.foo(); // Works tmp.bar(); // Doesn't Work, why? I don't think all the public ConcreteClass methods have to be listed in an interface. Has anyone else come across this problem? Thx, -mL http://knowledge.lapasa.net ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] The Delegate class ...
Hello :) You can use my Delegate implementation too in VEGAS Framework : - http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/events/Delegate.as( vegas.events.Delegate class) - http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/events/(example with Delegate and Event Model EventDispatcher, etc..) - http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/events/ (package vegas.events) More information about VEGAS : http://osflash.org/vegas EKA+ :) 2006/6/15, Ian Thomas [EMAIL PROTECTED]: On 6/15/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Alot of people complain that you can't pass parameters with delegate. Well you can, a multiple of ways, and if you structure your code with some forethought, you can have it pass params if you are delegating a function structured do so. Alternatively you could use (or write, as I did) a slightly more advanced version of Delegate which takes function passing into account. A couple of popular variants are: http://www.dynamicflash.co.uk/2005/02/delegate-class-refined/ and http://www.person13.com/articles/proxy/Proxy.htm They let you write things like: myButton1.onRelease=Delegate.create(this,onSomeButtonPressed,green); myButton2.onRelease=Delegate.create(this,onSomeButtonPressed,red); : function onSomeButtonPressed(colour:String) { trace(The +red+ button was pressed!); } and also to pass additional parameters to existing callback function. HTH, Ian ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Class overloading question
hello :) in AS1 : _global.SuperSound = function ( mc ) { super (mc) ; } SuperSound.prototype.__proto__ = Sound.prototype ; // inherit in AS2 : class SuperSound extends Sound { // o Constructor function SuperSound( mc ) { super(mc) ; } } You can use super to call the superclass constructor You can use super too in methods : class SuperSound extends Sound { // o Constructor function SuperSound( mc ) { super(mc) ; this.target = mc ; } // -o Public Properties public var target:MovieClip ; // -o Public Methods public function stop () { super.stop() ; trace(i stop the sound in : + target) ; } } EKA+ :) 2006/6/15, Nik Derewianka [EMAIL PROTECTED]: Hi All, Im trying to overload the Sound class to add my own features, it works fine for all the basic features, but what do i need to do with my class to pass through a parameter to the constructor of the superclass ? ie for the var x = new ExtendedSound(my_soundMC), what do i need to call in my class to pass the my_soundMC up to the original Sound class? (ExtendedSound already has extends Sound in its class definition). Regards, -- :: Nik Derewianka :: :: freelance director programmer :: ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Accessing non-interface methods from an object ofan interface type
Hello :) i forget ... you can transform your expression too with [] notation : import ConcreteClass; import Interface; var tmp:Interface = new ConcreteClass(); tmp[bar]() ; // works too EKA+ :) 2006/6/15, Mark Lapasa [EMAIL PROTECTED]: Thanks EKA and JC for your answers. I -kinda- knew that was the answer but I wanted to know if there was another way. Casting/trantyping an abstract object down into one of a concrete type seems like to me very self-defeating to use abstractions as a data type. I might as well say var tmp:ConcreteClass = new ConcreteClass(); tmp.bar(); as JC has mentioned and forget about the low-coupling flexibility of using interfaces. I imagined the inital route I wanted to go ought to work at run-time but the compiler is not forgiving. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Hans Wichman Sent: Wednesday, June 14, 2006 5:52 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Accessing non-interface methods from an object ofan interface type The compiler sees an object of type Interface which does not support the method you are trying to call. Either use: var tmp:ConcreteClass = new ConcreteClass(); or var tmp:Interface = new ConcreteClass(); ConcreteClass(tmp).bar(); grtz JC On 6/14/06, Mark Lapasa [EMAIL PROTECTED] wrote: /// // Inside Interface.as // /// interface Interface { public function foo():Void; } /// // Inside ConcreteClass.as // /// import Interface; class ConcreteClass implements Interface { public function foo():Void { trace(Foo was fired);}; // As required by the interface public function bar():Void { trace(Bar was fired);}; } /// // Inside the Test.FLA // /// import ConcreteClass; import Interface; var tmp:Interface = new ConcreteClass(); tmp.foo(); // Works tmp.bar(); // Doesn't Work, why? I don't think all the public ConcreteClass methods have to be listed in an interface. Has anyone else come across this problem? Thx, -mL http://knowledge.lapasa.net ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Accepting 1 parameter with 2 possible types in a method?
Hello :) you can try this example : private function _myMethod( args ):Void { var arg0 = arguments[0] ; switch (true) { case arg0 instanceof String : break ; case arg0 instanceof Number : break ; default throw new Error(Illegal Argument, + arg0 + must be String or Number) ; ) } For me ... this method is a good alternative :) EKA+ :) 2006/6/15, Adrian Park [EMAIL PROTECTED]: Hi List, What's the neatest way of accepting a single parameter with 2 possible types into a method and then working out what type of parameter has been passed? e.g. in pseudo code private function myMethod( i:Number/String ):Void { if ( i is a String ) { // do this } else if ( i is a Number ) { // do this } } I can think of several alternatives : - passing a generic object which contains the property and then using typeof on that property - calling 2 different methods but, in this case, it just makes sense to be one since it's doing the same thing with either parameter (retrieving a bit of data from an Array which may be identified using a numerical id or a String ID) - limiting my method to accepting a String only and then defining a second method that returns the correspoding String identifier given a numerical identifier All of the ways I can think of seem dirty. Is there a nice clean way or is it wrong to expect the method to accept one parameter of different types? Thanks in advance, Adrian P. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q:Get name of referring class
Hello :) You can use Reflexion algorithm to search the namespace and the name of the calling class :) For example in Vegas, i use my ConstructorUtil class with getName(instance) , getPackage(instance) or getPath(instance) methods :) You can read the code here : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/ConstructorUtil.as For example : import vegas.util.ConstructorUtil ; var u = new myNameSpace.User(eka) ; trace( ConstructorUtil.getName(u) ) ; // return User trace( ConstructorUtil.getPath(u) ) ; // return myNameSpace.User trace(ConstructorUtil.getPackage(u)) ; // return myNameSpace EKA+ :) More Information about VEGAS in OSFlash : http://osflash.org/vegas 2006/6/28, Merrill, Jason [EMAIL PROTECTED]: Or you could also just pass it as a parameter to the calling function. Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of John Giotta Sent: Wednesday, June 28, 2006 4:21 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Q:Get name of referring class Unless it's coded into the Class you can't, but you could use instanceOf if you know what your looking for. E.g.; if (myClassObj instanceof Class) { //... } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Determining when the Stage *stops* resizing
Hello :) You can use a setInterval to test the stop of the resizing :) example : // o Singleton StageResizer = {} ; // o Init Broadcaster AsBroadcaster.initialize(StageResizer) ; // inject broadcast methods // o Listen Stage onResize event ! Stage.addListener(StageResizer) ; // o Public Property StageResizer.id /*Number*/ = null ; StageResizer.delay /*Number*/ = 100 ; // o Public Method StageResizer.reset = function () { clearInterval(this.id) ; this.id = null ; } StageResizer.stopResizing = function () { this.broadcastMessage(onStopResize) ; this.reset() ; } StageResizer.startResizing = function () { if (this.id == null) { this.broadcastMessage(onStartResize) ; } clearInterval(this.id) ; this.id = setInterval(this, stopResizing, this.delay) ; } StageResizer.onResize = StageResizer.startResizing ; // -o TEST var listener = {} ; listener.onStartResize = function () { trace(start resize) ; } listener.onStopResize = function () { trace(stop resize) ; } StageResizer.addListener(listener) ; EKA+ :) 2006/6/29, Matt Bennett [EMAIL PROTECTED]: Hello all, I've got a perplexing problem and I've run out of ideas to solve it - I hope you can help! I have an application that runs fullscreen in the browser - so the object is set to 100%x100% and the Stage.scaleMode is noScale. The application realigns itself via a Stage.onResize listener. The problem I have, is determining when the user *stops* resizing the Stage (i.e the last Stage onResize event in any given resize). For example, the widgets inside my application get resized as the stage resizes, and since they too have their own layout code, they need to know when they're being resized. Consequently, when the stage stops resizing I also need to tell them that they're no longer resizing also. I've had a couple of ideas on how to solve the problem: 1. Add some method to the Stage.prototype. I'm not really sure what I should be looking for though. Does onMouseUp get registered if the mouse is not over the flash window? 2. The HTML body onResize event gets broadcast when the browser window stops resizing, so I thought I might be able to use that. Is there any way to send information via flashVars after the movie has loaded? Many thanks in advance, Matt. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Programmatically instantiating a class that extends MovieClip.
Hello :) it's easy, you must use __proto__ AS2 - MyClass extend MovieClip !!! MyClass extends MovieClip { // o Constructor public function MyClass() { } } var mc = createEmptyMovieClip(myInstance, 1) ; mc.__proto__ == MyClass.prototype ; MyClass.call(mc) ; EKA + :) 2006/6/29, Scott Hyndman [EMAIL PROTECTED]: That's exactly what I mean. As a result you can do cool things like reparenting -- like moving a button from one window to another. It handles the MovieClip creation itself. A code example really isn't too easy, because the framework that allows this to be possible is quite large. If you were really interested, you could look at the code. Here's a link: http://tinyurl.com/jqtwv It's a gigantic class...so it might be difficult to work through. The important method is createMovieClips(), which is called when a view (the type of object that encapsulates movieclips) moves to a new superview. Scott On 29/06/06, Jim Kremens [EMAIL PROTECTED] wrote: Why not subclass object instead? Both ActionStep and ASwing work this way, then create movieclips on the fly. It's very nice to work with. So you never really subclass movieclip, you use composition instead. In other words, your class has a movieclip, but it isn't a movieclip.,, Is that what you mean, or am I missing the point? Can you give a small code example? Thanks, Jim Kremens ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS2 and watch ...
Hello :) You can use watch with a MovieClip if you want create components with an event when you use the enabled property for example :) import mx.utils.Delegate ; class MyButton extends MovieClip { // o Constructor public function MyButton() { this.watch(enabled, Delegate.create(this, _changeEnabled) ; } // -o Init Broadcaster static public var INIT = AsBroadcaster.initialize(MyButton.prototype) ; // -o Public Methods public function up():Void { this.gotoAndStop(up) ; // first frame in your component this._alpha = 100 ; } public function disabled():Void { this.gotoAndStop(disabled) ; // the skin when you button is disabled this._alpha = 60 ; } // o Private Methods private methods _changeEnabled( id , oldValue, newValue) { trace(id : + id + , change + oldValue + to + newValue) ; if (newValue) { up() ; } else { disabled() ; } return newValue ; } private function onPress():Void { broadcastMessage(onClick, this) ; } } In flash you create a MovieClip symbole with AS2 class MyButton ! Try this : myButton.addListener(this) ; this.onClick = function ( who:MovieClip ) { trace(Click : + who) ; } Key.addListener(this) ; onKeyDown = function () { myButton.enabled = ! myButton.enabled ; // press key to test please :) } EKA+ :) 2006/7/6, Julien Vignali [EMAIL PROTECTED]: Well, I use it sometimes as an update broadcast mecanism. Let's say I have some value objects floating around, and when I change a property on any of these, I use the watch to broadcast an event if for example the value has changed (by testing the newValue and the oldValue). It can be sometimes useful for some little and simple tasks that don't rely on a heavy process, like applying watches on global vars. Of course, you can do all of this without using the watch function, it's just a matter of design, choice and code comfort :) Julien Stephen Ford a écrit : How often do you use 'watch' in your applications?. It seems pretty powerful to me, and I've only just discovered it. Any thoughts on this. Cheers, Stephen.___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Abstract classes in AS3?
Hello :) Try this method : package { import flash.utils.getQualifiedClassName; import flash.errors.IllegalOperationError; class AbstractClass { public function AbstractClass () { var path:String = getQualifiedClassName(this) ; if( path == AbstractClass) { throw new IllegalOperationError(AbstractClass is abstract, you can't instanciate it directly.); } trace(in A constructor : + path); } } class MyClass extends AbstractClass { public function MyClass() { super() ; } } class MainClass { public function MainClass() { var i:MyClass = new MyClass() ; // ok var a:AbstractClass = new AbstractClass() ; // throw IllegalOperationError } } } EKA+ :) 2006/7/9, Weyert de Boer [EMAIL PROTECTED]: I am blind or is their no support for Abstract classes in AS3? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 Hide props?
Hello :) It's easy ;) You can use myObject.setPropertyIsEnumerable(myProperty, false) EKA+ :) 2006/7/9, Weyert de Boer [EMAIL PROTECTED]: Yes, hiding properties of inherited classes would be nice. Yours, Weyert ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] private constructors in AS3.0?
Hello :) use internal keyword it's more easy : http://groups.google.com/group/FCNG/browse_thread/thread/b16a38f8389803a0/8ff037af609e7b94#8ff037af609e7b94 text\Singleton.as -- package test { public const Singleton:_Singleton = new _Singleton(); } internal class _Singleton { function _Singleton() { } public const testconst:String = hello world; public var testvar:String = bonjour le monde; public function testMethod():String { return ni hao shijie; } } -- testSingleton2.as -- package { import flash.display.Sprite; import test.Singleton; public class testSingleton2 extends Sprite { public function testSingleton2() { trace( Singleton.testconst ); trace( Singleton.testvar ); trace( Singleton.testMethod() ); } } } Thanks Zwetan for this good solution. EKA+ :) 2006/7/10, Weyert de Boer [EMAIL PROTECTED]: I am told private constructors should jsut work fine (in AS2 though) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] parsing XML / xpath
Hello :) Use XPATH library in http://www.xfactorstudio.com/ EKA+ :) 2006/7/10, keitai guy [EMAIL PROTECTED]: hi list - are there any popular AS libs out there for walking thru XML? eg something like xpath - to find a named node... tx! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Dynamic access of top-level variables in AS3
Hello :) in AS3 you use directly variables in global when you use a new .as ! package { static globalVariable = {} ; // your in topLevel !!! public class MainClass() { // first code in your Application // load your xml and use your global variable !!! } } EKA+ :) 2006/7/10, Chris McFadyen aka Grayson Carlyle [EMAIL PROTECTED]: In doing web apps, we pass a lot of variables directly to the swf files. Some of these are dynamically matched using eval() to write variable values into strings. Example: Reading settings from an XML file, with %var% in the node values; we search for for these and match up %var% to eval(var). Without using eval(), _root[var] would've worked, but _root is gone in AS3 as well. Is there some other method I can use in AS3 to access top-level variables dynamically? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Dynamic access of top-level variables in AS3
Hello :) in french : http://www.ekameleon.net/blog/index.php?2006/07/06/35--as3-le-_global-bien-cache- EKA+ :) 2006/7/11, Derek Vadneau [EMAIL PROTECTED]: Create an object in the global scope to contain your variables, let's call it _global. Then reference it as: _global[myVar]; Or if you don't like the idea of a global object, create a dynamic class to do the same. Derek Vadneau - Original Message - From: Chris McFadyen aka Grayson Carlyle [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, July 11, 2006 11:31 AM Subject: [Flashcoders] Dynamic access of top-level variables in AS3 flash.display.Stage is a sealed class and can't contain swf-passed variables. QUOTE or what about stage[myVar] Charles P. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: Re: [Flashcoders] Abstract classes in AS3?
Hello ;) In AS3 the private keyword it's removed !! ;) You can't use this keyword for your constructor :) EKA+ :) 2006/7/11, Chris Allen [EMAIL PROTECTED]: For compile time checks, just use a private constructor. As ActionScript allows one to access a private (not really private) super constructor in a subclass this works perfectly. At least this is what I do when I need an Abstract class in ActionScript. E.G. class com.tomsnyder.fasttmath2.studentclient.activities.tasks.AbstractTask { //private constructor to discourage instantiation private function AbstractTask() { //initialization code here } } Now there's no way to instantiate it, and the compiler will bitch about it if you try. I hope that helps. -Chris On 7/9/06, Weyert de Boer [EMAIL PROTECTED] wrote: I still think compile-time checks are the best to have... but this will serve very well. Thanks. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Abstract classes in AS3?
private constructor is not ECMAScript ! to create a Singleton you can use a simple object inherit internal class, it's more clean :) links about this subject : http://blog.jasonnussbaum.com/?p=112 french discussion about this subject : http://groups.google.com/group/FCNG/browse_thread/thread/544f79b0b223b15a/e2b2527f81678da7?lnk=stq=constructeur+AS3rnum=1#e2b2527f81678da7 PS : sorry for my english ^_^ EKA+ :) 2006/7/11, Weyert de Boer [EMAIL PROTECTED]: Why is it removed? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Abstract classes in AS3?
yes but i speak very badly in english !!! i can't explain you easily this change :( EKA+ :) 2006/7/11, Mike [EMAIL PROTECTED]: That does seem stupid and completely pointless. I use private constructors all the time. Is there an official rationale for this? -- T. Michael Keesey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cédric Néhémie Sent: Tuesday, July 11, 2006 11:30 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Abstract classes in AS3? Chris, from the latest AS3 Language Reference (http://livedocs.macromedia.com/flex/2/langref/index.html), in compile-time errors section : 1153 - A constructor can only be declared public I don't understand why Adobe do that ? If somebody have an idea, I'ld be buyer ? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Abstract classes in AS3?
Hello :) Yes for an enumeration you can use an internal class in your package and a Singleton namespace. private is good width a method and not a constructor. You can use throw error to limit your constructor or use internal keyworld, for me it's better ! EKA+ :) 2006/7/11, Cédric Néhémie [EMAIL PROTECTED]: I'm agree with Mike concerning the ECMAScript rationale : From the ECMA specifications (http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf ) 7.5.3 Future Reserved Words The following words are used as keywords in proposed extensions and are therefore reserved to allow for the possibility of future adoption of those extensions. Syntax FutureReservedWord :: one of abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public There's no mention of any restrictions anywhere in the specifications, seems it's a choice of Adobe to restrict the usage of the private keyword for constructors. About instanciate the Math class, there is an error in Run Time errors section : 1075 - Math is not a constructor. You can not instantiate the Math class. They probably use the same type of restrictions as we discussed before. PS : sorry for my english too :( , french people and english don't really works fine together :) Mike wrote: Yeah, but what if you're doing an enumeration class, like so: class TransitionState { private function TransitionState() { } public static var NOT_PLAYED_IN:TransitionState = new TransitionState(); public static var PLAYING_IN:TransitionState = new TransitionState(); public static var PLAYED_IN:TransitionState = new TransitionState(); public static var PLAYING_OUT:TransitionState = new TransitionState(); public static var PLAYED_OUT:TransitionState = new TransitionState(); } I want to be able to assume that these are the only 5 TransitionState objects in existence! (Okay, somebody could extend the class and make more--are they adding final in AS3.0?) Or what about static method classes? Why should something like this be allowed?: var stupid:Math = new Math(); Or, to return to the original topic, what if you want to do a pseudo-abstract class? Saying it's not ECMAScript doesn't fully answer the question--what is ECMAScript's rationale for not allowing private constructors? -- T. Michael Keesey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eka Sent: Tuesday, July 11, 2006 11:45 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Abstract classes in AS3? private constructor is not ECMAScript ! to create a Singleton you can use a simple object inherit internal class, it's more clean :) links about this subject : http://blog.jasonnussbaum.com/?p=112 french discussion about this subject : http://groups.google.com/group/FCNG/browse_thread/thread/544f79b0b223b15 a/e2b2527f81678da7?lnk=stq=constructeur+AS3rnum=1#e2b2527f81678da7 PS : sorry for my english ^_^ EKA+ :) 2006/7/11, Weyert de Boer [EMAIL PROTECTED]: Why is it removed? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] as3 and attachmovie
Hello :) read in french : - http://iteratif.free.fr/blog/index.php?2006/07/11/44-bibliotheque-partagee-sous-flash-9 attachMovie is remove in AS3 :) Use [embed(source=)] metadata and create the instance with new MyClass and addChild() method :) eKA+ :) 2006/7/25, Carl Welch [EMAIL PROTECTED]: I just downloaded the demo of Flash 9 / as3 and I noticed you can't use attachmovie anymore. I've found some new methods on google but it seems like the only way I can do it is by using classes. Is there another way to handle an attachmovie equivilent without using a class in as3? thanks. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Decompiler for AS3
Hello :) you can send a message in the flare and flasm website ? http://www.nowrap.de/flare.html in Kontakt ? EKA+ :) 2006/7/28, Mike Mountain [EMAIL PROTECTED]: We're discussing on the HaXe mailing list whether it would be possible to decompile from Flash 8/AS2 swfs to Haxe, then (when the support is added) recompile to Flash9/AS3 swfs to help speed up AS2 to AS3 conversion. Obvious stumbling block at the moment is nothing decompiles to HaXe, but as a related issue Ralf Bokelberg wondered if it would even be possible to decompile a Flash 9 swf at all? Anyone (Burak?) M ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] FlexBuilder warnings about Flash Player version
Hello :) you can download the new version : http://www.adobe.com/support/flashplayer/downloads.html a discussion about this subject : http://groups.yahoo.com/group/flexcoders/message/41878 EKA+ :) 2006/7/30, the real punk [EMAIL PROTECTED]: hi list, i recently switched from the FlexBuilder standalone version to the plugin version, each time i try to launch an MXML file, with both the debug and the run commands in eclipse, i get an error dialog box telling me the required flash player version (9) wasn't found on my machine, even though it was installed during Flex Builder's installation process : here's a quick screenshot http://www.punkscum.org/files/misc/060730_001.png just wanted to know if someone had encountered the same thing and how to resolve it :) cheers ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] LoadVars - sending an array
Hello :) you can use JSON to send and receive an Array (with text format and LoadVars) Use JSON to format your string, serialize or deserialize your datas : http://www.json.org/ You can use my JSON version in Vegas : http://www.ekameleon.net/blog/index.php?2006/04/11/30--vegas-json-tout-en-couleur PS : Vegas is my openSource framework - http://osflash.org/vegas EKA+ :) 2006/8/3, Alexander Farber [EMAIL PROTECTED]: Hello, I'm working on a flash game sending data to an Apache module through the LoadVars.sendAndLoad() (i.e. I use neither XML, nor AMF, but send the application/x-www-form-urlencoded strings around). I wonder, how do the other folks send arrays, since you unfortunately can't send a key more than once: var resp_lv:LoadVars = new LoadVars(); resp_lv.decode('my_array=1my_array=2'); for (var key in resp_lv) { trace('key=' + key + ', val=' + resp_lv[key]); } this will print only the last one: key=my_array, val=2 So what do you guys use? Do you glue array elements together using %0A or %00 or is there smth. better? Regards Alex -- http://preferans.de ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] skew a movie clip
Hello :) read this article in french : http://kiroukou.media-box.net/blog/mes-recherches-sur-flash/64-distortimage-20-la-facon-la-plus-performante-de-deformer-des-images-en-actionscript.html and use the source of this article :) EKA+ :) 2006/8/6, [EMAIL PROTECTED] [EMAIL PROTECTED]: i want to skew a movieclip like this: http://vogtmitvogt.com/test/test.jpg i made it with disortion, but this was to slow. has anyone an other solution. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How to Create Flex Projector
Hello :) you can use the last version of ZINC : http://www.multidmedia.com/news/news.php?id=62 EKA+ :) 2006/8/7, Marcos Neves [EMAIL PROTECTED]: Hi, I need to create a Flex apllication that runs on an exe projector for a CD-ROM. How can I do that? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] createTextField and _alpha
Hello :) use an embed Fonts in your animation :) var tf:TextField = createTextField(field, 1, 10, 10, 150, 20) ; tf.setNewTextFormat ( new TextFormat (MyFont, 12) ) ; // MyFont is the link name in you library tf.embedFonts = true ; tf.text = Hello World ; tf._alpha = 50 ; NB : Read your ActionScript reference _alpha (TextField._alpha property) public _alpha : Number Sets or retrieves the alpha transparency value of the text field. Valid values are 0 (fully transparent) to 100 (fully opaque). The default value is 100. Transparency values are not supported for text fields that use device fonts. You must use embedded fonts to use the _alpha transparency property with a text field. EKA+ :) 2006/8/22, bh [EMAIL PROTECTED]: hi i have a created TextField in a created emptyMovieClip in a MC, and when i made my MC._alpha = 0, the textField inside still appears ! now, if i run the same script with an attachBitmap instead of TextField, the bitmap disappears with my MC._alpha = 0. any ideas ? thanks bhir ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] HTML formated text in Flash 8 SWF
Hello :) try to use TextField.condenseWhite property :) http://livedocs.macromedia.com/flashlite/2/main/0816.html EKA + :) 2006/8/29, Robin Burrer [EMAIL PROTECTED]: Hi all, This is wired. It seems html text in a flash 7 swf behaves differently than html text in a flash 8 swf. var myText =pbHeadline/b/p pSome text/p; this.myTextField.html = true; this.myTextField.htmlText = myText; the swf 7 text filed displays: HeadlineSome text // the whitespace between the p tags is ignored. the swf 8 text filed displays: Headline Some text Note that I use the flash 8 player to view both swf files. I have a few xml documents which have a lot of html formatted text in an CD-DATA tag. Getting rid of the whitespace between the html tags would be a bit of a nightmare + the XML document would not be readable/editable anymore. Any ideas how to get around this problem? Cheers Robin ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AMFPHP 1.2 Class Mapping VO's incomming from PHP5 - It works but...
Hello :) do you use Object.registerClass method to register your VO classes in ActionScript ? You can read in french my article about Class Mapping (AS2 and AS3) and fixing bug in AS3 in my blog : http://www.ekameleon.net/blog/index.php?2006/08/28/48--amf-class-mapping-difficile-en-as3 Sorry, the article is write in French ! but the ActionScript and PHP codes are easy ;) EKA+ :) You can use Google translator or babelFish 2006/8/28, Julius Turnmire [EMAIL PROTECTED]: Ok, I've got it working as advertised. I'm using VO's and my returned values are being mapped to my VO classes. But the problem is how they're mapped. I decided to work on getting VO's to work in my project in the hopes that all the string values I get from MySQL would be mapped to their proper datatypes. But it didn't quite work the way I had hoped. The returned values do not get put into the VO class as the datatypes that are assigned in the class, they get put in as the datatypes that are returned from PHP. For instance.. PHP service class: ?php class SimpleService { function SimpleService() { $this-methodTable = array( tester = array( description = tester() :: returns examples, arguments = array(), access = remote, returns = TesterVO ) ); } function tester() { $TesterVO = array('aString' = 12345, 'aNumber' = '12345'); return $TesterVO; } } ? Flash VO class: class TesterVO { aString:String; aNumber:Number; function TesterVO() { } } In this example aString doesn't get mapped to a String, and aNumber doesn't get mapped to a Number. aString becomes a Number and aNumber becomes a string. Well, I wouldn't normally return types like this, but I was really hoping to avoid converting strings to numbers, and also the 1 string that you get when MySql returns a TRUE. So, I figure that it's all ok.. I'll use getters/setters. So I set up those methods in my class, for instance: ... __aNumber:Number; function set aNumber(newNum):Void { __aNumber = parseInt(newNum); //ie parseInt(12345); } function get aNumber():Number { return __aNumber; } ... Guess what happens... my setter basically gets overwritten with aNumber:String = 12345.. And my getter returns undefined because the setter never set __aNumber! I was under the assumption that the whole purpose of VO's was so that datatypes get typed properly.. But the way Flash works, it just overwrites the properties with what's returned. Now I know I can work around all this, but doesn't it really defeat the purpose of all of it all? Aren't Value Object's properties supposed to use the datatypes that they define? Am I missing something? All does work fine when the returning types correspond. When array('aNumber' = 123, 'aString' = 123JustaString, 'aBoolean' = true) is returned I do get those datatypes. There's no need to even set the datatypes as it really wont matter when flash gets a hold of it. Another thing, but it's minor, is that in this case: function onResult(myResult:ResultEvent) { var theResult:TesterVO = myResult.result; } Flash will error on compile. It really thinks that myResult.result will be of the datatype Object. Shouldn't they have left that untyped? Now before you think that my VO's really aren't getting mapped, they are. I've made sure of that, any methods I put in that class are accessible upon receiving data from the server.. Any thoughts? Am I missing something? I've been very happy with remoting, and have been using it with great success for some time now. But, I was really hoping that spending the time to get VO's working would be worth it. Boy was I disappointed. It just seems to be more work then what it's worth. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AMFPHP 1.2 Class Mapping VO's incomming from PHP5 - It works but...
Hello :) class mapping it's very cool ... but i prefere use EDEN serialisation/deseiialization :) More information : http://live.burrrn.com/wiki/eden you can use this tool in Javascript, AS1, AS2, AS3, ASP, .NET etc... and if you can't use remoting you can continue to keep your datas in .txt or other db files. You can find Eden sources in the buRRRn repository located here svn://live.buRRRn.com (port 3690) with your SVN client :) I use AMFPhp and EDEN in my works with Flex, Flash and FMS. EKA+ :) 2006/8/30, Julius Turnmire [EMAIL PROTECTED]: On Tue, 2006-08-29 at 18:17 +0200, Martin Wood wrote: Unfortunately the player wont do data type conversion when deserializing the contents of an object returned via remoting. Bummer :( You have to make sure your types are right on the server so that when the remoting gateway constructs the amf data to send to flash it has the correct types already inside. Yes, when they are correct on the server first, they do come in properly. Obviously this is more of a pain from something like PHP than say Java as PHP has a much looser type system. nods in agreement For me the beauty of remoting is that you *do* get the datatypes that you create on the server sent to you in flash. Yes, I have had much success with remoting. But I have some old code that I'm working with that leaves a lot of things in strings. I was hoping that VO's and class mapping might help here, but apparently not. I think the other issue you are running into is that when the player creates the actionscript objects from the remoting data it populates the object *before* it runs the constructor. That is very good to know, I'll have to look into it more. I also had a brief look at eka's article and I'll need to do some more looking into this. This means that it doesnt care about any getters / setters and you have to be extra careful if you do anything in the constructor or are expecting parameters to your constructor. Yes again, I'll need to experiment to see exactly what's happening. If it is populating the object before the constructor is run, then perhaps I can use the constructor to do the type conversion if I do decide to do the conversion in Flash and not on the server. Thank you very much for your insight! Julius Turnmire wrote: Ok, I've got it working as advertised. I'm using VO's and my returned values are being mapped to my VO classes. But the problem is how they're mapped. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] key listener class
hello :) yes :) In my framework VEGAS : http://osflash.org/vegas you find in the AGArd extension (http://osflash.org/asgard) the package asgard.ui with KeysValidator class : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/asgard/ui/ You can test the class with the example in the bin directory on the SVN : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/asgard/ui/ Install the framework with Tortoise SVN for example, set the /src classpath and that's all :) EKA+ :) 2006/9/3, aaron smith [EMAIL PROTECTED]: does anyone know of a class that makes it easy for listening to keyboard events. say i want to add a listener for ctal+shift+y. there has to be something developed already to do that.. thanks... ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] using Tween with addEventListener instead of addListener in flash 8
Hello :) 1 - you can try to read this article : http://blog.lalex.com/post/2004/09/17/Tween2-%3A-quand-Tween-rencontre-EventDispatcher (download the sources) 2 - You can too use the AsBroadcaster implementation with addListener and delegate the handler methods like this : import mx.transitions.Tween ; import mx.transitions.easing.* ; import mx.utils.Delegate ; var scope = {} ; scope.toString = function () { return MY SCOPE ; } var myMethod = function ( tw:Tween ) { trace( + myMethod) ; } var listener:Object = {} ; listener.onMotionFinished = Delegate.create( scope , myMethod ) ; var tw:Tween = new Tween(mc, _x, Elastic.easeOut, 0, 500, 24) ; tw.addListener( listener ) ; PS : you write in your code Delegate.create,onTweenAFinished... isn't a good code ? 3 - You can use my Open Source framework with VEGAS and ASGard : project : http://osflash.org/vegas http://osflash.org/asgard Install in SVN : http://svn1.cvsdude.com/osflash/vegas/ (use TortoiseSVN for example) Tween's examples in the SVN : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/asgard/transitions/ My blog in french to explain to use the SVN : http://www.ekameleon.net/blog/index.php?2006/03/05/27--vegas-installation EKA+ :) 2006/9/5, Patrick Matte [EMAIL PROTECTED]: Is there a version of mx.transitions.Tween that works with EventDispatcher instead of ASBroadcaster? I'd like to delegate the onMotionFinished event on different functions using the addEventListener instead of addListener. For example : tweenA.addEventListener(onMotionFinished,Delegate.create ,onTweenAFinished); tweenB.addEventListener(onMotionFinished,Delegate.create ,onTweenBFinished); instead of this code which would not work... tweenA.addListener(this); tweenB.addListener(this); ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Var untouch
Hello :) try this code : var list:Array = [ always, never, sometimes, yes, no, often, rarely, undecided ] ; var len:Number = list.length ; // important to optimize your speed for (var i:Number=0; i len ; i++) { var current:MovieClip = attachMovie(wedgelabel, wedgelabel+i, i ) ; trace( create : + current) ; current._x = i * 10 + 100 ; current._y = i * 10 + 100 ; current.wedgename.text = list[i]; } You can use a local reference (current in my example) to target your current movieclip, it's more easy ;) EKA+ :) 2006/9/7, Laurent CUCHET [EMAIL PROTECTED]: I duplicate a movie clip to show array label inside but it doesnt work It copy ok but textt isnt fill. If i write directly the mc nzme it work , but I loose dynamic. Have you got an Idea ? var wedgename:Array = Array(always, never, sometimes, yes, no, often, rarely, undecided); var thingname; for (var z:Number=0; zwedgename.length; z++) { _root.attachMovie(wedgelabel, wedgelabel+z, this.getNextHighestDepth(), {_x:(z*10)+100, _y:(z*10)+100}); var thingname = ( wedgelabel+z); trace(thingname); thingname.wedgename.text = wedgename[z]; // doesnt work why ??? wedgelabel0.wedgename.text = wedgename[z]; // trace( wedgelabel0.wedgename.text //=²always²); } Thank you ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] optimizing swf size
Hello :) to optimize : 1 - don't use MM components ^_^ 2 - use flasm to optimize your swf http://flasm.sourceforge.net/ 3 - use MTASC to compile your project. 4 - Create your components and class ;) EKA+ :) 2006/9/8, Mendelsohn, Michael [EMAIL PROTECTED]: Hi list... When publishing my swf with generate size report, I notice that there is 57KB of AS2 classes in there (much heavier than my graphics). How do I know that all of these classes are necessary for the movie to run? For example, I've got a scrollpane component and scrollbar component in there, which understandably adds size, but when debugging, why does it list Version.as several times? Could that be adding unnecessary bulk? How can I optimize what I've got? Thanks, - Michael M. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] ns.onStatus calling a function
Hello :) where is your function ? :) var write = function ( message ) { trace( + message) ; } ns.onStatus = function(info) { if (info.code == NetStream.Play.Start) { write( info.code ) ; } } ??? EKA+ :) 2006/9/12, Christian Pugliese [EMAIL PROTECTED]: can't I call a function inside a ns.onStatus ? ie: ns.onStatus = function(info) { if(info.code == NetStream.Play.Start) { trace(info.code); callTheFunction(); } } the trace line executes, an any other event occurs normally, but the callTheFunction() is never called? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Hex to HSB
Hello :) you can find this tool in my OpenSource framework VEGAS (with this extension ASGard) http://osflash.org/vegas # Color tools in asgard.colors package : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/asgard/colors/ # HSV to RGB in ColorHSV class http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/asgard/colors/ColorHSV.as EKA+ :) 2006/9/15, Mike Mountain [EMAIL PROTECTED]: Anyone got a quick and dirty hex to HSB and back converter algo - without having to convert to RGB first? Cheers M ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] rewrite flash.net.Responder source code is where??
Hello :) in AS3 RelayResponder is native .. you can't read this class... but you can encapsulate it with composition if you want ... EKA+ :) 2006/9/18, Martin Weiser [EMAIL PROTECTED]: Hello, in as2 i have successfully rewritten Relayresponder class, so that it had extra property id, by wich i coukd exactly track my calls and responses from amfphp, i'd like the same for flex applications, i can extent responder and it works, but i would like to rewrite it and need the source, or description and names of all methods, return values, arguments etcplease help thanks in advance Martin ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Associate clip with class
Hello :) with Vegas : http://osflash.org/vegas you can use the class DisplayFactory : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/factory/DisplayFactory.as Install the AS2 src of vegas in your classpaths and test the example : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/util/factory/ You can try my example too in Lunas, the Components library extension of vegas : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/lunas/display/components/button/ EKA+ :) 2006/9/20, Alain Rousseau [EMAIL PROTECTED]: There is an interesting article on the subject in the Flashcoder's Wiki at osflash.org : http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library With this approach you can create a class that extends MovieClip and then create an instance of that class without a symbol in the library. I found it very useful and really neat ! works like a charm ! Alain Geoff Stearns wrote: it does work in flash 8. as for clips on the stage, it does work, you just have to give the clip a linkage ID in the library first, and use that linkage to register the class to it. On Sep 19, 2006, at 5:31 PM, slangeberg wrote: Does Object.registerClass() work in Flash 8 (i haven't been able to get it to work)? Also, does that allow you to register more than one clip with a class? The documentation seems to point to using the Linkage setting for AS2: * Availability: *ActionScript 1.0; Flash Player 6 - If you are using ActionScript 2.0 classes, you can use the ActionScript 2.0 Class field in the Linkage Properties or Symbol Properties dialog box to associate an object with a class instead of using this method. Also, I don't think it works for clips that you've dragged to the stage: When an instance of the specified movie clip symbol is created by using MovieClip.attachMovie() or MovieClip.duplicateMovieClip(), it is registered to the class specified by theClass Scott On 9/19/06, Geoff Stearns [EMAIL PROTECTED] wrote: that article was only meant for assigning a class to your _root timeline... I don't think he intended it to be used for other movieclips in the library or on stage. for that you could just use the linkage in the library or use Object.registerClass() On Sep 19, 2006, at 4:29 PM, slangeberg wrote: I was looking at Danny's article regarding a Flash Document Class at: http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=106 And i started to wonder if people are using this to associate their clips on stage with a class? Are people doing this kind of thing (or otherwise) instead of setting the AS 2.0 class property in the 'linkage' dialog of their movieclips in the library? I just hate how it's not obvious (by linkage) which class is being used in Flash 8.0. Only gets me more excited for some Flash 9.0 projects to come through! : : ) Scott ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- : : ) Scott ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe
Re: [Flashcoders] Datagrid and Image
Hello :) you can find examples to use Datagrid in this web site : http://philflash.inway.fr/index.html the tutorials are in french but you can understand the method to create a custom CellRenderer, example : http://philflash.inway.fr/dghtmlrd/dghtmlrd.html EKA+ :) 2006/9/24, Laurent CUCHET [EMAIL PROTECTED]: Im searching for datagrid exemples with images Have you got links ?? Thanks Laurent ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q:AddProperty and getters/setters
Hello :) 1 - in AS1 you can use addProperty with the prototype and not in the constructor !! // o Constructor _global.Square= function(side) { this.side=side } // o Public Methods Square.prototype.getArea=function() { return Math.pow(this.side,2); } Square.prototype.setArea = function(area) { this.side=Math.sqrt(area) ; // don't forget Math and not math !!! } // o Virtual Properties Square.prototype.addProperty(area, Square.prototype.getArea, Square.prototype.setArea) ; 2 - In AS2 you have 2 methods to create Virtual Properties 2 - 1 with get and set keywords class Square { // o Constructor public function Square(side:Number) { this.side = side ; } // o Public Properties public var side:Number ; // o Virtual Properties public function get area() { return Math.pow(this.side,2); } public function set area ( area ) { side = Math.sqrt(area) ; } } 2 - 2 with addProperty method class Square { // o Constructor public function Square(side:Number) { this.side = side ; } // o Public Properties public var side:Number ; // o Public Methods public function getArea() { return Math.pow(this.side,2); } public function setArea ( area ) { side = Math.sqrt(area) ; } // o Virtual Properties static private var __AREA__:Boolean = Square.prototype.addProperty(area, Square.prototype.getArea ,Square.prototype.setArea) ; } EKA+ :) 2006/9/25, [EMAIL PROTECTED] [EMAIL PROTECTED]: I know AddProperty was useful in creating getter/setters when defining AS1 based classes ie //CODE BEGIN //create a new square class _global.Square= function(side){ this.side=side this.addProperty(area,this.getArea,this.setArea); } Square.prototype.setArea=function(area){ this.side=math.sqrt(area); } Square.prototype.getArea=function(){ return Math.pow(this.side,2); } //CODE END Is this same AddProperty technique useful with AS2 classes? [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] remoting alternatives?
Hello :) You can use my framework OpenSource Vegas : http://osflash.org/vegas NB : you can find my project too in google code : http://code.google.com/p/vegas/ With this extension ASGard : http://osflash.org/asgard In ASGard you can find asgard.net.remoting package : AS2 version : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/asgard/net/remoting/ AS3 version : http://svn1.cvsdude.com/osflash/vegas/AS3/trunk/src/asgard/net/remoting/ SSAS version (FMS) : http://svn1.cvsdude.com/osflash/vegas/SSAS/trunk/src/src/asgard/net/remoting/ You can find example to use this implementation in AS2 example : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/asgard/net/remoting/ EKA+ :) 2006/9/27, Ray Chuan [EMAIL PROTECTED]: Hi, does any of you use a non-Macromedia remoting implementation? I know that ActionStep and pixlib has one. -- Cheers, Ray Chuan ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Event bubbling in Flash like in Flex
Hello :) you can use my event model implementation in my AS2 / SSAS openSource : project : http://osflash.org/vegas svn : http://svn1.cvsdude.com/osflash/vegas/ example : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/events/ (EventDispatcher 12 - BubblingEvent.flahttp://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/vegas/events/EventDispatcher%2012%20-%20BubblingEvent.fla ) EKA+ :) 2006/9/28, Van De Velde Hans [EMAIL PROTECTED]: Great, thanks! I've updated the sample with the static function initializeBubbling in a separate class all is well ! (sample : http://www.novio.be/downloads/showReel/showReel.zip) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel Sent: donderdag 28 september 2006 16:59 To: Flashcoders mailing list Subject: Re: [Flashcoders] Event bubbling in Flash like in Flex personally i use a different mechanism, but this one by ralf bokelberg is good http://www.helpqlodhelp.com/blog/archives/000144.html On 9/28/06, Van De Velde Hans [EMAIL PROTECTED] wrote: Hi list, a question that's in my mind since for a little while now : how can you get event bubbling (cfr. Flex) in Flash? I have a menu with nested bullet-movieclips. A click on a bullet dispatches an event and my menu does not automatically forward that event to the listeners on the menu (sample : http://www.novio.be/downloads/showReel/showReel.zip) What I usually do is add an event handler at the level of the menu and then re-dispatch the event in that handler. This is a bit silly indeed, but how to do better? Thanks, Hans. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] function and convert String
Hello :) try the [] notation : function getField ( i ) { return _root[rec+ i].text ; } // test var reference = getField(1) ; EKA+ :) 2006/10/7, Laurent CUCHET [EMAIL PROTECTED]: I would like to take textfield value. How can I convert string ? function sqr(x) { var tx = _level0.rec+x; var c1 = tx+1.text; trace(c1); // give } Sqr(1); // Give string ³_level0.rec1.text² not the textfield value Thank You ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] ::dk:: understanding roll over with addEventListener
Hello :) if you use Macromedia's V2 components, the Button component don't have over and out event you must override the class and add your custom events. EKA+ :) 2006/10/14, dnk [EMAIL PROTECTED]: Hi there - this is probably a simple question, but... I have been using addEventListener with button components: this._targetMc.btn.addEventListener(click, MyDelegate.create(this, onHit)); Then the onHit function deals with it. Now I need some rollover rollout functions. So I wrote those, and then tried adding the event with: this._targetMc.btn.addEventListener(rollOver, MyDelegate.create(this, onRollOvr); this._targetMc.btn.addEventListener(rollOut, MyDelegate.create(this, onRollOut); Yet nothing is called - what am I missing? Not sure if it matters, these actions are within an AS2 class. Thanks in advance! d ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] ::dk :: passing args to onPress, onRollOver, etc
Hello :) you can try 2 solutions : 1 - with a little property index to save the index value var bt = this._targetMc[btnHldr + i] ; bt.index = i ; bt.onPress = function() { trace(pressed: + this.index); } 2 - with Proxy method (like mx.utils.Delegate class but you can use arguments : // create Delegate Singleton Delegate = {} ; Delegate.create = function (scope, method:Function /*, arg1, arg2, ..., argn*/):Function { var f:Function = function() { var o = arguments.callee ; var s = o.s ; var m = o.m ; var a = arguments.concat(o.a) ; return m.apply(s, a) ; } ; f.s = scope ; f.m = method ; f.a = arguments.splice(2); return f; } /// in your code var press:Function = function (index:Number):Void { trace(pressed: + index); } var writeBtnEvents:Function = function():Void { for (var i:Number = 0; i 35; i++) { var bt = this._targetMc[btnHldr + i] ; bt.onPress = Delegate.create( this, press, i ) ; } } EKA+ :) 2006/10/16, dnk [EMAIL PROTECTED]: Hi there, I am trying to write a few mouse events for multiple movieclips. Now say I have the following: function writeBtnEvents() { for (var i:Number = 0; i 35; i++) { this._targetMc[btnHldr + i].onPress = function(i:Number) { trace(pressed: + i); } this._targetMc[btnHldr + i].onRollOver = function(i:Number) { trace(roll over + i); } this._targetMc[btnHldr + i].onRollOut = function() { trace(roll off); } } } I read somewhere that you can not pass args to an onPress function, etc. Is this true? Is there a better way to accomplish something like this? d ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] HTML display component for Flash?
Hello :) if you wait the end of this year you can use HTML in a SWF with apollo : http://labs.adobe.com/wiki/index.php/Apollo More information in this videos : http://video.google.com/videoplay?docid=1551903488172905143 http://www.mediabox.fr/adobe_max_2006_01.html ( cuePoint about apollo at the end of the list on the bottom of this link) EKA+ :) 2006/11/4, vipin chandran [EMAIL PROTECTED]: Hello All, I am in search for a flash component which display HTML content. I got one, which is Deng. But it takes a lot of time to render my content. I have my content as XHTML. I am new to this group and I dont have any previous discussion about this. Anybody, please help me getting a good component or code library which does this. Regards, Vipin ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q:Framework ARP vs PixLib
Hello :) We can find very good ideas in all opensource framework :) All librairies are good :) Only the vision of the concepts change with the practices of uses. There is not only one manner of implementing a design pattern for me. You can test for example my library VEGAS (it's an other librarie to compare) : - http://osflash.org/vegas (the project in OSFlash) - http://vegas.riaforge.org/ (the backup in RIAForge) - http://code.google.com/p/vegas/ (the backup in Google Code) You can use VEGAS and this libraries (extension) ASGard (remoting, displays, config, localization...) and LunAS( components) A good library is a set of tools ... not a complete solution to resolve all problems ! EKA+ :) 2006/11/8, Muzak [EMAIL PROTECTED]: See reply inline.. - Original Message - From: Marcelo de Moraes Serpa [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 08, 2006 1:51 PM Subject: Re: [Flashcoders] Q:Framework ARP vs PixLib Hi Muzak, Can you provide some more details on these 2 statements? - found arp to be somewhat limited and unflexible - It goes far beyond ARP, no doubt ARP was no doubt the pioneer in introducing design patterns development into flash apps. However, its MVC model is not what I would call the ideal, not when you take into account the decoupling between the classes. Pixlib has two MVC models you can choose: a strict one and a frontcontroller based one, similar to arp/cairngorm. The original arp didn't have a EventBroadcaster nor the concept of system events. True, but it doesn't need to, as there is already an EventDispatcher that comes with Flash. It does make a distinction between View and System events though: quote Both types of events are broadcast from Forms within your View, however the objects interested in and listening for the events are different. System Events are events that concern the application. The Application Controller listens for System Events and maps them to Commands. In most cases the Commands either by themselves or using Business Delegates will cause the execution of business logic either on the client or, more commonly as part of a remote service. View Events, by contrast, only concern the View. Business logic, especially remote business logic, is not triggered in response to View Events. Forms within the View listen for View Events either on themselves, on their components or on other forms. /quote But since ARP doesn't provide its own Event system, it kinda leaves it up to the developer to work out which events are View/System events. Even though ARP is now open source it originally wasn't, and was meant to be used with the Flash IDE and v2 components framework, so assumed that you'd use the existing mx.events.EventDispatcher. It is also meant to be lightweight, so using mx.events.EventDispatcher makes sense. To make views downloadable at runtime I had to modify significantly the way it worked. Also, the lack of a ModelLocator (introduced on recent versions of ARP) and the coupling between commands and views were things I really didn't like about ARP Yup, the coupling between views and commands is something most people don't like about it, including me ;-) This has been discussed on the ARP mailing list quite a few times and solutions have been provided as well. I think the ModelLocator has been around for quite some time now. There's a simple one in the svn trunk, and there's another floating around by Christophe Herreman that allows for databinding and that kind of stuff. Pixlib makes it easy to load and locate views anywhere in your application through MovieClipHelper and GraphicLibLocator classes, and has a very nice Model and ModelLocator class. Not to mention the other usefull packages and classes it provides. It has been designed from the ground up to be powerful and flexible. Agreed, ARP doesn't make it easy to use external swf's as views, meaning it doesn't provide anything to achieve/handle this. I do remember someone posting a solution for this on the ARP list as well. Can't remember who though.. (can't find the thread right now). Take a look at www.deja-vue.net, at the Sushi service application ... this was the article that conviced me to switch to pixlib. For those interested, the sushi service app is here: http://www.deja-vue.net/blog/2006/05/25/actionstep-plugin-view-pixlib-mvc-frontcontroller-remoting-sushi-service/ Thanks for sharing your thoughts. regards, Muzak ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription
Re: [Flashcoders] Q:Framework ARP vs PixLib
hello :) the documentation is in progress (en english with javadoc) and i think finish it in the version 0.8 :) but for the moment, you can find examples in the svn : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/ EKA+ :) 2006/11/8, Muzak [EMAIL PROTECTED]: Does it come with documentation? Couldn't find any useful info or documentation on osflash regarding VEGAS. All it says is: VEGAS is an AS2, AS3 and SSAS OpenSource Framework regards, Muzak - Original Message - From: eka [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 08, 2006 2:58 PM Subject: Re: [Flashcoders] Q:Framework ARP vs PixLib Hello :) We can find very good ideas in all opensource framework :) All librairies are good :) Only the vision of the concepts change with the practices of uses. There is not only one manner of implementing a design pattern for me. You can test for example my library VEGAS (it's an other librarie to compare) : - http://osflash.org/vegas (the project in OSFlash) - http://vegas.riaforge.org/ (the backup in RIAForge) - http://code.google.com/p/vegas/ (the backup in Google Code) You can use VEGAS and this libraries (extension) ASGard (remoting, displays, config, localization...) and LunAS( components) A good library is a set of tools ... not a complete solution to resolve all problems ! EKA+ :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] number parsing
Hello :) in ActionScript (based on ECMAScript) you must use the point '.' to the float numbers, example : 10.5 You can't use the , caractere, 10,5 is false and return NaN if you use the number type. if you want parse 10,5 you must transfor the ',' in '.' ... EKA+ :) 2006/11/9, Hans Wichman [EMAIL PROTECTED]: Hi list, can anyone confirm whether number parsing depends on regional settings in anyway? For example, could parsing 10,3 result in 10,3 on some pc's and 10 on others? And even worse could parsing it using Number result in 10 on some pc's and NaN on others? I can't reproduce it, but client's evidence seems to prove otherwise:) thanks, JC ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q; Increase Saturation and/or Contrast using setTransform method
Hello :) you can try the class of Lalex : XColor http://blog.lalex.com/post/2005/09/20/SuperColor-devient-XColor-pour-Flash-8 EKA+ :) 2006/11/10, [EMAIL PROTECTED] [EMAIL PROTECTED]: Anyone have ideas on how to change the contrast and/or saturation using the new setTransform method in Flash 8? Jim Bachalo [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] why are my class property's strong typing being ignored?
Hello :) a XML is only a String all properties (nodeValue) or attributes are strings... you must transform the type of your values with customs deserialize functions. For me it's better to use JSON for example : http://www.json.org/ (you keep the primitive types of your objects with the serialize/deserialize) You can try to use my openSource framework VEGAS who implement JSON and EDEN (the best solution to text format datas) Install VEGAS : http://vegas.riaforge.org/ (use the SVN or the zip link in this page to download my framework) Test the JSON examples in VEGAS in the vegas.string package : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/vegas/string/ Test the Eden examples (Burrrn library used in VEGAS) : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/buRRRn/eden/ Test JSON and Eden extension in ASGard (extension of VEGAS) : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/asgard/net/ (JSONLoader, EdenLoader) Test my example of Config pattern and localization pattern in http://svn.riaforge.org/vegas/AS2/trunk/bin/test/asgard/config/ (and bin/test/system) For me ... XML is slow and don't keep the typing ! EKA+ :) 2006/11/16, Julien Vignali [EMAIL PROTECTED]: Hi Rich, could you provide some sample code of your Settings class and your xml processing ? 2006/11/16, Rich Rodecker [EMAIL PROTECTED]: Hello, I've got a class named 'Settings' which has a number of properties. Those properties are strongly typed to various types...string, number, boolean, etc. I'm loading in xml in a separate Model class, and then parsing the xml and assigning the that various values in the xml to the properties of the Settings class. However, all the values are being set as a string (that part I expected since I am assigning the values of text nodes, which of course are strings, in the xml to the Setting's properties)...and I'm not getting any parse errors when I try and assign a string to a property that is strongly typed as a number, or boolean. I figure since I am trying to use myBranch.firstChild.nodeValue that flash, at compile time, can see I am trying to set a string to a property typed as a Number, so what's going on? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] why are my class property's strong typing being ignored?
Use json or eden ... you can use it in XML to with a deserialization of the nodes ;) x = new XML(xmlitem{ prop1:item1, prop2:item2 }/item/xml) ; you can use JSON.deserialize( x.firstChild.firstChild.firstChild.nodeValue ) ; // it's an example not tested ! EKA+ :) 2006/11/16, Rich Rodecker [EMAIL PROTECTED]: julien: sure here's a sample: class com.mysite.model.Settings { private static var instance = null; public var custom_color_3:String; public var background_image:Boolean; public var background_type:String; public var background_alpha:Number; public var title_mode:String; //rest of class } Here is the function where I parse the xml into the properties above, pretty simple: function parseSettings(){ var settingsBranch = app_xml.firstChild.firstChild; var c = settingsBranch.childNodes; var num = settingsBranch.childNodes.length; var nextBranch:XMLNode = settingsBranch.childNodes[0]; while(nextBranch){ var tagName = nextBranch.nodeName; settings[tagName] = nextBranch.firstChild.nodeValue; nextBranch = nextBranch.nextSibling; } } and here is what the xml looks like: settings custom_color_3#FF/custom_color_3 background_image1/background_image background_typejpg/background_type background_alpha100/background_alpha title_modePROFILE/title_mode /settings eka: - yeah, i know xml is only a string..my problem is that i am assigning a string to properties that are clearly typed as something other than a string, yet flash isnt complaining. On 11/16/06, eka [EMAIL PROTECTED] wrote: Hello :) a XML is only a String all properties (nodeValue) or attributes are strings... you must transform the type of your values with customs deserialize functions. For me it's better to use JSON for example : http://www.json.org/ (you keep the primitive types of your objects with the serialize/deserialize) You can try to use my openSource framework VEGAS who implement JSON and EDEN (the best solution to text format datas) Install VEGAS : http://vegas.riaforge.org/ (use the SVN or the zip link in this page to download my framework) Test the JSON examples in VEGAS in the vegas.string package : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/vegas/string/ Test the Eden examples (Burrrn library used in VEGAS) : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/buRRRn/eden/ Test JSON and Eden extension in ASGard (extension of VEGAS) : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/asgard/net/(JSONLoader, EdenLoader) Test my example of Config pattern and localization pattern in http://svn.riaforge.org/vegas/AS2/trunk/bin/test/asgard/config/ (and bin/test/system) For me ... XML is slow and don't keep the typing ! EKA+ :) 2006/11/16, Julien Vignali [EMAIL PROTECTED]: Hi Rich, could you provide some sample code of your Settings class and your xml processing ? 2006/11/16, Rich Rodecker [EMAIL PROTECTED]: Hello, I've got a class named 'Settings' which has a number of properties. Those properties are strongly typed to various types...string, number, boolean, etc. I'm loading in xml in a separate Model class, and then parsing the xml and assigning the that various values in the xml to the properties of the Settings class. However, all the values are being set as a string (that part I expected since I am assigning the values of text nodes, which of course are strings, in the xml to the Setting's properties)...and I'm not getting any parse errors when I try and assign a string to a property that is strongly typed as a number, or boolean. I figure since I am trying to use myBranch.firstChild.nodeValue that flash, at compile time, can see I am trying to set a string to a property typed as a Number, so what's going on? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http
Re: [Flashcoders] Searching for Generator-like utility
Hello :) With BitmapDatas, AS3, flexBuilder, the flex 2 sdk you can do this now :) for example : http://www.kaourantin.net/2005/10/png-encoder-in-as3.html EKA+ :) 2006/11/16, Jim Robson [EMAIL PROTECTED]: Remember Macromedia Generator? With the Generator extensions in the Flash authoring environment, you could create .swt files with placeholders for dynamic data and images. The Generator Server could then render these at runtime into .swf, .jpg, .gif, or .png files. With the advent of Flash MX, Generator was phased out. Does anyone know of a way to implement the functionality of Generator today? Specifically, I'm looking to convert Flashs file to .png files at runtime. Any thoughts / suggestions? -Jim ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Manually fire Stage resize event.
Hello :) when you listen the onResize event of the stage you write this code : var listener:Object = {} ; listener.onResize = function ():Void { trace(onResize : + Stage.width + : + Stage.height) ; } Stage.addListener( listener ) ; If you want resize manually without the event it's easy... call the callback function in your code :) listener.onResize() ; EKA+ :) 2006/11/17, bayo [EMAIL PROTECTED]: Hi, I'd like to manually fire a Stage resize event without the Stage having actually been resized. Anyone know if this is possible? Thanks. Julian ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] changing a MovieClip instance class at runtime inAS2 ?
Hello :) You must use the __proto__ reference to change the inherit of yours movieclips :) example 1 : you create an empty movieclip and you want attach a new class who extends MovieClip ! import myPackage.MyClass ; var mc = createEmptyMovieClip(mc, 1) ; mc.__proto__ = MyClass.prototype ; // i change the default __proto__ reference(MovieClip.prototype) with the prototype of MyClass. MyClass.call(mc) ; // if you want launch the constructor of the class and initialize the movieclip example 2 : your movieclip is allready on the stage, it's the same operation :) mc.__proto__ = MyClass.prototype ; // i change the default __proto__ reference(MovieClip.prototype) with the prototype of MyClass. MyClass.call(mc) ; // if you want launch the constructor of the class and initialize the movieclip You can create a function to lauch this hack ... it's more easy. eKA+ :) 2006/11/23, Dani Bacon [EMAIL PROTECTED]: hi marijan yeah thats exactly it, im using exactly that - inject code, to attach my classes to assets in a SWF file. but what happens is that any MC in that SWF that is linked to a class via the symbols properties panel, is ignored. ive used registerClass in Main to correct that, which does but not for instances that are already on stage. so im looking for another way to attach a class to a MovieClip instance in runtime ? thx .. dani On 11/22/06, Marijan Miličević [EMAIL PROTECTED] wrote: as far as I know, FD ignores anything on the stage unless you choose inject code compile method, see compiler options within FD, hth -m -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Dani Bacon Sent: Wednesday, November 22, 2006 5:50 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] changing a MovieClip instance class at runtime inAS2 ? hey TMK. thank you for your interest :) i started working with FlashDevelop + mtasc and would like to compile my projects solely via FlashDevelop. this way i would have the design team i work with set up the symbols and stage with all the visual assets needed, and set up linkageIDs to them. then i would be able to set up those symbols functionality via external code. i wouldnt mind linking classes to MCs using the symbols properties panel, but FlashDevelop ignores those links. so using registerClass in Main i can link linkageIDs to classes but that only works for dynamic attachments of MC instances. any ideas ? [snip..] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q:JSON vs XML advantages
Hello :) JSON is speed !! the xml parser is slow ! With JSON your objects are typed.. in XML all properties, attributes, are String values only. You can try to compare 2 big files in XML and JSON to see the difference :) For me JSON is good but EDEN is better ;) Eden is like JSON but you can instanciate your customs objects, securize the datas etc You can compare JSON and EDEN in my openSource framework : http://vegas.riaforge.org/ 1 - dowload with the zip or the SVN my framework 2 - install the src folder in flash in your ActionScript preference list. 3 - Try the example in VEGAS and this extension ASGard : (JSON) http://vegas.riaforge.org/index.cfm?event=page.svnbrowsepath=%2FAS2%2Ftrunk%2Fbin%2Ftest%2Fvegas/string (EDEN) http://vegas.riaforge.org/index.cfm?event=page.svnbrowsepath=%2FAS2%2Ftrunk%2Fbin%2Ftest%2Fasgard/net (Config tool with EDEN or JSON loader) http://vegas.riaforge.org/index.cfm?event=page.svnbrowsepath=%2FAS2%2Ftrunk%2Fbin%2Ftest%2Fasgard/config (Localization tool with Eden or JSON loader) http://vegas.riaforge.org/index.cfm?event=page.svnbrowsepath=%2FAS2%2Ftrunk%2Fbin%2Ftest%2Fasgard/system PS : all examples are in the AS2/trunk/bin/test/ directory EKA+ :) 2006/11/23, [EMAIL PROTECTED] [EMAIL PROTECTED]: I know one of the advantages of the JSON format is easier to maintain code, ie your config files can be essentially actionscript. But are there any oither advantages over XML? What about performance? Does it 'parse' faster? Jim Bachalo [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q:JSON vs XML advantages
Hello :) in AS2 ... isn't the same bench in AS3 with E4X ! With my library and my custom JSON class... in AS2, SSAS, etc.. JSON is speed... very speed :) I don't use for my test the JSON library of adobe ? Now ... AMFPHP XML ??? if you use class mapping in AMFPHP ... i think AMF protocol is speed no ? EKA+ :) 2006/11/23, Ben Smeets [EMAIL PROTECTED]: JSON Speed? I haven't used it before so can only judge it by what I read on the web :) http://blogs.adobe.com/mikepotter/2006/07/php_and_flex_js.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eka Sent: donderdag 23 november 2006 15:10 To: Flashcoders mailing list Subject: Re: [Flashcoders] Q:JSON vs XML advantages Hello :) JSON is speed !! the xml parser is slow ! With JSON your objects are typed.. in XML all properties, attributes, are String values only. You can try to compare 2 big files in XML and JSON to see the difference :) For me JSON is good but EDEN is better ;) Eden is like JSON but you can instanciate your customs objects, securize the datas etc You can compare JSON and EDEN in my openSource framework : http://vegas.riaforge.org/ 1 - dowload with the zip or the SVN my framework 2 - install the src folder in flash in your ActionScript preference list. 3 - Try the example in VEGAS and this extension ASGard : (JSON) http://vegas.riaforge.org/index.cfm?event=page.svnbrowsepath=%2FAS2%2Ft runk%2Fbin%2Ftest%2Fvegas/string (EDEN) http://vegas.riaforge.org/index.cfm?event=page.svnbrowsepath=%2FAS2%2Ft runk%2Fbin%2Ftest%2Fasgard/net (Config tool with EDEN or JSON loader) http://vegas.riaforge.org/index.cfm?event=page.svnbrowsepath=%2FAS2%2Ft runk%2Fbin%2Ftest%2Fasgard/config (Localization tool with Eden or JSON loader) http://vegas.riaforge.org/index.cfm?event=page.svnbrowsepath=%2FAS2%2Ft runk%2Fbin%2Ftest%2Fasgard/system PS : all examples are in the AS2/trunk/bin/test/ directory EKA+ :) 2006/11/23, [EMAIL PROTECTED] [EMAIL PROTECTED]: I know one of the advantages of the JSON format is easier to maintain code, ie your config files can be essentially actionscript. But are there any oither advantages over XML? What about performance? Does it 'parse' faster? Jim Bachalo [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] changing a MovieClip instance class at runtime inAS2 ?
Hello :) Don't forget to use the inherit in your class :) class classes.TestClass extends MovieClip { /** * Constructor */ public function TestClass() { trace( constructor : TestClass); } public function action() { trace(some action); } } PS : use uppercase to begin the name of your classes... MovieClip, LoadVars, TextField etc... all this classes begin with a uppercase character. PS2 : use a reference property in your main class import classes.TestClass ; /** * The Main class of the application. */ class Application { /** * Constructor, creates a new Main instance. */ function Application( target:MovieClip ) { // register the reference of you view in the class (it's a shortcut !) myMC = target.testMC ; // Change inherit myMC.__proto__ = TestClass.prototype ; TestClass.call( myMC ) ; // Use TestClass method myMC.action(); } /** * The reference of my view. */ public var myMC:MovieClip ; /** * Main method (use this method in mtasc ?) */ static public function main( target:MovieClip ) { var main:Main = new Main(target) ; } } PS3 : you can try to use my ConstructorUtil class in VEGAS my openSource framework : http://vegas.riaforge.org/ 1 - Download the framework 2 - install my AS2 library in Flash or MTASC with the AS2/trunk/src class path. 3 - You can find my ConstructorUtil AS2 tool class in the package vegas.util.* : http://vegas.riaforge.org/index.cfm?event=page.svnbrowsepath=%2FAS2%2Ftrunk%2Fsrc%2Fvegas/util In this class you can use the methods : createVisualInstance(class:Function, oVisual, oInit) You can try to use too my vegas.util.factory.DisplayFactory class ... Try the examples in AS2/trunk/bin/test/util/... directory EKA+ :) 2006/11/24, Dani Bacon [EMAIL PROTECTED]: hey eka. thx it seems to almost do the trick it changes the class prototype but errors when i try to initialize the constructor using the call method. on stage i have a MC called testMC and the code im using- class Main { static function main() { _root.testMC.__proto__ = classes.testClass.prototype ; classes.testClass.call(_root.testMC); _root.testMC.action(); } } class classes.testClass { public function testClass() { trace(test); } public function action() { trace(some action); } } errors with - type error classes.testClass have no static field call commenting put the .call() line compiles and prints some action any ideas how i can get the constructor to be called? thanks for all your help :) On 11/23/06, eka [EMAIL PROTECTED] wrote: Hello :) You must use the __proto__ reference to change the inherit of yours movieclips :) example 1 : you create an empty movieclip and you want attach a new class who extends MovieClip ! import myPackage.MyClass ; var mc = createEmptyMovieClip(mc, 1) ; mc.__proto__ = MyClass.prototype ; // i change the default __proto__ reference(MovieClip.prototype) with the prototype of MyClass. MyClass.call(mc) ; // if you want launch the constructor of the class and initialize the movieclip example 2 : your movieclip is allready on the stage, it's the same operation :) mc.__proto__ = MyClass.prototype ; // i change the default __proto__ reference(MovieClip.prototype) with the prototype of MyClass. MyClass.call(mc) ; // if you want launch the constructor of the class and initialize the movieclip You can create a function to lauch this hack ... it's more easy. eKA+ :) 2006/11/23, Dani Bacon [EMAIL PROTECTED]: hi marijan yeah thats exactly it, im using exactly that - inject code, to attach my classes to assets in a SWF file. but what happens is that any MC in that SWF that is linked to a class via the symbols properties panel, is ignored. ive used registerClass in Main to correct that, which does but not for instances that are already on stage. so im looking for another way to attach a class to a MovieClip instance in runtime ? thx .. dani On 11/22/06, Marijan Miličević [EMAIL PROTECTED] wrote: as far as I know, FD ignores anything on the stage unless you choose inject code compile method, see compiler options within FD, hth -m -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Dani Bacon Sent: Wednesday, November 22, 2006 5:50 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] changing a MovieClip instance class at runtime inAS2 ? hey TMK. thank you for your interest :) i started working with FlashDevelop + mtasc and would like to compile my projects solely via FlashDevelop. this way i would have the design team i work with set up the symbols and stage with all the visual assets needed, and set up linkageIDs to them. then i would be able to set up those symbols functionality via
Re: [Flashcoders] setRGB question
Hello :) use Color.setTransform method to clear the color effect :) var c:Color = new Color(mc) ; c.setRGB(0x00) ; c.setTransform ({ra:100, ga:100, ba:100, rb:0, gb:0, bb:0}) ; EKA+ :) 2006/11/30, dan [EMAIL PROTECTED]: Hi guys Im using the setRGB command to change a color of a movieclip to black Now... How do I change it back to its orig color? 10x d dan ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] onChange or onResize or onX event - howto?
Hello :) 1 - Object watch failed with virtual properties (_x, _y, _width etc).. don't use addProperty and watch method !! In your example you must return the new value in the change method !!! var o:Object = {} ; o.prop = 0 ; var change = function ( id , oldValue, newValue) { trace(id : + id + , change + oldValue + to + newValue) ; mc._x = Math.round(newValue) ; return newValue ; } o.watch(prop, change) ; o.prop = 20 ; o.prop = 30 ; o.prop = 30 ; o.prop = 40 ; o.prop = 100 ; 2 - in your the constructor must be the same name with the class name !! If the name of your class is MyUIObject .. your constructor must have the same name :) 3 - is AS2 used get and set keywords to create virtual properties and don't use addProperty method ! 3 - You can use in your example the Asbroadcaster class to inject addListener, removeListener and broadcastMessage method in your class : class MyUIObject { /** * Constructor of the class. */ public function MyUIObject() { } /** * Inject addListener, removeListener and broadcastMessage methods in the prototype of the class. */ static private var __INITBROADCASTER__ = AsBroadcaster.initialize( MyUIObject.prototype ) ; // Public Properties /** * The code of this method is injected by the AsBroadcaster tool. * Use this declaration in the AS2 compilation. */ public var addListener:Function ; /** * The code of this method is injected by the AsBroadcaster tool. * Use this declaration in the AS2 compilation. */ public var broadcastMessage:Function ; /** * The code of this method is injected by the AsBroadcaster tool. * Use this declaration in the AS2 compilation. */ public var removeListener:Function ; /** * (read-write) Returns the x position of the ui object. */ public function get x():Number { return getX() ; } /** * (read-write) Sets the x position of the ui object. */ public function set x( value:Number ):Void { setX( value ) ; } // Public Methods /** * Returns the x position of the UI object. */ public function getX():Number { return _x; } /** * Sets the x position of the UI object. */ public function setX( value:Number ):Void { _x = value ; broadcastMessage(onX , this, _x) ; } // Private Properties /** * The internal x position of the UI object. */ private var _x:Number ; } You can now use this class and this event model : var onX = function ( who , x ) { trace(onX : + who + with the value : + x) ; } var ui:MyUIObject = new MyUIObject(); ui.addListener(this) ; ui.x = 25 ; EKA+ :) 2006/11/30, Matthias Dittgen [EMAIL PROTECTED]: Hello, I often need to recognize for some of my gui elemets when the embedded gui elements (childs) have changed or vice-versa the parent elements has changed in a property, like _x, _width, etc. to repaint the necessary elements of the GUI. So what is the best way to do this? I stumbled over the methods of Object to add or watch properties. This allows myself to build something like this: class MyUIObject extends Object { public var _x:Number; public function GUIObject() { this.addProperty(_x, getX, setX); this.watch(_x,onChange,{test: 123}); // possibility 2 } // possibility 2 private function onChange(prop, oldVal, newVal, userData):Boolean { if (prop==_x) { onX(newVal); return true; } else { return false; } } private function getX(Void):Number { return _x; } private function setX(x:Number):Void { onX(x); // possibility 1 } public function onX(x:Number):Void { } } This way I can set and get _x: var muo:MyUIObject = new MyUIObject(); trace(1: +muo._x) muo._x.onX = function(x) { trace(2: +this._x); trace(3: +x); } muo._x = 100; trace(4: +muo._x) But the onX method is invoked BEFORE _x is actually set, why? Output: 1: undefined 2: undefined 3: 100 4: 100 Is there a better way to have an onX method, which perhaps is invoked immediately after _x was set? Thank you, Matthias ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier
Re: [Flashcoders] onChange or onResize or onX event - howto?
Hello :) you can but a good event model use AsBroadcaster or other system to dispatch the events :) In my personnal AS2 OpenSource framework i use a event model compatible with W3C Dom3 event model for example (like AS3 framework) it's more easy to use a event model to dispatch information in callbacks methods ! If you want dispatch the information in your class... use this.addListener(this) and you can use onX method directly on your instance :) class MyUIObject { /** * Constructor of the class. */ public function MyUIObject() { this.addListener(this) ; } /** * Inject addListener, removeListener and broadcastMessage methods in the prototype of the class. */ static private var __INITBROADCASTER__ = AsBroadcaster.initialize( MyUIObject.prototype ) ; // Public Properties /** * The code of this method is injected by the AsBroadcaster tool. * Use this declaration in the AS2 compilation. */ public var addListener:Function ; /** * The code of this method is injected by the AsBroadcaster tool. * Use this declaration in the AS2 compilation. */ public var broadcastMessage:Function ; /** * This method is empty but can be override by the user in this code to notify the x value modification. */ public var onX:Function ; /** * The code of this method is injected by the AsBroadcaster tool. * Use this declaration in the AS2 compilation. */ public var removeListener:Function ; /** * (read-write) Returns the x position of the ui object. */ public function get x():Number { return getX() ; } /** * (read-write) Sets the x position of the ui object. */ public function set x( value:Number ):Void { setX( value ) ; } // Public Methods /** * Returns the x position of the UI object. */ public function getX():Number { return _x; } /** * Sets the x position of the UI object. */ public function setX( value:Number ):Void { _x = value ; broadcastMessage(onX , this, _x) ; } // Private Properties /** * The internal x position of the UI object. */ private var _x:Number ; } And in your code : var ui:MyUIObject = new MyUIObject(); ui.onX = function ( who , x ) { trace(onX : + who + with the value : + x) ; } ui.addListener(this) ; ui.x = 25 ; EKA+ :) 2006/11/30, Matthias Dittgen [EMAIL PROTECTED]: Hello EKA, thanks for your reply. to your 1: yes, i really don't wanted to use watch. the watch method is less performant, I have read on this list sometime before. That's, why I asked my question. It admit, it has been more than only one question. :-) to your 2: I usually give my constructor the same name as the class. This is a typical mistake, when I use the copypastechange method to write emails. to your 3: is AS2 used get and set keywords to create virtual properties and don't use addProperty method!, I was not aware of the set and get keywords. Is this syntax supported by both Flash IDE and MTASC? Be sure, I'll try that! to your second 3: you can use in your example the Asbroadcaster class But I don't have to. The way you use set x(x:Number), get x():Number, setX(x:Number) and getX():Number, I could just change your public function setX( value:Number ):Void { _x = value ; broadcastMessage(onX , this, _x) ; } into: public function onX():Void {} // can be dynamically overwritten public function setX( value:Number ):Void { _x = value ; onX(); } ,can't I? But again: thanks a lot for introducing the set and get keywords to me. I'll try that now! Thanks, Matthias ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] onChange or onResize or onX event - howto?
hello :) sorry for my english ... i speak french and the english is difficult for me :( if you want try my openSource framework read this page : http://vegas.riaforge.org/ 1 - Download with a SVN client the subversion of the project or download the zip in the project page( SVN is better to use versionning when i change or update the code ) 2 - install in mtasc or flash the AS2/trunk/src classpath to used my libraries 3 - try the AS2 example in AS2/trunk/bin/test To test my event model you can try the example in the AS2/trunk/bin/test/vegas/events directory ... All my framework use the W3C DOM2/3 event model with bubbling event, capturing event, etc... the event model in an application is important ! In the AS2 components of Macromedia the EventDispatcher class is very poor... AsBroadcaster is in AS1 and AS2 the only native class to inject in your class the 3 methods addListener, removeListener and broadcastMessage... documented since Flash8 but ready in Flash6/7/8... AsBroadcaster is the good solution to begin to used a event model in your code... (example of tutorials about this class : http://www.actionscript.org/resources/articles/116/1/ASBroadcaster/Page1.html ) EKA+ :) 2006/11/30, Matthias Dittgen [EMAIL PROTECTED]: Hello eka, perhaps I can cotton up with (btw. is this good english?) AsBroadcaster, since it is availablefrom flash version 6 and above. :-) But I can't find documentations about the set/get syntax you used. But it works just perfect. And I guess this set and get keywords are available within all classes, and thus in classes extending MovieClip, too, right? That is an advantage to addProperty, which is only available to Object. You write In my personnal AS2 OpenSource framework.. I guess, we all have our own personnal AS2 OpenSource framework at home. :-) Currently I try to implement layout mechanisms other than absolute coordinates. This is, why I want this onX events and such things. Thanks, Matthias 2006/11/30, eka [EMAIL PROTECTED]: ooops... ui.addListener(this) ; is no necessary now in your test in my last message;) the 2006/11/30, eka [EMAIL PROTECTED]: Hello :) you can but a good event model use AsBroadcaster or other system to dispatch the events :) In my personnal AS2 OpenSource framework i use a event model compatible with W3C Dom3 event model for example (like AS3 framework) it's more easy to use a event model to dispatch information in callbacks methods ! If you want dispatch the information in your class... use this.addListener(this) and you can use onX method directly on your instance :) class MyUIObject { /** * Constructor of the class. */ public function MyUIObject() { this.addListener(this) ; } /** * Inject addListener, removeListener and broadcastMessage methods in the prototype of the class. */ static private var __INITBROADCASTER__ = AsBroadcaster.initialize( MyUIObject.prototype ) ; // Public Properties /** * The code of this method is injected by the AsBroadcaster tool. * Use this declaration in the AS2 compilation. */ public var addListener:Function ; /** * The code of this method is injected by the AsBroadcaster tool. * Use this declaration in the AS2 compilation. */ public var broadcastMessage:Function ; /** * This method is empty but can be override by the user in this code to notify the x value modification. */ public var onX:Function ; /** * The code of this method is injected by the AsBroadcaster tool. * Use this declaration in the AS2 compilation. */ public var removeListener:Function ; /** * (read-write) Returns the x position of the ui object. */ public function get x():Number { return getX() ; } /** * (read-write) Sets the x position of the ui object. */ public function set x( value:Number ):Void { setX( value ) ; } // Public Methods /** * Returns the x position of the UI object. */ public function getX():Number { return _x; } /** * Sets the x position of the UI object. */ public function setX( value:Number ):Void { _x = value ; broadcastMessage(onX , this, _x) ; } // Private Properties /** * The internal x position of the UI object. */ private var _x:Number ; } And in your code : var ui:MyUIObject = new MyUIObject(); ui.onX = function ( who , x ) { trace(onX : + who + with the value : + x) ; } ui.addListener(this) ; ui.x = 25 ; EKA+ :) 2006/11/30, Matthias Dittgen [EMAIL PROTECTED]: Hello EKA, thanks for your reply. to your 1: yes, i really don't wanted
Re: Re[2]: [Flashcoders] onChange or onResize or onX event - howto?
Hello :) EventDispatcher isn't native in the AS1/AS2 framework, AsBroadcaster is a speed solution to implement an event model in your code. The EventDispatcher in AS3 is compatible with the W3C DOM3 event model with a custom implementation of all listeners... For me in AS2 you can 1 - use AsBroadcaster (speed) 2 - use GDispatcher class and not AS2 EventDispatcher: http://www.gskinner.com/blog/archives/27.html 3 - use my event model in VEGAS :) (compte event model) EKA+ :) 2006/11/30, Rákos Attila [EMAIL PROTECTED]: MD perhaps I can cotton up with (btw. is this good english?) MD AsBroadcaster, since it is availablefrom flash version 6 and above. AsBroadcaster is quite obsolete, why don't use the event dispatching mechanism introduced in MX 2004 (mx.events.EventDispatcher)? It handles separate callbacks (see also mx.utils.Delegate for avoiding scope issues) as well as listener objects. MD But I can't find documentations about the set/get syntax you used. E.g. see the AS language elements or this one: http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1322.html Attila ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: Re[4]: [Flashcoders] onChange or onResize or onX event - howto?
Hello :) To test mx.events.EventDispatcher, GDispatcher, Vegas... the best solution is to test all model :) In big project with FrontController, MVC etc.. my framework is very interesting... if you want just create a little communication between 2 objects AsBroadcaster is very good :) In Vegas you can try my EDispatcher.ashttp://svn.riaforge.org/vegas/AS2/trunk/src/vegas/events/EDispatcher.as(an old adaptation of the mx.events.EventDispatcher class ;)) ..You can use my native EDispatcher implementation with the package vegas.events.type : http://svn.riaforge.org/vegas/AS2/trunk/src/vegas/events/type/ Example : import vegas.events.type.BasicDispatcher ; /** * This class extends Object and contains addEventListener, removeEventListener, dispatchEvent etc. methods implemented in the interface IDispatcher */ class MyClass extends BasicDispatcher { function MyClass() { } public function getX():Number { return _x ; } public function setX( value:Number ):Void { _x = value ; var event = { type : onX , target:this, x:_x } ; dispatchEvent(event) ; } private var _x:Number ; } you can try too my class FastDispatcher with a AsBroadcaster implementation with typed events : http://svn.riaforge.org/vegas/AS2/trunk/src/vegas/events/FastDispatcher.as import vegas.events.Event ; import vegas.events.FastDispatcher ; function onTest( ev:Event ):Void { trace () ; trace (type : + ev.getType()) ; trace (target : + ev.getTarget()) ; trace (context : + ev.getContext()) ; trace (this : + this) ; } var oFD:FastDispatcher = new FastDispatcher() ; trace (addListener this : + oFD.addListener(this)) ; trace (hasListeners : + oFD.hasListeners()) ; trace (size : + oFD.size()) ; oFD.dispatch( { type : onTest, target : this } ) ; oFD.removeAllListeners() ; oFD.dispatch( { type : onTest, target : this } ) ; ... my framework implement 3 event models.. but the vegas.events.EventDispatcher is more complete... with EventListener, Event, EventTarget interface etc.. EKA+ :) 2006/11/30, Matthias Dittgen [EMAIL PROTECTED]: You guys are right, I have mixed two questions into one: 1: properties in AS1/AS2 2: watching properties, EventModel Hello Rákos, thank you for the link to the documentation of the set/get keywords. On that page, you can read: NOTE Implicit getter and setter methods are syntactic shorthand for the Object.addProperty() method found in ActionScript 1.0. So I was on the right track and it was only a syntactical AS1-to-AS2 question. ;-) You say: AsBroadcaster is quite obsolete, why don't use the event dispatching mechanism introduced in MX 2004 (mx.events.EventDispatcher)? I agree with eka on that, saying: EventDispatcher isn't native in the AS1/AS2, the mx classes are just AS Code from MM, and thus is not intrinsic to the FlashPlayer in a way. AsBroadcaster is intrinsic. And I have to take a closer look on EventDispatcher, because I currently don't understand, how it can detect changes made to a property. But I'll check the other event modell classes, too. So thank you for your very good input into this direcion. Hello EKA, you live in france? Europeans seem to be a strong part of the flashcoder community. :-) I am in germany. Are there any documented comparisons between AsBroadcaster, mx.events.EventDispatcher, GDispatcher and VEGAS, yet? Thanks, Matthias ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: Re[4]: [Flashcoders] onChange or onResize or onX event - howto?
Hello :) the _ notation is used to do the difference between private and public ... if you create a virtual property with get/set used in private the _ notation : class Test { function Test() { } /** * Internal private value. */ private var _value:Number ; public function get value():Number { return _value ; } public function set value( n:Number ):Void { _value = n ; // do something here , notify an event, update the class etc... else don't use a getter/setter property if you want just used the value of this property. } } And in your code : var t:Test = new Test() ; t.value = 2 ; trace(t) ; EKA+ :) 2006/12/1, Matthias Dittgen [EMAIL PROTECTED]: The set/get (former addProperty) methodology seemed to offer the solution, but now I see, that I can implicit (not writing uio.setSomething, but uio._something) set a value, but _something is private and thus code completion etc. will not work. Matthias ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Attach sub class to swf which is loaded via attachMovie()?
Hello :) a delete in a function failed to destroy a variable ;) My french article about this subject : http://www.ekameleon.net/blog/index.php?2006/06/10/34--as-ssas-delete-un-peu-capricieux Used google translator or bablefish if you want read my article in english (sorry .. i speak english very bad...) delete method returns false if the variable isn't clear on memory (protected with a ASSetPropFlags or if the variable is undefined too) function test() { var a = 1 ; trace( a : + a) ; // a : 1 trace(i remove the variable 'a' : + delete(a)) ; // output false trace( a : + a) ; // a : 1 // the value isn't deleted ! } trace(++ delete sur une variable dans une fonction) ; test() ; .. you can read some good articles about Garbage collector (in FP8 and FP9 the garbage is better...) - http://www.tekool.net/flash/benchmark/garbage_collector/ (french) - http://weblog.shaoken.be/index.php?2005/09/23/17-gestion-du-garbage-collector-sous-flash8(french) - http://www.blog.lessrain.com/?p=237 (benchmark) - http://www.kaourantin.net/2005/09/garbage-collection-in-flash-player-8.html(english) - http://www.adobe.com/devnet/flashplayer/articles/fp8_performance.html(english) - http://www.informit.com/guides/content.asp?g=flashseqNum=344rl=1(english) - http://www.gskinner.com/blog/archives/2006/09/garbage_collect.html (search the key work Garbage collector in this blog) EKA+ :) 2006/12/1, Yehia Shouman [EMAIL PROTECTED]: You're welcome Micky EKA, I've been really confused by the garbage collection and how it sometimes sits their coldly not doing the job ! I read somewhere the garbage collection won't fire unless the application is in a still state. In an application, that I had some interval process happening, the garbage collection never worked and the memory usage kept going up. I've watched a presentation by G Skinner, read some articles, but never found a way to fire that garbage collector other than minimizing the application (and that works in IE, it doesnt with firefox). So its an act of anxiety ! Can you point us to links where the garbage collection work ?, Perhaps with a new message Thanks for your comment, Yehia On 12/1/06, eka [EMAIL PROTECTED] wrote: Hello :) the __proto__ solution is a good solution : /** * Constructor of the class */ function Square() { this.draw() ; } /** * Square extends MovieClip */ Square.prototype.__proto__ = MovieClip.prototype ; /** * Draw the square shape. */ Square.prototype.draw = function() { this.beginFill(0xFF, 100) ; this.lineTo(100,0) ; this.lineTo(100,100) ; this.lineTo(0,0) ; this.lineTo(0,0) ; this.endFill() ; } /** * Sets the color of the movieclip. */ Square.prototype.setRGB = function ( color:Number ) { (new Color(this)).setRGB(color) ; } // test attachMovie var mc1:MovieClip = attachMovie(myID, myClip, 1) ; mc1.__proto__ = Square.prototype ; // change the prototype reference Square.call(mc2) ; // launch the constructor of the Square class mc1.setRGB(0xFF) ; // ok // test with createEmptyMovieClip var mc2:MovieClip = createEmptyMovieClip(myClip2, 2) ; mc2.__proto__ = Square.prototype ; // change the prototype reference Square.call(mc2) ; // launch the constructor of the Square class mc2.setRGB(0xFF) ; // ok @Yehia Shouman : your delete in your changeColorTo method is useless because all local variables with a var in a method is remove by the Garbage collector at the end of the call function. EKA+ :) 2006/12/1, Yehia Shouman [EMAIL PROTECTED]: function Square(){} Square.prototype=new MovieClip(); Square.prototype.changeColorTo=function (clr:Number) { var tempClr:Color=new Color(this); tempClr.setRGB(clr); delete tempClr; } var linkageID_str:String=exportedClip; //associate the linked clip with sub class Object.registerClass(linkageID_str,Square); //attach var mc:MovieClip= attachMovie(linkageID_str,mc,1); //then prohibit further association of linked clip to class Object.registerClass(linkageID_str,null); //when you call the method it should work mc.changeColorTo(0xFF); Same idea if you're working with Actionscript 2.0 Y Shouman On 12/1/06, Micky Hulse [EMAIL PROTECTED] wrote: Just curious if it is possible to extend/apply a sub class to a swf which is loaded via attachMovie()? TIA, Cheers, M -- Wishlist: http://snipurl.com/vrs9 Switch: http://browsehappy.com/ BCC?: http://snipurl.com/w6f8 My: http://del.icio.us/mhulse ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] [AS 3.0] Instantiating a Class from child SWF
Hello :) read this article in french : http://iteratif.free.fr/blog/index.php?2006/09/14/52-bibliotheque-partagee-sous-flash-9-et-flex-2 i think this article can help you :) EKA+ :) 2006/12/2, James Marsden [EMAIL PROTECTED]: Hey all, I have a problem instantiating a class that's defined in a child swf... It's not recognising the class definitions. eg: a child swf has an MC in the library with a dynamically generated class definition called 'Death_Tile_16x64' then in the parent I'm trying to create that by doing: var mc = new Death_Tile_16x64(); this is the error I'm getting: ReferenceError: Error #1065: Variable Death_Tile_16x64 is not defined. It doesn't work with getDefinitionByName either :( Any ideas peeps? Thanks, James ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Flashpaper for customized documents
Hello :) yes you can do it .. use BitmapData class in you movieClip and used my FlashPaperLoader class in VEGAS : http://vegas.riaforge.org/ 1 - download the last version of VEGAS (or use SVN client) 2 - install the classpath of Vegas AS2 in your Flash8 or in MTASC, use AS2/trunk/src directory for your classpath. 3 - test the examples in AS2/trunk/bin/test/asgard/loader/FlashPaperLoader.fla :) Read the documentation of the class to see all methods in this loader (you can hide the logo etc...) EKA+ :) 2006/12/5, redknot [EMAIL PROTECTED]: Hi all: I have not used Flashpaper yet. I have a potential project that would involve making a resource that would allow users to customize printable documents (forms). There are hundreds of these forms so they can't be laid out directly in Flash (too time prohibitive). Customization could be limited to header, footer and a logo. Here is the workflow I need to develop: 1) Original documents are in Word 2) convert to Flashpaper 3) import flashpaper swf into Flash 4) create an interface in Flash that allows user to add a logo, and edit header and footer content 5) Print customized document from Flash with flashpaper, logo and custom header/footer Is this feasible? For instance could I just lay movieclips with a logo, and header and footer on top of the multipage Flashpaper for it to print? or does printing from flashpaper work differently from what I could accomplish using the Printjob class? Another question. Obviously I can load a jpeg for the logo, if the above is feasible. Is there a way the user can browse to find their logo.jpg file on their hard drive to load it? Thanks for any help... I need to figure this out today, of course. Lorraine -- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem with function access into class
Hello :) Your code is cut ??? where is the declaration of the xml etc ? You can try to use mx.utils.Delegate to create a proxy between the onLoad event of the reference and a method in your class with the scope of the current instance : import mx.utils.Delegate ; class Loader { /** * Creates a new Loader. */ function Loader() { super() ; lv = new LoadVars() ; x = new XML() ; x.onLoad = Delegate.create(this, _test) ; } /** * The LoadVars reference of this loader. */ public var lv:LoadVars ; /** * The XML reference of this loader. */ public var x:XML ; /** * Trigger the loader. */ public function trigger( url ):Void { lv.sendAndLoad( url , x ) ; } /** * Returns the string representation of the object. */ public function toString():String { return [Loader] ; } /** * Internal method to test the result */ private function _test( success:Boolean ) { trace( + this + test : + success); trace( + this + xml : + x ) ; // continue your test here ! } } EKA+ :) 2006/12/6, Fratiman Vladut [EMAIL PROTECTED]: Hi! I have this class: class LoadVars2 extends LoadVars { function LoadVars2() { super(); } function populate(){ ... my_xml.onLoad = function(){ //code for test } } private function test(){ trace(ok); } } If i try to access test function before my_xml.onLoad, all works, but when i try to access into onLoad function body (after code for test comment), fail. How i can resolve that ? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] undocumented || usage
Hello :) if you test this code you can understant easily this feature : 1 - first example var a = toto ; var b = (a != undefined) ; if ( b ) { trace(a exist : + a) ; } 2 - second exemple var a = toto ; if ( a ) { trace(a exist : + a) ; } You can show the variable a in a conditional expression corresponding with the true value... if the variable is undefined in a conditional expression the variable is false ! 3 - New example : function test1 ( message ) { if (message == undefined) { message = empty ; } return message ; } trace( test1() ) ; function test2 ( message:String ) { if ( !message ) { message = empty ; } return message ; } trace( test2() ) ; function test3 ( message:String ) { message = (message || empty) ; // if message != undefined ... message is true the || return message else.. || return empty return message ; } trace( test3() ) ; function test4 (message:String ) { return (message) ? message : empty ; // if message exist and is true... return message else return empty } trace( test4() ) ; ... in a conditional expression, an object used true or false value and not the primitive value ;) if you use == or or or != the variable primitive value is used... EKA+ :) 2006/12/22, Steven Sacks | BLITZ [EMAIL PROTECTED]: Saw this recently in code and was surprised that it worked but it's pretty cool. a = foo; b = bar; c = a || b; trace(c); -- foo a = 0; // or a = ; // or a = false; // or a = null; // or a is undefined b = bar; c = a || b; trace(c); -- bar It will return b if a is an empty string, false, null, 0 or undefined. Interesting shortcut. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] A little AS3 AMFPHP 1.9 HowTo
Hello :) You can try to use my OpenSource AS2/AS3/SSAS Framework who contains a remoting package : - http://vegas.riaforge.org/ 1 - install the sources in your system with subversion or the zip file in RIAForge 2 - use Vegas in your flex AS3 or MXML project 3 - use the package asgard.net.remoting : Example : 1 - class test.User package test { import flash.net.registerClassAlias ; public class User { // o Constructor public function User(name:String=, age:uint=0, url:String=) { trace( User constructor : + this ) ; this.name = name ; this.age = age ; this.url = url ; } // -o Public Properties public var age:uint ; public var name:String ; public var url:String ; // o Public Methods static public function register():void { registerClassAlias(test.User, User) ; } public function toString():String { return [User name: + name + , age: + this.age + , url: + this.url + ] ; } } } 2 - main class to test the AMFPHP services : package { import asgard.events.ActionEvent ; import asgard.events.RemotingEvent ; import asgard.net.remoting.RemotingService; import asgard.net.remoting.RemotingAuthentification; import flash.display.Sprite ; import test.User ; public class TestAsgardRemoting extends Sprite { // o Constructor public function TestAsgardRemoting() { // o Register your shared Class. User.register() ; // o Create Service var service:RemotingService = new RemotingService() ; service.addEventListener(RemotingEvent.ERROR, onError) ; service.addEventListener(RemotingEvent.FAULT, onFault) ; service.addEventListener(ActionEvent.FINISH, onFinish) ; service.addEventListener(RemotingEvent.RESULT, onResult) ; service.addEventListener(ActionEvent.START, onStart) ; service.addEventListener(RemotingEvent.TIMEOUT, onTimeOut) ; service.gatewayUrl = http://localhost/work/vegas/php/gateway.php; ; service.serviceName = Test ; service.methodName = getUser ; service.params = [eka, 29, http://www.ekameleon.net;] ; // o Launch Service service.trigger() ; } // o Public Methods public function onError(e:RemotingEvent):void { trace( + e.type + : + e.code) ; } public function onFinish(e:ActionEvent):void { trace( + e.type) ; } public function onFault(e:RemotingEvent):void { trace( + e.type + : + e.getCode() + :: + e.getDescription()) ; } public function onProgress(e:ActionEvent):void { trace( + e.type ) ; } public function onResult( e:RemotingEvent ):void { trace(---) ; trace( result : + e.result) ; trace(---) ; } public function onStart(e:ActionEvent):void { trace( + e.type ) ; } public function onTimeOut(e:RemotingEvent):void { trace( + e.type ) ; } } } in the PHP services you can use class mapping : 1 - The User php class in services/test directory : /** * @author ekameleon */ class test.User { // o Constructor public
Re: [Flashcoders] problem with combobox within another clip
Hello :) in flash8 with FP8 compilation you can use the property _lockroot of the MovieClips. You wait the loading of your movie and you apply in the holder movie the value true on the _lockroot property. Example : var loader:MovieClipLoader = new MovieClipLoader() ; loader.addListener(this) ; // register the _root with the event model of the instance /** * Invoqued when the swf or picture is loading */ var onLoadInit:Function = function( target:MovieClip ):Void { target._lockroot = true ; // modify the _lockroot property of the container. } var mc:MovieClip = createEmptyMovieClip(holder_mc, 1) ; loader.loadClip(movie.swf, mc) ; PS : MovieClipLoader is better with this event model... EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: Hi to all Can anybody help me with this problem? I have combobox in swf file. This loading works well _root.loadMovie(movie.swf); but with this _root.holder.loadMovie(movie.swf); combobox does not work I need to load this swf in holder clip and don't know how to solve the problem. Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem with combobox within another clip
Hello :) the panel of the combobox is an movieclip hide in the _root by macromedia in this component framework... you can't hide with a mask this panel beaucause the panel isn't in the same referencial :) If you want change this state... you must develop your component with actionscript and localize the panel of the combobox in the good referencial. Or you can try to read and modify the Macromedia class in the classes/mx packages in the install folder of flash. EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: THANK YOU. Maybe you can give me one more advice. When holder clip is under mask I don't see my list. I understand that I should embed font somehow to combobox but could not find how. Is it possible that combobox works under mask? 2006/12/23, eka [EMAIL PROTECTED]: Hello :) in flash8 with FP8 compilation you can use the property _lockroot of the MovieClips. You wait the loading of your movie and you apply in the holder movie the value true on the _lockroot property. Example : var loader:MovieClipLoader = new MovieClipLoader() ; loader.addListener(this) ; // register the _root with the event model of the instance /** * Invoqued when the swf or picture is loading */ var onLoadInit:Function = function( target:MovieClip ):Void { target._lockroot = true ; // modify the _lockroot property of the container. } var mc:MovieClip = createEmptyMovieClip(holder_mc, 1) ; loader.loadClip(movie.swf, mc) ; PS : MovieClipLoader is better with this event model... EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: Hi to all Can anybody help me with this problem? I have combobox in swf file. This loading works well _root.loadMovie(movie.swf); but with this _root.holder.loadMovie(movie.swf); combobox does not work I need to load this swf in holder clip and don't know how to solve the problem. Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem with combobox within another clip
Hello :) 1 - use a movieclip to create your mask and the method MovieClip.setMask() (not a layer) 2 - if the first solution don't work. embed the fonts in the library and use the style of the component to embed the fonts and change the default font. EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: No my clip holder is under mask. Combobox works but don't show text in opend list. 2006/12/23, eka [EMAIL PROTECTED]: Hello :) the panel of the combobox is an movieclip hide in the _root by macromedia in this component framework... you can't hide with a mask this panel beaucause the panel isn't in the same referencial :) If you want change this state... you must develop your component with actionscript and localize the panel of the combobox in the good referencial. Or you can try to read and modify the Macromedia class in the classes/mx packages in the install folder of flash. EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: THANK YOU. Maybe you can give me one more advice. When holder clip is under mask I don't see my list. I understand that I should embed font somehow to combobox but could not find how. Is it possible that combobox works under mask? 2006/12/23, eka [EMAIL PROTECTED]: Hello :) in flash8 with FP8 compilation you can use the property _lockroot of the MovieClips. You wait the loading of your movie and you apply in the holder movie the value true on the _lockroot property. Example : var loader:MovieClipLoader = new MovieClipLoader() ; loader.addListener(this) ; // register the _root with the event model of the instance /** * Invoqued when the swf or picture is loading */ var onLoadInit:Function = function( target:MovieClip ):Void { target._lockroot = true ; // modify the _lockroot property of the container. } var mc:MovieClip = createEmptyMovieClip(holder_mc, 1) ; loader.loadClip(movie.swf, mc) ; PS : MovieClipLoader is better with this event model... EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: Hi to all Can anybody help me with this problem? I have combobox in swf file. This loading works well _root.loadMovie(movie.swf); but with this _root.holder.loadMovie(movie.swf); combobox does not work I need to load this swf in holder clip and don't know how to solve the problem. Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem with combobox within another clip
Hello :) dont forget the property embedFonts : myComboBox.setStyleProperty(embedFonts, true); myComboBox.setStyleProperty(textFont, fontID); myComboBox.setStyleProperty(textSize, 10); with fontID the link of your font in the library of flash (right button on the symbol to attach the font in the first frame of the animation) EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: Nothing helps. I embed Arial in to the library with name my_font (I did that in movie.swf) then in that movie I write myComboBox.setStyle(fontFamily, my_font); myComboBox.setStyle(fontSize, 12); or _global.style.setStyle(fontFamily, my_font); _global.style.setStyle(fontSize, 12); There is nothing see in the combobox in my main movie where I load movie.swfin clip holder . Holder clip is under mask. I even embed Arial to the library in my main movie with the same name. Nothing 2006/12/23, eka [EMAIL PROTECTED]: Hello :) 1 - use a movieclip to create your mask and the method MovieClip.setMask () (not a layer) 2 - if the first solution don't work. embed the fonts in the library and use the style of the component to embed the fonts and change the default font. EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: No my clip holder is under mask. Combobox works but don't show text in opend list. 2006/12/23, eka [EMAIL PROTECTED]: Hello :) the panel of the combobox is an movieclip hide in the _root by macromedia in this component framework... you can't hide with a mask this panel beaucause the panel isn't in the same referencial :) If you want change this state... you must develop your component with actionscript and localize the panel of the combobox in the good referencial. Or you can try to read and modify the Macromedia class in the classes/mx packages in the install folder of flash. EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: THANK YOU. Maybe you can give me one more advice. When holder clip is under mask I don't see my list. I understand that I should embed font somehow to combobox but could not find how. Is it possible that combobox works under mask? 2006/12/23, eka [EMAIL PROTECTED]: Hello :) in flash8 with FP8 compilation you can use the property _lockroot of the MovieClips. You wait the loading of your movie and you apply in the holder movie the value true on the _lockroot property. Example : var loader:MovieClipLoader = new MovieClipLoader() ; loader.addListener(this) ; // register the _root with the event model of the instance /** * Invoqued when the swf or picture is loading */ var onLoadInit:Function = function( target:MovieClip ):Void { target._lockroot = true ; // modify the _lockroot property of the container. } var mc:MovieClip = createEmptyMovieClip(holder_mc, 1) ; loader.loadClip(movie.swf, mc) ; PS : MovieClipLoader is better with this event model... EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: Hi to all Can anybody help me with this problem? I have combobox in swf file. This loading works well _root.loadMovie(movie.swf); but with this _root.holder.loadMovie(movie.swf); combobox does not work I need to load this swf in holder clip and don't know how to solve the problem. Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf
Re: [Flashcoders] problem with combobox within another clip
Hello :) All the response are in the documentation ;) Good continuation ;) EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: !!! my problem that I did not use myComboBox.setStyle(embedFonts, true); THANK YOU!!! 2006/12/23, eka [EMAIL PROTECTED]: Hello :) dont forget the property embedFonts : myComboBox.setStyleProperty(embedFonts, true); myComboBox.setStyleProperty(textFont, fontID); myComboBox.setStyleProperty(textSize, 10); with fontID the link of your font in the library of flash (right button on the symbol to attach the font in the first frame of the animation) EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: Nothing helps. I embed Arial in to the library with name my_font (I did that in movie.swf) then in that movie I write myComboBox.setStyle(fontFamily, my_font); myComboBox.setStyle(fontSize, 12); or _global.style.setStyle(fontFamily, my_font); _global.style.setStyle(fontSize, 12); There is nothing see in the combobox in my main movie where I load movie.swfin clip holder . Holder clip is under mask. I even embed Arial to the library in my main movie with the same name. Nothing 2006/12/23, eka [EMAIL PROTECTED]: Hello :) 1 - use a movieclip to create your mask and the method MovieClip.setMask () (not a layer) 2 - if the first solution don't work. embed the fonts in the library and use the style of the component to embed the fonts and change the default font. EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: No my clip holder is under mask. Combobox works but don't show text in opend list. 2006/12/23, eka [EMAIL PROTECTED]: Hello :) the panel of the combobox is an movieclip hide in the _root by macromedia in this component framework... you can't hide with a mask this panel beaucause the panel isn't in the same referencial :) If you want change this state... you must develop your component with actionscript and localize the panel of the combobox in the good referencial. Or you can try to read and modify the Macromedia class in the classes/mx packages in the install folder of flash. EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: THANK YOU. Maybe you can give me one more advice. When holder clip is under mask I don't see my list. I understand that I should embed font somehow to combobox but could not find how. Is it possible that combobox works under mask? 2006/12/23, eka [EMAIL PROTECTED]: Hello :) in flash8 with FP8 compilation you can use the property _lockroot of the MovieClips. You wait the loading of your movie and you apply in the holder movie the value true on the _lockroot property. Example : var loader:MovieClipLoader = new MovieClipLoader() ; loader.addListener(this) ; // register the _root with the event model of the instance /** * Invoqued when the swf or picture is loading */ var onLoadInit:Function = function( target:MovieClip ):Void { target._lockroot = true ; // modify the _lockroot property of the container. } var mc:MovieClip = createEmptyMovieClip(holder_mc, 1) ; loader.loadClip(movie.swf, mc) ; PS : MovieClipLoader is better with this event model... EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: Hi to all Can anybody help me with this problem? I have combobox in swf file. This loading works well _root.loadMovie(movie.swf); but with this _root.holder.loadMovie(movie.swf); combobox does not work I need to load this swf in holder clip and don't know how to solve the problem. Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] problem with combobox within another clip
Hello :) Do you use the _lockroot property ? (my first comment explain this property) EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: Hi again Yes of course but sometime I don't know where to find solution. So please help more. My continuation is not good. When combox is loaded in main movie I scroll list and when I move mouse to item trying to choose the item list closes. When I test original swf all work correctly.What can be wrong now? 2006/12/23, eka [EMAIL PROTECTED]: Hello :) All the response are in the documentation ;) Good continuation ;) EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: !!! my problem that I did not use myComboBox.setStyle(embedFonts, true); THANK YOU!!! 2006/12/23, eka [EMAIL PROTECTED]: Hello :) dont forget the property embedFonts : myComboBox.setStyleProperty(embedFonts, true); myComboBox.setStyleProperty(textFont, fontID); myComboBox.setStyleProperty(textSize, 10); with fontID the link of your font in the library of flash (right button on the symbol to attach the font in the first frame of the animation) EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: Nothing helps. I embed Arial in to the library with name my_font (I did that in movie.swf) then in that movie I write myComboBox.setStyle(fontFamily, my_font); myComboBox.setStyle(fontSize, 12); or _global.style.setStyle(fontFamily, my_font); _global.style.setStyle(fontSize, 12); There is nothing see in the combobox in my main movie where I load movie.swfin clip holder . Holder clip is under mask. I even embed Arial to the library in my main movie with the same name. Nothing 2006/12/23, eka [EMAIL PROTECTED]: Hello :) 1 - use a movieclip to create your mask and the method MovieClip.setMask () (not a layer) 2 - if the first solution don't work. embed the fonts in the library and use the style of the component to embed the fonts and change the default font. EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: No my clip holder is under mask. Combobox works but don't show text in opend list. 2006/12/23, eka [EMAIL PROTECTED]: Hello :) the panel of the combobox is an movieclip hide in the _root by macromedia in this component framework... you can't hide with a mask this panel beaucause the panel isn't in the same referencial :) If you want change this state... you must develop your component with actionscript and localize the panel of the combobox in the good referencial. Or you can try to read and modify the Macromedia class in the classes/mx packages in the install folder of flash. EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED]: THANK YOU. Maybe you can give me one more advice. When holder clip is under mask I don't see my list. I understand that I should embed font somehow to combobox but could not find how. Is it possible that combobox works under mask? 2006/12/23, eka [EMAIL PROTECTED]: Hello :) in flash8 with FP8 compilation you can use the property _lockroot of the MovieClips. You wait the loading of your movie and you apply in the holder movie the value true on the _lockroot property. Example : var loader:MovieClipLoader = new MovieClipLoader() ; loader.addListener(this) ; // register the _root with the event model of the instance /** * Invoqued when the swf or picture is loading */ var onLoadInit:Function = function( target:MovieClip ):Void { target._lockroot = true ; // modify the _lockroot property of the container. } var mc:MovieClip = createEmptyMovieClip(holder_mc, 1) ; loader.loadClip(movie.swf, mc) ; PS : MovieClipLoader is better with this event model... EKA+ :) 2006/12/23, natalia Vikhtinskaya [EMAIL PROTECTED] : Hi to all Can anybody help me with this problem? I have combobox in swf file. This loading works well _root.loadMovie(movie.swf); but with this _root.holder.loadMovie(movie.swf); combobox does not work I need to load this swf in holder clip and don't know how to solve the problem. Thank you for help
Re: [Flashcoders] dynamic TextField with AS3
hello :) to attach a Sprite, MovieClip, TextField, , DisplayObject in a DisplayObjectContainer you must use the addChild method : Read the examples in my article about TextField in AS3 (the article is in french but the code is in AS3 ;)) http://www.ekameleon.net/blog/index.php?2006/07/18/38--as3-textfield-les-bases For me the best solution to use a custome TextField is the implementation of a custom class : package { import flash.display.Sprite ; class MainApplication extends Sprite { // o Constructor public function MainApplication () { var tf:MyField = new MyField(10, 10, 120, 20) ; tf.text = Hello World ; addChild ( tf ) ; } } } import flash.text.TextField ; class MyField extends TextField { // o Constructor public function MyField( x:Number=0, y:Number= 0, w:Number=0, h:Number=0) { this.x = x ; this.y = y ; height = h ; width = w ; selectable = false ; textColor = 0xFF ; border = true ; borderColor = 0xFF ; } } EKA+ :) 2006/12/29, John Lawrence [EMAIL PROTECTED]: Hey folks, Im trying to learn how to set a TextField on the stage dynamically with ActionScript 3 something like public function addText(txtname:String, txt:String, X:int, Y:int, format:TextFormat):void { //using array notation for a new variable does NOT WORK var [txtname]:TextField = new TextField(); } cheers! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] create drop caps text ...
Hello :) you can begin to read this article : http://www.quasimondo.com/archives/000526.php This example explain full justified with flash but you can show a drag tool ... EKA+ :) 2007/1/5, kamal Priyashantha [EMAIL PROTECTED]: i want to create dynamic text with drop caps, pls anyone can help me ... Thanks. ex: http://www.yearbooks.biz/images/gal_ID-drop-cap.gif Kamal. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Tutorial on the flash mx.* classes?
Hello :) in flash8 all mx.* classes are documented in the reference of the components in the help of flash (F1) or you can read the online documentation in http://www.gotapi.com/(Macromedia - ActionScript - Component Reference) EKA+ :) 2007/1/6, William Smith [EMAIL PROTECTED]: I know the tween class is documented on actionscript.org, but is there much information on any of the other classes? I've been able to piece together a few of them, but there's a lot in there that seem useful but have no doco. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] String to object
Hello :) in AS3 you must use the DisplayObjectContainer methods to manipulate the childs in a DisplayObject (MovieClip, Sprite, etc...) http://livedocs.macromedia.com/flex/2/langref/flash/display/DisplayObjectContainer.html You can read in the documentation the method getChildByNamehttp://livedocs.macromedia.com/flex/2/langref/flash/display/DisplayObjectContainer.html#getChildByName%28%29 (name:String http://livedocs.macromedia.com/flex/2/langref/String.html): DisplayObjecthttp://livedocs.macromedia.com/flex/2/langref/flash/display/DisplayObject.html You can now get the reference of your display with this method. EKA+ :) 2007/1/9, Bart Albrecht [EMAIL PROTECTED]: Hi, I'm migrating some stuff from AS2 to AS3 In AS2 I can do this: function doSomething(btnName:String) { _root[btnName]visible = false; } doSomething(exit_btn); In AS3 I want to do the same: public function doSomething(btnName:String) { //XXX here I don't know what I should do } I hope someone can help me Bart ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] as 3 help
Hello :) Flash 9 IDE don't exist for the moment.. only a alpha release of Flash8 with optional extension to used Flex2 SDK. You can read the Flex2 sdk documentation to used AS3 in Flash with the AS3 extension or wait the final version of Flash 9 :) http://www.adobe.com/support/documentation/en/flex/ EKA+ :) 2007/1/10, dan [EMAIL PROTECTED]: Does anyone know if macromedia is going to add the help files to the flash 9 IDE? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] help as3
Hello :) read this tutorial : http://wiki.media-box.net/tutoriaux/flash/bibliotheque_flash_9 (in french) EKA+ :) 2007/1/10, dan [EMAIL PROTECTED]: Hi all How do you attach a moveclip from the library in as3 there isn't an attachMovie? 10x ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] flash.geom package backport to player 6
Hello :) you can use VEGAS my openSource Framework and this library PEGAS and this package pegas.geom :) You can use my framework in Flash 7 and Flash8 and you can transform my AS2 class in AS1 class if you want (my framework is openSource ;)) The project page in RIAFOrge : http://vegas.riaforge.org/ The project page in Google code : http://code.google.com/p/vegas/ You must install the class path (AS2/trunk/src) in flash in the ActionScript properties to used my framework... Used Tortoise SVN (on pc) or RapidSVN on mac to dowload the SVN version of VEGAS The example of VEGAS are in the directory AS2/trunk/bin/test The package geom in progress of PEGAS : http://svn.riaforge.org/vegas/AS2/trunk/src/pegas/geom/ The examples of the package geom : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/pegas/geom/ The documentation (in progress) : http://www.ekameleon.net/vegas/docs/ EKA+ :) 2007/1/13, Rákos Attila [EMAIL PROTECTED]: Hi, I'd like to use some scripts written for Flash Player 8 in an application targeted to player 6. The script uses flash.geom package which doesn't exist in player 6 (and 7), but as far as I see it doesn't contain anything that couldn't be implemented in pure AS, so it can be backported to player 6. Does anybody know about an existing backport or do I have to make it myself? Unfortunatelly I found only a Point class ( http://nodename.com/blog/2005/09/26/point-class-slow), but nothing else. Thanks, Attila ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Algo's to change the ordering of arrays
Hello :) the algo to the zsorting can inspire you to find your algo : http://www.tweenpix.net/blog/index.php?q=grid+algo EKA+ :) 2007/1/17, Mike Mountain [EMAIL PROTECTED]: I'm looking for some simple algo's to change the ordering of an array which represents squares in a grid: In the first instance I want to translate from 0 3 6 1 4 7 2 5 8 Existing Array=new Array(0,3,6,1,4,7,2,5,8) To: 0 1 2 7 8 3 6 5 4 (0,1,2,7,8,3,6,5,4) Ideally I'd want a whole bunch of these to produce pretty patterns by changin a particular MC's property in the grid. I'm thinking there must be stuff like this already out there - but I'm not even sure what I should be googling! But I want this to be scaleable for any grid, x by y represented by an array. Anyhow - any help would be greatly appreciated. Ta Mike ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ Tel: 01964 672000 Fax: 01964 671102 Registered in England no. 01646471 The information contained within this email expresses the views of the sender and not necessarily those of the company. It is private and confidential and may be legally privileged. It is intended solely for those authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or action taken in reliance on its contents is strictly prohibited and may be unlawful. If you have received this email in error, please telephone us immediately on 01964 672000 or email a reply to highlight the error and then delete it from your system. This email may contain links to web-sites, the contents of which ECM Systems Ltd have no control over and can accept no responsibility for. Any attachments have been virus-checked before transmission; however, recipients are strongly advised to carry out their own virus checking as ECM Systems Ltd do not warrant that such attachments are virus-free. Please note that this email has been created in the knowledge that Internet email is not a secure communications medium. We advise that you understand and observe this lack of security when emailing us. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q;3D vector based site...how done?
Hello :) i don't know the 3D engine used in this application but 1 - you can try to test the openSource 3D framework Sandy for example : http://www.flashsandy.org/ 2 - You can search in the robertpenner web site (3D example) : http://robertpenner.com/index2.html 3 - You can search in the lab of Andre Mitchelle : http://lab.andre-michelle.com/ All example can explain you how this web site is do. EKA+ :) 2007/1/18, [EMAIL PROTECTED] [EMAIL PROTECTED]: Ok, don't normally go 'oh' when seeing flash sites, but I like the novel way that vector graphics have been used within a 3d environment. This is great stuff...can anyone tell me how? Is there a 3d rendering engine behind everything? http://lab.mathieu-badimon.com/ [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q;3D vector based site...how done?
Hello :) The warped text used the technik of Peter Hall ( http://www.peterjoel.com/blog/) with this tools to creates fx on a movieclip draw api :) EKA+ :) 2007/1/18, eka [EMAIL PROTECTED]: Hello :) i don't know the 3D engine used in this application but 1 - you can try to test the openSource 3D framework Sandy for example : http://www.flashsandy.org/ 2 - You can search in the robertpenner web site (3D example) : http://robertpenner.com/index2.html 3 - You can search in the lab of Andre Mitchelle : http://lab.andre-michelle.com/ All example can explain you how this web site is do. EKA+ :) 2007/1/18, [EMAIL PROTECTED] [EMAIL PROTECTED]: Ok, don't normally go 'oh' when seeing flash sites, but I like the novel way that vector graphics have been used within a 3d environment. This is great stuff...can anyone tell me how? Is there a 3d rendering engine behind everything? http://lab.mathieu-badimon.com/ [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q;3D vector based site...how done?
Hello :) the best ? it's a very good project yes but the best ? ;) For the moment this framework is in a private beta... for me an openSource library must be public between the version 0 and the final version ;) For the moment i have not read the scripts... i prefere wait to speak about this library :) PS : sorry for my english... ;) EKA+ :) 2007/1/18, eka [EMAIL PROTECTED]: Hello :) The warped text used the technik of Peter Hall ( http://www.peterjoel.com/blog/) with this tools to creates fx on a movieclip draw api :) EKA+ :) 2007/1/18, eka [EMAIL PROTECTED]: Hello :) i don't know the 3D engine used in this application but 1 - you can try to test the openSource 3D framework Sandy for example : http://www.flashsandy.org/ 2 - You can search in the robertpenner web site (3D example) : http://robertpenner.com/index2.html 3 - You can search in the lab of Andre Mitchelle : http://lab.andre-michelle.com/ All example can explain you how this web site is do. EKA+ :) 2007/1/18, [EMAIL PROTECTED] [EMAIL PROTECTED]: Ok, don't normally go 'oh' when seeing flash sites, but I like the novel way that vector graphics have been used within a 3d environment. This is great stuff...can anyone tell me how? Is there a 3d rendering engine behind everything? http://lab.mathieu-badimon.com/ [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Override _xscale and _yscale setter in AS2
Hello :) Yes you can :) Try this code (not tested) class Test1 extends MovieClip { /** * Constructor */ function Test1() { } public function get _xscale ():Number { return _xscale_ ; } public function set _yscale( value:Number ):Void { __xscale__ = value ; // your code :) } private var _xscale_ = MovieClip.prototype._xscale ; } I use this technik in LUnAS the extension of VEGAS my framework OpenSource with the enabled property... it's possible it's work with the _xscale property. NB 1 : Vegas project : http://vegas.riaforge.org/ NB 2 : the AbstractComponent class in LunAS with this hack over the enabled property : http://svn.riaforge.org/vegas/AS2/trunk/src/lunas/display/components/AbstractComponent.as EKA+ :) 2007/1/19, Patrick Matte | BLITZ [EMAIL PROTECTED]: In AS2, is it possible to override the _xscale and _yscale setter in a subclass of MovieClip ? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com