Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
Hi guys, I haven't had a chance to delve into using AS3 yet, and I know the AS1 and AS3 runtime engines in the Flash 9 player are totally seperate, but is it not possible for AS2 movies to share data with AS3 at all? Surely an AS3 movie can load an AS2 movie into itself and access it's properties? If so then it should be possible for an AS3 project to use an AS2 movie with remoting components and use movieclips for data storage and communication? It would be poor use of OO coding skills, but technically feasible and much less effort than re-engineering the components. And along those lines, isn't it possible to reverse-engineer the AS2 components with a decompiler, and rewrite the code in AS3? 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
Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
Anything is possible :) You can use flashinterface to communicate with as2 components and then return the events back. That would be possible. It just makes it a lot more cumbersome -- that's all. The flashinterface package is quite sophisticated as it uses localconnection to return and pass data back and forth. It has limitations though. Scott Whittaker wrote: Hi guys, I haven't had a chance to delve into using AS3 yet, and I know the AS1 and AS3 runtime engines in the Flash 9 player are totally seperate, but is it not possible for AS2 movies to share data with AS3 at all? Surely an AS3 movie can load an AS2 movie into itself and access it's properties? If so then it should be possible for an AS3 project to use an AS2 movie with remoting components and use movieclips for data storage and communication? It would be poor use of OO coding skills, but technically feasible and much less effort than re-engineering the components. And along those lines, isn't it possible to reverse-engineer the AS2 components with a decompiler, and rewrite the code in AS3? 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] Weird testing behaviour
Here's a weird one: I created a frame 1 preloader that simply displays load progress onscreen and then issues a nextFrame() command when it's done. When I run it in the IDE, it works fine and runs as expected. If I publish it to a website, it also works as expected. If I Simulate Download in the Flash IDE, it totally ignores the stop() in frame 1, runs the code and proceeds onto frame 2. Test (you should only see a loader then 1 image): http://www.3ddu.org/test/simple_1.swf Source (Test and you should see 1 image, Simulate download and it will bypass frame 1 and start at frame 2): http://www.3ddu.org/test/simple_1.fla I tested this on another Flash 8 IDE here and I also tested it on the Flash 9 Alpha IDE and they do the same thing. anyone seen this before? ___ 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] Exporting a swf to an FLV
I think swf to video converter at http://www.flash-video-mx.com/swf_to_video/ can help you to do that. master 2007-06-07 From: Patrick Lemiuex Sent: 2007-06-06 23:34:41 To: flashcoders@chattyfig.figleaf.com CC: Subject: [Flashcoders] Exporting a swf to an FLV Sorry, this may be a pretty obvious question - how do I export a flash swf to an FLV? Thanks, Patrick ___ 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] examples of scripting the Flash application?
And wich part are you having problems with? regards, Muzak - Original Message - From: Roy Pardi [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Wednesday, June 06, 2007 4:12 PM Subject: Re: [Flashcoders] examples of scripting the Flash application? At 3:23 AM +0200 6/6/07, Muzak wrote: Not sure I completely understand what you're asking, but it sounds like you're looking for JSFL. http://livedocs.adobe.com/flash/8/main/Part7_Extending.html http://livedocs.adobe.com/flash/9.0/main/flash_cs3_extending.pdf thanks- I'd looked those over but they are a little thin on detail. Guess I was too vague about what I want to try to do- basically, within the Flash app: 1. user opens a template movie that contains a Library of movieClips 2. user selects my command from the menu 3. the command opens a file picker dialog box where they can select a previously created XML file 4. my command parses the XML file and instances the appropriate movieClip from the librbary, setting name text props from the XML data 5. my command opens a save as dialog so the file can be saved 6. user can adjust/tweak positions of added MCs and then publish the swf. (just thinking out loud here) --Roy ___ 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 Remoting for Flash CS3 AS3
AMFPHP is an alternative for the 'server side' of Remoting. Flash Remoting = Flash Remoting, it just comes in different flavors: Coldfusion, PHP, Java, .NET. This doesn't change the fact that Remoting ActionScript 3 classes are missing (Flash Remoting Components) which were both available for AS1 and AS2. regards, Muzak - Original Message - From: greg h [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Wednesday, June 06, 2007 5:52 PM Subject: [Flashcoders] Flash Remoting for Flash CS3 AS3 As yet Adobe has not updated Flash Remoting for Flash CS3 AS3. Following are links to 3 sources documenting how to make remoting calls in AS3 using NetConnection.call(...)http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetConnection.html#call%28%29 . NOTE: I have not tested the following sources. If you use any of these, please post back regarding your experience. - AS3 Lightweight Remoting Framework http://osflash.org/as3lrf - AS3 Flash Remoting Example http://www.oscartrelles.com/archives/as3_flash_remoting_example - ActionScript 3.0 Cookbook -- Chapter 21: Web Services and Flash Remoting http://www.oreilly.com/catalog/actscpt3ckbk/toc.html Section 21.4 Calling Flash Remoting Methods Section 21.5 Handling Flash Remoting Responses NOTE: These sections expand on the TOC page link above for viewing first several paragraphs. NOTE #2: The Web Services Sections of this chapter use Flex 2 components, and are not for Flash CS3 AS3 In addition to a recent thread here on FlashCoders where this came up (Flash CS3 Prof copy: missing Tree component), this issue was also discussed by developers on the Adobe forums at this link: Great Alternative To Flash Remoting - AMFPHP http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15catid=250threadid=1245196enterthread=y NOTE: Go to comments starting in thread on April 19. hth, g ___ 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 CS3 Prof copy: missing Tree component.
but is it not possible for AS2 movies to share data with AS3 at all Out of the box, not possible.. You need to use a LocalConnection to have the 2 AVM's communicate with each other, which by itself has limitations. For starters, 40k data limit. regards, Muzak - Original Message - From: Scott Whittaker [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 8:09 AM Subject: Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Hi guys, I haven't had a chance to delve into using AS3 yet, and I know the AS1 and AS3 runtime engines in the Flash 9 player are totally seperate, but is it not possible for AS2 movies to share data with AS3 at all? Surely an AS3 movie can load an AS2 movie into itself and access it's properties? If so then it should be possible for an AS3 project to use an AS2 movie with remoting components and use movieclips for data storage and communication? It would be poor use of OO coding skills, but technically feasible and much less effort than re-engineering the components. And along those lines, isn't it possible to reverse-engineer the AS2 components with a decompiler, and rewrite the code in AS3? 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] Launch flash player / web browser from ANT on Mac OS X
Hi guys, I've sussed a reliable build solution for launching apps from an ANT task. First, declare some variables which hold paths to your app: property name=webBrowser location=/Applications/Firefox.app// property name=flashPlayer location=/Applications/FlashPlayer.app// Then use the OSX open command as the executable, and pass it both the app and the file as arguments: !-- LAUNCH HTML -- target name=launchHTML if=html.exists echo message=Launching ${html}/ exec executable=open dir=. spawn=true arg line=-a ${webBrowser} ${deploy_dir}/${html} / /exec /target !-- LAUNCH FLASH PLAYER -- target name=launchPlayer unless=html.exists echo message=Launching ${out_swf}/ exec executable=open dir=. spawn=true arg line=-a ${flashPlayer} ${deploy_dir}/${out_swf} / /exec /target Of course this means you need to define an app to open the file with instead of relying on open to use the default app, but it works! Now we just need a better version of ASDT... 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
Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component.
IIRC there are a few problems/limitations with using LocalConnection. I had real trouble with getting it to work consistently. It might be worth taking a look at Robert Taylor's FlashInterface (which uses ExternalInterface). http://www.flashextensions.com/products/flashinterface.php Cheers, Ian On 6/7/07, Muzak [EMAIL PROTECTED] wrote: but is it not possible for AS2 movies to share data with AS3 at all Out of the box, not possible.. You need to use a LocalConnection to have the 2 AVM's communicate with each other, which by itself has limitations. For starters, 40k data limit. regards, Muzak - Original Message - From: Scott Whittaker [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 8:09 AM Subject: Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Hi guys, I haven't had a chance to delve into using AS3 yet, and I know the AS1 and AS3 runtime engines in the Flash 9 player are totally seperate, but is it not possible for AS2 movies to share data with AS3 at all? Surely an AS3 movie can load an AS2 movie into itself and access it's properties? If so then it should be possible for an AS3 project to use an AS2 movie with remoting components and use movieclips for data storage and communication? It would be poor use of OO coding skills, but technically feasible and much less effort than re-engineering the components. And along those lines, isn't it possible to reverse-engineer the AS2 components with a decompiler, and rewrite the code in AS3? 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
RE: [Flashcoders] EventDispatcher weirdness in AS2
If you are using this exact code then I believe you have an error in the constructor : public function MyClass should be public function MyMainClass also you should either set your vars as private or whatever kind you need. Another thing, your eventlistener should have an object as second param, not a function so your Class should become : import myClass; import myOtherClass; import mx.events.EventDispatcher; class MyMainClass { private var _myClass:MyClass; private var _myOtherClass:MyOtherClass; public function MyMainClass() { doStuff(); } private function doStuff() { _myClass = new MyClass(); // Refer to the listening object, in this case it's the current Class MyMainClass (this) _myClass.addEventListener(onTransition, this) _myOtherClass = new MyOtherClass(); } // I usually define event handlers as simple function not public nor private - took that approach from ARP :) function onTransition(evtObj:Object) { trace(Hello World, the event fired); trace(_myOtherClass); } } This is not tested but I believe it should yield something As for your MovieClip problem, I feel your pain ... seen it before and can't remember how I fixed it. Is there a stop() at the beginning of that clip ? in another timeline code or class ? This usually brings problems with gotoAndPlay ... Sometimes we forget to remove a stop() at certain places where it is unneeded - OnEnterFrame, setInterval, etc .. HTH Alain -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 6 juin 2007 16:30 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] EventDispatcher weirdness in AS2 Driving me mad. I don't get what could possibly be happening here. Why would _myOtherClass instance no longer exist after the event in an unrelated class fires? Any ideas? import myClass; import myOtherClass; import mx.events.EventDispatcher; class MyMainClass { var _myClass:MyCLass; var _myOtherClass:MyOtherClass; public function MyClass() { doStuff() } private function doStuff() { _myClass = new MyClass(); _myClass.addEventListener(onTransition, onTransitionHandler); _myOtherClass = new MyOtherClass(); trace(_myClass) //traces [object Object] as expected trace(_myOtherClass)//traces [object Object] as expected } private function onTransitionHandler():Void { //Event is heard just fine, the following traces just fine: trace(Hello World, the event fired!) //but this does not: trace(_myOtherClass)//traces undefined !?! } } Also, in other movie clip, a simple gotoAndPlay(theframelabel) does not work. It goes to the right framelabel, but willl NOTplay - even if I force it with a mc.nextframe() and mc.play() it only advances one frame and stops again. There are no other stop() actions in the clip or anywhere else referencing the clip. Makes me wonder if my project is somehow corrupt. ? Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ 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 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.9/834 - Release Date: 2007-06-05 14:38 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06 14:03 ___ 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] EventDispatcher weirdness in AS2
Thanks, yes, I actually posted that I solved it last night - (un-related - that was just a typo for my constructor when I wrote the e-mail - that wasn't the actual problem) - the problem was I wasn't using Delegate in the listener. So what threw me was the listener WAS detecting the event dispatch, but losing scope. I just forgot about using Delegate in this case. Thanks. also you should either set your vars as private or whatever kind you need. I do/did, so confused by that comment, but regardless, it's working. Thanks for the input! Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ 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] EventDispatcher weirdness in AS2
Hehe no prob. For your listener are you doing something like _myClass.addEventListener(onTransition, Delegeate.create(this, onTransitionHandler)); private function onTransitionHandler() { //do stuff } don't you prefer _myClass.addEventListener(onTransition, this); function onTransition() { //do stuff } for better clarity and less code writing ? No need of delegate in this case. Of course it's a question of choice and habit. Just to let you know of the alternatives ! Alain -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 7 juin 2007 09:30 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 Thanks, yes, I actually posted that I solved it last night - (un-related - that was just a typo for my constructor when I wrote the e-mail - that wasn't the actual problem) - the problem was I wasn't using Delegate in the listener. So what threw me was the listener WAS detecting the event dispatch, but losing scope. I just forgot about using Delegate in this case. Thanks. also you should either set your vars as private or whatever kind you need. I do/did, so confused by that comment, but regardless, it's working. Thanks for the input! Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ 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 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06 14:03 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06 14:03 ___ 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] EventDispatcher weirdness in AS2
Ah, I didn't know you could do that. I'll give it a shot, thanks. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alain Rousseau Sent: Thursday, June 07, 2007 10:08 AM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 Hehe no prob. For your listener are you doing something like _myClass.addEventListener(onTransition, Delegeate.create(this, onTransitionHandler)); private function onTransitionHandler() { //do stuff } don't you prefer _myClass.addEventListener(onTransition, this); function onTransition() { //do stuff } for better clarity and less code writing ? No need of delegate in this case. Of course it's a question of choice and habit. Just to let you know of the alternatives ! Alain -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 7 juin 2007 09:30 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 Thanks, yes, I actually posted that I solved it last night - (un-related - that was just a typo for my constructor when I wrote the e-mail - that wasn't the actual problem) - the problem was I wasn't using Delegate in the listener. So what threw me was the listener WAS detecting the event dispatch, but losing scope. I just forgot about using Delegate in this case. Thanks. also you should either set your vars as private or whatever kind you need. I do/did, so confused by that comment, but regardless, it's working. Thanks for the input! Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ 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 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06 14:03 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06 14:03 ___ 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 Loader.content.name error
If you want to call addChild on the content then you can simply do: addChild(event.target.content) and that will throw your content on the stage. I'm not sure why it is not possible to name that new content. I've tried playing around with this myself and can't figure out how once you've loaded the content you can access that content as a class. I've loaded up swfs and can reference classes within the swf no problem and create instances of those classes but if I try to get a class definition for the content all I can get is MovieClip and I can't figure out how to create new instances of the that loaded content without running another loader Not sure if that helps you any or not. Rob On Wed, 06 Jun 2007 22:59:33 -0400, Patrick Matte|BLITZ [EMAIL PROTECTED] wrote: Is there a way a change the name of the Loader content property. I'd like to call addChild() on the content instead of the Loader itself. Like this : loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, loaderInit); var request:URLRequest = new URLRequest(pageSource); loader.load(request); private function loaderInit(event:Event):void{ event.target.removeEventListener(Event.INIT, loaderInit); var page:Page = event.target.content; page.name = test; } That code throws this error but I cant understand why. Error: Error #2078: The name property of a Timeline-placed object cannot be modified. at flash.display::DisplayObject/set name() at com.blitzagency.fabric::Main/::loaderInit() ___ 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] EventDispatcher weirdness in AS2
also you should either set your vars as private or whatever kind you need. I do/did, so confused by that comment, but regardless, it's working. Thanks for the input! Oops I meant in my actual file, sorry. I see now when I typed the post I did not designate them as private, but they are that way in the actual file thanks. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ 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 CS3 Prof copy: missing Tree component.
Ian, thank you for the link on Robert Taylor's FlashInterface. Regarding Scott's intuitive response, the responses by Austin, Muzak and Ian pretty much tell the story. When I used the word stupefying the other day this is what I meant. Just to recap: AS2 to AS3 - At runtime can only integrate through external APIs - Only a small subset of AS2 components got rev'ed up to AS3 - leaving Flash application developers a choice of staying at AS2, building their own AS3 components, programming to lower level APIs in AS3, or integrating Flex into their workflow/architecture. Anyway, since Flex 2 is AS3 only, Flash/Flex developers have been confronted for a full year now with the runtime firewall between AVM1 and AVM2. None has been more eloquent in analyzing this than Jesse Warden. See in particular the following among his posts: Integrating a Flash Interface into Flex 2 http://www.jessewarden.com/archives/2006/12/integrating_a_f.html Here is an excerpt. To make the relevance of Jesse's original Flash/Flex comments apparent to our current AS2/AS3 discussion, in the excerpt I use square brackets to replace Jesse's original references to Flash and Flex with [AS2] and [AS3]. I will include Jesse's original, unedited language at the end. Of course, see Jesse's original post for his full analysis. EXCERPT: Why Integration? ... For security various other engineering reasons, the AVM's cannot talk to each other. This results in a SWF written in [AS2] not being able to talk to a [AS3] SWF. The need for doing such is that the [Flash AS2 components] allows creation of design content that [Flash AS3 components] cannot create on it's own. ... There are a few solutions out there. ... Another is to utilize a small set of classes to communicate via LocalConnection. ... A third one is to utilize ExternalInterface. ... So, why not use one of the above methods. First off, [since the AS2 components are a complete component set (including data components), the AS2 components] is powerful; it's not just a design asset. So, simply being loaded in isn't good enough for some functionality; [AS2] [AS3] need to talk. Secondly, LocalConnection isn't syncronous, and doesn't have good error checking. This makes debugging long and frustrating. Third, Externalnterface uses JavaScript. You've now gone from 2 languages to 3; ActionScript 3, ActionScript 2 (or 1), and JavaScript as well as at least 2 different tools; Flex Builder for ActionScript 3 and JavaScript and Flash 8 btw ... Integrating even Flash AS3 content into Flex 2 apps requires special processes. See the following post by Jesse for details on using the Flex Component Kit for Flash CS3http://labs.adobe.com/wiki/index.php/Flex_Component_Kit_for_Flash_CS3 that is now on labs: Example for Flex Component Kit for Flash CS3 http://www.jessewarden.com/archives/2007/04/example_for_fle.html hth, g [ORIGINAL LANGUAGE] Why Integration? ... For security various other engineering reasons, the AVM's cannot talk to each other. This results in a SWF written in the Flash 8 IDE not being able to talk to a Flex 2 SWF. The need for doing such is that the Flash IDE allows creation of design content that Flex cannot create on it's own. ... There are a few solutions out there. ... Another is to utilize a small set of classes to communicate via LocalConnection. ... A third one is to utilize ExternalInterface. ... So, why not use one of the above methods. First off, Flash is powerful; it's not just a design asset. So, simply being loaded in isn't good enough for some functionality; Flash Flex need to talk. Secondly, LocalConnection isn't syncronous, and doesn't have good error checking. This makes debugging long and frustrating. Third, Externalnterface uses JavaScript. You've now gone from 2 languages to 3; ActionScript 3, ActionScript 2 (or 1), and JavaScript as well as at least 2 different tools; Flex Builder for ActionScript 3 and JavaScript and Flash 8 ___ 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] examples of scripting the Flash application?
At 11:53 AM +0200 6/7/07, Muzak wrote: And wich part are you having problems with? Well, I've been digging around for examples (for instance, of opening a file picker) so I can see JSFL in action along with info on any dead ends or other issues that would indicate that what I want to do isn't possible. Guess I was too vague about what I want to try to do- basically, within the Flash app: 1. user opens a template movie that contains a Library of movieClips 2. user selects my command from the menu 3. the command opens a file picker dialog box where they can select a previously created XML file 4. my command parses the XML file and instances the appropriate movieClip from the librbary, setting name text props from the XML data 5. my command opens a save as dialog so the file can be saved 6. user can adjust/tweak positions of added MCs and then publish the swf. (just thinking out loud here) -- - Studio Site Updated! http://www.roypardi.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: solve[Flashcoders] AS2 Datagrid + invisible row
-- Message transféré De : Laurent CUCHET [EMAIL PROTECTED] Répondre à : flashcoders@chattyfig.figleaf.com Date : Wed, 06 Jun 2007 13:04:07 +0200 À : Flashcoders mailing list flashcoders@chattyfig.figleaf.com Conversation : AS2 Datagrid + invisible row Objet : [Flashcoders] AS2 Datagrid + invisible row Good Morning I have done a listener to fill datagrid. It works but I need to hide or make invisible a row How can do ?? Thank you var myListener1:Object = new Object(); myListener1.dataLoaded = function(success:Boolean, xmldata:XML) { if (success) { trace(xmldata); if (comStatus == loading) { display.removeAllColumns(); display.columnNames = [ONE, TWO, THREE,FOUR];// just cut FOUR : display.columnNames = [ONE, TWO, THREE]; display.getColumnAt(0).width = 120; display.getColumnAt(1).width = 100; display.getColumnAt(2).width = 115; display.getColumnAt(3).width = 0;// it doesnt work how can I do ? var dat:Array = new Array(); for (var i:Number = 0; ixmldata.firstChild.childNodes[3].childNodes.length; i++) { dat.push({ONE:unescape(xmldata.firstChild.childNodes[3].childNodes[i].childN odes[15].childNodes), TWO:unescape(xmldata.firstChild.childNodes[3].childNodes[i].childNodes[3].ch ildNodes), THREE:unescape(xmldata.firstChild.childNodes[3].childNodes[i].childNodes[7]. childNodes), FOUR:unescape(xmldata.firstChild.childNodes[3].childNodes[i].childNodes[5].c hildNodes) }); } display.dataProvider = dat; msg = Data has loaded Successfully; } else if (comStatus == sending) { msg = Data Sent Successfully. You can now reload!; } } }; ___ 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 -- Fin du message transféré ___ 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] examples of scripting the Flash application?
Show a browse for file dialog: var fileURL = fl.browseForFileURL(open, Select file); Suggest you read the docs: http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part7_Extending.html as already mentioned by Muzak On 6/7/07, Roy Pardi [EMAIL PROTECTED] wrote: At 11:53 AM +0200 6/7/07, Muzak wrote: And wich part are you having problems with? Well, I've been digging around for examples (for instance, of opening a file picker) so I can see JSFL in action along with info on any dead ends or other issues that would indicate that what I want to do isn't possible. Guess I was too vague about what I want to try to do- basically, within the Flash app: 1. user opens a template movie that contains a Library of movieClips 2. user selects my command from the menu 3. the command opens a file picker dialog box where they can select a previously created XML file 4. my command parses the XML file and instances the appropriate movieClip from the librbary, setting name text props from the XML data 5. my command opens a save as dialog so the file can be saved 6. user can adjust/tweak positions of added MCs and then publish the swf. (just thinking out loud here) -- - Studio Site Updated! http://www.roypardi.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] examples of scripting the Flash application?
You're not gonna find much JSFL examples out there I'm afraid. Not that many people really use it (extensively). There used to be a jsfl mailing list.. Ah, found it: http://www.flashguru.co.uk/extending-flash-mailing-list/ I used to be on it, but there wasn't much activity and I left a while ago. Might be worth looking into.. In any case, people there will be able to help you out (as it's all about jsfl). The things you mentioned all are possible through jsfl AFAIK. For instance, the following will show a 'browse for file' dialog and then read it and display the contents in the Output panel: var fileURL = fl.browseForFileURL(open, Select file); fl.trace(fileURL); var str = FLfile.read( fileURL); fl.trace(str); Note that file content is returned as a String. regards, Muzak - Original Message - From: Roy Pardi [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 4:42 PM Subject: Re: [Flashcoders] examples of scripting the Flash application? At 11:53 AM +0200 6/7/07, Muzak wrote: And wich part are you having problems with? Well, I've been digging around for examples (for instance, of opening a file picker) so I can see JSFL in action along with info on any dead ends or other issues that would indicate that what I want to do isn't possible. Guess I was too vague about what I want to try to do- basically, within the Flash app: 1. user opens a template movie that contains a Library of movieClips 2. user selects my command from the menu 3. the command opens a file picker dialog box where they can select a previously created XML file 4. my command parses the XML file and instances the appropriate movieClip from the librbary, setting name text props from the XML data 5. my command opens a save as dialog so the file can be saved 6. user can adjust/tweak positions of added MCs and then publish the swf. (just thinking out loud here) ___ 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] List component
Hi guys, I have a list component that I add objects to. I use the labelFunction field to set the label. It works fine, but if I change the object name, the List doesnt update. Is there a way to get the list to update the the labels after object changes? TIA ___ 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] EventDispatcher weirdness in AS2
Even though it's possible to use the class instance as the listener (this), you're still better off using Delegate. What if you have 2 instances dispatching the same event that need to be handled completely different? submit_btn.addEventListener(click, this); aTotallyUnrelated_btn.addEventListener(click, this); The above will work, but they'll both trigger the same event handler and you'll have to resort to if()else() stuff. No big deal if you have 2 buttons.. get's hairy with loads of buttons. Or what about different components (DataGrid, ComboBox, List, etc..) who all dispatch a change event.. _dg.addEventListener(change, this); _cb.addEventListener(change, this); _list.addEventListener(change, this); versus: _dg.addEventListener(change, Delegate.create(this, datagridChangeHandler)); _cb.addEventListener(change, Delegate.create(this, comboChangeHandler)); _list.addEventListener(change, Delegate.create(this, listChangeHandler)); Get in the habit of using Delegate (in AS2) and *always* use it.. no exceptions ;-) regards, Muzak - Original Message - From: Alain Rousseau [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 4:07 PM Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 Hehe no prob. For your listener are you doing something like _myClass.addEventListener(onTransition, Delegeate.create(this, onTransitionHandler)); private function onTransitionHandler() { //do stuff } don't you prefer _myClass.addEventListener(onTransition, this); function onTransition() { //do stuff } for better clarity and less code writing ? No need of delegate in this case. Of course it's a question of choice and habit. Just to let you know of the alternatives ! Alain ___ 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] List component
Try using a listener to listen to change of the list so when the list changes it gets updated. code var listenerObject:Object = new Object(); listenerObject.change = function(eventObject:Object) { // Your code here. }; listInstance.addEventListener(change, listenerObject); /code That's taken from the Help files. -Gerry Hi guys, I have a list component that I add objects to. I use the labelFunction field to set the label. It works fine, but if I change the object name, the List doesnt update. Is there a way to get the list to update the the labels after object changes? TIA ___ 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] examples of scripting the Flash application?
Hey, sorry, haven't been paying attention to flashcoders much as things have been busy the past couple days.so I'm picking this thread up at the end, and don't really know what's going on. But I'm hearing you want JSFL examples, and specifically external XML file to animation. Among a few examples on my webpage, I have a Director executable which contains a ball which you drag around. It creates a text file, which then when you run the JSFL script it will prompt you to open the text file containing your animation and then writes the motion to the timeline. If this is what you're after feel free to look! http://www.yellow5labs.com/demos/ ben Muzak wrote: You're not gonna find much JSFL examples out there I'm afraid. Not that many people really use it (extensively). There used to be a jsfl mailing list.. Ah, found it: http://www.flashguru.co.uk/extending-flash-mailing-list/ I used to be on it, but there wasn't much activity and I left a while ago. Might be worth looking into.. In any case, people there will be able to help you out (as it's all about jsfl). The things you mentioned all are possible through jsfl AFAIK. For instance, the following will show a 'browse for file' dialog and then read it and display the contents in the Output panel: var fileURL = fl.browseForFileURL(open, Select file); fl.trace(fileURL); var str = FLfile.read( fileURL); fl.trace(str); Note that file content is returned as a String. regards, Muzak - Original Message - From: Roy Pardi [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 4:42 PM Subject: Re: [Flashcoders] examples of scripting the Flash application? At 11:53 AM +0200 6/7/07, Muzak wrote: And wich part are you having problems with? Well, I've been digging around for examples (for instance, of opening a file picker) so I can see JSFL in action along with info on any dead ends or other issues that would indicate that what I want to do isn't possible. Guess I was too vague about what I want to try to do- basically, within the Flash app: 1. user opens a template movie that contains a Library of movieClips 2. user selects my command from the menu 3. the command opens a file picker dialog box where they can select a previously created XML file 4. my command parses the XML file and instances the appropriate movieClip from the librbary, setting name text props from the XML data 5. my command opens a save as dialog so the file can be saved 6. user can adjust/tweak positions of added MCs and then publish the swf. (just thinking out loud here) ___ 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] EventDispatcher weirdness in AS2
// I usually define event handlers as simple function not public nor private - took that approach from ARP :) there's no such thing as 'simple function'. Properties and methods are public by default. function onTransition(evtObj:Object) { } is that same as public function onTransition(evtObj:Object) { } And in most cases event handlers should be private, as they should be accessible by the class instance only. regards, Muzak - Original Message - From: Alain Rousseau [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 3:20 PM Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 If you are using this exact code then I believe you have an error in the constructor : public function MyClass should be public function MyMainClass also you should either set your vars as private or whatever kind you need. Another thing, your eventlistener should have an object as second param, not a function so your Class should become : import myClass; import myOtherClass; import mx.events.EventDispatcher; class MyMainClass { private var _myClass:MyClass; private var _myOtherClass:MyOtherClass; public function MyMainClass() { doStuff(); } private function doStuff() { _myClass = new MyClass(); // Refer to the listening object, in this case it's the current Class MyMainClass (this) _myClass.addEventListener(onTransition, this) _myOtherClass = new MyOtherClass(); } // I usually define event handlers as simple function not public nor private - took that approach from ARP :) function onTransition(evtObj:Object) { trace(Hello World, the event fired); trace(_myOtherClass); } } This is not tested but I believe it should yield something As for your MovieClip problem, I feel your pain ... seen it before and can't remember how I fixed it. Is there a stop() at the beginning of that clip ? in another timeline code or class ? This usually brings problems with gotoAndPlay ... Sometimes we forget to remove a stop() at certain places where it is unneeded - OnEnterFrame, setInterval, etc .. HTH Alain ___ 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] EventDispatcher weirdness in AS2
Another thing to note: Delegating the event as such: _dg.addEventListener(change, Delegate.create(this, datagridChangeHandler)); will NOT allow you to remove the event listener. This won't work: _dg.removeEventListener(change, Delegate.create(this, datagridChangeHandler)); What I usually do is have a private variable: private var datagridChangeHandler_func and then create the delegate: datagridChangeHandler_func = Delegate.create(this, datagridChangeHandler); Thany you would add and remove it as: _dg.addEventListener(change, datagridChangeHandler_func); _dg.removeEventListener(change, datagridChangeHandler_func); - James -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Muzak Sent: Thursday, June 07, 2007 12:22 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] EventDispatcher weirdness in AS2 Even though it's possible to use the class instance as the listener (this), you're still better off using Delegate. What if you have 2 instances dispatching the same event that need to be handled completely different? submit_btn.addEventListener(click, this); aTotallyUnrelated_btn.addEventListener(click, this); The above will work, but they'll both trigger the same event handler and you'll have to resort to if()else() stuff. No big deal if you have 2 buttons.. get's hairy with loads of buttons. Or what about different components (DataGrid, ComboBox, List, etc..) who all dispatch a change event.. _dg.addEventListener(change, this); _cb.addEventListener(change, this); _list.addEventListener(change, this); versus: _dg.addEventListener(change, Delegate.create(this, datagridChangeHandler)); _cb.addEventListener(change, Delegate.create(this, comboChangeHandler)); _list.addEventListener(change, Delegate.create(this, listChangeHandler)); Get in the habit of using Delegate (in AS2) and *always* use it.. no exceptions ;-) regards, Muzak - Original Message - From: Alain Rousseau [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 4:07 PM Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 Hehe no prob. For your listener are you doing something like _myClass.addEventListener(onTransition, Delegeate.create(this, onTransitionHandler)); private function onTransitionHandler() { //do stuff } don't you prefer _myClass.addEventListener(onTransition, this); function onTransition() { //do stuff } for better clarity and less code writing ? No need of delegate in this case. Of course it's a question of choice and habit. Just to let you know of the alternatives ! Alain ___ 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 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.7/830 - Release Date: 6/3/2007 12:47 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.7/830 - Release Date: 6/3/2007 12:47 PM ___ 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 CS3 Prof copy: missing Tree component.
FlashInterface requires/relies on Javascript, which means it'll only work in a browser. regards, Muzak - Original Message - From: Ian Thomas [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 12:47 PM Subject: Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component. IIRC there are a few problems/limitations with using LocalConnection. I had real trouble with getting it to work consistently. It might be worth taking a look at Robert Taylor's FlashInterface (which uses ExternalInterface). http://www.flashextensions.com/products/flashinterface.php Cheers, Ian On 6/7/07, Muzak [EMAIL PROTECTED] wrote: but is it not possible for AS2 movies to share data with AS3 at all Out of the box, not possible.. You need to use a LocalConnection to have the 2 AVM's communicate with each other, which by itself has limitations. For starters, 40k data limit. regards, Muzak - Original Message - From: Scott Whittaker [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 8:09 AM Subject: Re: [Flashcoders] Flash CS3 Prof copy: missing Tree component. Hi guys, I haven't had a chance to delve into using AS3 yet, and I know the AS1 and AS3 runtime engines in the Flash 9 player are totally seperate, but is it not possible for AS2 movies to share data with AS3 at all? Surely an AS3 movie can load an AS2 movie into itself and access it's properties? If so then it should be possible for an AS3 project to use an AS2 movie with remoting components and use movieclips for data storage and communication? It would be poor use of OO coding skills, but technically feasible and much less effort than re-engineering the components. And along those lines, isn't it possible to reverse-engineer the AS2 components with a decompiler, and rewrite the code in AS3? 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
Re: [Flashcoders] examples of scripting the Flash application?
Everything you want to do is actually pretty easy with JSFL. Get the API documentation for it on Adobe's site and start digging. You'll be amazed at everything you can do with it. I've written many tools with JSFL. Basically, there isn't much you can do in Flash that you can't do with JSFL. The secret here is that you don't want to use JSFL only. You make an FLA to create a swf Panel and use Actionscript to do stuff that's a pain in the butt to do in JSFL, and you talk back and forth between the two. For instance, parsing XML in JSFL sucks. But it's easy to do in Flash. So you have Flash ask JSFL to open a dialog to find your XML, pass the path to the XML to Flash, Flash loads and parses the XML and passes the pieces of data to subroutines in JSFL. There are no shortcuts when it comes to learning JSFL. You simply have to read the API documentation and play around with the methods. Luckily, it's a searchable PDF and the documentation is well organized. I try to avoid complex MMExecute commands as much as I can. Jesse Warden wrote an MMExecute wrapper method awhile back. If you search for JesterXL JSFL you might find it. I use Actionscript for what it does best and pass stuff back to JSFL to do what it does best. I don't try to run complex JSFL in Actionscript using MMExecute. It's too prone to error and the debugging process for Flash panels sucks. If you have to make a change to your Actionscript in the Flash panel itself, you have to publish it, quit Flash, copy your panel into the WindowSWF folder (or set your FLA to publish there) and relaunch Flash because the panels only load in when Flash launches. Not fun, so I mitigate that by not using complicated MMExecute commands. Word to the wise: Make sure you dock your panel when you're using it. There are all kinds of stupid bugs with certain JSFL commands that put things on the stage if your panel is not docked. I had to learn the hard way. ___ 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] EventDispatcher weirdness in AS2
Never thought of that and never had to listen to multiple events with the same name ! Thanks for the heads up Muzak! Alain -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: 7 juin 2007 12:22 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] EventDispatcher weirdness in AS2 Even though it's possible to use the class instance as the listener (this), you're still better off using Delegate. What if you have 2 instances dispatching the same event that need to be handled completely different? submit_btn.addEventListener(click, this); aTotallyUnrelated_btn.addEventListener(click, this); The above will work, but they'll both trigger the same event handler and you'll have to resort to if()else() stuff. No big deal if you have 2 buttons.. get's hairy with loads of buttons. Or what about different components (DataGrid, ComboBox, List, etc..) who all dispatch a change event.. _dg.addEventListener(change, this); _cb.addEventListener(change, this); _list.addEventListener(change, this); versus: _dg.addEventListener(change, Delegate.create(this, datagridChangeHandler)); _cb.addEventListener(change, Delegate.create(this, comboChangeHandler)); _list.addEventListener(change, Delegate.create(this, listChangeHandler)); Get in the habit of using Delegate (in AS2) and *always* use it.. no exceptions ;-) regards, Muzak - Original Message - From: Alain Rousseau [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 4:07 PM Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 Hehe no prob. For your listener are you doing something like _myClass.addEventListener(onTransition, Delegeate.create(this, onTransitionHandler)); private function onTransitionHandler() { //do stuff } don't you prefer _myClass.addEventListener(onTransition, this); function onTransition() { //do stuff } for better clarity and less code writing ? No need of delegate in this case. Of course it's a question of choice and habit. Just to let you know of the alternatives ! Alain ___ 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 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06 14:03 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date: 2007-06-06 14:03 ___ 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] examples of scripting the Flash application?
Thanks much. I did find this breeze presentation: http://mmusergroup.breezecentral.com/p87127622/ It's great - gives me a way to start tinkering. --Roy At 6:10 PM +0200 6/7/07, Muzak wrote: You're not gonna find much JSFL examples out there I'm afraid. Not that many people really use it (extensively). There used to be a jsfl mailing list.. Ah, found it: http://www.flashguru.co.uk/extending-flash-mailing-list/ I used to be on it, but there wasn't much activity and I left a while ago. Might be worth looking into.. In any case, people there will be able to help you out (as it's all about jsfl). The things you mentioned all are possible through jsfl AFAIK. For instance, the following will show a 'browse for file' dialog and then read it and display the contents in the Output panel: var fileURL = fl.browseForFileURL(open, Select file); fl.trace(fileURL); var str = FLfile.read( fileURL); fl.trace(str); Note that file content is returned as a String. regards, Muzak - Original Message - From: Roy Pardi [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 4:42 PM Subject: Re: [Flashcoders] examples of scripting the Flash application? At 11:53 AM +0200 6/7/07, Muzak wrote: And wich part are you having problems with? Well, I've been digging around for examples (for instance, of opening a file picker) so I can see JSFL in action along with info on any dead ends or other issues that would indicate that what I want to do isn't possible. Guess I was too vague about what I want to try to do- basically, within the Flash app: 1. user opens a template movie that contains a Library of movieClips 2. user selects my command from the menu 3. the command opens a file picker dialog box where they can select a previously created XML file 4. my command parses the XML file and instances the appropriate movieClip from the librbary, setting name text props from the XML data 5. my command opens a save as dialog so the file can be saved 6. user can adjust/tweak positions of added MCs and then publish the swf. (just thinking out loud here) ___ 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 -- - Studio Site Updated! http://www.roypardi.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] IE7 Crashing on FileReference.download()
For 99% of our users, they can download images just fine via FileReference.download(). However, one user in particular is using IE7, Windows XP, and without fail, anytime FileReference.download() is called, IE will crash. Doesn't matter whether it's our site, or other sites that allow downloads that we've directed her to to test. Anybody see a similar problem, or have any ideas? She's using FP 9.0.45 - Josh ___ 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] List component
Actually, I got the listener going, but I dont know how to get the List itself to update the labels :P [EMAIL PROTECTED] wrote: Try using a listener to listen to change of the list so when the list changes it gets updated. code var listenerObject:Object = new Object(); listenerObject.change = function(eventObject:Object) { // Your code here. }; listInstance.addEventListener(change, listenerObject); /code That's taken from the Help files. -Gerry Hi guys, I have a list component that I add objects to. I use the labelFunction field to set the label. It works fine, but if I change the object name, the List doesnt update. Is there a way to get the list to update the the labels after object changes? TIA ___ 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] Private var not accessible?
I have a simple class and I can't access a private var after using setTimeout... I typed this up to show whats happening: class foo extends MovieClip { private var nTime:Number = 0.75; private var delay:Number; function foo() { // stuff }; public function doSomething():Void { trace( nTime ); // works fine [0.75] var delay = _global.setTimeout( delayedFunc, 1000 ); }; private function delayedFunc():Void { trace( nTime ); //undefined ? }; } ?? I could use setInterval and kill it after the first fire, but setTimeout is nicer. This is AS2 obviously. - eric ___ 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 Loader.content.name error
I want to rename the content because I need to be able to access it later using getChildByName(test); But since its not possible, I think I'll have to make my classes dynamic and do this instead : private function loaderInit(event:Event):void{ event.target.removeEventListener(Event.INIT, loaderInit); this[test] = event.target.content; addChild( this[test] ); } BLITZ | Patrick Matte - 310-551-0200 x214 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Romanek Sent: Thursday, June 07, 2007 7:19 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] as3 Loader.content.name error If you want to call addChild on the content then you can simply do: addChild(event.target.content) and that will throw your content on the stage. I'm not sure why it is not possible to name that new content. I've tried playing around with this myself and can't figure out how once you've loaded the content you can access that content as a class. I've loaded up swfs and can reference classes within the swf no problem and create instances of those classes but if I try to get a class definition for the content all I can get is MovieClip and I can't figure out how to create new instances of the that loaded content without running another loader Not sure if that helps you any or not. Rob On Wed, 06 Jun 2007 22:59:33 -0400, Patrick Matte|BLITZ [EMAIL PROTECTED] wrote: Is there a way a change the name of the Loader content property. I'd like to call addChild() on the content instead of the Loader itself. Like this : loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, loaderInit); var request:URLRequest = new URLRequest(pageSource); loader.load(request); private function loaderInit(event:Event):void{ event.target.removeEventListener(Event.INIT, loaderInit); var page:Page = event.target.content; page.name = test; } That code throws this error but I cant understand why. Error: Error #2078: The name property of a Timeline-placed object cannot be modified. at flash.display::DisplayObject/set name() at com.blitzagency.fabric::Main/::loaderInit() ___ 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] Scroll pane pain
Hi list... I have a ScrollPane (V2) that isn't displaying any of its scrolling elements, and it's stuck at about 100x100 pixel size, no matter how much I stretch it. When I create a blank test movie and bring all my skins and the component in from the problematic movie, everything works fine. Any ideas? - 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
RE: [Flashcoders] EventDispatcher weirdness in AS2
The alternative to creating a variable as the subscriber is to use an extended Delegate class - one that either stores the variable inside the function or appends it to the end of the arguments. Appends: http://dynamicflash.com/2005/02/delegate-class-refined/ Usage: import mx.controls.TextArea; import com.dynamicflash.utils.Delegate; class DFDelegateTest { private var _textArea:TextArea; public function DFDelegateTest(textArea:TextArea) { _textArea = textArea; _textArea.addEventListener(change, Delegate.create(this, onTextAreaChange)); } private function onTextAreaChange(event:Object, delegate:Function) : Void { trace(DFDelegateTest.onTextAreaChange); _textArea.removeEventListener(change, delegate); } } Stores variable: http://www.justgooddesign.com/blog/jgdelegate.htm Usage: import mx.controls.TextArea; import com.jgraup.utils.jgDelegate2; class DFDelegateTest { private var _textArea:TextArea; public function DFDelegateTest(textArea:TextArea) { _textArea = textArea; _textArea.addEventListener(change, jgDelegate2.create(this, onTextAreaChange)); } private function onTextAreaChange(event:Object ) : Void { trace(DFDelegateTest.onTextAreaChange); _textArea.removeEventListener(change, arguments.callee.self ); } } _ Jesse Graupmann www.jessegraupmann.com www.justgooddesign.com/blog/ _ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James E. Booth Jr. Sent: Thursday, June 07, 2007 9:45 AM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 Another thing to note: Delegating the event as such: _dg.addEventListener(change, Delegate.create(this, datagridChangeHandler)); will NOT allow you to remove the event listener. This won't work: _dg.removeEventListener(change, Delegate.create(this, datagridChangeHandler)); What I usually do is have a private variable: private var datagridChangeHandler_func and then create the delegate: datagridChangeHandler_func = Delegate.create(this, datagridChangeHandler); Thany you would add and remove it as: _dg.addEventListener(change, datagridChangeHandler_func); _dg.removeEventListener(change, datagridChangeHandler_func); - James -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Muzak Sent: Thursday, June 07, 2007 12:22 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] EventDispatcher weirdness in AS2 Even though it's possible to use the class instance as the listener (this), you're still better off using Delegate. What if you have 2 instances dispatching the same event that need to be handled completely different? submit_btn.addEventListener(click, this); aTotallyUnrelated_btn.addEventListener(click, this); The above will work, but they'll both trigger the same event handler and you'll have to resort to if()else() stuff. No big deal if you have 2 buttons.. get's hairy with loads of buttons. Or what about different components (DataGrid, ComboBox, List, etc..) who all dispatch a change event.. _dg.addEventListener(change, this); _cb.addEventListener(change, this); _list.addEventListener(change, this); versus: _dg.addEventListener(change, Delegate.create(this, datagridChangeHandler)); _cb.addEventListener(change, Delegate.create(this, comboChangeHandler)); _list.addEventListener(change, Delegate.create(this, listChangeHandler)); Get in the habit of using Delegate (in AS2) and *always* use it.. no exceptions ;-) regards, Muzak - Original Message - From: Alain Rousseau [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 4:07 PM Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 Hehe no prob. For your listener are you doing something like _myClass.addEventListener(onTransition, Delegeate.create(this, onTransitionHandler)); private function onTransitionHandler() { //do stuff } don't you prefer _myClass.addEventListener(onTransition, this); function onTransition() { //do stuff } for better clarity and less code writing ? No need of delegate in this case. Of course it's a question of choice and habit. Just to let you know of the alternatives ! Alain ___ 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 No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.7/830 - Release Date: 6/3/2007 12:47 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.7/830 - Release Date: 6/3/2007 12:47 PM
Re: [Flashcoders] IE7 Crashing on FileReference.download()
have you checked to see what happens when she uploads in an html form? On 6/7/07, Joshua Buhler [EMAIL PROTECTED] wrote: For 99% of our users, they can download images just fine via FileReference.download(). However, one user in particular is using IE7, Windows XP, and without fail, anytime FileReference.download() is called, IE will crash. Doesn't matter whether it's our site, or other sites that allow downloads that we've directed her to to test. Anybody see a similar problem, or have any ideas? She's using FP 9.0.45 - Josh ___ 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
Re: [Flashcoders] IE7 Crashing on FileReference.download()
I guess i'd start with a full uninstall / re-install of the player if you haven't had her try already. I know it's not much but a good starting point. http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14157 On 6/7/07, Joshua Buhler [EMAIL PROTECTED] wrote: For 99% of our users, they can download images just fine via FileReference.download(). However, one user in particular is using IE7, Windows XP, and without fail, anytime FileReference.download() is called, IE will crash. Doesn't matter whether it's our site, or other sites that allow downloads that we've directed her to to test. Anybody see a similar problem, or have any ideas? She's using FP 9.0.45 - Josh ___ 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: SPAM-LOW: [Flashcoders] Private var not accessible?
You'd run into the same issue with setInterval. When you specify a function reference like this there is no scope for that function, so the private var is not within the scope of the function. Use the alternative call for setTimeout: var delay = _global.setTimeout(this, 'delayedFunc', 1000 ); Or use Delegate: var delay = _global.setTimeout( Delegate.create(this, delayedFunc), 1000 ); In both cases you are providing the scope for which the function will have. Derek Vadneau - Original Message - From: eric e. dolecki To: Flashcoders mailing list Sent: Thursday, June 07, 2007 1:17 PM Subject: SPAM-LOW: [Flashcoders] Private var not accessible? I have a simple class and I can't access a private var after using setTimeout... I typed this up to show whats happening: class foo extends MovieClip { private var nTime:Number = 0.75; private var delay:Number; function foo() { // stuff }; public function doSomething():Void { trace( nTime ); // works fine [0.75] var delay = _global.setTimeout( delayedFunc, 1000 ); }; private function delayedFunc():Void { trace( nTime ); //undefined ? }; } ?? I could use setInterval and kill it after the first fire, but setTimeout is nicer. This is AS2 obviously. - eric ___ 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 Loader.content.name error
Couldn't you just set a variable and pass that to whichever class/method needs to access the child by name? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Matte|BLITZ Sent: Thursday, June 07, 2007 1:40 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] as3 Loader.content.name error I want to rename the content because I need to be able to access it later using getChildByName(test); But since its not possible, I think I'll have to make my classes dynamic and do this instead : private function loaderInit(event:Event):void{ event.target.removeEventListener(Event.INIT, loaderInit); this[test] = event.target.content; addChild( this[test] ); } BLITZ | Patrick Matte - 310-551-0200 x214 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rob Romanek Sent: Thursday, June 07, 2007 7:19 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] as3 Loader.content.name error If you want to call addChild on the content then you can simply do: addChild(event.target.content) and that will throw your content on the stage. I'm not sure why it is not possible to name that new content. I've tried playing around with this myself and can't figure out how once you've loaded the content you can access that content as a class. I've loaded up swfs and can reference classes within the swf no problem and create instances of those classes but if I try to get a class definition for the content all I can get is MovieClip and I can't figure out how to create new instances of the that loaded content without running another loader Not sure if that helps you any or not. Rob On Wed, 06 Jun 2007 22:59:33 -0400, Patrick Matte|BLITZ [EMAIL PROTECTED] wrote: Is there a way a change the name of the Loader content property. I'd like to call addChild() on the content instead of the Loader itself. Like this : loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, loaderInit); var request:URLRequest = new URLRequest(pageSource); loader.load(request); private function loaderInit(event:Event):void{ event.target.removeEventListener(Event.INIT, loaderInit); var page:Page = event.target.content; page.name = test; } That code throws this error but I cant understand why. Error: Error #2078: The name property of a Timeline-placed object cannot be modified. at flash.display::DisplayObject/set name() at com.blitzagency.fabric::Main/::loaderInit() ___ 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] Private var not accessible?
I have a simple class and I can't access a private var after using setTimeout... I typed this up to show whats happening: class foo extends MovieClip { private var nTime:Number = 0.75; private var delay:Number; function foo() { // stuff }; public function doSomething():Void { trace( nTime ); // works fine [0.75] var delay = _global.setTimeout( delayedFunc, 1000 ); }; private function delayedFunc():Void { trace( nTime ); //undefined ? }; } ?? I could use setInterval and kill it after the first fire, but setTimeout is nicer. This is AS2 obviously. Is this a case for Delegate? Looks to me like you've lost scope as a result of going to _global. Danny ___ 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 var not accessible?
There is no difference between setInterval() and setTimeout() in this aspect. The function invoked by any of them has no object context (this is undefined inside the function), so use Delegate to set the scope. Attila eed I have a simple class and I can't access a private var after using eed setTimeout... I typed this up to show whats happening: eed eed class foo extends MovieClip eed { eed private var nTime:Number = 0.75; eed private var delay:Number; eed eed function foo() eed { eed // stuff eed }; eed eed public function doSomething():Void eed { eed trace( nTime ); // works fine [0.75] eed var delay = _global.setTimeout( delayedFunc, 1000 ); eed }; eed eed private function delayedFunc():Void eed { eed trace( nTime ); //undefined ? eed }; eed } eed eed ?? I could use setInterval and kill it after the first fire, but setTimeout eed is nicer. This is AS2 obviously. ___ 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] Scroll pane pain: solved
For some reason, I discovered that the Border, CustomBorder and RectBorder border classes were causing the issue so I took them out of the library. - MM ___ 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] examples of scripting the Flash application?
If you have to make a change to your Actionscript in the Flash panel itself, you have to publish it, quit Flash, copy your panel into the WindowSWF folder (or set your FLA to publish there) and relaunch Flash because the panels only load in when Flash launches. Not fun, so I mitigate that by not using complicated MMExecute commands. That is indeed annoying as hell. What I do is when testing/debugging a Flash panel, is place it in the proper location (configuration/WindowSWF) once, and then use a .bat file (I'm on win xp) to copy the new swf to the configuration/WindowSWF folder after that (or you could change the publish settings path as well). That way I don't have to restart Flash to get the Panel to update, just close and reopen it and it should update. Let me know if that doesn't make any sense, hehe.. regards, Muzak - Original Message - From: Steven Sacks [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 6:45 PM Subject: Re: [Flashcoders] examples of scripting the Flash application? Everything you want to do is actually pretty easy with JSFL. Get the API documentation for it on Adobe's site and start digging. You'll be amazed at everything you can do with it. I've written many tools with JSFL. Basically, there isn't much you can do in Flash that you can't do with JSFL. The secret here is that you don't want to use JSFL only. You make an FLA to create a swf Panel and use Actionscript to do stuff that's a pain in the butt to do in JSFL, and you talk back and forth between the two. For instance, parsing XML in JSFL sucks. But it's easy to do in Flash. So you have Flash ask JSFL to open a dialog to find your XML, pass the path to the XML to Flash, Flash loads and parses the XML and passes the pieces of data to subroutines in JSFL. There are no shortcuts when it comes to learning JSFL. You simply have to read the API documentation and play around with the methods. Luckily, it's a searchable PDF and the documentation is well organized. I try to avoid complex MMExecute commands as much as I can. Jesse Warden wrote an MMExecute wrapper method awhile back. If you search for JesterXL JSFL you might find it. I use Actionscript for what it does best and pass stuff back to JSFL to do what it does best. I don't try to run complex JSFL in Actionscript using MMExecute. It's too prone to error and the debugging process for Flash panels sucks. If you have to make a change to your Actionscript in the Flash panel itself, you have to publish it, quit Flash, copy your panel into the WindowSWF folder (or set your FLA to publish there) and relaunch Flash because the panels only load in when Flash launches. Not fun, so I mitigate that by not using complicated MMExecute commands. Word to the wise: Make sure you dock your panel when you're using it. There are all kinds of stupid bugs with certain JSFL commands that put things on the stage if your panel is not docked. I had to learn the hard way. ___ 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] EventDispatcher weirdness in AS2
That's correct, you have to assign the delegate to a variable. I only do so if I know I will need to remove the listener, e.g: the instance that dispatches the event will at some point be removed (in which case it's best to clean up listeners). regards, Muzak - Original Message - From: James E. Booth Jr. [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 6:44 PM Subject: RE: [Flashcoders] EventDispatcher weirdness in AS2 Another thing to note: Delegating the event as such: _dg.addEventListener(change, Delegate.create(this, datagridChangeHandler)); will NOT allow you to remove the event listener. This won't work: _dg.removeEventListener(change, Delegate.create(this, datagridChangeHandler)); What I usually do is have a private variable: private var datagridChangeHandler_func and then create the delegate: datagridChangeHandler_func = Delegate.create(this, datagridChangeHandler); Thany you would add and remove it as: _dg.addEventListener(change, datagridChangeHandler_func); _dg.removeEventListener(change, datagridChangeHandler_func); - 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
Re: [Flashcoders] as3 Loader.content.name error
Another workaround that I've been using is to use the loading swf as wrapper for the movieClip I ultimately want to display on the stage. Create the content you want to use as movieClip symbol in your swf, export for actionscript, no need to put it on the stage, and give it a class name. Now you can load the wrapper swf. As soon as you do all the classes in that wrapper will be available throughout your project and you can access them by name. Untested e-mail code: loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, loaderInit); var request:URLRequest = new URLRequest(pageSource); loader.load(request); private function loaderInit(event:Event):void{ var myClass:Class = getDefinitionByName(myClassInMySwf) as Class; var newClip:MovieClip = new myClass(); newClip.name = test; addChild(newClip); } This way you can create a library of swfs that you can load in and use as required. If you make two libraries with the class internally named the same then you can change up your app just by loading in a different library swf. Rob On Thu, 07 Jun 2007 13:39:48 -0400, Patrick Matte|BLITZ [EMAIL PROTECTED] wrote: I want to rename the content because I need to be able to access it later using getChildByName(test); But since its not possible, I think I'll have to make my classes dynamic and do this instead : private function loaderInit(event:Event):void{ event.target.removeEventListener(Event.INIT, loaderInit); this[test] = event.target.content; addChild( this[test] ); } ___ 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 var not accessible?
inside a class i have to use _global.setTimeout since its not in the intrinsics, maybe use Delegate, but that car should be available from anywhere within the class, no? eric On 6/7/07, Danny Kodicek [EMAIL PROTECTED] wrote: I have a simple class and I can't access a private var after using setTimeout... I typed this up to show whats happening: class foo extends MovieClip { private var nTime:Number = 0.75; private var delay:Number; function foo() { // stuff }; public function doSomething():Void { trace( nTime ); // works fine [0.75] var delay = _global.setTimeout( delayedFunc, 1000 ); }; private function delayedFunc():Void { trace( nTime ); //undefined ? }; } ?? I could use setInterval and kill it after the first fire, but setTimeout is nicer. This is AS2 obviously. Is this a case for Delegate? Looks to me like you've lost scope as a result of going to _global. Danny ___ 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] Scroll pane pain
Hi, not sure, but are you exporting the classes to another frame then 1? greetz JC On 6/7/07, Mendelsohn, Michael [EMAIL PROTECTED] wrote: Hi list... I have a ScrollPane (V2) that isn't displaying any of its scrolling elements, and it's stuck at about 100x100 pixel size, no matter how much I stretch it. When I create a blank test movie and bring all my skins and the component in from the problematic movie, everything works fine. Any ideas? - 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
[Flashcoders] Uncover the Flash Files
Hi there, Since there have been many rumours circulating about Flash - monolithic 100% Flash-based sites are complex and unmanageable, they can't be optimized to be search engine friendly, they can't be bookmarked, and sending a URL of a specific page is next to impossible. But is any of that really true? With all the bad press surrounding Flash sites, we have decided to create a Website to put an end to the biggest misconceptions, including: * SEO-friendly Flash sites * Accessibility for disabled users * Browser functionalities of 100% Flash sites * Bookmarking * Deep linking * The use of Express Install * Three-tier architectures * Content management systems * Analytics Rifle through the Flash Files and be part of the investigation. We want your feedback. Do you agree? Do you disagree? Have anything to add? Tell us what you think about the arguments presented. Do your friends have the same opinion? Let them know about the site. Let's spark a worldwide debate! Just drop us an email with any questions and/or comments! http://www.the-flash-files.com Frédéric Caron Flash team lead Nurun inc. www.nurun.com Tel : (514) 392 1292 # 2128 ___ 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 var not accessible?
Hello :) you must use the second notation of the method : var delay = _global.setTimeout( this, delayedFunc, 1000 ); EKA+ :) 2007/6/7, eric e. dolecki [EMAIL PROTECTED]: I have a simple class and I can't access a private var after using setTimeout... I typed this up to show whats happening: class foo extends MovieClip { private var nTime:Number = 0.75; private var delay:Number; function foo() { // stuff }; public function doSomething():Void { trace( nTime ); // works fine [0.75] var delay = _global.setTimeout( delayedFunc, 1000 ); }; private function delayedFunc():Void { trace( nTime ); //undefined ? }; } ?? I could use setInterval and kill it after the first fire, but setTimeout is nicer. This is AS2 obviously. - eric ___ 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: SPAM-LOW: Re: [Flashcoders] Private var not accessible?
Looks to me like you've lost scope as a result of going to _global. Nope. _global is simply an object and has nothing to do with scope in this case. but that car should be available from anywhere within the class, no? No. When you specify a function reference in setInterval or setTimeout the function's scope only includes local and _global. It does NOT include where the function is defined. In AS3 it would because of function closure, but that's not the case in AS1/AS2. That's why there's the alternative arguments for setInterval and setTimeout. Or you can use Delegate if you want compile-time checking of the function reference. Derek Vadneau - Original Message - From: eric e. dolecki To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 3:38 PM Subject: SPAM-LOW: Re: [Flashcoders] Private var not accessible? inside a class i have to use _global.setTimeout since its not in the intrinsics, maybe use Delegate, but that car should be available from anywhere within the class, no? eric ___ 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] examples of scripting the Flash application?
hi ben, thanks for the demos - a big help! I just needed a nudge to get going with JSFL. I also only just discovered that I can use the history panel to understand syntax and get more familiar with the commands. fun stuff. --Roy At 12:43 PM -0400 6/7/07, ben gomez farrell wrote: Hey, sorry, haven't been paying attention to flashcoders much as things have been busy the past couple days.so I'm picking this thread up at the end, and don't really know what's going on. But I'm hearing you want JSFL examples, and specifically external XML file to animation. Among a few examples on my webpage, I have a Director executable which contains a ball which you drag around. It creates a text file, which then when you run the JSFL script it will prompt you to open the text file containing your animation and then writes the motion to the timeline. If this is what you're after feel free to look! http://www.yellow5labs.com/demos/ ben Muzak wrote: You're not gonna find much JSFL examples out there I'm afraid. Not that many people really use it (extensively). There used to be a jsfl mailing list.. Ah, found it: http://www.flashguru.co.uk/extending-flash-mailing-list/ I used to be on it, but there wasn't much activity and I left a while ago. Might be worth looking into.. In any case, people there will be able to help you out (as it's all about jsfl). The things you mentioned all are possible through jsfl AFAIK. For instance, the following will show a 'browse for file' dialog and then read it and display the contents in the Output panel: var fileURL = fl.browseForFileURL(open, Select file); fl.trace(fileURL); var str = FLfile.read( fileURL); fl.trace(str); Note that file content is returned as a String. regards, Muzak - Original Message - From: Roy Pardi [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 4:42 PM Subject: Re: [Flashcoders] examples of scripting the Flash application? At 11:53 AM +0200 6/7/07, Muzak wrote: And wich part are you having problems with? Well, I've been digging around for examples (for instance, of opening a file picker) so I can see JSFL in action along with info on any dead ends or other issues that would indicate that what I want to do isn't possible. Guess I was too vague about what I want to try to do- basically, within the Flash app: 1. user opens a template movie that contains a Library of movieClips 2. user selects my command from the menu 3. the command opens a file picker dialog box where they can select a previously created XML file 4. my command parses the XML file and instances the appropriate movieClip from the librbary, setting name text props from the XML data 5. my command opens a save as dialog so the file can be saved 6. user can adjust/tweak positions of added MCs and then publish the swf. (just thinking out loud here) ___ 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 -- - Studio Site Updated! http://www.roypardi.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] IE7 Crashing on FileReference.download()
Hello :) this bug ... i have 3 computers (Core2 Duo, Athlon XP 3500 and a laptop..) with WinXP and i can't use the FileReference.download method : In Flash, in the desktop, in Firefox, IE etc... my player crash and if i test my animation in flash.. flash is closed ! The upload method work.. not the download :( Same problem with all FP9 version and the FP8 :( And i don't know why ? EKA+ :) 2007/6/7, Joshua Buhler [EMAIL PROTECTED]: I've actually had her uninstall/install the FP 3 times now, with no luck. I've found a few forum posts which have a list of registry items to tweak, but that's something that's way over her head - reinstalling Flash was pushing it. As for uploading via HTML forms - haven't tried it, as the problem seems to be related to downloading a file. There's no uploading in this application. Thanks for the suggestions though. - Josh On 6/7/07, Duncan Reid [EMAIL PROTECTED] wrote: I guess i'd start with a full uninstall / re-install of the player if you haven't had her try already. I know it's not much but a good starting point. http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14157 On 6/7/07, Joshua Buhler [EMAIL PROTECTED] wrote: For 99% of our users, they can download images just fine via FileReference.download(). However, one user in particular is using IE7, Windows XP, and without fail, anytime FileReference.download() is called, IE will crash. Doesn't matter whether it's our site, or other sites that allow downloads that we've directed her to to test. Anybody see a similar problem, or have any ideas? She's using FP 9.0.45 - Josh ___ 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] Embed fonts Flash C3
Hi there, Is it possible for child .swfs (loaded into a parent .swf) to access the embedded fonts in a parent .swf? Actionscript 3.0, Flash C3. I know Flex has some handy functionality to embed fonts, is something similar possible with C3? Thanks, Phil ___ 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 var not accessible?
thanks all :) I appreciate it. - eric On 6/7/07, eka [EMAIL PROTECTED] wrote: Hello :) you must use the second notation of the method : var delay = _global.setTimeout( this, delayedFunc, 1000 ); EKA+ :) 2007/6/7, eric e. dolecki [EMAIL PROTECTED]: I have a simple class and I can't access a private var after using setTimeout... I typed this up to show whats happening: class foo extends MovieClip { private var nTime:Number = 0.75; private var delay:Number; function foo() { // stuff }; public function doSomething():Void { trace( nTime ); // works fine [0.75] var delay = _global.setTimeout( delayedFunc, 1000 ); }; private function delayedFunc():Void { trace( nTime ); //undefined ? }; } ?? I could use setInterval and kill it after the first fire, but setTimeout is nicer. This is AS2 obviously. - eric ___ 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] Private var not accessible?
Eka, was right about the notation being the problem but I thought I would mention something small I noticed. You declare delay as a private property of the class but then declare it again as a local variable inside your doSomething() method. If you don't need to access the value of delay outside of the doSomething() method I would remove it at a private property of the class. Otherwise, if you do need it outside of the doSomething method I would remove the var keyword from in front of the assignment so that you are assigning to the class' property and not creating a new local variable. You might also want to be consistant with your variable names. You prefix Time with n for a Number but don't do so with delay. Also, you can check out my Timer class for something like this: http://www.jamesor.com/2006/10/18/as2-timer-class/ James O'Reilly — Consultant Adobe Certified Flash Expert http://www.jamesor.com Design • Code • Train eric e. dolecki wrote: I have a simple class and I can't access a private var after using setTimeout... I typed this up to show whats happening: class foo extends MovieClip { private var nTime:Number = 0.75; private var delay:Number; function foo() { // stuff }; public function doSomething():Void { trace( nTime ); // works fine [0.75] var delay = _global.setTimeout( delayedFunc, 1000 ); }; private function delayedFunc():Void { trace( nTime ); //undefined ? }; } ?? I could use setInterval and kill it after the first fire, but setTimeout is nicer. This is AS2 obviously. - eric ___ 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 var not accessible?
that was a typo - did that on the fly not copy pasted. nice catch though. My private vars get a leading _ on them. - eric On 6/7/07, JOR [EMAIL PROTECTED] wrote: Eka, was right about the notation being the problem but I thought I would mention something small I noticed. You declare delay as a private property of the class but then declare it again as a local variable inside your doSomething() method. If you don't need to access the value of delay outside of the doSomething() method I would remove it at a private property of the class. Otherwise, if you do need it outside of the doSomething method I would remove the var keyword from in front of the assignment so that you are assigning to the class' property and not creating a new local variable. You might also want to be consistant with your variable names. You prefix Time with n for a Number but don't do so with delay. Also, you can check out my Timer class for something like this: http://www.jamesor.com/2006/10/18/as2-timer-class/ James O'Reilly — Consultant Adobe Certified Flash Expert http://www.jamesor.com Design • Code • Train eric e. dolecki wrote: I have a simple class and I can't access a private var after using setTimeout... I typed this up to show whats happening: class foo extends MovieClip { private var nTime:Number = 0.75; private var delay:Number; function foo() { // stuff }; public function doSomething():Void { trace( nTime ); // works fine [0.75] var delay = _global.setTimeout( delayedFunc, 1000 ); }; private function delayedFunc():Void { trace( nTime ); //undefined ? }; } ?? I could use setInterval and kill it after the first fire, but setTimeout is nicer. This is AS2 obviously. - eric ___ 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] Private var not accessible?
Hello :) i have the same implementation in VEGAS inspired of the flash.util.Timeclass : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/Timer.as http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/FrameTimer.as For me it's a better solution to use this implementation :) I prefere the dom2/3 of the W3C event model to manage my intervals too ;) EKA+ :) 2007/6/8, JOR [EMAIL PROTECTED]: Eka, was right about the notation being the problem but I thought I would mention something small I noticed. You declare delay as a private property of the class but then declare it again as a local variable inside your doSomething() method. If you don't need to access the value of delay outside of the doSomething() method I would remove it at a private property of the class. Otherwise, if you do need it outside of the doSomething method I would remove the var keyword from in front of the assignment so that you are assigning to the class' property and not creating a new local variable. You might also want to be consistant with your variable names. You prefix Time with n for a Number but don't do so with delay. Also, you can check out my Timer class for something like this: http://www.jamesor.com/2006/10/18/as2-timer-class/ James O'Reilly — Consultant Adobe Certified Flash Expert http://www.jamesor.com Design • Code • Train eric e. dolecki wrote: I have a simple class and I can't access a private var after using setTimeout... I typed this up to show whats happening: class foo extends MovieClip { private var nTime:Number = 0.75; private var delay:Number; function foo() { // stuff }; public function doSomething():Void { trace( nTime ); // works fine [0.75] var delay = _global.setTimeout( delayedFunc, 1000 ); }; private function delayedFunc():Void { trace( nTime ); //undefined ? }; } ?? I could use setInterval and kill it after the first fire, but setTimeout is nicer. This is AS2 obviously. - eric ___ 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] Private var not accessible?
Oh cool, I never saw the VEGAS framework before. Looks interesting, I'll check it out. Thanks, James eka wrote: Hello :) i have the same implementation in VEGAS inspired of the flash.util.Timeclass : http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/Timer.as http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/vegas/util/FrameTimer.as For me it's a better solution to use this implementation :) I prefere the dom2/3 of the W3C event model to manage my intervals too ;) 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
Re: [Flashcoders] IE7 Crashing on FileReference.download()
Can you post a sample that doesn't work/crashes, so we can test this? regards, Muzak - Original Message - From: eka [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, June 07, 2007 11:30 PM Subject: Re: [Flashcoders] IE7 Crashing on FileReference.download() Hello :) this bug ... i have 3 computers (Core2 Duo, Athlon XP 3500 and a laptop..) with WinXP and i can't use the FileReference.download method : In Flash, in the desktop, in Firefox, IE etc... my player crash and if i test my animation in flash.. flash is closed ! The upload method work.. not the download :( Same problem with all FP9 version and the FP8 :( And i don't know why ? 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
Re: [Flashcoders] IE7 Crashing on FileReference.download()
Doesn't matter whether it's our site, or other sites that allow downloads that we've directed her to to test. It sounds to me like its her system more than a bug but I might be wrong. specially since she is the only one having this issue with all sites that allow downloads. Who knows what she has installed in her browser. I hope you guys are able to figure it out. ...helmut ___ 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] problems with getURL and local frame targeting in FP9
Well it seems that the getURL() behaviour HAS changed in FP9. The Asia-Pacific support pointed me in the right direction: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1180.html I cant see any benefit in changing this behaviour becuse you are running inside the local security sandbox anyway. Big thumbs down to Macradobe on this one. On 31/05/07, Darren Bowers [EMAIL PROTECTED] wrote: I tried the Access network only and it would work great but I have to load a number of XML files locally to build the Tree structure. This prevents access to these files. I have been searching Adobe and the net for ages and I cant find any official reference to this change in behaviour as a security fix. I am wondering if it is actually a bug. Unlikely, but a possibility? ___ 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