Re: [Flashcoders] E4X, it's STILL just not my day.
the following works fine for me: var artData:XML = art bios artistBio f=Victor s=Pasmoreblah blah/artistBio artistBio f=Stephen s=Pentakmore blah blah/artistBio /bios /art; var lastName:String = Pentak; var firstName:String = Stephen; var allBios:XMLList = artData.bios..artistBio; var thisone:XMLList = allBios.((@s==lastName)(@f==firstName)); trace(thisone.toXMLString()); - Original Message - From: Mendelsohn, Michael michael.mendels...@fmglobal.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, February 17, 2010 10:26 PM Subject: [Flashcoders] E4X, it's STILL just not my day. Hi list... Why can't I get to the node I want to here: art bios artistBio f=Victor s=Pasmoreblah blah/artistBio artistBio f=Stephen s=Pentakmore blah blah/artistBio /bios /art var artData:XML represents the above correctly. var lastName:String = Pentak; var firstName:String = Stephen; // successfully lists out all the artistBio tags var allBios:XMLList = artData.bios..artistBio; // thisone is null...why?? Aren't I filtering it correctly? var thisone:XMLList = artData.bios..artistBio.((@s==lastName)(@f==firstName)); Thanks, perplexed, E4x shouldn't be this weird... - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: AS2: blank input text field when clicked
if you're still in the AS2 universe, look up mx.utils.Delegate. - Original Message - From: Alan Neilsen aneil...@gotafe.vic.edu.au To: flashcoders@chattyfig.figleaf.com Sent: Monday, February 15, 2010 11:00 PM Subject: [Flashcoders] Re: AS2: blank input text field when clicked Thanks to Glen Pike. The solution ended up being very simple. I blanked the text in the input field using enterPage.onSetFocus as below, then added Selection.setFocus(null); to all other controls on that screen so the text field always gets its focus set when clicked. enterPage.onSetFocus = function() { enterPage.text = ; go_btn._visible=true; }; go_btn.onRelease = function() { Selection.setFocus(null); if (enterPage.text != ) { if (enterPage.text=19) { whichPage = int(enterPage.text); holder_uh.myPageFlipperuh.gotoPage(whichPage); go_btn._visible=false; } } }; Alan Neilsen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash Coders Archives..?
http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com/ - Original Message - From: Andrew Murphy amur...@delvinia.com To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Thursday, February 04, 2010 2:25 PM Subject: [Flashcoders] Flash Coders Archives..? Hi. :) Is there an archive of the recent posts to Flash Coders? I've checked on the Figleaf page for the list (http://chattyfig.figleaf.com/mailman/listinfo/flashcoders) and it leads to an archive site that only has archives from 1998 to 2007. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] SEO + Flash = any great strategies?
http://www.google.com/#hl=ensource=hpq=mod_rewrite - Original Message - From: Gustavo Duenas gdue...@leftandrightsolutions.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, February 04, 2010 2:33 PM Subject: Re: [Flashcoders] SEO + Flash = any great strategies? do you mind to share with me how to use the mod_rewrite...is on the as3 , in the javascript or the html? regards, Gus On Feb 4, 2010, at 5:43 AM, tom rhodes wrote: ah forgot to mention to use mod_rewrite and have all the links in your non flash version be without the #... On 4 February 2010 11:42, tom rhodes tom.rho...@gmail.com wrote: swfaddress SEO solution works for me very well, i did a flash news site for a client and searching for headlines or article text came up in google perfectly. it's php serving up either a version of the site for the web crawler/non flash user or the flash if you've got it... On 4 February 2010 02:34, Steven Sacks flash...@stevensacks.net wrote: I like the solution that Gaia uses. I'm biased because I wrote it and it works really well. It is an idea given to me by a guy who's very good at SEO, I merely executed it. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] making a repeating effect
no need for the counter in the event handler, Timer has a repeat count //Timer(delay, repeatCount) var timer:Timer = new Timer(5000, 1000); - Original Message - From: Nathan Mynarcik nat...@mynarcik.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, February 04, 2010 10:37 PM Subject: Re: [Flashcoders] making a repeating effect You can try this: timer.addEventListener(timer,timedFunction); var counter:int; timer.start(); function timedFuntion(e:TimerEvent):void{ if(counter = 1000){ var heart:MovieClip = new Heart(); heart.x = Math.random * stage.stageWidth; heart.y = Math.random * stage.stageHeight; counter++; }else{ timer.stop(); } } --Original Message-- From: Gustavo Duenas Sender: flashcoders-boun...@chattyfig.figleaf.com To: Flash Coders List ReplyTo: Flash Coders List Subject: Re: [Flashcoders] making a repeating effect Sent: Feb 4, 2010 3:14 PM I've downloaded thanks on other matters, when you say using a timer, you mean something like this ( I've have this from a tutorial, mixing with my idea); something like this? import flash.utils.*; var timer:Timer = new Timer(5000); timer.addEventListener(timer,TimedFunction); timer.start(); function timedFuntion(e:TimerEvent):void{ var heart:MovieClip = new Heart(); heart.x = Math.random * stage.stageWidth; heart.y = Math.random * stage.stageHeight; } the question is , how can I stop this? Gus On Feb 4, 2010, at 3:40 PM, Jer Brand wrote: Completely un-helpful for your code, but you could also give HYPE a whirl. Have been having a blast playing with it lately. I think the above task is one of the examples. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Ideas, Please
Can we stop making this list into a chatroom.. plz.. thx. - Original Message - From: beno - flashmeb...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, January 27, 2010 6:26 PM Subject: Re: [Flashcoders] Ideas, Please On Wed, Jan 27, 2010 at 1:01 PM, Boerner, Brian J brian.j.boer...@lmco.comwrote: Funny. 12,000 lines of code isn't necessarily a good thing. If you can't deliver your concept then maybe it's a really bad concept! Know your limitations. This is OT and the list manager has already jumped on me for such. I won't respond, except to say that you, too, might want to keep away from this OT stuff. beno ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Rotation
I suggest you buy a few books and start learning - basic - stuff rather than shooting emails to the list every 5 minutes. - Original Message - From: beno - flashmeb...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, January 25, 2010 7:21 PM Subject: [Flashcoders] Rotation Hi; Can someone please give me the general parameters for doing the following: 1) Rotate a hand on its axis; 2) Attach another graphic so that it rotates with the hand as if it were held by the same. TIA, beno ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] 2nd onPress ignored unless mouse moved at least1 pixel
This felt like a deja-vu :) http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com/msg38178.html I'm using AS3 for FP8 FP 8 doesn't support AS3. So if you're using FP8 AS2 and are using v2 components, they above solution applies. regards, Muzak - Original Message - From: Andrew Sinning and...@learningware.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, January 21, 2010 2:24 PM Subject: Re: [Flashcoders] 2nd onPress ignored unless mouse moved at least1 pixel I'm using AS3 for FP8. I'll see if I can publish to FP9. Merrill, Jason wrote: Ah. What Flash player version and Flash IDE version are you using and targeting? Seems like this used to be a bug with the Flash player and present in AS2 apps. It used to annoy me on sites I would build or sites on the internet like MSNBC's flash-based photo slide shows, but I haven't seen it in while. I think it's no longer an issue in AS3/Flash player 9/10. Jason Merrill ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] archives?
Earliest stuff in there is from oct 2005 http://www.mail-archive.com/search?l=flashcod...@chattyfig.figleaf.comq=2005 I'm actually the one who added flashcoders to the mail-archive back then :-) - Original Message - From: Anthony Pace anthony.p...@utoronto.ca To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, January 10, 2010 11:18 AM Subject: Re: [Flashcoders] archives? http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com I searched 2007 and it brought up a bunch of threads. The few I looked at were from Feb, May, June, etc. of 2007. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] archives?
No, I registered FlashCoders there in 2005. If I'm not mistaken there was a server migration back then - or something like that - and the archives got lost.. can't quite remember. There's an (amazing) AIR app that let's you search different archives (flexcoders etc..) and has blog feeds as well. http://www.adobe.com/cfusion/marketplace/index.cfm?event=marketplace.offeringofferingID=10029 http://labs.searchcoders.com/dashboard/demo/ regards, Muzak - Original Message - From: Andrew Sinning and...@learningware.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, January 10, 2010 7:02 PM Subject: Re: [Flashcoders] archives? Wow, this is so cool. Did this just get put up, because 2 days ago Dave Watts, our list moderator, seemed to suggest that the archives ended in 2007. Thanks! http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com I searched 2007 and it brought up a bunch of threads. The few I looked at were from Feb, May, June, etc. of 2007. On 1/8/2010 2:43 PM, Paul Andrews wrote: Andrew Sinning wrote: Are there archives of this list since 2007? The only one I can find ends on Dec '07. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Prevent space button passing click event tobutton (as3)
Try: gameMenuBtn.focusRect = false; - Original Message - From: Paul Steven paul_ste...@btinternet.com To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Wednesday, December 02, 2009 11:51 AM Subject: RE: [Flashcoders] Prevent space button passing click event tobutton (as3) Thanks for the replies. When you say buttons are meant to be pressed like that - do you mean that it is standard practice to use the tab key to move between buttons and then use the SPACE key to click it? You are correct in assuming I have a game where there is a button on the interface that allows the user to quit the game. I have the following code on this button: gameMenuBtn.addEventListener(MouseEvent.CLICK, clickGameMenuButton); function clickGameMenuButton(event:MouseEvent) { gotoAndStop(splash); } I was hoping there was just a simple way to prevent the SPACE key from virtually clicking this button. I still want the user to be able to click it with the mouse. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Website in an application
The HTMLLoader class has a locationChange event: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/html/HTMLLoader.html#event:locationChange - Original Message - From: Eric E. Dolecki edole...@gmail.com To: spamtha...@gmail.com; Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, October 28, 2009 1:32 PM Subject: Re: [Flashcoders] Website in an application You can get headers, tags, etc. not too sure about preventing links from being clicked though - probably can do that. On Tue, Oct 27, 2009 at 6:59 PM, Latcho spamtha...@gmail.com wrote: I did not know that ! Looks good. Is it also possible to catch referer headers / link clicks and prevent them ? Ciao, Latcho Eric E. Dolecki wrote: Just use AIR and an HTML Browser component. Easy-peasy. On Tue, Oct 27, 2009 at 5:12 PM, John R. Sweeney Jr jr.swee...@comcast.netwrote: Thanks, I'll check it out. John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] totally lost figuring out AS3 JSON Class
It's AS3, so not just Flex specific. There's an example here: http://code.google.com/p/as3corelib/source/browse/trunk/examples/JSONExample/JSONExample.mxml The sample uses MXML, but not for the json part, only for loading the data (using HTTPService). So basically this is you're after: import com.adobe.serialization.json.JSON; var arr:Array = JSON.decode(rawData) as Array; Where rawData is the loaded JSON data. regards, Muzak - Original Message - From: Andrew Sinning and...@learningware.com To: Flash Coders flashcoders@chattyfig.figleaf.com Sent: Tuesday, October 13, 2009 12:27 AM Subject: [Flashcoders] totally lost figuring out AS3 JSON Class I've been using JSON forever with AS2. It's a single as class in org.JSON. I've downloaded the as3 core library from JSON.org. It's 283 files, and there's no explanation for what to do. The main JSON class is in adobe.serialization.json, which seems to suggest that this is an adobe class. I think this is for Flex, not Flash. I would be very grateful for any help. Thanks! -And ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] totally lost figuring out AS3 JSON Class
AFAIK, there are no Flex specific classes in the AS3CoreLib library, it's an ActionScript 3 library (hence the name). But yes, you have to make sure it's in the class path to be able to use it, just like any other classes. You can use the .as source files (com folder) or the .swc, whichever you prefer. Did you get the library from googlecode? http://code.google.com/p/as3corelib/downloads/list - Original Message - From: Andrew Sinning and...@learningware.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, October 13, 2009 2:02 AM Subject: Re: [Flashcoders] totally lost figuring out AS3 JSON Class I don't have com.adobe.serialization.json in my install of Flash. So, I just move the com folder from the as3corelib into my global classpath and then I can use any of the Flex classes? Muzak wrote: It's AS3, so not just Flex specific. There's an example here: http://code.google.com/p/as3corelib/source/browse/trunk/examples/JSONExample/JSONExample.mxml ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [MEMORY LEAK]
I'd say, keep the loader instance (instead of creating a new one each time) and unload the loader content (the swf) using Loader.unloadAndStop. http://kb2.adobe.com/cps/403/kb403670.html http://www.gskinner.com/blog/archives/2008/07/additional_info.html regards, Muzak - Original Message - From: Gregory Boland breakfastcof...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, October 02, 2009 5:57 AM Subject: Re: [Flashcoders] [MEMORY LEAK] All I can say is that you aren't releasing all of the references to this material that you are trying to release from memory. So after you make this call addChild(loadEvent.currentTarget.content); make that = to null as well as any other time that you are referring to this content you are trying to rid. I know if you run your program in Flex Builder and choose the profiler, you can actually purge the garbage manually and see if the object you want to be deleted gets purged. If it hasn't then there is still something that is referencing it. However, after looking at your code it seems that you are writing it on the timeline and i'm not sure how you would go about putting that into Flex Builder. best of luck greg ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Dynamic motion path
http://www.google.com/search?hl=enq=bezier+curve+tweenaq=foq=aqi= - Original Message - From: Glen Pike g...@engineeredarts.co.uk To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, October 02, 2009 12:11 PM Subject: Re: [Flashcoders] Dynamic motion path Hi, You might want to look at something like this: http://www.airtightinteractive.com/news/?p=38 I think I googled dynamic bezier tween... Glen Karl DeSaulniers wrote: Hello list, Is it possible to create a dynamic motion path for a dynamic image? And is there a way to put a tween on it? I am working in AS2, but may be able to convert an AS3 suggestion. Thanks, Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [MEMORY LEAK]
All you need is: function timerHandler(event:TimerEvent):void { mLoader.unloadAndStop(); startLoad(); trace(timerHandler: + event); } - Original Message - From: TS sunnrun...@gmail.com To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Friday, October 02, 2009 9:27 PM Subject: RE: [Flashcoders] [MEMORY LEAK] Muzak, I've got that already. function timerHandler(event:TimerEvent):void { trace(this.removeChildAt(0)); // remove loaded swf from display list mLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.unloadAndStop(); mLoader = null; mLoader = new Loader(); // clear from memory startLoad(); trace(timerHandler: + event); } Thanks, T ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash Cache in IE FF
Depending on your browser settings, it's both. But in general you only need to worry about the data caching. So appending a random number to the text file url should suffice. - Original Message - From: Don Schnell - TFE dschn...@toolsforeducation.com To: n...@joeflash.ca Cc: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, September 25, 2009 3:35 PM Subject: Re: [Flashcoders] Flash Cache in IE FF Chris/Joe, thanks a bunch, but here is my next question (just curious)... Is it the SWF which is not getting reloaded every time the page is viewed and thus my data is not getting reloaded or is it my data file that is cached and therefore the browser just keeps reloading the same old data file, or is it both? One other item I notice is that I entered the url for the actual text file i was attempting to load and when I previewed that file it also contained old content and did not update until I performed a CTRL F5. Even attempting to clear the browser cache didn't seem to help. *Don ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Error when trying to embed a font
That's explained in the docs tbh: http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_09.html I always use that approach for embedding fonts in Flex. - Original Message - From: Matt Gitchell m...@moonbootmedia.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, September 03, 2009 7:25 PM Subject: Re: [Flashcoders] Error when trying to embed a font Sheesh. I totally forgot, I've done this before: Create a TextField in your FLA, embed the selected character set into that textfield, stick that in a symbol, use [Embed] to embed that symbol ( [Embed(source=blah.swf, symbol=textMC)]), then you're off to the fonty races, if memory serves. I've gotten this to work in the past, but honestly I forget the particulars. --Matt ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem understanding Class heirarchy issue
Meanwhile, I would like to say that, I am not writing anything in my FLA. (I guess thats the best practice, is it correct?) Yup, that's correct. So, ONlything I do in the FLA is declare ClassA as my document root class. Could that be the problem? Nope. I modified ClassA and made it the document class: package { import flash.events.Event; public class ClassA extends ClassC { public var b:ClassB; public function ClassA():void { trace(ClassA ::: CONSTRUCTOR); addEventListener(ClassC.MOVE_UP, moveUpHandler); trace(- disptaching MOVE_UP event); dispatchEvent(new Event(ClassC.MOVE_UP)); } protected function moveUpHandler(event:Event):void { trace(ClassA ::: moveUpHandler); b = new ClassB(); addChild(b); trace(- instance 'b': , b); } } } //Output ClassD ::: CONSTRUCTOR ClassC ::: CONSTRUCTOR ClassA ::: CONSTRUCTOR - disptaching MOVE_UP event ClassA ::: moveUpHandler ClassD ::: CONSTRUCTOR ClassC ::: CONSTRUCTOR ClassB ::: CONSTRUCTOR - instance 'b': [object ClassB] As you can see, the last line in the output is the trace() after instantiating ClassB. In your initial question you said: If I instantiate ClassB from ClassA, the constructor does not execute. How are you determining that? Cos now you're saying that a trace() in ClassA is not displaying any output when creating an instance of ClassB. Are you sure there are no errors in the Compiler Errors window? What does ClassB look like? regards, Muzak - Original Message - From: Sajid Saiyed sajid.fl...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, September 02, 2009 4:07 AM Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue Hi, Thanks all of you for adding your valuable inputs, I am reviewing all suggestions. Meanwhile, I would like to say that, I am not writing anything in my FLA. (I guess thats the best practice, is it correct?) So, ONlything I do in the FLA is declare ClassA as my document root class. Could that be the problem? Also the trace in my someFunction is getting called. Then immediately after the trace, I have the code to instantiate ClassB. The trace immediately after this instantiation does not appear. Regards Sajid ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem understanding Class heirarchy issue
Are you talking about something like this?? package { public class ClassA { public function ClassA():void { trace(ClassA ::: CONSTRUCTOR); } } } package { public class ClassB extends ClassA { public function ClassB():void { trace(ClassB ::: CONSTRUCTOR); } } } // in fla var b:ClassB = new ClassB(); // output ClassA ::: CONSTRUCTOR ClassB ::: CONSTRUCTOR There's no need to call super() in the constructor. Or are you talking about something else? regards, Muzak - Original Message - From: Steven Sacks flash...@stevensacks.net To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, September 02, 2009 12:56 AM Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue In AS2, super() was called automatically (so to speak), so calling it was a matter of proper form more than anything else. In AS3, you have to call it yourself or it doesn't get called. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem understanding Class heirarchy issue
AKAIK, a constructor is always invoked when an instance is created and there's no way around that. So if you have some trace() actions in the contstructor of ClassB and you don't see the output, no instance is created. Which in this case probably means that someFunction() is not being invoked. When is the moveUP event dispatched? regards, Muzak - Original Message - From: Sajid Saiyed sajid.fl...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, September 01, 2009 8:12 AM Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue Ok, Here is a bit more information. ClassA (works pefrectly fine): --- package com.folder.subfolder { import flash.display.*; import flash.events.*; import flash.filters.*; import flash.utils.Timer; import com.folder.subfolder.*; public class ClassA extends ClassC { public var myMenu: ClassB; public function ClassA (){ addEventListener(ClassC.moveUP, someFunction); } public function someFunction(){ myMenu = new ClassB(); myMenu.name = mymenu; this.addChild(myMenu); } } } ClassB --- package com.folder.subfolder { import flash.display.*; import flash.events.*; import flash.filters.*; import flash.utils.Timer; import com.folder.subfolder.*; public class ClassB extends ClassC { public function ClassB (){ // This is not getting called. } } } Does this explanation help a bit?? Am I looking at the right place for the problem or the problem could be somewhere else? Thanks Sajid ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem understanding Class heirarchy issue
Works fine here: ClassA extends ClassC ClassB extends ClassC ClassC extends ClassD ClassD extends MovieClip // ClassA package { import flash.events.Event; public class ClassA extends ClassC { public var b:ClassB; public function ClassA():void { trace(ClassA ::: CONSTRUCTOR); addEventListener(ClassC.MOVE_UP, moveUpHandler); } protected function moveUpHandler(event:Event):void { trace(ClassA ::: moveUpHandler); b = new ClassB(); trace(- instance 'b': , b); } } } // ClassB package { public class ClassB extends ClassC { public function ClassB():void { trace(ClassB ::: CONSTRUCTOR); } } } // ClassC package { public class ClassC extends ClassD { public static const MOVE_UP:String = moveUp; public function ClassC():void { trace(ClassC ::: CONSTRUCTOR); } } } // ClassD package { import flash.display.MovieClip; public class ClassD extends MovieClip { public function ClassD():void { trace(ClassD ::: CONSTRUCTOR); } } } In FLA: var a = new ClassA(); trace(- instance 'a': , a); trace(- disptaching MOVE_UP event on 'a'); a.dispatchEvent(new Event(ClassC.MOVE_UP)); //Output ClassD ::: CONSTRUCTOR ClassC ::: CONSTRUCTOR ClassA ::: CONSTRUCTOR - instance 'a': [object ClassA] - disptaching MOVE_UP event on 'a' ClassA ::: moveUpHandler ClassD ::: CONSTRUCTOR ClassC ::: CONSTRUCTOR ClassB ::: CONSTRUCTOR - instance 'b': [object ClassB] Exactly as expected. From what I can tell, it doesn't really matter which class extends which. The only thing that matters is that the MOVE_UP event handler (moveUpHandler) in ClassA gets called, which happens when I dispatch a MOVE_UP event on 'a' in the fla. regards, Muzak - Original Message - From: Sajid Saiyed sajid.fl...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, September 01, 2009 8:12 AM Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue Ok, Here is a bit more information. ClassA (works pefrectly fine): --- package com.folder.subfolder { import flash.display.*; import flash.events.*; import flash.filters.*; import flash.utils.Timer; import com.folder.subfolder.*; public class ClassA extends ClassC { public var myMenu: ClassB; public function ClassA (){ addEventListener(ClassC.moveUP, someFunction); } public function someFunction(){ myMenu = new ClassB(); myMenu.name = mymenu; this.addChild(myMenu); } } } ClassB --- package com.folder.subfolder { import flash.display.*; import flash.events.*; import flash.filters.*; import flash.utils.Timer; import com.folder.subfolder.*; public class ClassB extends ClassC { public function ClassB (){ // This is not getting called. } } } Does this explanation help a bit?? Am I looking at the right place for the problem or the problem could be somewhere else? Thanks Sajid On Mon, Aug 31, 2009 at 10:46 PM, jonathan howejonathangh...@gmail.com wrote: Are you defining a subclass constructor and then failing to explicitly call the super() (superclass's constructor)? On Mon, Aug 31, 2009 at 8:37 AM, Sajid Saiyed sajid.fl...@gmail.com wrote: I am already importing all the classes in the package. Still cant seem to get my head around this. Maybe later today I will post excerpts of my classes here. That might help. Regards Sajid On Mon, Aug 31, 2009 at 6:14 PM, Corc...@chello.nl wrote: Not knowing what you are trying to do, you have to import ClassB to instantiate it in ClassA. HTH Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sajid Saiyed Sent: maandag 31 augustus 2009 12:06 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Problem understanding Class heirarchy issue Hi, I have following Class structure: ClassA extends ClassC ClassB extends ClassC ClassC extends ClassD ClassD extends MovieClip Now, If I instantiate ClassB from ClassA, the constructor does not execute. note: Inside ClassB, I am instantiating another ClassE which extends MovieClip Is there something I am doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: accessing a text node inside another node in aXMLList
ok i-ve just discovered: trace (dfdf: + tabsContentSlideshow.children()[0].item[1]); or since you know it's a slide node: tabsContentSlideshow.slide[0].item[1]; - Original Message - From: Isaac Alves isaacal...@gmail.com To: flashcoders@chattyfig.figleaf.com Sent: Friday, August 28, 2009 8:58 PM Subject: [Flashcoders] Re: accessing a text node inside another node in aXMLList Ok I�ve realized now something. I had before in the script: tabsContentSlideshow = myXML.slideshow.children(); I�ve replaced with: tabsContentSlideshow = myXML.slideshow; Then if i trace tabsContentSlideshow.children()[0] it will show : slide item label=ss1_title link=# type=_selfCONECTE-SE/item item label=ss1_subtitleBem-vindo ao Conecte-se!/item item label=ss1_textAqui voc� encontra vida! Grupos pequenos, c�lulas, que se re�nem semanalmente. N�s oramos e desejamos que voc� desenvolva bons relacionamentos, um prop�sito, envolvimento e encontre alegria. Vamos servir ao Senhor juntos!/item /slide alright. now how can I retrieve the text that�s inside the tag item ?? ok i-ve just discovered: trace (dfdf: + tabsContentSlideshow.children()[0].item[1]); :D thank you people 2009/8/28 Isaac Alves isaacal...@gmail.com: I�ve realized actually that flash recognizes the XMLList as having 9 children, ignoring the tags slide when I was expecting three children , each one of them with also 3 children ( the tags item). Why? 2009/8/28 Isaac Alves isaacal...@gmail.com: Hello list, I have the following XML ( i get that by tracing tabsContentSlideshow which is a XMLList. I-d like to use something like tabsContentSlideshow[slide][1] slide is an integer, so for example, if the slide 2 is showing, this statement would return the first node item inside the second node slide, that is: �item label=ss1_title link=# type=_selfSLIDE 2/item but it doesn�t work like that. how could I do it ?? thanks in advance ! slide �item label=ss1_title link=# type=_selfCONECTE-SE/item �item label=ss1_subtitleBem-vindo ao Conecte-se!/item �item label=ss1_textAqui voc� encontra vida! Grupos pequenos, c�lulas, que se re�nem semanalmente. N�s oramos e desejamos que voc� desenvolva bons relacionamentos, um prop�sito, envolvimento e encontre alegria. Vamos servir ao Senhor juntos!/item /slide slide �item label=ss1_title link=# type=_selfSLIDE 2/item �item label=ss1_subtitleBem-vindo ao slide 2/item �item label=ss1_textAqui voc� encontra vida! Grupos pequenos, c�lulas, que se re�nem semanalmente. N�s oramos e desejamos que voc� desenvolva bons relacionamentos, um prop�sito, envolvimento e encontre alegria. Vamos servir ao Senhor juntos!/item /slide slide �item label=ss1_title link=# type=_selfSLIDE 3/item �item label=ss1_subtitleBem-vindo ao slide 3/item �item label=ss1_textAqui voc� encontra vida! Grupos pequenos, c�lulas, que se re�nem semanalmente. N�s oramos e desejamos que voc� desenvolva bons relacionamentos, um prop�sito, envolvimento e encontre alegria. Vamos servir ao Senhor juntos!/item /slide ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to add a DisplayObject into a container withoutusing addChild() method.
Not to mention, a class adding itself to its parent ?? eeew.. - Original Message - From: Steven Sacks flash...@stevensacks.net To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, August 17, 2009 10:53 PM Subject: Re: [Flashcoders] How to add a DisplayObject into a container withoutusing addChild() method. I don't understand why you would not want to write a single line of code in the class where it would provide the most clarity, and instead write MORE code in another class obscuring the behavior that is going on. In other words, you're writing more code to write the same code. You're going to write addChild either way, why make it more complicated than it needs to be? Always follow the KISS principle. BTW, Ekameleon, you should use if (target) Instead of if (target != null) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Interface for displayObjects
The bad part, as I said, is that only Adobe can fix this. So, until that happens (if it happens someday...), I just do a cast to DisplayObject on the argument at call time and carry on. You can always file an enhancement request. https://bugs.adobe.com/ regards, Muzak - Original Message - From: Juan Pablo Califano califa010.flashcod...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, August 08, 2009 7:39 PM Subject: Re: [Flashcoders] Interface for displayObjects Hi, I've had the same problem and couldn't find a real solution. The simplest thing to do, for me, was just using the as operator: var obj:ISomeInterface = new ConcreteObject(); container.addChild(obj as DisplayObject); I like that it doesn't require an extra variable and it doesn't clutter your code too badly. The only real solution, I think, it's on Adobe's hands, since DisplayObject is a concrete class defined natively by the player (well, sort of, at runtime it behaves like an abstract class since you can't create an instance with new ...). The cool part is that the change should be simple and backward compatible. Just provide an IDisplayObject interface and have DisplayObject implent it. Then change method signatures in the dispay list API to require IDisplayObject instead of DisplayObject. In your code, your interface can extend IDisplayObject, and that should solve the problem: interface ISomeInterface extends IDisplayObject class ConcreteObject extends Sprite implements ISomeInterface The bad part, as I said, is that only Adobe can fix this. So, until that happens (if it happens someday...), I just do a cast to DisplayObject on the argument at call time and carry on. Cheers Juan Pablo Califano ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Interface for displayObjects
What makes things move forward is voting. Ask people (like on this list or FlexCoders) to vote for it. - Original Message - From: Juan Pablo Califano califa010.flashcod...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, August 08, 2009 8:35 PM Subject: Re: [Flashcoders] Interface for displayObjects Yes, but someone already did that 6 months ago: http://bugs.adobe.com/jira/browse/FP-1678 No one from Adobe bothered to reply or comment on it, though. As a side note, this is something that I really dislike about Adobe's bug-fixing process (though I don't say this is a bug, but rather a possible improvement) and it's very common if you take a look at jira. I understand that they have lots of request and limited resources. They naturally have to set priorities and though this seems easy to fix, I might be wrong and often things looks easier from the outside. Yet, it's that hard to say this is low priority, we'll fix it in the next player, we will not implement this, etc ? I mean, I don't expect them to fix every reported problem right away, but at least give some kind of feedback so the people that actually take the time to register / login / investigate a problem or bug and report it don't feel like they're wasting time talking to a brick wall. Cheers Juan Pablo Califano ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Extending Flex UIComponent in flash SWC
FlexComponentBase is added automatically here, is that not the case for you? Just watched the screencast.. :) it's being added. Odd though, I don't get that warning.. maybe it's a Mac thing? And just wondering, why are you using a Flex component just for skins? There's no need for that, but maybe I'm missing something. For instance, if your skinning buttons, use a Flex Button and style it through CSS, using png's or movieclip symbols from swf's. // png images, using 9-grid scaling for some .menuButton { upSkin: Embed(source=/skins/LinkButton_upSkin.png); overSkin: Embed(source=/skins/LinkButton_overSkin.png); downSkin: Embed(source=/skins/LinkButton_downSkin.png); disabledSkin: Embed(source=/skins/LinkButton_selectedSkin.png, scaleGridLeft=10, scaleGridRight=56, scaleGridTop=1, scaleGridBottom=15); } // symbols from swf Tab { upSkin: Embed(source=/assets/PMSGraphical.swf, symbol=Tab_upSkin); overSkin: Embed(source=/assets/PMSGraphical.swf, symbol=Tab_overSkin); downSkin: Embed(source=/assets/PMSGraphical.swf, symbol=Tab_downSkin); } If they're not skins, but graphical elements, you can do the same by using png's or symbols as container backgrounds. // CSS .bgCanvas { backgroundImage: Embed(source=/assets/Graphical.swf, symbol=CanvasBackground); } // MXML mx:Canvas stylename=bgCanvas //other stuff here /mx:Canvas regards, Muzak - Original Message - From: Matt Muller matthewmul...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, July 29, 2009 11:30 AM Subject: Re: [Flashcoders] Extending Flex UIComponent in flash SWC figured it out. you need to have FlexComponentBase in the lib for FP9 export. On Wed, Jul 29, 2009 at 10:13 AM, Matt Muller matthewmul...@gmail.comwrote: i made a video of whats happening... http://screencast.com/t/cvTKLGch go figure. unless im meant to make a class that ecenteds something other than mc before creating the component? On Wed, Jul 29, 2009 at 8:16 AM, Matt Muller matthewmul...@gmail.comwrote: there is no class attached. its just to get ui graphics from flash into flex. add to mx:Box and using layout props. On Wed, Jul 29, 2009 at 3:06 AM, Muzak p.ginnebe...@telenet.be wrote: Yup, using CS4. Doing the same thing as you described: - select File - Publish Settings - in Formats tab: - deselect HTML in Flash tab - select Flash Player 9 - select ActionScript 3 - select Export SWC - create Movieclip symbol, fill in a class name (export for ActionScript) - select the Movieclip in Library, select Commands - Convert Symbol to Flex Component - File - Publish I'm only asked to change the framerate to 24 when converting the MovieClip to Flex Component. Other than that it just works.. What does the class look like (the one attached to the MovieClip symbol)? regards, Muzak - Original Message - From: Matt Muller matthewmul...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, July 29, 2009 12:09 AM Subject: Re: [Flashcoders] Extending Flex UIComponent in flash SWC yep. are you using cs4? i was just exporting swc and add to flex but then had to use rawchildren and couldnt use positioning. when i select the clip in the lib and then go to commandsmake flex component the warning pops up. MaTT ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Extending Flex UIComponent in flash SWC
Get the Flex Component Kit for Flash CS3. http://labs.adobe.com/wiki/index.php/Flex_Component_Kit_for_Flash_CS3 I think Flash CS4 already has the component kit installed. regards, Muzak - Original Message - From: Matt Muller matthewmul...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, July 28, 2009 6:39 PM Subject: [Flashcoders] Extending Flex UIComponent in flash SWC Hi, Im creating a SWC with some UI movieclips exported in the lib to use with FLEX. Right now they extend MovieClip and when I create a new instance in FLEX and add to mx:Box I need to add to rawChildren. This means I cant use the alignment properties of mx:Box to align the graphics. apart from adding them to a new UIComponent as a child and then adding the UIComponent to the Box, is there another way to do this? thanks, MaTT ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Extending Flex UIComponent in flash SWC
Mine publishes to fp9 just fine. Have you set fp9 in the publish settings and enabled Export swc ? http://muzakdeezign.com/flashcoders/publish_swc.jpg regards, Muzak - Original Message - From: Matt Muller matthewmul...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, July 28, 2009 8:43 PM Subject: Re: [Flashcoders] Extending Flex UIComponent in flash SWC thanks. I only have cs4 and it wont publish to flash 9. only fp 10 :/ On Tue, Jul 28, 2009 at 6:18 PM, Muzak p.ginnebe...@telenet.be wrote: Get the Flex Component Kit for Flash CS3. http://labs.adobe.com/wiki/index.php/Flex_Component_Kit_for_Flash_CS3 I think Flash CS4 already has the component kit installed. regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Extending Flex UIComponent in flash SWC
Yup, using CS4. Doing the same thing as you described: - select File - Publish Settings - in Formats tab: - deselect HTML in Flash tab - select Flash Player 9 - select ActionScript 3 - select Export SWC - create Movieclip symbol, fill in a class name (export for ActionScript) - select the Movieclip in Library, select Commands - Convert Symbol to Flex Component - File - Publish I'm only asked to change the framerate to 24 when converting the MovieClip to Flex Component. Other than that it just works.. What does the class look like (the one attached to the MovieClip symbol)? regards, Muzak - Original Message - From: Matt Muller matthewmul...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, July 29, 2009 12:09 AM Subject: Re: [Flashcoders] Extending Flex UIComponent in flash SWC yep. are you using cs4? i was just exporting swc and add to flex but then had to use rawchildren and couldnt use positioning. when i select the clip in the lib and then go to commandsmake flex component the warning pops up. MaTT ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Image loader problem
When you get a elements from an XML object through e4x it return an XMLList. The following would throw an error: var data:XML = data img src=jpg/cinematic001.jpg / img src=jpg/cinematic002.jpg / img src=jpg/cinematic003.jpg / /data; var imgs:XML = data.img; //output: TypeError: Error #1034: Type Coercion failed: cannot convert xmll...@4a24d91 to XML. The following works: var data:XML = data img src=jpg/cinematic001.jpg / img src=jpg/cinematic002.jpg / img src=jpg/cinematic003.jpg / /data; var imgs:XMLList = data.img; trace(num nodes: , imgs.length()); trace(imgs.toXMLString()); // output num nodes: 3 img src=jpg/cinematic001.jpg/ img src=jpg/cinematic002.jpg/ img src=jpg/cinematic003.jpg/ An XML object has a length of 1, while an XMLList has a length matching the number of nodes, which could be 1, in which case you can treat it as XML :). From the docs: quote If an XMLList object has only one XML element, you can use the XML class methods on the XMLList object directly. If you attempt to use XML class methods with an XMLList object containing more than one XML object, an exception is thrown; instead, iterate over the XMLList collection (using a for each..in statement, for example) and apply the methods to each XML object in the collection. /quote Just think of an XMLList as an Array of XML nodes. Actually, you use the Array access operator (which is a fancy way of saying square brackets) to access nodes in an XMLList object: var data:XML = data img src=jpg/cinematic001.jpg / img src=jpg/cinematic002.jpg / img src=jpg/cinematic003.jpg / /data; var imgs:XMLList = data.img; trace(imgs[...@src); // output: jpg/cinematic001.jpg regards, Muzak - Original Message - From: Cor c...@chello.nl To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Sunday, July 26, 2009 10:58 AM Subject: RE: [Flashcoders] Image loader problem Thank guys!!! It is an eye opener to see all kinds of different approaches. I will definitely look at the bulkloader but Muzak's method makes a lot of sence to me in my project for now. @Muzak, I normally only use the XML class. I notice you using XMLList. Could you explain when XML is appropriate and when to use XML. I read the help, but this does not explain the nitty-gritty. Thanks again!! Cor PS. I love this list ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Image loader problem
Would be nice if you could just throw data at it in one go, rather than having to iterate through your data and adding them one at a time. Something like this: var data:XML = data img src=jpg/cinematic001.jpg / img src=jpg/cinematic002.jpg / img src=jpg/cinematic003.jpg / /data; var imgLoader:BulkLoader = new BulkLoader(); imgLoader.addEventListener(BulkLoader.COMPLETE, allItemsLoaded, false, 0, true ); imgLoader.dataFormat = BulkLoaderDataFormat.XML_FORMAT; imgLoader.dataField = @src; imgLoader.data = data.img; imgLoader.start(); Now BulkLoader would take care of creating the LoadingItem instances, based on the dataFormat and dataField. And it would handle XML (as above), Array of Objects (complex data), Array of Strings (simple data). // complex data var data:Array= [{src:cinematic003.jpg}, {src:cinematic003.jpg}, {src:cinematic003.jpg}]; var imgLoader:BulkLoader = new BulkLoader(); imgLoader.dataFormat = BulkLoaderDataFormat.COMPLEX_FORMAT; imgLoader.dataField = src; imgLoader.data = data; // simple data (no need for dataField) var data:Array= [cinematic003.jpg, cinematic003.jpg, cinematic003.jpg]; var imgLoader:BulkLoader = new BulkLoader(); imgLoader.dataFormat = BulkLoaderDataFormat.SIMPLE_FORMAT; imgLoader.data = data; Just a thought :) regards, Muzak - Original Message - From: Karim Beyrouti ka...@kurst.co.uk To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, July 26, 2009 12:31 PM Subject: Re: [Flashcoders] Image loader problem I went for bulkloader over making my own queued loader - as it has so many tested features. Here is a little code to help get you started ( if you need it )... Instantiate the loader... code // New Bulk Loader imgLoader = new BulkLoader( 'NameOfLoaderInstance'); imgLoader.addEventListener(BulkLoader.COMPLETE, AllItemsLoaded , false , 0 , true ); /code Load images: code // Clear the loader of any previously loaded images imgLoader.removeAll(); // Add all the images to the loading queue for ( var i : int = 0 ; i _data.length ; i ++ ){ var record : Object = _data.getItemAt( i ); var item : LoadingItem = imgLoader.add( record['uri'] ); item.addEventListener( Event.COMPLETE , completeHandler , false , 0 , true ); item.addEventListener( ProgressEvent.PROGRESS , progressHandler , false , 0 , true ); } // start loading - one item at a item - this will load images in the order you added them imgLoader.start( 1 ); /code Image Loaded Event Handler: code private function completeHandler( e : Event ) : void { // // remove event listeners and reference the bitmap var item:LoadingItem = e.target as LoadingItem; item.removeEventListener( Event.COMPLETE , completeHandler ); item.removeEventListener( ProgressEvent.PROGRESS, progressHandler ); var sURL : String = item.url.url; var record : Object = getRecordByKey( sURL, 'uri' ); record.loadid = sURL; view.addImage( imgLoader.getBitmap( record.loadid ) , record ); } /code hope this helps... Regards Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Image loader problem
That thought has crossed my mind as well, especially since you still have to write your own loop to add items to the BulkLoader. So in the end, using BulkLoader you'd probably end up writing about as much code as without it. If all you need to do is load a bunch of images, skip BulkLoader IMO. regards, Muzak - Original Message - From: Latcho spamtha...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, July 26, 2009 9:13 PM Subject: Re: [Flashcoders] Image loader problem 1900 lines of code to fetch some stuff Joseph Masoud wrote: Have you considered using existing bulk loaders? http://code.google.com/p/bulk-loader/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Image loader problem
To make this conversation more constructive, it would be nice if you could point out, explicitly if you may, what would be wrong with using bulk-loader? Well, guess you missed the posts I already made in this thread. I provided both sample code and what BulkLoader is missing (IMO). Basically, the sample code I posted is about the same as the one needed for use with BulkLoader, the main difference being that BulkLoader needs 1900 xtra lines (including comments btw) of code to do it. Don't get me wrong, BulkLoader has its use but as you mentioned, in somewhat more complex applications. And as Cor was only asking about loading a list of images, I think BulkLoader isn't really needed. quoteI am loading a lot of images dynamically from xml./quote Maintainability is an essential feature of complex software systems. Sure, but what makes the use of BulkLoader vs your own loader class more maintainable ? regards, Muzak - Original Message - From: Joseph Masoud yousif.mas...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, July 27, 2009 12:36 AM Subject: Re: [Flashcoders] Image loader problem Hello everyone, The OP did not specify what his deployment requirements are. Personally, I'm happier working with 1900 lines of well structured and reasonably well documented code. Maintainability is an essential feature of complex software systems. I referred the OP to an existing solution for several reasons: 1. He will be able to see what a well designed system looks like 2. Since the source is readily available, the OP gets an excellent case study about classification (arguably the more heuristic part of software development) 3. It demonstrates the proper use of Events 4. It'll save him a lot of time in the future, Bulk loader is a generic library, ad-hoc code is not To make this conversation more constructive, it would be nice if you could point out, explicitly if you may, what would be wrong with using bulk-loader? Finally, please note that my original response was just a suggestion. NB. I am not implying that bulk-loader would have been a superior solution to the one already offered. Many thanks, Joseph On 26 Jul 2009, at 23:12, Muzak wrote: That thought has crossed my mind as well, especially since you still have to write your own loop to add items to the BulkLoader. So in the end, using BulkLoader you'd probably end up writing about as much code as without it. If all you need to do is load a bunch of images, skip BulkLoader IMO. regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Image loader problem
You don't need an array of urls, as you have no use for them, you need an array of loader instances, so that you have the correct order (as they are in the xml). With e4x getting to the image urls is easy, and looping through them as well, so there really is no need to have them in a seperate array. Something like this (from the top of my head): private var data:XML = data img src=jpg/cinematic001.jpg / img src=jpg/cinematic002.jpg / img src=jpg/cinematic003.jpg / /data; private var imgLoaders:Array; private var numLoaded:int = 0; private var numTotal:int; function loadImages():void { imgLoaders = new Array(); var imgs:XMLList = data.img; var len:int = numTotal = imgs.length(); var loader:Loader; for(var i:int=0; ilen; i++) { loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imgCompleteHandler); loader.load(new URLRequest(imgs[...@url)); imgLoaders.push(loader); } function imgCompleteHandler(event:Event):void { numLoaded += 1; event.currentTarget.removeEventListener(Event.COMPLETE, imgCompleteHandler); if(numLoaded == numTotal) { // all images are loaded } } With the above it doesn't matter in what order the images finish loading, you have the correct order in the array (imgLoaders) and you know when all images are loaded when numLoaded equals numTotal. regards, Muzak - Original Message - From: Paul Andrews p...@ipauland.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, July 25, 2009 9:42 PM Subject: Re: [Flashcoders] Image loader problem Cor wrote: Joseph, I always like to write all the code myself. :-) But I will look at this to learn from at least and maybe using someone else his classes. Thank you very much!! Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Joseph Masoud Sent: zaterdag 25 juli 2009 15:04 To: Flash Coders List Subject: Re: [Flashcoders] Image loader problem Have you considered using existing bulk loaders? http://code.google.com/p/bulk-loader/ You've got a relatively complex task ahead if you're going to write the code all by yourself. Essentially the idea is to have two stacks, a loading stack and a pending stack [list of assets to be loaded]. Ensure there is only one loader in the loading stack at any time during the loading process if order is important. I suggest creating a separate data type for storing information about the images, however I think you might want to consider letting one object deal with the loading process. Many thanks, Joseph On 25 Jul 2009, at 13:53, Cor wrote: To solve your issue you might write the code so that the next image in the sequence doesn't load or start to load until the previous is complete. Yes, but I dont know how. You could bulk load the images and stuff them in an array then use a loop to run through the array to get the image and it's properties so that you can align everything the way you want. Frankly I just want them in the same order as they are in my xml. Here's a nudge in the right direction. Store the image paths in an array - imagePaths and the loaded images in loadedImages. Use i as a counter through the array. I have ommited variable declarations. This is just a bare bones, with bits missing! Adapt to your case. Paul function loadImage():void { if ((iimagePaths .length) (i= 0)) { loader =new flash.display.Loader(); urlreq = new URLRequest(imagePaths [i]); loader .contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete); loader .contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,onIOError); loader .load(urlreq); } } public function _onLoadComplete(e:Event):void { loadedImages[i]= e.currentTarget.content; i++; if (iimagePaths .length) { loadImage(); } else { useImages(); } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] What program is this
Have a look at Captivate: http://www.adobe.com/products/captivate/ - Original Message - From: Zuriel zu...@zadesigns.com To: flashcoders@chattyfig.figleaf.com Sent: Monday, July 20, 2009 11:57 PM Subject: [Flashcoders] What program is this Can someone tell me what this company used to record this demo? Was it all done by hand with Flash or was a screen recording system used... http://www.imagenow.com/interactive/demo-player.jsp?DemoPlayerFile=DemoPlayer_v03File=ap-auto-invoice.swfTitle=ImageNow%20for%20Automated%20Invoice%20ProcessingCopyright=%a9%202009%20Perceptive%20Software,%20IncKeepThis=trueTB_iframe=trueheight=755width=970 [1] I am going to do one for a company and I was originally going to do it by hand.. but it looks almost like its a FLV. with a player playing it??? can someone tell me which one it is... I know of camtasia and random google searches but which one is the best and which one is the most feature packed.. I can code very good AS3 code ATM so I want one that maybe integrates into Flash AS nicely.. Thanks! Links: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] setTimeout / clearTimeout
You may have to use _global.setTimeout() and _global.clearTimeout() regards, Muzak - Original Message - From: Glen Pike g...@engineeredarts.co.uk To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, July 03, 2009 2:02 PM Subject: [Flashcoders] setTimeout / clearTimeout Hi, I have some old AS2 stuff where I have used setTimeout and clearTimeout in timeline script no problem, but as soon as I try to use these in a class I am getting compiler errors saying the functions are not defined. Any reason this would happen? Compiling for Flash 8 AS2 with a mixture of timeline (yuck) and class code. Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange characters added to file when saving fromFlex/AIR using fileStream
Use FileStream.writeUTFBytes() var xml:XML = order !--This is a comment. -- ?PROC_INSTR sample ? item id='1' menuNameburger/menuName price3.95/price /item item id='2' menuNamefries/menuName price1.45/price /item /order; var str:String = '?xml version=1.0 encoding=UTF-8?' + File.lineEnding; str += xml.toXMLString(); var fs:FileStream = new FileStream(); fs.open(outputFile, FileMode.WRITE); fs.writeUTFBytes(str); fs.close(); regards, Muzak - Original Message - From: Cheetham, Marcus marcus.cheet...@pearson.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, July 03, 2009 12:39 PM Subject: [Flashcoders] Strange characters added to file when saving fromFlex/AIR using fileStream I'm using fileStream to save a text file. This works OK, but introduces some strange characters at the beginning of the saved text. I'm saving XML data. I've kept this as an XML object and also converted it to string first -- same thing always happens. Any idea how I can get rid of these characters? Thanks, Marcus. This is what I end up with (note the 'g at the beginning) : 'gorder item id=1 menuNameburger/menuName price3.95/price /item item id=2 menuNamefries/menuName price1.45/price /item /order This is the Flex 3 code: ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute activate=createXML() mx:Script ![CDATA[ import flash.events.Event; import flash.filesystem.*; public function createXML():void { x1 = order !--This is a comment. -- ?PROC_INSTR sample ? item id='1' menuNameburger/menuName price3.95/price /item item id='2' menuNamefries/menuName price1.45/price /item /order } public var file:File; public function saveToFile() :void { file = new File(/filename.xml); file.addEventListener(Event.SELECT, dirSelected); file.browseForSave(''); } public function dirSelected(e:Event) :void { // this object will get saved to the file var dat:String = new String; var str:String = new String; str = x1.toXMLString(); dat = str; var fileStream:FileStream = new FileStream(); fileStream.open(file, FileMode.WRITE); fileStream.writeObject(dat); fileStream.close(); } ]] /mx:Script mx:Button x=102 y=320 label=Save XML click=saveToFile()/ mx:XML id=x1 format=e4x/ /mx:WindowedApplication This email was sent by a company owned by Pearson plc, registered office at 80 Strand, London WC2R 0RL. Registered in England and Wales with company number 53723 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange characters added to file whensaving fromFlex/AIR using fileStream
You mean writing to disk? That's AIR only. regards, Muzak - Original Message - From: Cor c...@chello.nl To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Friday, July 03, 2009 3:21 PM Subject: RE: [Flashcoders] Strange characters added to file whensaving fromFlex/AIR using fileStream Muzak, Is this also possible from Flash?? And if so: How? Kind regards Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Muzak Sent: vrijdag 3 juli 2009 14:48 To: Flash Coders List Subject: Re: [Flashcoders] Strange characters added to file when saving fromFlex/AIR using fileStream Use FileStream.writeUTFBytes() var xml:XML = order !--This is a comment. -- ?PROC_INSTR sample ? item id='1' menuNameburger/menuName price3.95/price /item item id='2' menuNamefries/menuName price1.45/price /item /order; var str:String = '?xml version=1.0 encoding=UTF-8?' + File.lineEnding; str += xml.toXMLString(); var fs:FileStream = new FileStream(); fs.open(outputFile, FileMode.WRITE); fs.writeUTFBytes(str); fs.close(); regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Variable naming conventions...
http://www.google.com/search?hl=enq=as3+naming+conventionsmeta=aq=0oq=as3+naming+con http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions - Original Message - From: Sander Schuurman b...@chello.nl To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, June 29, 2009 1:34 PM Subject: [Flashcoders] Variable naming conventions... Hi, just wondering what you guys have for variable naming conventions... I use: ALL_CAPITALS for constants _underscore for private vars this.thisPublicVar for public vars $dollarSignedParam for method params normalCamelCase for local method vars Inside methods I can recognize all variable types... What do you use? Sander Schuurman sentoplene.com twitter: @sentoplene ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Youtube Videos cache
And from what I can tell, doesn't work for HD videos, which is where this *feature* would actually be useful. - Original Message - From: Juan Pablo Califano califa010.flashcod...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, June 28, 2009 8:34 PM Subject: Re: [Flashcoders] Youtube Videos cache Appartently, the news is that it works across youtube CDN, which would likely serve the same video from different servers / url. Yet, I think calling this incredible is a bit overstated... And FWIW, it doesn't seem to work every time (I've just tried it on Chrome -- default settings -- and sometimes it works, sometimes it doesn't. Cheers Juan Pablo Califano 2009/6/28 Leandro Ferreira dur...@gmail.com According to this site, Youtube can now cache his videos on the browser YouTube managed to achieve something incredible: browsers now cache YouTube videos and you can load the same video multiple times from the local cache. ( http://googlesystem.blogspot.com/2009/06/browsers-cache-youtube-videos.html ) I though that FLV files were normally cached by the browser, but apparently not. Anyone got info about that? Leandro Ferreira ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flex interferes with SVN
I use SubClipse and TortoiseSVN and have no problems. Just make sure both have the exact same version, 1.6.2 in my case. regards, Muzak - Original Message - From: Mario Gonzalez ma...@wddg.com To: Flash Coders List flashcoders@chattyfig.figleaf.com; This is the generalmailing list for FlashCodersNY.org flashcoder...@flashcodersny.org Sent: Saturday, June 27, 2009 12:00 AM Subject: [Flashcoders] Flex interferes with SVN If I have a project that is under subversion control, then I decide to make a flex project with the folder (order of these two operations can be reversed with same results) everything gets screwed up. I can't add/commit (* is already under version control) my files because flexbuilder already has it's own internal 'subversion' type system. If you try to commit you get this error Over all its a big annoying mess, What do you guys do in this situation? Mario Gonzalez http://onedayitwillmake.com Senior Developer | WDDG.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] blip.tv api?
Their API is explained here: http://wiki.blip.tv/index.php/Blip.tv_API username and password are in the prompt. - Original Message - From: Nate Beck n...@tldstudio.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, June 19, 2009 5:17 AM Subject: Re: [Flashcoders] blip.tv api? To try and make this a little more clear. You're basically requesting the information from their webservers using a customized url. A RESTful service you can actually use from a web browser, for example... on Twitter Search you can get your results in JSON by doing this. http://search.twitter.com/search?q=iPhone turns into this: http://search.twitter.com/search.json?q=iPhone Which will return the data your looking for in a format called JSON (JavaScript Object Notation). So to clarify on what I said earlier. You can get this data into your flash application using URLLoader. Just set the URL to where the JSON data is and then request it. When you get a result back, you will have a REALLY long String of data that you want to drill into. That's where as3corelib and it's JSON.parse() method steps in. You pass JSON.parse() a String and it returns an Object. You can then drill into that Object to get the relevant data that you need. Those Java and Ruby files are just wrappers for making calls to Blip.tv web services. Unfortunately there isn't a wrapper (library) for ActionScript. Hopefully that makes it a bit more clear, I wasn't trying to be rude earlier, after re-reading my emails I may have come across that way. I apologize. Cheers, Nate ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] blip.tv api?
You're not limited to JSON. From what I can tell (only looked at their API real quick), blip.tv supports JSON, REST and RSS (xml). Which one you use is up to you (you can even mix them if you want). regards, Muzak - Original Message - From: Fabio Pinatti fpina...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, June 19, 2009 1:55 PM Subject: Re: [Flashcoders] blip.tv api? hello! @Nate: Thank you so much by the so clear explanation.. I don't have much experience with JSON and that's why I didn't get it if blip.tv was possible through flash.. but your last emails were great, and a great step to learn it.. About google, well, I really agree with you that it needs to be the first tool to everyone, since a lot of people are really lazy.. the point is that I didn't get the files and process to do in my case, and that's why I've posted in that forum.. thank you so much, Nate! @Muzak: I saw that they require a login/pass, and now I know that can be possible use the api from flash, I'll dig for register and get a login info to me and check it better right now.. thanks Muzak! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Projector Serial Number protection
Careful with buying Zinc if you don't already have a license. As of late, their support is non existing. They haven't responded in quite some time on their support forums. I've asked them (a month ago) about a (serious) bug that has been around since August 2008 and haven't heard anything. Just a friendly warning :) - Original Message - From: Glen Pike postmas...@glenpike.co.uk To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, May 27, 2009 12:22 AM Subject: Re: [Flashcoders] Projector Serial Number protection Hi, Cheers guys - Zinc looks quite sturdy and possibly a nice investment, depending on whether the (humanoid) client wants to go for something flexible. Found a few other products that let you bundle in serial protection - probably less flexible, but cheap - links for anyone interested. Comments welcome.. http://www.increditools.com/flash_exe_builder/features.php http://www.chameleonflash.com/index.html As for the robots - they can look after themselves - can't put serial numbering on an OS Linux app, so we have to resort to making the robots walk and fight their own battles :P Later Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] RegEx
Must be a mistake. There's no such mention here: http://livedocs.adobe.com/flex/3/langref/String.html#match() - Original Message - From: Anthony Pace anthony.p...@utoronto.ca To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, May 10, 2009 12:54 AM Subject: [Flashcoders] RegEx I am reading the documentation, and it says that match and replace are only for air 1.0 and they have that nasty trilobal air logo. What the heck If that is the case then why are they running in the flash player? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] What's the dollar symbol for?
What does the dollar symbol do? It shows that the developer broke the underscore key on his keyboard :) And that he's most likely a PHP developer.. or both. gd$rating -- gdRating -- gd_rating And I assume gd stands for Google Data -- Google Data API http://code.google.com/intl/nl-BE/apis/gdata/overview.html gd is also a namespace in the GData XML in the YouTube Data API http://code.google.com/intl/nl-BE/apis/youtube/2.0/reference.html#GData_elements_reference - Original Message - From: Stephen Matthews st...@gingerman.co.uk To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, May 05, 2009 10:42 AM Subject: [Flashcoders] What's the dollar symbol for? Hi, I am working with Martin Legris's great Youtube API class and wondered what this was ( _data.gd$rating ) What does the dollar symbol do? Here is a link to the particular class- http://as3-youtube-data-api.googlecode.com/svn/trunk/ca/newcommerce/youtube/data/VideoData.as This is the getter- public function get rating():RatingData { return new RatingData(_data.gd$rating); } PS I looked at Adobe's online help but could not find a reference to it. Thanks Steve ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] What's the dollar symbol for?
Not really.. The guidelines specify to prepend a getter/setter with a dollar sign if it overrides an inherited getter/setter. quote If a class overrides a getter/setter and wants to continue to expose the base getter/setter, it should do so by implementing a property whose name is the base name with a $ prepended. This getter/setter should be marked final and should do nothing more than call the supergetter/setter. /quote gd$comments gd$rating gd$feedLink AFAIK, those have nothing to do with that. If they did, they would be: $gdComments $gdRating $gdFeedLink indicating overriding inherited properties: gdComments, gdRating, gdFeedLink Again, my guess is they want to indicate they represent the GData API xml ellements which use the gd namespace. http://code.google.com/intl/nl-BE/apis/youtube/2.0/reference.html#GData_elements_reference I haven't looked at the YouTube API at all by the way, so I'm just guessing :) regards, Muzak - Original Message - From: Ivan Dembicki ivan.dembi...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, May 05, 2009 1:35 PM Subject: Re: [Flashcoders] What's the dollar symbol for? Hello, http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions#CodingConventions-Property(variableandgetter%2Fsetter)names and you can find other $ symbols in this document. -- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: CS4 on non intel
I've used FontExpert in the past. Great tool for managing installed and non-installed fonts. Also allows you to temporarily deactivate installed fonts and alot more.. http://www.proximasoftware.com/fontexpert/ - Original Message - From: Glen Pike postmas...@glenpike.co.uk To: kennethkawam...@gmail.com; Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, May 06, 2009 12:39 AM Subject: Re: [Flashcoders] Re: CS4 on non intel Hi, Is there any way of testing the validity of fonts on PC's? I ask as we have a similar problem with Adobe Premiere Pro 2 where fonts are causing the program to crash... Not sure how you validate on a Mac, but if there is some kind of tool to do this... Googling shows what looks like a lot of complaints about Adobe stuff suffering from dodgy font crashes - it seems ironic that a company dealing mainly in graphics software can't seem to write a program that fails gracefully when something graphical goes wrong ;| Any tips on fonts are most appreciated as we have about 700 or more installed (and never used...) Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Dynamic Images and the Library
Google for JPEGEncoder and/or PNGEncoder. - Original Message - From: Karl DeSaulniers k...@designdrumm.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, May 03, 2009 5:30 AM Subject: Re: [Flashcoders] Dynamic Images and the Library Thanks Ashim. I will try that. Sent from losPhone On May 2, 2009, at 10:06 PM, Ashim D'Silva as...@therandomlines.com wrote: If you're dynamically loading an image, it doesn't have to be an mc, it's bitmap data and can be treated so. If you want to save the contents of an mc to an image, use bitmapData.draw(mc) to get bitmapData and write that to a jpeg/png on your server. You should be able to find a tutorial that runs you through the whole process. Ashim The Random Lines My online portfolio www.therandomlines.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Batch wrapping a bunch of FLV files in SWFs
You know you can control flv's right? - Original Message - From: Henry Cooke aninfinitenumberofmonk...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 30, 2009 7:23 PM Subject: [Flashcoders] Batch wrapping a bunch of FLV files in SWFs Anyone know a good way of doing this? I've got a big stack of FLVs that I need to wrap up in SWFs so I can control their timelines properly. I'd love it if there was a command line tool like swfmill or swftools to do it, but I'm willing to try anything that works ;) h. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] E4X question
var floorplan:XML = FloorplanData floor name=1 dept name=Administration/ dept name=Reception/ /floor floor name=2 dept name=Human Resources/ dept name=Finance/ /floor floor name=3 dept name=Marketing/ dept name=Accounting/ /floor floor name=4 dept name=Sales/ dept name=Legal/ /floor /FloorplanData; var dep:String = Reception; trace(floor: , floorplan.floor.dept.(@name == dep).parent().toXMLString()); //output: floor: floor name=1 dept name=Administration/ dept name=Reception/ /floor Is that what you're looking for? regards, Muzak - Original Message - From: Mendelsohn, Michael michael.mendels...@fmglobal.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 30, 2009 8:43 PM Subject: [Flashcoders] E4X question Hi list... I'm still relatively new with E4X. I can't get seem to get this function to return the name of the floor that the department is on. I.E., pass a string, traverse the xml, get the parent's name attribute. In my second attempt, I figured to test for the property name first, because the root node doesn't have @name, but still no luck. This should be easy, right? It's probably obvious. Thanks, - Michael M. private function getFloor(deptName:String):void{ // always errors var theFilteredList:XMLList = FloorplanData..*.(@name==thisLabel); // this doesn't work either var f:XMLList = FloorplanData.*.(hasOwnProperty(name) attribute(name)==thisLabel); } ?xml version=1.0 encoding=utf-8? FloorplanData floor name=1 dept name=Administration/ dept name=Reception/ /floor floor name=2 dept name=Human Resources/ dept name=Finance/ /floor floor name=3 dept name=Marketing/ dept name=Accounting/ /floor floor name=4 dept name=Sales/ dept name=Legal/ /floor /FloorplanData ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] mxmlc include classes , possible???
Checked the docs? includes class [...] Links one or more classes to the resulting application SWF file, whether or not those classes are required at compile time. http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html - Original Message - From: Jiri jiriheitla...@googlemail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 29, 2009 4:40 PM Subject: [Flashcoders] mxmlc include classes , possible??? Hello list, Is it possible to force the mxmlc compiler to include certain classes so they can be instantiated at runtime. So I dont have to put an explicit reference in the .as files, in order to include it. I thought there was a compiler flag called include-classes, but a google search yields nothing of any use. I tried putting this in my flex-config include-classes classorg.name.class/class /include-classes But I get an error. Doing a mxmlc -help advanced in the console also yields no such flag. So I wonder now, is it at all possible, or do i need to create a .swc and have that add to the librart tag? Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Memory concerns
If you have many listeners in a loaded external movie and then you remove the movie are the listeners still in memory, which might cause problems later? Yes. AFAIK, that's a No. If there are no more references *to* the external movie, you should be fine. There are problems however with external movies having NetConnection, NetStream and Sound objects. For that, a new method was introduced: Loader.unloadAndStop(); Have a look at Loader.unload() and loader.unloadAndStop() http://livedocs.adobe.com/flex/3/langref/flash/display/Loader.html#unload() http://livedocs.adobe.com/flex/3/langref/flash/display/Loader.html#unloadAndStop() - Original Message - From: Paul Andrews p...@ipauland.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 28, 2009 7:55 PM Subject: Re: [Flashcoders] Memory concerns - Original Message - From: John R. Sweeney Jr jr.swee...@comcast.net To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 28, 2009 6:35 PM Subject: [Flashcoders] Memory concerns I know you have to implicitly remove objects to free up memory, but does that also apply to listeners? Yes. If you have many listeners in a loaded external movie and then you remove the movie are the listeners still in memory, which might cause problems later? Yes. Thanks in advance for any insights, John Anything with a reference to it won't be garbage collected and that includes listeners and instances referenced by listeners (unless it's a weak reference). Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Memory concerns
So, you may be right but I'm not entirely convined about unload() sorting out event handlers. Well there's nothing to sort out if the external content only has events going on inside itself. - Original Message - From: Paul Andrews p...@ipauland.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 29, 2009 2:11 AM Subject: Re: [Flashcoders] Memory concerns - Original Message - From: Muzak p.ginnebe...@telenet.be To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 28, 2009 7:46 PM Subject: Re: [Flashcoders] Memory concerns If you have many listeners in a loaded external movie and then you remove the movie are the listeners still in memory, which might cause problems later? Yes. AFAIK, that's a No. If there are no more references *to* the external movie, you should be fine. I'm not sure that's true for Loader.unload() and event handlers.. There are problems however with external movies having NetConnection, NetStream and Sound objects. For that, a new method was introduced: Interestingly enough this method explicitly deals with event dispatchers and is only available in FP10. So, you may be right but I'm not entirely convined about unload() sorting out event handlers. Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Loading string data in a file from a server
Well it depends on what you're trying to do with the loaded data. If all you want is to load it and write to disk, then the format doesn't really matter. As mentioned earlier, to write the loaded data to disk you use a combination of a File instance and a FileStream instance. Should be examples of that in the docs. http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e4a.html The following will load the data, when loaded, ask where to save it, and then write that data to the file you selected. private var plsData:String; private function appInit():void { trace(Application ::: appInit); var plsURL:String = http://www.funky-monkey.nl/air/stringtest/serveFile.php;; var plsReq:URLRequest = new URLRequest( plsURL ); var plsLoader:URLLoader = new URLLoader( plsReq ); plsLoader.addEventListener( Event.COMPLETE , plsLoaded ); } private function plsLoaded(evt:Event):void { trace(Application ::: plsLoaded); var value:String = plsData = evt.currentTarget.data; trace(value); var f:File = new File(); f.addEventListener(Event.SELECT, fileSelectHandler); f.browseForSave(Save Data); } private function fileSelectHandler(evt:Event):void { trace(Application ::: fileSelectHandler); var f:File = evt.currentTarget as File; trace(- nativePath: , f.nativePath); // create filestream, open it and write data to file var fs:FileStream = new FileStream(); fs.open(f, FileMode.WRITE); fs.writeUTFBytes(plsData); fs.close(); } - Original Message - From: Sidney de Koning sid...@funky-monkey.nl To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 22, 2009 9:44 AM Subject: Re: [Flashcoders] Loading string data in a file from a server No i cant use XML since eventually it will be a PLS file (Winamp Shoutcast), I wrote a library that parses a PLS file (Playlist file from Winamp Shoutcast server) (http://code.google.com/p/as3plsreader/) this all works fine from with AIR, IF I have the file already saved to local disk. So my final test is to directly load the PLS from the shoutcast server. That why i need to convert the event.target.data to a File... Cant i do: var f:File = new File(event.target.data) ? Do you have any other suggestion on how to do this? Greets Sid ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Feasibility of xml file for high score data storage
An xml file for use by multiple clients simultaneously is just not an option. Go with a database + server side language (php, asp, coldfusion) and add remoting if you can. regards, Muzak - Original Message - From: Paul Steven paul_ste...@btinternet.com To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 22, 2009 12:57 PM Subject: [Flashcoders] Feasibility of xml file for high score data storage I was considering using an xml file to store high score data for a game. It is quite possible that this game will have a significant amount of traffic (certainly in the first few days after launch) and I am now wondering if an xml file would be suitable. I am not sure what happens in the scenario where multiple players want to update the highscore at the same time - they will all need to write to the file. I assume this is the same scenario with a database but think perhaps updating a database is more efficient. Anyone care to offer any insight into whether an xml file would be suitable or not? Thanks Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Loading string data in a file from a server
Well that was just an example :) Here's how to do it without the save file dialog: private function plsLoaded(evt:Event):void { trace(Application ::: plsLoaded); var value:String = evt.currentTarget.data; trace(value); var f:File = File.desktopDirectory; f.url += /playlist.pls; trace(- url: , f.url); trace(- nativePath: , f.nativePath); var fs:FileStream = new FileStream(); fs.open(f, FileMode.WRITE); fs.writeUTFBytes(plsData); fs.close(); } The above will create a file called playlist.pls on your desktop. Some stuff on security: http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e5b.html http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e59.html From the above: quote AIR applications cannot modify content using the app: URL scheme. Also, the application directory may be read only because of administrator settings. Unless there are administrator restrictions to the user's computer, AIR applications are privileged to write to any location on the user's hard drive. Developers are advised to use the app-storage:/ path for local storage related to their application. /quote To get to the application storage directory rather than the desktop, in the above example, use: var f:File = File.applicationStorageDirectory; regards, Muzak - Original Message - From: Sidney de Koning sid...@funky-monkey.nl To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 22, 2009 3:37 PM Subject: Re: [Flashcoders] Loading string data in a file from a server Hi Muzak, This is not exactly what i want to do but it comes close (and i cant test right now since i'm at work) The whole 'prompt user for saving a file' i want to avoid, but the below code looks like what i wan to do: var f:File = evt.currentTarget as File; trace(- nativePath: , f.nativePath); // create filestream, open it and write data to file var fs:FileStream = new FileStream(); fs.open(f, FileMode.WRITE); fs.writeUTFBytes(plsData); fs.close(); Thanks for the help, will let you know if it worked. Sid ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash Player 6 Cross Domain Policy
It appears that the cross domain policy files were not introduced until Flash Player 7 - is this correct? Nope, Flash Player 6,0,21,0. Check out the Adobe Security Center: http://www.adobe.com/devnet/security/ http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html#flash-player-support-by-version - Original Message - From: Paul Steven paul_ste...@btinternet.com To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 21, 2009 1:15 PM Subject: [Flashcoders] Flash Player 6 Cross Domain Policy I need to confirm whether it is possible for a game being published for Flash Player 6 and played with the Flash Player 6 plug-in is able to read and write an xml file on another server? It appears that the cross domain policy files were not introduced until Flash Player 7 - is this correct? Basically my client does not want to host the highscores on their server so I am assessing whether I can host the swf on their server and update and retrieve the high scores from my server using PHP and xml? Any advice much appreciated on possible solutions Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Loading string data in a file from a server
Works fine here (Flex+Air). - Original Message - From: Sidney de Koning sid...@funky-monkey.nl To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 21, 2009 3:41 PM Subject: Re: [Flashcoders] Loading string data in a file from a server Anybody? I just want to know how to load an file from a server that holds string data (xml or txt file) without getting the 2032 error. Please help, Sid On Apr 20, 2009, at 4:14 PM, Sidney de Koning wrote: Hi List, I want to load textfile from my own server from an AIR app but i keep getting a 2032 Error, a Stream Error. Event though when i load this from the browser it works. The docs about this on the net are very limited. This is what i thought of so far: - It could be a crossdomain error? - I do handle all events? - I tried a loading in a PHP file that uses fopen to serve me the file Do anyone have any ideas? I just want to read in this text file ( or any other file with string data from my server ) or should i use FileStream to read in the file? Eventually the contents of the file i load in will will need to be a File Object (). Thanks in advance, Sidney Below is my code: var xmlURL:String = http://www.funky-monkey.nl/air/stringtest/serveFile.php ; var xmlReq:URLRequest = new URLRequest( xmlURL ); var xmlLoader:URLLoader = new URLLoader( xmlReq ); //listen for error events xmlLoader.addEventListener( IOErrorEvent.IO_ERROR , onIOError ); xmlLoader.addEventListener( SecurityErrorEvent.SECURITY_ERROR , onSecurityError ); xmlLoader.addEventListener( Event.COMPLETE , xmlLoaded ); function xmlLoaded(evt:Event):void { trace( evt.target.data) } function onIOError(evt:IOErrorEvent):void { trace( evt.text) } function onSecurityError(evt:SecurityErrorEvent):void { trace( evt.text ) } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Loading string data in a file from a server
And when you trace out you do get the contents of the file? Yup, I saw file content in debug window. If it does work, my question becomes something different; How do i convert the loaded in data (one big string) to a File object ? Use xml instead of text? - Can i add data to a File Object? - Can i create a new temporary File Object and and string data to it? Nope and nope. The data property of a File object is read only. Check the docs. You typically use a File object in combination with a FileStream instance to read/write to disk. http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html http://livedocs.adobe.com/flex/3/langref/flash/filesystem/FileStream.html I save it in memory and pass it through to the rest. Depends on what the rest is, but you can pass a File object around, just like any other object. regards, Muzak - Original Message - From: Sidney de Koning sid...@funky-monkey.nl To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 21, 2009 4:49 PM Subject: Re: [Flashcoders] Loading string data in a file from a server Hi Muzak, And when you trace out you do get the contents of the file? Sid ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Just a quick one
IMHO they should have just integrated all the code editing and compilation abilities into dreamweaver to make it a better, must have, product, or put everything dreamweaver has into eclipse if they truly want to move everything to eclipse. They (Macromedia) tried that with Flex 1 and 1.5 and failed miserably. If you think Eclipse is slow (which I don't) then you should find a copy of Flex 1 :) Like Dave I have also run Eclipse on a single core P4 with 1Gb ram and it ran OK. Took a bit of jvm tweaking though. And FB 3 runs alot better than FB2. On a dual core 3.0 with 4Gb ram it runs smooth as butter. I'm personally very happy with FlexBuilder (and Eclipse in general) and look forward to Bolt (CF editor). regards, Muzak - Original Message - From: Anthony Pace anthony.p...@utoronto.ca To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, April 18, 2009 8:55 PM Subject: Re: [Flashcoders] Just a quick one Use Flash Develop or Flex Builder Flash develop is free and great for as3; yet, Flex Builder for eclipse, with its insanely high price tag of $249, is better if you want to include capabilities to edit other languages like c++ or java. IMHO they should have just integrated all the code editing and compilation abilities into dreamweaver to make it a better, must have, product, or put everything dreamweaver has into eclipse if they truly want to move everything to eclipse. Eclipse is insanely slow, and java , even with flashdevelop's sytax checking through java, makes my dual core 2.2 ghz CPU with 2gigs of memory, spike at 45% for its processes and take 250 - 500 MB of memory. Java sucks ass when it comes to speed; despite the propaganda, spread by SUN and java developers, to the contrary. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Just a quick one
This should work: import ImageLoader; var imgHolder:MovieClip = this.createEmptyMovieClip(imgHolder_mc, this.getNextHighestDepth()); var imgURL:String = ableton_live6_logo.jpg; var imgLoader:ImageLoader; function onLoadInit():Void { trace(Application ::: onLoadInit); trace(- width: + imgHolder._width); trace(- height: + imgHolder._height); } imgLoader = new ImageLoader(); imgLoader.addListener(this); imgLoader.loadImage(imgURL, imgHolder); regards, Muzak - Original Message - From: Karl DeSaulniers k...@designdrumm.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, April 19, 2009 12:56 AM Subject: Re: [Flashcoders] Just a quick one Thank you all for the great responses. I actually think I have a copy of flex 1 somewhere. LOL But alas my movie is still not working and my programming knowledge extent at this time is as2 based. Don't seem to get the time to dive into as3 or any other ie: flex 1 I really am stumped on how to get the wh of this loaded data. Nothing I do seems to work. :( ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] rotationX not working In Flex actionscript Projects
Well, that's the one you should enable :) I don't know how else to *force* FlexBuilder to compile a f10 swf. Try enabling it, fill in fp 10, then click apply (it will make some project changes behind the scene) then disable it again (leaving fp10 as the required version). See if that helps.. regards, Muzak - Original Message - From: Omar Fouad omarfouad@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 14, 2009 1:42 PM Subject: Re: [Flashcoders] rotationX not working In Flex actionscript Projects There is no compiler settings except to the html wrapper file that I don't use... On Sun, Apr 12, 2009 at 2:29 AM, Muzak p.ginnebe...@telenet.be wrote: In FlexBuilder, in the Project properties (right click the project select properties), set the required Flash Player to 10 in the Flex Compiler tab. By default FlexBuilder compiles to Flash 9, which doesn't have the new 3D stuff. regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] rotationX not working In Flex actionscript Projects
This might do the trick as well: In the project properties select Flex Build Path - Library Path. Select the playerglobal.swc and remove it. Select Add SWC.. and browse to frameworks/libs/player/10/playerglobal.swc inside the 3.2 SDK directory and click OK. That's probably what FB automatically does when you change the required FP version :) regards, Muzak - Original Message - From: Omar Fouad omarfouad@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 14, 2009 1:42 PM Subject: Re: [Flashcoders] rotationX not working In Flex actionscript Projects There is no compiler settings except to the html wrapper file that I don't use... On Sun, Apr 12, 2009 at 2:29 AM, Muzak p.ginnebe...@telenet.be wrote: In FlexBuilder, in the Project properties (right click the project select properties), set the required Flash Player to 10 in the Flex Compiler tab. By default FlexBuilder compiles to Flash 9, which doesn't have the new 3D stuff. regards, Muzak - Original Message - From: Omar Fouad omarfouad@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, April 11, 2009 10:51 PM Subject: [Flashcoders] rotationX not working In Flex actionscript Projects Hi all, Since I switched to Mac now, I am using Flex Builder for my ActionScript Projects, I've got the latest Flex SDK 3.2 (I think that is the latest) and edited the flex_config xml file. I've added the playerglobal swc file to the build path of Flex for Auto Completion and all. Here is the problem: it seems that the specific FP 10 new properties as .z, .rotationX, .rotationY and .rotationZ are not recognized by the compiler. mc.rotationX = 45; // this is not working as it is ignored. Using Tweener: Tweener.addTween(mc, { rotationX:45, time:1}); // throws Property rotationX not found on [object name ] and there is no default value Is there anything wrong I am doing in flex? Thanks for the support. Cordially. -- Omar M. Fouad - Adobe Flashâ„¢ Platform Developer www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Adobe Flash™ Platform Developer www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Nintedo experiencewii ( how did they do that ? )
Stephen, I think the answer is one word: Money. Well, not enough money apparently.. getting security errors and a bunch of null object reference errors :) - Original Message - From: jonathan howe jonathangh...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 14, 2009 7:15 PM Subject: Re: [Flashcoders] Nintedo experiencewii ( how did they do that ? ) Stephen, I think the answer is one word: Money. My theory is that the whole page is paid advertising. On Tue, Apr 14, 2009 at 1:03 PM, Stephen Matthews st...@gingerman.co.ukwrote: Hi, I know that the whole YouTube area is a Flash movie, but... does anyone have any idea how they got to embed this Flash movie onto the YouTube site? http://www.youtube.com/experiencewii ( I see the Flash movie is served from the facebook.com server - even weirder ). Regards - and thanks Steve ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Favorite Flex book?
I have Flexbuilder but don't use it much because I have so many out of memory errors with it, I haven't been able to get those under control - only happens with Flexbuilder - not with any other multimedia application. Sounds odd. I've used FB on an older P4 with only 1Gb ram without any problems. As Dave said, you should probably look into tweaking the Eclipse JVM memory If you google Eclipse JVM or Eclipse ini I'm sure something useful will come up. Here's an article on EclipseZone: http://eclipsezone.com/eclipse/forums/t61618.html As for Flex books, I never looked into any of them. There's plenty of things to get you started on the Adobe site: http://www.adobe.com/devnet/flex/?tab:samples=1 http://www.adobe.com/devnet/flex/quickstart.html And I spend alot of time reading docs :) http://livedocs.adobe.com/flex/3/html/help.html?content=Part2_DevApps_1.html pdf of the above: http://livedocs.adobe.com/flex/3/devguide_flex3.pdf http://livedocs.adobe.com/flex/3/langref/index.html regards, Muzak - Original Message - From: Merrill, Jason jason.merr...@bankofamerica.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 14, 2009 8:06 PM Subject: RE: [Flashcoders] Favorite Flex book? (On a side note, are there people out there who are successfully using FlashDevelop with the FlexDesignView plugin for real development? Or should I lay down the cash for FlexBuilder?) I'm using FlashDevelop + the free Flex SDK from Adobe to create Flex apps. Works great, no problems. I didn't know about the FlexDesignView plugin until you mentioned it! My only problem with using the Flex SDK this way is it doesn't include the charting components. I have Flexbuilder but don't use it much because I have so many out of memory errors with it, I haven't been able to get those under control - only happens with Flexbuilder - not with any other multimedia application. And I have 2GB RAM. I'm really disappointed in Adobe for not addressing this issue - but sorry, back to your topic: To fit your description, I like the Flex 3 Cookbook from O'Reilly press - though I does not compare Flash and Flex if that is what you are looking for. It's just filled with tons of examples on how you would solve specific problems with Flex: http://www.amazon.com/dp/0596529856/?tag=googhydr-20hvadid=3383658585r ef=pd_sl_74cudeesgv_e For training, I like the Adobe Flex training from the source book(s). I have the one for Flex 2, but here is the latest: http://www.amazon.com/Adobe-Flex-3-Training-Source/dp/0321529189/ref=sr_ 1_1?ie=UTF8s=booksqid=1239732077sr=1-1 Some people like the Friends of Ed books too - I have some of those and they are great, but they are for Actionscript 3 and design patterns, not Flex. The Friends of Ed books on Flex are probably pretty good too. Jason Merrill ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Favorite Flex book?
If you're using the Flex Builder integrated install What does that mean? How would I know? Flex Builder Standalone vs Eclipse + FB plugin. If you have FB standalone, you typically see the FB startup logo when starting the app. Eclipse + FB plugin shows the Eclipse logo at startup. The standalone version has Eclipse integrated, so it installs Eclipse for you (kinda). With this config you'll have 1 install directory (e.g. C:\Program Files\Adobe\Flex Builder 3) The plugin version requires Eclipse to be already installed and during the FB plugin installation asks for the Eclipse location. With this config you'll have 2 install locations: e.g. C:\Eclipse (or whereever you installed Eclipse) + C:\Program Files\Adobe\Flex Builder 3 plugin regards, Muzak - Original Message - From: Merrill, Jason jason.merr...@bankofamerica.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 15, 2009 1:10 AM Subject: RE: [Flashcoders] Favorite Flex book? As Dave said, you should probably look into tweaking the Eclipse JVM memory If you google Eclipse JVM or Eclipse ini I'm sure something useful will come up. Dave, Muzak - Hey thanks guys. However, been there and done that tweaking of the ini a few times to create more heap space. Initally, I discovered the problem was the ini file was actually MISSING from my Flexbuilder/Eclipse install (after my license was purchased, it was pushed to my machine via Tivoli - I'm sure that's what caused the problem - the person who packed it in Tivoli probably did it wrong), so I had to manually create it with notepad and then tweak the settings as per what people on the Flexcoders list advised and also tried things in articles. Thanks though. The version of Eclipse is just what came out of the box from Adobe, so it should work. However, I may try re-installing that too. I wonder if there are any other files missing - Flexbuilder works fine with otherwise. I had not seen that article before in my research Muzak, thanks! I'll try that out. This experience has made me really dislike the fact that Adobe essentially built an Eclipse Plug-in instead of a single app, but I also understand why they did it. It makes it difficult to know what to tweak, where to tweak it,etc. And also trying to explain this to the guy creating the Tivoli push was pretty hard - he didn't get the concept too well, which is I'm sure what started the problem in the first place when it wasn't packaged right. If you're using the Flex Builder integrated install What does that mean? How would I know? Thanks. Jason Merrill ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Favorite Flex book?
No, this is actually a Good Thing(tm). Eclipse is a mature environment with lots of people improving it regularly. And because of its plugin architecture, you can use it for all sorts of things. Not to mention a big step forward from Flex 1/1.5 which was a messed up version of Dreamweaver. I have 2 installs: - FlexBuilder + Subclipse (with integrated Eclipse updated to 3.3) - Eclipse (Ganymede 3.4 http://www.eclipse.org/ganymede/) + FDT + CFEclipse + EclipseNSIS + Subclipse (and a few others) Why? Well Flex Builder standalone can be updated (the Eclipse part) but not to the latest version (3.4). Updating Eclipse to 3.3 is fine though. The latest CFEclipse plugin requires Eclipse 3.4 so I installed Eclipse separatly for that :) regards, Muzak - Original Message - From: Dave Watts dwa...@figleaf.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 15, 2009 2:47 AM Subject: Re: [Flashcoders] Favorite Flex book? This experience has made me really dislike the fact that Adobe essentially built an Eclipse Plug-in instead of a single app, but I also understand why they did it No, this is actually a Good Thing(tm). Eclipse is a mature environment with lots of people improving it regularly. And because of its plugin architecture, you can use it for all sorts of things. For example, my Eclipse install includes FlexBuilder, J2EE toolchain, CFEclipse, Oxygen, Aptana, etc. And there are lots of third-party tools to help manage Eclipse and plugin updates. If you're using the Flex Builder integrated install What does that mean? How would I know? Thanks. You can either install Flex Builder with Eclipse, or into an existing Eclipse install. The version of Eclipse that comes with Flex Builder is not the latest version - if I recall correctly, it's 3.2. To find out which you have, the integrated Flex Builder/Eclipse is installed in c:\program files\adobe, while if you installed Eclipse separately, it'd be wherever you put it - typically, c:\eclipse. Also, you get different splash screens. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] rotationX not working In Flex actionscript Projects
In FlexBuilder, in the Project properties (right click the project select properties), set the required Flash Player to 10 in the Flex Compiler tab. By default FlexBuilder compiles to Flash 9, which doesn't have the new 3D stuff. regards, Muzak - Original Message - From: Omar Fouad omarfouad@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, April 11, 2009 10:51 PM Subject: [Flashcoders] rotationX not working In Flex actionscript Projects Hi all, Since I switched to Mac now, I am using Flex Builder for my ActionScript Projects, I've got the latest Flex SDK 3.2 (I think that is the latest) and edited the flex_config xml file. I've added the playerglobal swc file to the build path of Flex for Auto Completion and all. Here is the problem: it seems that the specific FP 10 new properties as .z, .rotationX, .rotationY and .rotationZ are not recognized by the compiler. mc.rotationX = 45; // this is not working as it is ignored. Using Tweener: Tweener.addTween(mc, { rotationX:45, time:1}); // throws Property rotationX not found on [object name ] and there is no default value Is there anything wrong I am doing in flex? Thanks for the support. Cordially. -- Omar M. Fouad - Adobe Flashâ„¢ Platform Developer www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Dragging loads of sound files from library into amovie clip
Hey Paul, Use jsfl again.. - create a new movieclip in library (mc:audio) - edit the movieclip (enter editMode) - loop through all library items - if item == sound - create new layer in movieclip - add sound to new layer fl.outputPanel.clear(); fl.trace(Audio to MovieClip Command); var doc = fl.getDocumentDOM(); var lib = doc.library; // create movieclip for audio lib.addNewItem(movie clip, mc:audio); lib.setItemProperty(linkageExportForAS, false); lib.setItemProperty(linkageExportForRS, false); lib.editItem(mc:audio); var tl = doc.getTimeline(); var libItems = lib.items; var len = libItems.length; var item; var frIndex; fl.trace(library items: + len); for(var i=0; ilen; i++) { item = libItems[i]; //fl.trace(- item: + item); //fl.trace(- item type: + item.itemType); if(item.itemType == sound) { // create layer in movieclip, give it the audio name frIndex = tl.addNewLayer(item.name); fl.trace(- creating layer for: + item.name); // add sound (current library item) to new layer tl.layers[frIndex].frames[0].soundLibraryItem = item; } } doc.exitEditMode(); fl.trace(==); Additionally you can add some more commands to actually add the audio movieclip from the library to the main timeline in a specific frame (for preloading). You should be able to figure that out from the jsfl docs :) regards, Muzak - Original Message - From: Paul Steven paul_ste...@btinternet.com To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 08, 2009 8:30 AM Subject: [Flashcoders] Dragging loads of sound files from library into amovie clip Related to my previous post, I now need to drag about 300 audio files from the library into a movie clip. Essentially this is to ensure they are preloaded in my game. The method I use is to create a movie clip that has all the audio files on separate layers. This movie clip is then nested inside another movie clip and placed on the second keyframe with a stop action on the first. I am wondering if there is a magic way to drag say 300 audio files from the library and for flash (Flash CS3) to automatically create 300 layers, one layer for each audio file? Thanks in advance Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Dragging loads of sound files from library intoamovie clip
This will add the audio mc to the main timeline in frame 10 (add it after doc.exitEditMode(); in the previous script): // main timeline tl = doc.getTimeline(); frIndex = tl.addNewLayer(ALL AUDIO); tl.insertFrames(10); tl.insertBlankKeyframe(10); tl.currentFrame = 10; lib.addItemToDocument({x:0, y:0}, mc:audio); Depending on how your FLA is built up, you may have to remove: tl.insertFrames(10) regards, Muzak - Original Message - From: Muzak p.ginnebe...@telenet.be To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 09, 2009 4:27 PM Subject: Re: [Flashcoders] Dragging loads of sound files from library intoamovie clip Hey Paul, Use jsfl again.. - create a new movieclip in library (mc:audio) - edit the movieclip (enter editMode) - loop through all library items - if item == sound - create new layer in movieclip - add sound to new layer fl.outputPanel.clear(); fl.trace(Audio to MovieClip Command); var doc = fl.getDocumentDOM(); var lib = doc.library; // create movieclip for audio lib.addNewItem(movie clip, mc:audio); lib.setItemProperty(linkageExportForAS, false); lib.setItemProperty(linkageExportForRS, false); lib.editItem(mc:audio); var tl = doc.getTimeline(); var libItems = lib.items; var len = libItems.length; var item; var frIndex; fl.trace(library items: + len); for(var i=0; ilen; i++) { item = libItems[i]; //fl.trace(- item: + item); //fl.trace(- item type: + item.itemType); if(item.itemType == sound) { // create layer in movieclip, give it the audio name frIndex = tl.addNewLayer(item.name); fl.trace(- creating layer for: + item.name); // add sound (current library item) to new layer tl.layers[frIndex].frames[0].soundLibraryItem = item; } } doc.exitEditMode(); fl.trace(==); Additionally you can add some more commands to actually add the audio movieclip from the library to the main timeline in a specific frame (for preloading). You should be able to figure that out from the jsfl docs :) regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3: if (urlvars.bids != null) trace(urlvars.bids); still prints null?
If the variable is actually present, it will have a value: an emtpy string. And you may have to check for 0 instead of 0, again a string. if (urlvars.bids != urlvars.bids != 0) regards, Muzak - Original Message - From: Alexander Farber alexander.far...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 09, 2009 3:13 PM Subject: [Flashcoders] AS3: if (urlvars.bids != null) trace(urlvars.bids);still prints null? Hello, does anybody please have an idea, why would this code: private function handleComplete(event:Event):void { var urlvars:URLVariables = event.target.data; .. if (urlvars.bids != null urlvars.bids != 0) { trace(urlvars.bids); . } } still print out null? Is it maybe because null != null in AS3 and I have to perform some other check similar to isNaN()? Thank you Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Dragging loads of sound files from libraryinto amovie clip
I used to create loads of IDE Panels (SWF Panels) for Flash/Fireworks :) You can even launch Fireworks from a swf and make it do all kinds of stuff (you can make RPC calls from a swf to Fireworks for instance). About everything you do in Flash is done through jsfl. Just open up the History panel and do some stuff and then copy it from the history panel to notepad to see what it looks like. There used to be a complete Flash/Fireworks API for AS2 (or even AS1) but I'm not sure if that has been updated for CS4. Flash panels are still pretty much alive (and now even work for Photoshop if I'm not mistaken). Since I hardly ever use Flash nowadays I haven't looked into it much. Just did a quick google and looks like CS4 still uses the same (or similar) API. Flash CS4 jsfl docs: http://help.adobe.com/en_US/Flash/10.0_ExtendingFlash/ Fireworks CS4 jsfl docs: http://help.adobe.com/en_US/Fireworks/10.0_Extending/ Fireworks CS4: Cross-Product Extensions http://help.adobe.com/en_US/Fireworks/10.0_Extending/WS5b3ccc516d4fbf351e63e3d1183c949219-8000.html Fireworks CS4: Using the API wrapper extension in Adobe Flash http://help.adobe.com/en_US/Fireworks/10.0_Extending/WS5b3ccc516d4fbf351e63e3d1183c949219-7fc8.html regards, Muzak - Original Message - From: Karl DeSaulniers k...@designdrumm.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 09, 2009 6:10 PM Subject: Re: [Flashcoders] Dragging loads of sound files from libraryinto amovie clip I must say WOW as well. I never knew you could do that eigther. Karl Sent from losPhone On Apr 9, 2009, at 10:15 AM, Paul Steven paul_ste...@btinternet.com wrote: Wow this jsfl is a life saver! Can't believe I had never heard about it before in all the years I have been using Flash. Thank you Muzak for taking the time to write the code out for me. It works a dream! Cheers Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ColorTransform GTween
but is there really nobody out there who knows how to do it ? I'm sure Mr. Google knows. http://www.google.com/search?hl=enq=tween+colortransformmeta=aq=1oq=tween+color And I'm pretty sure AnimationPackage has some color stuff. http://www.alex-uhlmann.de/flash/animationpackage/ - Original Message - From: Jiri jiriheitla...@googlemail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 08, 2009 8:11 PM Subject: Re: [Flashcoders] ColorTransform GTween Thanx Ashum...,but is there really nobody out there who knows how to do it ? Jiri Ashim D'Silva wrote: Never used GTween before, but Grant is joining forces with Jack Doyle of TweenLite, and that library is incredibly easy to use. If the possibility exists, you might want to switch libraries, and soon, you should get the best of both worlds. 2009/4/9 Jiri jiriheitla...@googlemail.com: I am experimenting with GTween from Grant Skinner. I cant seem to figure out how to do a color transform. Does somebody know how to do that? Here is what i have: import fl.motion.easing.*; import com.gskinner.motion.* var colorInfo:ColorTransform = clip.transform.colorTransform; trace(colorInfo); var myTween:GTween = new GTween(clip,2,{color:0xFFcc00}); myTween.setAssignment(clip.transform,colorTransform); //resulting in flickering of color of the clip. Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] SWIZ + AS3
You should probably try the framework specific mailing list: http://groups.google.com/group/swiz-framework - Original Message - From: Gert-Jan van der Wel gert...@floorplanner.com To: flashcoders@chattyfig.figleaf.com Sent: Monday, April 06, 2009 11:02 AM Subject: [Flashcoders] SWIZ + AS3 Hi everybody, After seeing Introduction to the Swiz Framework for Flex by Chris Scott I got enthusiastic about SWIZ. I wanted to use it for an AS3 project, but I'm having some trouble getting started. I'm using Eclipse (3.4.2) with FDT 3. I downloaded the swiz.swc and added it to my linked libraries. Then I added the keep-as3-metadata to my flex- config.xml keep-as3-metadata nameAutowire/name nameMediate/name /keep-as3-metadata I created a Flash project with Main, Bean MyController, MyService classes, the sample can be downloaded here. I hope somebody can help me out to get started. Cheers, Gert-Jan ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Proof of Concept - HTTPService objectdoesn't requirecrossdomain-policy file
I haven't really looked into the differences between standalone and AIR - haven't created a projector in years - but my guess is that because you have to install an AIR application (and are therefor informed/warned about the risks that entails) it is allowed to do more than a standalone executable (projector). So basically there are 3 different player security models: - Standalone - AIR - Browser plugin Here's an article explaining the AIR security model: http://www.adobe.com/devnet/air/articles/introduction_to_air_security.html @Johan: Please check out the code included at the end of this post. I've created a small AIR application (with a certificate) and it works without a problem. Am I missing something? Yes, as I explained earlier, this has nothing to do with HTTPService. This is about different sandboxes: standalone, AIR and the browser. regards, Muzak - Original Message - From: Glen Pike g...@engineeredarts.co.uk To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, April 02, 2009 11:54 AM Subject: Re: [Flashcoders] Proof of Concept - HTTPService objectdoesn't requirecrossdomain-policy file Hi, It's an AS2 Flash application running standalone on Linux requesting stuff from the localhost on various ports - the irritating thing is I still have to implement x-domain files / responses on every port I connect to, I tried setting a policy server up on the default port as per the instructions on the devnet site, but this did not work.. My point is that the standalone Flash application is an exe, like Air, so implies that a higher level of trust is required to run it, therefore it should be allowed more liberty than a browser based Flash app. This is one of the most irritating things about doing standalone stuff - I can't load files from the file system because I am requesting over the network. I am doing standalone because this is legacy stuff for a kiosk... Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Cross-domain policy - why is Flex more forgiving thanFlash?
If everybody and everything can read an XML on a random server, why can't Flash, it doesn't make any sense. Because the Flash Player can't determine if you're *allowed* to read that particular xml file or not, nor does it know your intensions. So rather than allowing it and hoping for the best, it shuts the door for everyone and provides a means to open a backdoor (if you like) through the use of policy files. When this was first implemented (Flash 6) this was highly annoying since noone out there had policy files in place. Nowadays service providers (Xmethods/Yahoo/Amazon/etc..) have those in place and their public services can be used with Flash. If there's a public service you'd like to use and they don't have a policy file in place, contact them, explain them what you want and why and point them to the appropriate pages on the Adobe site. I've done so in the past and up to now I never had a no go. http://www.xmethods.net/crossdomain.xml http://www.yahoo.com/crossdomain.xml http://search.yahooapis.com/crossdomain.xml http://developer.yahoo.com/faq/#flash The way I see it, crossdomain policy files are here to stay, so might as well deal with it :) regards, Muzak - Original Message - From: Meinte van't Kruis mei...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, March 31, 2009 5:59 PM Subject: Re: [Flashcoders] Cross-domain policy - why is Flex more forgiving thanFlash? Still, I agree with John, on the XML part. If everybody and everything can read an XML on a random server, why can't Flash, it doesn't make any sense. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Best data type for Zend AMF
For database type data, Array of Objects. Forget about XML. With Coldfusion (and remoting) you can grab a database query result and just send that straight to Flash/Flex and it will be transformed into an Array of Objects automatically. In CF it's as simple as: cfset var rsResult= / cfquery name=rsResult other stuff.. SELECT * FROM table_name /cfquery cfreturn rsResult / Seems they're still working on mapping PHP to AS objects: http://wadearnold.com/blog/?p=54 Allthough, the article is from sept 2008, so it may have been implemented by now. So if class mappings are implemented (still have to take Zend AMF for a spin) then that's the *best* option, but probably not the *fastest*. At least in Coldfusion transforming plain vanilla objects into typed objects slows things down (especially with lots of data). regards, Muzak - Original Message - From: Sidney de Koning sid...@funky-monkey.nl To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, March 30, 2009 12:05 PM Subject: [Flashcoders] Best data type for Zend AMF Hi List, I'm using Zend AMF, and i'd like to know what is the best way and fastest to transfer data. For instance; do i create an array from database data in PHP and send it to flash? Or do i formatted array data from a database to xml and send that to flash? Which is the fastest? And more specifically; what datatype is the fastest. Sidney de Koning - be a geek, in rockstar style! Flash / AIR Developer @ www.funky-monkey.nl Technical Writer @ www.insideria.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Best data type for Zend AMF
AMFPHP did this really well with result sets too - straight out of the box like CF. Yeah, that's what I expect Zend AMF to do as well, but I haven't tried it yet. Maybe I'll take it for a spin this evening if I find the time.. The only *gotcha* with sending query results straight from CF to Flex/Flash is that table column names all become uppercase. Not sure if AMFPHP did the same (been too long since I used it). So that might be something to look out for with Zend AMF as well, but it may just be a (annoying) CF thing. Let's say you have a user table with firstName and lastName columns. When sending a query result straight to Flex/Flash (from CF) it looks like this: [{FIRSTNAME:value, LASTNAME:value}, {FIRSTNAME:value, LASTNAME:value}]; rather than: [{firstName:value, lastName:value}, {firstName:value, lastName:value}]; regards, Muzak - Original Message - From: Glen Pike g...@engineeredarts.co.uk To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, March 30, 2009 4:23 PM Subject: Re: [Flashcoders] Best data type for Zend AMF AMFPHP did this really well with result sets too - straight out of the box like CF. Muzak wrote: For database type data, Array of Objects. Forget about XML. With Coldfusion (and remoting) you can grab a database query result and just send that straight to Flash/Flex and it will be transformed into an Array of Objects automatically. In CF it's as simple as: cfset var rsResult= / cfquery name=rsResult other stuff.. SELECT * FROM table_name /cfquery cfreturn rsResult / Seems they're still working on mapping PHP to AS objects: http://wadearnold.com/blog/?p=54 Allthough, the article is from sept 2008, so it may have been implemented by now. So if class mappings are implemented (still have to take Zend AMF for a spin) then that's the *best* option, but probably not the *fastest*. At least in Coldfusion transforming plain vanilla objects into typed objects slows things down (especially with lots of data). regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Best data type for Zend AMF
If Zend AMF supports mapping, then it should be possible with pure AS3. Think you'll need to use flash.net.registerClassAlias() to map the AS class to a PHP class. http://livedocs.adobe.com/flex/3/langref/flash/net/package.html#registerClassAlias() That will do the same thing as the Flex [RemoteClass] metadata tag. So in the VO constructor, make a call to registerClassAlias(): registerClassAlias(php.package.classname, VOClass); No idea if PHP does packages tho (someone else does the PHP stuff for me, I'm a CF guy), so you might just need the php class name (without package). http://www.roboncode.com/articles/187 http://framework.zend.com/manual/en/zend.amf.server.html#zend.amf.server.typedobjects regards, Muzak - Original Message - From: Sidney de Koning sid...@funky-monkey.nl To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, March 30, 2009 4:40 PM Subject: Re: [Flashcoders] Best data type for Zend AMF Nice one guys, thanks for the response. Since i'm not at all into Flex, in the video he talks about binding (and mapping them to ValueObjects). My question is can i do this with pure AS3? Cheers, Sid ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ?: how to prevent users to copy text from aTextArea?
That depends.. If you have a component-heavy application with your own custom styles for instance, it might be better to use a TextArea. Or you could take it a step further and make this into a new component (and even make it an mxp for distribution). Then again, if all you need is one (and one only) non-selectable textfield, sure grab a TextField and ScrollBar and move on :) I mearly wanted to present a better solution (IMO) than overlaying a TextArea with a shape, which is to actually fix what seems to be broke. regards, Muzak - Original Message - From: Cor c...@chello.nl To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Sunday, March 29, 2009 1:00 PM Subject: RE: [Flashcoders] ?: how to prevent users to copy text from aTextArea? Just interested. Is all this worth the hassle? I mean instead using a TextArea, I would go for a normal TextField and a custom scrollbar all in 1 movieclip. And set the needs. Cor. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Muzak Sent: zondag 29 maart 2009 1:20 To: Flash Coders List Subject: Re: [Flashcoders] ?: how to prevent users to copy text from aTextArea? The problem seems to be that TextArea uses the enabled value to set the inner textField's selectable property value. protected function updateTextFieldType():void { textField.type = (enabled _editable) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = enabled; textField.wordWrap = _wordWrap; textField.multiline = true; } So each time the updateTextFieldType() method is called, no matter what you set TextArea.textField.selectable to, it will revert to the TextArea.enabled value. That's why : details_ta.textField.selectable = false; doesn't really work. So it's not really a bug, just a (very) bad decision. Why it was done that way, who knows.. To get the TextArea to work the way you want, you can extend it and override the updateTextFieldType() method and add a selectable property, like so: package { import fl.controls.TextArea; import flash.text.TextFieldType; public class TextArea2 extends TextArea { private var _selectable:Boolean = true; override protected function updateTextFieldType():void { textField.type = (enabled _editable) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = _selectable; textField.wordWrap = _wordWrap; textField.multiline = true; } public function get selectable():Boolean { return _selectable; } public function set selectable(value:Boolean):void { _selectable = value; super.textField.selectable = value; updateTextFieldType() } } } Tested with the code you provided earlier (normal TextArea on stage): package { import flash.display.Sprite; import fl.controls.TextArea; import flash.text.TextField; import flash.events.Event; import TextArea2; public class TestTextArea extends Sprite { public var details_ta:TextArea; public var details2_ta:TextArea2; public function TestTextArea() { addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); init(); } private function init():void { trace(TestTextArea ::: init); details2_ta = new TextArea2(); details2_ta.selectable = false; details2_ta.x = 220; details2_ta.y = 10; details2_ta.width = 200; details2_ta.height = 100; addChild(details2_ta); } private function addedToStageHandler(evt:Event):void { trace(TestTextArea ::: addedToStageHandler); var msg:String = bLorem ipsum dolor sit amet,/b consectetuer adipiscing elit.; details_ta.htmlText = msg; details2_ta.htmlText = msg; } } } regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ?: how to prevent users to copy text from aTextArea?
The problem seems to be that TextArea uses the enabled value to set the inner textField's selectable property value. protected function updateTextFieldType():void { textField.type = (enabled _editable) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = enabled; textField.wordWrap = _wordWrap; textField.multiline = true; } So each time the updateTextFieldType() method is called, no matter what you set TextArea.textField.selectable to, it will revert to the TextArea.enabled value. That's why : details_ta.textField.selectable = false; doesn't really work. So it's not really a bug, just a (very) bad decision. Why it was done that way, who knows.. To get the TextArea to work the way you want, you can extend it and override the updateTextFieldType() method and add a selectable property, like so: package { import fl.controls.TextArea; import flash.text.TextFieldType; public class TextArea2 extends TextArea { private var _selectable:Boolean = true; override protected function updateTextFieldType():void { textField.type = (enabled _editable) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = _selectable; textField.wordWrap = _wordWrap; textField.multiline = true; } public function get selectable():Boolean { return _selectable; } public function set selectable(value:Boolean):void { _selectable = value; super.textField.selectable = value; updateTextFieldType() } } } Tested with the code you provided earlier (normal TextArea on stage): package { import flash.display.Sprite; import fl.controls.TextArea; import flash.text.TextField; import flash.events.Event; import TextArea2; public class TestTextArea extends Sprite { public var details_ta:TextArea; public var details2_ta:TextArea2; public function TestTextArea() { addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); init(); } private function init():void { trace(TestTextArea ::: init); details2_ta = new TextArea2(); details2_ta.selectable = false; details2_ta.x = 220; details2_ta.y = 10; details2_ta.width = 200; details2_ta.height = 100; addChild(details2_ta); } private function addedToStageHandler(evt:Event):void { trace(TestTextArea ::: addedToStageHandler); var msg:String = bLorem ipsum dolor sit amet,/b consectetuer adipiscing elit.; details_ta.htmlText = msg; details2_ta.htmlText = msg; } } } regards, Muzak - Original Message - From: Keith Reinfeld keithreinf...@comcast.net To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Saturday, March 28, 2009 10:11 PM Subject: RE: [Flashcoders] ?: how to prevent users to copy text from aTextArea? Then again there is this: package{ //imports import fl.controls.TextArea; import flash.text.TextField; public class CustomTextArea extends TextArea{ //vars private var internalTextField:TextField; public function CustomTextArea(){ super(); internalTextField = TextField(this.textField); } public function set selectable(b:Boolean):void{ internalTextField.mouseEnabled = b; this.editable = b; } public function get selectable():Boolean{ return internalTextField.mouseEnabled; } } } Example usage: package{ //imports import flash.display.MovieClip; import CustomTextArea; public class Application extends MovieClip{ //vars private var customTA:CustomTextArea; public function Application(){ init(); //addEventListener(KeyboardEvent.KEY_DOWN, onUpArrow); } private function init():void{ customTA = new CustomTextArea(); addChild(customTA); customTA.x = 0; customTA.y = 0; customTA.width = 150; customTA.height = 90; customTA.htmlText = font color='#FF'bLorem ipsum dolor sit amet,/b consectetuer adipiscing elit./fontfont color='#FF'bLorem ipsum dolor sit amet,/b consectetuer adipiscing elit./fontfont color='#FF'bLorem ipsum dolor sit amet,/b consectetuer adipiscing elit./fontfont color='#FF'bLorem ipsum dolor sit amet,/b consectetuer adipiscing elit./font; trace(customTA.selectable =,customTA.selectable); customTA.selectable = false; trace(customTA.selectable =,customTA.selectable); } } } HTH Regards, -Keith ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 Object reference
There's no _width in AS3.. it's width. Array access notation should work fine: photoStrip_mc[thumbnail + i + _mc].width; As a sidenote, you're better off storing references in an array for easy access later. myClips = new Array(); var len:uint = 10; for(var i:uint=0; ilen; i++) { var mc:MovieClip = new MovieClip(); photoStrip_mc.addChild(mc); myClips.push(mc); } If you need to access the clips at some later time, just loop through the myClips Array. var len:uint = myClips.length; for(var i:uint=0; ilen; i++) { var mc:MovieClip = myClips[i]; mc.width = someValue; } regards, Muzak - Original Message - From: TS sunnrun...@gmail.com To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Sent: Sunday, March 29, 2009 3:09 AM Subject: [Flashcoders] AS3 Object reference Trying to cylec through some objects. This doesn't seem to work in AS3 as it does in AS2. Is there an equivalent in AS3? photoStrip_mc[thumbnail + i + _mc]._width Thanks ahead, T ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Tween AS3 issue with Firefox
My curiosity was caught, but it's difficult to help when someone is asking for help on something so vague. My thoughts exactly. - Original Message - From: Zeh Fernando z...@zehfernando.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, March 26, 2009 5:26 PM Subject: Re: [Flashcoders] Tween AS3 issue with Firefox That's my guess too, but in that case it would have made sense for him to give us the password to see whatever he wanted us to see. My curiosity was caught, but it's difficult to help when someone is asking for help on something so vague. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Tween AS3 issue with Firefox
My guess is whatever he's talking about is beyond the login? - Original Message - From: Zeh Fernando z...@zehfernando.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, March 26, 2009 12:01 AM Subject: Re: [Flashcoders] Tween AS3 issue with Firefox What animation? It works the same in both FF and IE here and there's no Tween whatsoever. Zeh On Wed, Mar 25, 2009 at 3:23 PM, Reina Lyn Ben rly...@gmail.com wrote: has anyone had the same problem. I have a website up.. http://kozonline.com/epk the animation is created in AS3, when I use firefox, the animation/transition freezes, I've found solutions online like creating a variable and store the tween there instead of being dependent on the garbage Collector feature that tween have. When I test the site on IE, it animates fine and finishes the tween.. -- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] do we still have to check to see if loaded 10 bytes?
In AS3 you usually listen for the complete event, which is triggered when loading is completed. regards, Muzak - Original Message - From: allandt bik-elliott (thefieldcomic.com) alla...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, March 24, 2009 5:03 PM Subject: [Flashcoders] do we still have to check to see if loaded 10 bytes? in as2 there used to be a thing where you had to check to make sure loaded was above 10 bytes or it would sometimes give a false reading (so you might see if (this.getBytesLoaded == this.getBytesTotal() this.getBytesLoaded 10) for instance) does the same apply to as3 or can i safely leave that part out of my code? thanks a ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] do we still have to check to see if loaded 10bytes?
I'm confused, Martijn's ImageLoader is AS2. Are you trying to use that in AS3? http://www.martijndevisser.com/blog/2006/imageloader-class-for-flash-8/ http://www.martijndevisser.com/download/ImageLoader.as regards, Muzak - Original Message - From: Karl DeSaulniers k...@designdrumm.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, March 24, 2009 5:50 PM Subject: Re: [Flashcoders] do we still have to check to see if loaded 10bytes? I have an issue with dynamic content not triggering my code when its complete. I am trying to call the progress from a external class.. any sample code that anyone can give to implement this easily. The class is com.martijndevisser.ImageLoader Please pardon my Newbieizm I am self taught AS2 and evidently I havent taught myself enough. : | Karl DeSaulniers Design Drumm http://designdrumm.com On Mar 24, 2009, at 11:41 AM, Muzak wrote: In AS3 you usually listen for the complete event, which is triggered when loading is completed. regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] do we still have to check to see if loaded 10bytes?
Not sure, my AS2 is *very* rusty, but think this should work: import com.martijndevisser.ImageLoader; function onLoadProgress(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void { trace(Application ::: onLoadProgress); trace(- target: + target) trace(- bytesLoaded: + bytesLoaded); trace(- bytesTotal: + bytesTotal); } function onLoadInit(target:MovieClip):Void { trace(Application ::: onLoadInit); trace(- target: + target); } var loader:ImageLoader = new ImageLoader(); loader.addListener(this); loader.loadImage( some_image.jpg, image_mc ); regards, Muzak - Original Message - From: Karl DeSaulniers k...@designdrumm.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Tuesday, March 24, 2009 9:19 PM Subject: Re: [Flashcoders] do we still have to check to see if loaded 10bytes? No. This project is still as2 Sent from losPhone On Mar 24, 2009, at 3:03 PM, Muzak p.ginnebe...@telenet.be wrote: I'm confused, Martijn's ImageLoader is AS2. Are you trying to use that in AS3? http://www.martijndevisser.com/blog/2006/imageloader-class-for- flash-8/ http://www.martijndevisser.com/download/ImageLoader.as regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Zend AMF Framework Paramaters error
Haven't had a chance to look at the Zend remoting implementation yet. Have you tried sending an object ? var params:Object = {path:images/, ba:ba}; NC.call(PHPClass.function, Res, params); Not sure about the syntax to retrieve those in PHP, as I don't do PHP :) // wild guess function writeJpg($args) { $args[path]; $args[ba]; } regards, Muzak - Original Message - From: Omar Fouad omarfouad@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 21, 2009 5:50 PM Subject: [Flashcoders] Zend AMF Framework Paramaters error Hello, I've got some trouble with the Zend Framework (AMF) and ActionScript, in sending multiple parameter to a PHP Function. The user loads an image file from the local hard drive using FileReference into the Flash Movie than I take the Image's Bitmap Data, encode it to with JPGEncoder (CoreLib), get the byteArray of it and pass it to a PHP function though a NetConnection Instance like this. Main.as - //ba is my byteArray from the encoder var NC:NetConnection = new NetConnection(); var Res:Reponder = new Responder(onSuccess, onError); NC.connect(zend_amf_server); NC.call(PHPClass.function, Res, ba); [...] PHPClass.php - function __construct() {...} //the construct code here function writeJpg( $byteArray ) { $fp = fopen('data.jpg', 'wb'); fwrite( $fp, implode(,$byteArray)); fclose( $fp ); return File Saved; } This work like a charm, the file is created I get the response. I tried to pass another argument to the function, a path string that holds the name of the folder to be created like this. Main.as - var path:String = images/ NC.call(PHPClass.function, Res, ba, path); PhpClass.php - function writeJpg( $byteArray, $path ) { $fp = fopen($path.'data.jpg', 'wb'); fwrite( $fp, implode(,$byteArray)); fclose( $fp ); return File Saved; } Apparently this does not work. in the response I get this message: Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion at fileUploader_fla::MainTimeline/onSave() the image file is corrupted and no folder is created. Apparently the NC.call, cannot pass more than one parameter. I've been searching about this problem on the web and I read that this is a bug in an older version of zendAMF, I've downloaded the latest release, restarted by MAMP server, but I still have the same problem... How can this be achieved? Thanks. -- Omar M. Fouad - Adobe Flashâ„¢ Platform Developer ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash Future - Unity3D, iPhone and performance
quote Unity is a multiplatform game development tool /quote Banner ads, really?? I'd like to be able to tell a client some day who has a banner campaign only capable in Unity that it has a large enough install base. That to me sounds like cramming a banner ad into the Quake engine. One of the reasons Flash became so popular was because of its small filesize. The Unity plugin is about 11mb, flash plugin (fp10) is around 1.5mb. I'm not surprised apple doesn't want flash on their iPhone because of performance issues. But the Flash Player is a slow virtual machine, isn't that right? I'd say for a 1.5mb plugin its damn fast and it gets better with every version. Yes the Flash Platform has wonderful tool and framework to create applications, but how long before someone is coming all these tools (such as AIR, the Flex framework, layouts and components)? Maybe Unity? Maybe another? People have been saying this for years now, still have to see it happen. Silverlight anyone?? Even if Flash will be here for a great bunch of years, I don't see a real good future unless they re-write a real new Virtual Machine that is taking all the power you can use from a computer. At what cost? I'm pretty sure this has nothing to do with Adobe not being able to write a decent VM. Meaning, I'm sure they're capable of doing so, but at what cost? Well, for one, filesize comes to mind again. Is there a market for Unity 3D? I'm sure there is and their demo site shows that as well. Does this affect Adobe/Flash? I seriously doubt it. As Taka pointed out: Unity is pretty kick-ass, but Unity != Flash One is a game development platform, the other a rich (internet) application platform. regards, Muzak - Original Message - From: Joel Stransky stranskydes...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, March 20, 2009 8:53 PM Subject: Re: [Flashcoders] Flash Future - Unity3D, iPhone and performance I'm not suggesting Unity is a replacement for flash so much as that it's worth having a viable market. I'd like to be able to tell a client some day who has a banner campaign only capable in Unity that it has a large enough install base. On Fri, Mar 20, 2009 at 3:00 PM, Taka Kojima t...@gigafied.com wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] A very simply question of XML toString()
You could look into the DataProvider class: import fl.data.DataProvider; var dp:DataProvider; var myXML:XML = order book titleDictionary 1/title /book book titleDictionary 2/title /book /order; dp = new DataProvider(myXML); trace(dp length: , dp.length); var item:Object = dp.getItemAt(0); trace(first item: , item); trace(item title: , item.title); So rather than storing just the title (in an array), you store each book node as an Object (Array of Objects). regards, Muzak - Original Message - From: ACE Flash acefl...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, March 19, 2009 6:11 PM Subject: [Flashcoders] A very simply question of XML toString() Hey there, I was trying to parse the XML to get all value of title and store them into array at once. Do I have to use loop to push them into an Array or there is a shortcut for doing this? I'd like to get something like this... var arr:Array = new Array(); // to trace arr arr[0] = Dictionary 1 arr[1] = Dictionary 2 Thank you 1. var myXML:XML = 2. order 3. book 4. titleDictionary 1/title 5. /book 6. book 7. titleDictionary 2/title 8. /book 9. /order; 10. trace( myXML.book.title.toString() ) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: Changing width of seekBar during playback (AS2, FLVPlayback)
The following works for me: FLVPlayback and SeekBar instance on stage. A button that, when clicked, will toggle the size of the seekbar. In the button click handler: - resize the seekbar - set the seekBar property of the video playback to null - remove the seekbar handle (seekBarHandle_mc) which is otherwise left behind - reset the seekBar property of the video playback to the same instance as before var SMALL_WIDTH:Number = 100; var LARGE_WIDTH:Number = 320; video_fpb.seekBar = video_sb; video_fpb.contentPath = paramore_decode_live.flv; function resizeClickHandler(o:Object):Void { trace(Application ::: resizeClickHandler); trace(- seekbar width: + video_sb._width); video_sb._width = (video_sb._width == SMALL_WIDTH) ? LARGE_WIDTH : SMALL_WIDTH; video_fpb.seekBar = null; removeMovieClip(seekBarHandle_mc); video_fpb.seekBar = video_sb; } video_sb._width = SMALL_WIDTH; resize_btn.addEventListener(click, resizeClickHandler); regards, Muzak - Original Message - From: jonas magnusson jonas.mag...@gmail.com To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, March 10, 2009 10:39 AM Subject: [Flashcoders] Re: Changing width of seekBar during playback (AS2,FLVPlayback) Probably solved the seekbar issue. If anyone happen to have the same problem in the future: Seems I can get it working by making two seekbars and encapsulating them in container_mc's. On newSize i set the new size of both seekbars, do remove movieclip on prev_container.seekBarHandle_mc then set flvplayback.seekBar = new_container.new_SeekBar. Then i hide the prev_container with _visible=false and make the new_container _visible=true. The handle is now draggable and i remove the old dead handles, the left/right limits are updated and the visuals are also updated. Thanks for listening :) /Jonas On Mon, Mar 9, 2009 at 5:55 PM, jonas magnusson jonas.mag...@gmail.comwrote: Hi List, I would like to make a FLV player that scales up the width depending on Stage.width. The width is different depending on size when starting up, and the user monitor size when in fullscreen. I am using the FLVPlayback component AS2.0 (several months of work put in already). Video can easily be scaled up, but the seekbar is a big problem. When i change the width of the seekbar, the flvplayback/seekbar does not realize the new limits of the handle. Most often the seekBar just takes on a temporary look but then reverts back after video-end. So no new left-right limits + temporary graphic change. Solutions tried: Placing differently sized seekbars of the same name in different keyframes, jumping between keyframes (no change at all) Setting width: seekBar._width = 300 or seekBar.progress_mc._width = 300 (temporary background-only change) Switching streams after width-change to force update. Having double seekbars, updating the size of one, then switching between them (flvplb.seekBar = seekBar2). Works really well for the new limits, the handle now moves between new limits. Problem with this solution is that the new handle is not clickable. Also, there are a lot of dead handles from the previous switches. The click-area remains behind the first dead handle. I managed to remove the graphics of previous handles by using handle_mc.removeMovieClip(), but the new handle does not get assigned the functionalityonPress - startDragging.. Any and all suggestions appreciated! /Jonas ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] find and delete XML nodes
delete xml.child.(@id==b); You might wanna try that first.. TypeError: Error #1119: Delete operator is not supported with operand of type XMLList. delete works as long as the XMLList is not retrieved using an expression, which in this case it is: (@id == b). So the following works (and deletes all elements): var s:String = 'parentchild id=a /child id=b /child id=a /child id=b //parent'; var xml:XML = new XML(s); delete xml.child; Bug or feature? Who knows.. regards, Muzak - Original Message - From: liutoday today...@hotmail.com To: flashcoders@chattyfig.figleaf.com Sent: Monday, March 09, 2009 5:28 AM Subject: RE: [Flashcoders] find and delete XML nodes Date: Sun, 8 Mar 2009 23:38:17 -0400 From: j...@stranskydesign.com To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] find and delete XML nodes I have some xml nodes where I need to evaluate their attributes and delete them if they meet certain criteria. It's probably simple but its late and brain fatigue is setting in. Say I had this node parent child id=a / child id=b / child id=a / child id=b / /parent How would I find and delete any child who's id is b ? -- --Joel Stransky stranskydesign.com ___ delete xml.child.(@id==b); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] find and delete XML nodes
One way to do it is to look for the child elements which id is *not* b. Then replace the original child elements with the new ones, or in other words, set the remaining elements as the children of the parent: var s:String = 'parentchild id=a /child id=b /child id=a /child id=b //parent'; var xml:XML = new XML(s); trace(before: , xml.toXMLString()); trace(--); var elements:XMLList = xml.child.(@id != b); trace(elements: , elements.toXMLString()); trace(--); xml.setChildren(elements); trace(after: , xml.toXMLString()); //output: before: parent child id=a/ child id=b/ child id=a/ child id=b/ /parent -- elements: child id=a/ child id=a/ -- after: parent child id=a/ child id=a/ /parent regards, Muzak - Original Message - From: Joel Stransky j...@stranskydesign.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, March 09, 2009 4:38 AM Subject: [Flashcoders] find and delete XML nodes I have some xml nodes where I need to evaluate their attributes and delete them if they meet certain criteria. It's probably simple but its late and brain fatigue is setting in. Say I had this node parent child id=a / child id=b / child id=a / child id=b / /parent How would I find and delete any child who's id is b ? -- --Joel Stransky stranskydesign.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Printing table receipt with Flex
Dump them in a datagrid, print the datagrid.. - Original Message - From: Omar Fouad omarfouad@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Friday, February 27, 2009 5:54 AM Subject: Re: [Flashcoders] Printing table receipt with Flex Thanks everybody for the replies... I've been thinking about rendering an HTML table into a TextField inside a sprite... But as far as I know, TextFields in flash does not support HTML tables. What else is recomended? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] component def doesn't pass params to constructor?
- Original Message - From: Gregory N greg.gousa...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, February 19, 2009 6:12 PM Subject: Re: [Flashcoders] component def doesn't pass params to constructor? Muzak, Nice addition, thanks for pointing to it. Frankly, I'd prefer to avoid calling commitProperties() after *each* of the setters... Anyway, this way looks better than my enter_frame trick :-) However, the problem none of the setters are called if no inspectable params were changed still remains. So we have to duplicate default values in [Inspectable] and constructor/declaration (or some init function) You shouldn't rely on them as init properties (if that makes sense) but as a way for a user to changed them visually (in the IDE). So yes, you have to define defaultValue=blah, but I guess that's because Flash (the IDE) has no way of knowing what the corresponding internal property is (if any). private var _prop:String = Hello; [Inspectable(defaultValue=Hello)] public function set prop(value:String):void { // } Personally I don't see that as a huge problem. regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] component def doesn't pass params to constructor?
- Original Message - From: Gregory N greg.gousa...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, February 19, 2009 7:17 PM Subject: Re: [Flashcoders] component def doesn't pass params to constructor? After some consideration... If I have, say dozen of Inspectable parameters AND a method that need several of them to work properly, then I'll have to call this method after a delay - to be sure that all necessary setters were called before it.. Thus, turning back to enter_frame trick :-( Or am I missing something trivial? With the use of commitProperties() you'll be calling it from your init() method and nothing will happen, as all xxxChanged flags will be false. If you set default values for you internal properties, your component should work fine. There should be no need for a delay, if there is, youl probably need to rethink your components inner workflow. regards, Muzak ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] this._livePreviewMask - what is analog in AS3?
Not sure if this has the answer you're looking for (haven't read the article), but it came up in a google search: http://www.adobe.com/devnet/flash/articles/creating_as3_components.html regards, Muzak - Original Message - From: Gregory N greg.gousa...@gmail.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Thursday, February 19, 2009 9:59 PM Subject: [Flashcoders] this._livePreviewMask - what is analog in AS3? I have a component which is built based on user parameters. And I'm trying to make a Live Preview for it. The problem is that too many things, including the visual size, are determined at runtime and/or in component inspector. So, sometimes part of the picture (in Live Preview) is cropped. In AS2, there was _livePreviewMask property, which I used to reference from component's class just as var lpMask:MovieClip = this._livePreviewMask; and then re-position this mask, change its size etc. Is there something like this in AS3? Or any workaround? -- -- Best regards, GregoryN ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders