Re: [Flashcoders] static const singleton GC?
anybody have any ideas? this is still shaking my boots. thanks :) On Mon, Sep 16, 2013 at 5:53 PM, ktu ktu_fl...@cataclysmicrewind.comwrote: hey all! I'm faced with an interesting question. in my codebase, we made the decision to use a few singletons. to implement those singletons we used the static const trick: package com.example { public static const API:AppAPI = new AppAPI(); } package com.example { public class AppAPI { public function AppAPI () { if (API) throw new Error(); } } this works fine in the normal environment we run in. that is, we run in a scheduler system that loads the flash player, runs our swf, then shuts down the flash player, doing that over and over again based off the schedule of content. the problem now is that a new client uses a scheduler that is built on AIR, so the flash player instance never shuts down. whenever our app comes up in the scheduler, memory jumps and never goes down causing the AIR app to crash every couple of hours. If, they load my application only once, and leave it running, it lasts for days without any major memory leaks. any idea how i could test whether GC does pick this up or could? or any known issues with this trick and GC? maybe you just have tricks in general to finding out what GC isn't getting? thanks!!! -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] static const singleton GC?
first, i must apologize for an error in my code. you cannot make a static package level var. the code should look like: package com.example { public const API:AppAPI = new AppAPI(); } Peter, this crazy method i am using does indeed only instantiate the object only once. i never get a runtime error in accessing the API through the package level const. thanks Paul. I made a simple test project and have determined that if i make it a var instead of const, everything is just fine. Next is to test whether loading a swf that uses it as a var versus const will allow garbage collection to pick it up. man, i haven't used a profile in ages. Henrik, you are right, but i don't think i am wrong about the flash player referencing. in this special case, the scheduler is built in flash on top of AIR. they load my swf, then stopAndUnload my swf, show another swf, show an image, then RELOAD my swf (and by reload i mean loader.loadBytes()), and so on... so the flash player is never shutting down. in normal cases, the scheduler is built outside of AIR, so when someone wants to run our content, the scheduler boots up the flash player only to play my swf, then shuts it down. even if the scheduler had two back to back swfs, the flash player instance is always shut down before the new one opens. Thanks for your input everyone! On Fri, Sep 20, 2013 at 10:46 AM, Henrik Andersson he...@henke37.cjb.netwrote: There is no such thing as calling a constant. And static properties are only initialized once. Your approach only serves to delay the construction of the instance to the moment it is first accessed, as opposed to when the runtime decides to initialize the constant. What OP needs is a singleton that can be destructed. The problem here is that the constant that is holding a reference to the instance never leaves scope and can't be changed not to point at the instance. The way I would do it would be to either fix the scheduler to correctly terminate the flash player or to reuse the flash player instead of spawning a new one each time. In fact, I doubt that OP actually means flash player, but rather means a random swf file that I load every so often. That would be a prime example of where reuse is the correct approach. Peter Ginneberge skriver: That's not a singleton, as every time you call the public static constant, it creates a new instance. The static var should be private and the class needs an access point method, usually called getInstance(); private static var INSTANCE:AppApi; public function AppApi():void { if (INSTANCE != null ) { throw new Error(Only one instance allowed. + To access the Singleton instance, use getInstance().); } } public static function getInstance():AppApi{ if(!INSTANCE) INSTANCE = new AppApi(); return INSTANCE; } Then elsewhere in your app you refer to the singleton with: AppApi.getInstance(); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] static const singleton GC?
hey all! I'm faced with an interesting question. in my codebase, we made the decision to use a few singletons. to implement those singletons we used the static const trick: package com.example { public static const API:AppAPI = new AppAPI(); } package com.example { public class AppAPI { public function AppAPI () { if (API) throw new Error(); } } this works fine in the normal environment we run in. that is, we run in a scheduler system that loads the flash player, runs our swf, then shuts down the flash player, doing that over and over again based off the schedule of content. the problem now is that a new client uses a scheduler that is built on AIR, so the flash player instance never shuts down. whenever our app comes up in the scheduler, memory jumps and never goes down causing the AIR app to crash every couple of hours. If, they load my application only once, and leave it running, it lasts for days without any major memory leaks. any idea how i could test whether GC does pick this up or could? or any known issues with this trick and GC? maybe you just have tricks in general to finding out what GC isn't getting? thanks!!! -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 finally..
yes. this is an example of a private class. but as someone earlier mentioned, you shouldn't ever _need_ to use them. and it would be more appropriate not to use them in production code. using the internal namespace gives you some restriction, and you could even use your own namespace for restriction but that's quite uncommon as well. for reference.. - you cannot add a namespace to this 'private' class and should result in a compile error if you do. (ex. public class CustomClient) therefore, it must always be defined as 'class ClassName' with no namespace. - any classes that you need within this 'private' class must be imported outside the package package com { // code } import flash.display.Sprite class MySprite { // code } - and if some outside object gets a reference to it, you should be able to access public functions and properties so long as you do not try to cast the object as anything other than Object. in my experience, i have yet to feel the need for a pseudo 'private' class. the internal namespace serves me well most and in a few occasions a custom namespace was required. good luck :) On Sun, May 26, 2013 at 6:58 AM, Karl DeSaulniers k...@designdrumm.comwrote: Ok, I am understanding things a little better I believe. Quick question to solidify some knowledge. In reference to my question about a private class, is the class CustomClient at the bottom an example of a private class? It was mentioned that even if you don't have the word private there and don't put public, flash automatically will interpret it as a private class. It is inside the class file but outside the package for the main class (which was also mentioned), it does not have public on it so you can't call it outside this file. This is what a private class is, correct? package { import flash.display.Sprite; import flash.events.NetStatusEvent; import flash.events.SecurityErrorEvent; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; import flash.events.Event; public class NetConnectionExample extends Sprite { private var videoURL:String = http://www.helpexamples.com/flash/video/cuepoints.flv;; private var connection:NetConnection; private var stream:NetStream; private var video:Video = new Video(); public function NetConnectionExample() { connection = new NetConnection(); connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); connection.connect(null); } private function netStatusHandler(event:NetStatusEvent):void { switch (event.info.code) { case NetConnection.Connect.Success: connectStream(); break; case NetStream.Play.StreamNotFound: trace(Stream not found: + videoURL); break; } } private function securityErrorHandler(event:SecurityErrorEvent):void { trace(securityErrorHandler: + event); } private function connectStream():void { addChild(video); var stream:NetStream = new NetStream(connection); stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); stream.client = new CustomClient(); video.attachNetStream(stream); stream.play(videoURL); } } } class CustomClient { public function onMetaData(info:Object):void { trace(metadata: duration= + info.duration + width= + info.width + height= + info.height + framerate= + info.framerate); } public function onCuePoint(info:Object):void { trace(cuepoint: time= + info.time + name= + info.name + type= + info.type); } } Best, Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 finally..
you can have public class, internal class (limited to package), and you can make pseudo private classes by declaring a class in the same file as another class, but outside the package. the main reason you write 'public class' is because the _default_ is internal. if you simply say class MyClass {}it is treated as internal. On Mon, May 20, 2013 at 11:57 PM, Karl DeSaulniers k...@designdrumm.comwrote: Thank you John. Yes, I have already watched some really good tuts on gotoandlearn and plan to watch more when I start working on my project. My book is from lynda.com too. Going to invest in Moocks book as suggested earlier as well. Just need to gen some funds. :) Karl DeSaulniers Design Drumm http://designdrumm.com On May 20, 2013, at 10:30 PM, John R. Sweeney Jr. wrote: Or subscribe to http://www.lynda.com Excellent training tutorials on tons of software. Very in-depth, but you do pay for it. If you know AS2, check out www.gotoandlearn.com. Many free tutorials on specific tasks, but you'll see them working and their AS3 code, so you can start making the correlation between what is different in 2 versus 3. John R. Sweeney Jr. Senior Interactive Multimedia Developer OnDemand Interactive Inc Hoffman Estates, IL 60169 On May 20, 2013, at 9:25 PM, Rick Hassen wrote: but you may want to consider getting a good AS3 book. ___ 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 -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] VizAlign 0.6 is now open source (alignment utility)
hey list. i hope it is ok to plug my own code, but i finally made VizAlignhttps://github.com/cataclysmicrewind/vizalignopen source under the MIT license. it's an awesome extendable utility for alignment of DisplayObject || Rectangle here is a modified snippet of the readme file on github: align your graphics the way you see it. VizAlign is a powerful, extendable, actionscript 3 alignment utility that allows you to *vizually align* DisplayObject. it is a new way of thinking about aligning, and will forever change your alignment habits. when you position something, you expect it to end up where you envision it; VizAlign helps you do that. the core is so extendable i never run out of new feature ideas. documentation is something i see as vital so i hope the information you find here is helpful to working with VizAlign. powerful api: each alignment you want to happen will need the objects you want to move (targets) a stationary object (targetCoordinateSpace) and an object (aligner) that will place the targets in relation to the targetCoordinateSpace. the main function you will use is: VizAlign.align ( [targets], [alignments], ignoreOrigins, applyResults, pixelHinting ):Array; targets: array of DisplayObject you want to align (or VizAlignTarget) alignments: array of VizAlignment which specify how to align the objects ignoreOrigins: if true, VizAlign will ignore the origin/registration point of the object and align purely based off the graphics contained applyResults: if true, VizAlign will actually set the x,y,width,height of the targets to the end calculations pixelHinting: if true, VizAlign will round all calculations with Math.round(); return: Array of VizAlignTarget who containt the target, its original dimensions and resulting dimensions features: - *natural api*: i want to align these [targets] to the [left of the stage]. - *40* alignments (and more coming!) - align Rectangle || DisplayObject - *extend*-able framework - returns results for *animation* or storage - *group*-ing! VizAlign.align ([logo], [new VizAlignment (new CenterAligner(), stage)], true, true, true); try reading the one liner above out loud like a sentence. if you can learn to think of your alignments like that, VizAlign will be a breeze and you’ll want to raise your arms and just expel the stress into the wind. *ahhh.* show me: come on up, relax, and take a look at the capabilities swf, which will let you play around with VizAlign, get used to how it works, and learn all the alignments available! VizAlign capabilities http://www.cataclysmicrewind.com/vizalign/showme/[swf+video] thank you -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] am i loaded by another swf?
Hey List, I'm building a swf, and i want to set the stage.scaleMode and align ONLY IF my swf is the top level swf, and was not loaded by another swf. anyone know how to find out if a swf was loaded by another swf? need more info? thanks -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] am i loaded by another swf?
so I could do something like this: public function Main():void { if (stage) { stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; init(); } else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener (Event.ADDED_TO_STAGE, init); // entry point } ? On Wed, Feb 15, 2012 at 3:07 PM, Henrik Andersson he...@henke37.cjb.netwrote: Ktu skriver: Hey List, I'm building a swf, and i want to set the stage.scaleMode and align ONLY IF my swf is the top level swf, and was not loaded by another swf. anyone know how to find out if a swf was loaded by another swf? need more info? thanks You can't know in the general case, but here is a good enough guess: function isFirstMovie():Boolean { return stage root==stage.getChildAt(1); } There is however one specific case where you can know: During the construction of the first frame (that includes the document class constructor). Check if you are on the stage during that. Only the first loaded movie will be, any subsequently loaded movies will not be. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] am i loaded by another swf?
sorry now, what if the loader is already in a display list when it runs that first frame? is it still not aware of the stage? On Wed, Feb 15, 2012 at 3:33 PM, Ktu ktu_fl...@cataclysmicrewind.comwrote: so I could do something like this: public function Main():void { if (stage) { stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; init(); } else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener (Event.ADDED_TO_STAGE, init); // entry point } ? On Wed, Feb 15, 2012 at 3:07 PM, Henrik Andersson he...@henke37.cjb.netwrote: Ktu skriver: Hey List, I'm building a swf, and i want to set the stage.scaleMode and align ONLY IF my swf is the top level swf, and was not loaded by another swf. anyone know how to find out if a swf was loaded by another swf? need more info? thanks You can't know in the general case, but here is a good enough guess: function isFirstMovie():Boolean { return stage root==stage.getChildAt(1); } There is however one specific case where you can know: During the construction of the first frame (that includes the document class constructor). Check if you are on the stage during that. Only the first loaded movie will be, any subsequently loaded movies will not be. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] loop and Timer problem?????????
A stack needs to finish and a new frame needs to enter for the Timer to actually dispatch its TimerEvent.TIMER. Since the while loop is never ending ( because the timer can't dispatch and change the boolean), the stack never ends. Thus, infinite loop. On Mon, Aug 29, 2011 at 3:28 PM, Cor c...@chello.nl wrote: It does not effect your CPU, but because of the never ending loop, your app crashes. Best regards, Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of nasim h Sent: maandag 29 augustus 2011 21:27 To: Flash Coders List Subject: RE: [Flashcoders] loop and Timer problem? I Cant understad why is that when the timer start it should work independence any thing but it wait for finish th loop can u explain the timer and loop i know them but i cant understand how they work and has an effect on cpu --- On Mon, 8/29/11, Cor c...@chello.nl wrote: From: Cor c...@chello.nl Subject: RE: [Flashcoders] loop and Timer problem? To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com Date: Monday, August 29, 2011, 2:44 PM TRY THIS: var forsate,generalFlag:Boolean; var counter:int=0; var generalTimer:Timer=new Timer(1); generalTimer.addEventListener(TimerEvent.TIMER,generalfunc); //NOW IT IS SET //UN COMMENT THE LINE BELOW TO NOTICE THE DIFFENCE //generalFlag=true; testhalgheh(); function generalfunc(e:TimerEvent=null):void { generalFlag=true; //trace( generalFlag + generalFlag) } function testhalgheh():void { generalTimer.start(); //generalFlag IS FALSE AT THIS MOMENT, BECAUSE THE generalfunc IS NOT YET CALLED while (counter1000) { if (generalFlag==true) { trace(hello); counter++; } } } ___ 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 -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Simplify XML Call
*UNTESTED*, but this was my thought... var level:int = 5; var xmlItem:* = xml.menu; for (var i:int = 0; i level; i++) { xmlItem = xmlItem.item[this[whichItem + ((i == 0) ? : i)]]; } totalItems = xmlItem.item.length; I am doing this: [whichItem + ((i == 0) ? : i)] because I have no idea where that value comes from or what its for... On Thu, Aug 11, 2011 at 11:48 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: You just need a recursive loop to do this. So I would write a function that handles each node level individually, adding to a class-level private property called something like, _totalItems. The function basically checks the XML node to see if it has any children. If it does, it calls itself, passing in the child XML node as an argument, and does the count the node, adding to the _totalItems private class property. The function then does not call itself again if the XML node does not have any children. No switch statement would be needed. Make sense? Jason Merrill Instructional Technology Architect II Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John Polk Sent: Thursday, August 11, 2011 11:31 AM To: Flash List Subject: [Flashcoders] Simplify XML Call Hi; I have this code: switch (level) { case 2: totalItems = xml.menu.item[whichItem].item.length(); break; case 3: totalItems = xml.menu.item[whichItem].item[whichItem2].item.length(); break; case 4: totalItems = xml.menu.item[whichItem].item[whichItem2].item[whichItem3].item.length(); break; case 5: totalItems = xml.menu.item[whichItem].item[whichItem2].item[whichItem3].item[whichItem4].item.length(); break; } Ugly, I know. How do I write one or two lines that does all that and even better: loops it? TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Simplify XML Call
sorry should have been this: var level:int = 5; var xmlItem:* = xml.menu; for (var i:int = 1; i level; i++) { xmlItem = xmlItem.item[this[whichItem + ((i == 1) ? : i)]]; } totalItems = xmlItem.item.length; On Thu, Aug 11, 2011 at 11:54 AM, Ktu ktu_fl...@cataclysmicrewind.comwrote: *UNTESTED*, but this was my thought... var level:int = 5; var xmlItem:* = xml.menu; for (var i:int = 0; i level; i++) { xmlItem = xmlItem.item[this[whichItem + ((i == 0) ? : i)]]; } totalItems = xmlItem.item.length; I am doing this: [whichItem + ((i == 0) ? : i)] because I have no idea where that value comes from or what its for... On Thu, Aug 11, 2011 at 11:48 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: You just need a recursive loop to do this. So I would write a function that handles each node level individually, adding to a class-level private property called something like, _totalItems. The function basically checks the XML node to see if it has any children. If it does, it calls itself, passing in the child XML node as an argument, and does the count the node, adding to the _totalItems private class property. The function then does not call itself again if the XML node does not have any children. No switch statement would be needed. Make sense? Jason Merrill Instructional Technology Architect II Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John Polk Sent: Thursday, August 11, 2011 11:31 AM To: Flash List Subject: [Flashcoders] Simplify XML Call Hi; I have this code: switch (level) { case 2: totalItems = xml.menu.item[whichItem].item.length(); break; case 3: totalItems = xml.menu.item[whichItem].item[whichItem2].item.length(); break; case 4: totalItems = xml.menu.item[whichItem].item[whichItem2].item[whichItem3].item.length(); break; case 5: totalItems = xml.menu.item[whichItem].item[whichItem2].item[whichItem3].item[whichItem4].item.length(); break; } Ugly, I know. How do I write one or two lines that does all that and even better: loops it? TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! -- Ktu
Re: [Flashcoders] :: flash player 10.0.12.36 Vector unshift issue ::
try looking at adobes JIRA http://bugs.adobe.com/flashplayer/ On Thu, Aug 11, 2011 at 5:39 AM, Arindam Dhar arin_d...@yahoo.com wrote: Hi, We found an issue with flash player version 10.0.12.36, wherein vector unshift() method is not working. Has anyone out there encountered similar issue ? thanks, Arindam D. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Simplify XML Call
that would be limited to you hard coding the number of levels to go down to - he already had this level var created with whatever number he had intended, I was just giving an example value... If the XML gets larger and deeper, that function would fail... - why would it fail? (assuming that the level var could be whatever you want? it would be a better idea to check the length of the array instead - John didn't indicate that this was a problem of verifying the data, but instead wishing to write the same code in fewer lines. That is what I did. I do agree with you though, that error checking would be good to have. I've changed my code to test creating the string required. This is a TEST to prove that my code would indeed create the referencing desired. var level:int = 5; var str:String = xml.menu for (var i:int = 1; i level; i++) { str += .item[whichItem + ((i == 1) ? : i) + ]; } str += .item.length(); change level to whatever you want and it will produce the same lines of code John reference above. Clearly this doesn't work, but since such little information was given (especially about the 'whichItemX' variables, this was my shot at it. This here is an updated version of it that breaks out a piece to make it a bit cleaner to read: var level:int = n; var xmlItem:* = xml.menu; for (var i:int = 1; i level; i++) { var which:* = this[whichItem + ((i == 1) ? : i)] xmlItem = xmlItem.item[which]; } totalItems = xmlItem.item.length(); John, I think if we are going to be able to help you further we would need more information about how this xml is truly setup, and wher some of these values come from (whichItem, whichItem2..., level) On Thu, Aug 11, 2011 at 12:58 PM, Henrik Andersson he...@henke37.cjb.netwrote: While you have the right spirit I think that it would be a better idea to check the length of the array instead. That way you won't accidentally step out of bounds there. __**_ Flashcoders mailing list Flashcoders@chattyfig.figleaf.**com Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/**mailman/listinfo/flashcodershttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Simplify XML Call
Never thought there was an argument here :) I see what you are getting at. Recursive would make it a more robust function. There are a lot of variables that he has not told us about, thus I was only commenting on the fact that a recursive function would do more than what his question asked. (I try not to do more than people ask for. It's easy to get sucked into solving a larger problem than was asked) you would have to know how deep in order to change the variable - apparently he already knows how deep to go. his original post said switch (level) { On Thu, Aug 11, 2011 at 2:31 PM, Merrill, Jason jason.merr...@bankofamerica.com wrote: If the XML gets larger and deeper, that function would fail... - why would it fail? (assuming that the level var could be whatever you want? (OK, I am not trying to argue with you here, I promise) Because that's exactly it, if the levels got deeper, you would have to know how deep in order to change the variable - human intervention. Otherwise, if you didn't manually keep the XML in synch with the variable value, it would fail. And how could you know that dynamically without doing a recursive function, which is what I suggested. It gets worse if a system produces the XML. So what would be advantage of your suggestion over mine? Yours would require a manual tweaking of the level variable. A recursive function would not that value to be set at all. And a recursive function could be set to only check down to a certain level if you wanted that, or only check certain specific levels. Jason Merrill Instructional Technology Architect II Bank of America Global Learning ___ -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu Sent: Thursday, August 11, 2011 2:14 PM To: Flash Coders List Subject: Re: [Flashcoders] Simplify XML Call that would be limited to you hard coding the number of levels to go down to - he already had this level var created with whatever number he had intended, I was just giving an example value... If the XML gets larger and deeper, that function would fail... - why would it fail? (assuming that the level var could be whatever you want? it would be a better idea to check the length of the array instead - John didn't indicate that this was a problem of verifying the data, but instead wishing to write the same code in fewer lines. That is what I did. I do agree with you though, that error checking would be good to have. I've changed my code to test creating the string required. This is a TEST to prove that my code would indeed create the referencing desired. var level:int = 5; var str:String = xml.menu for (var i:int = 1; i level; i++) { str += .item[whichItem + ((i == 1) ? : i) + ]; } str += .item.length(); change level to whatever you want and it will produce the same lines of code John reference above. Clearly this doesn't work, but since such little information was given (especially about the 'whichItemX' variables, this was my shot at it. This here is an updated version of it that breaks out a piece to make it a bit cleaner to read: var level:int = n; var xmlItem:* = xml.menu; for (var i:int = 1; i level; i++) { var which:* = this[whichItem + ((i == 1) ? : i)] xmlItem = xmlItem.item[which]; } totalItems = xmlItem.item.length(); John, I think if we are going to be able to help you further we would need more information about how this xml is truly setup, and wher some of these values come from (whichItem, whichItem2..., level) On Thu, Aug 11, 2011 at 12:58 PM, Henrik Andersson he...@henke37.cjb.net wrote: While you have the right spirit I think that it would be a better idea to check the length of the array instead. That way you won't accidentally step out of bounds there. __**_ Flashcoders mailing list Flashcoders@chattyfig.figleaf.**com Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/**mailman/listinfo/flashcodershttp://cha ttyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination
[Flashcoders] Document class with 2 frames without IDE?
I'm working on a project where I am using ANT for automation. I have a requirement where the main timeline of this swf MUST have 2 frames. The only way I have been able to do that is by creating a .fla and setting the document class. However, I am not sure how to use ANT to get Flash IDE open, change some compiler constants and then tell it to compile. My other option (which I would prefer) is to not use the Flash IDE, and use a swc with an asset that has 2 frames in it. Then I could extend that class and get the two frames and still be able to work within FlashDevelop. tldr; Anyone have experience with using a swc asset as a base class with multiple frames for the document class? -- Ktu; The information contained in this message may or may not be privileged and/or confidential. You never know when you could take what I say and use it against me. If you are NOT the intended recipient, congratulations! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Help Registration point and origion point
Hopefully below will help you: I'm going to just explain how the origin stuff works, and how you can learn to compensate for it, and maybe you can apply this to your work. Starting off with an example where the visual elements of a sprite are not originated at 0,0 var mySprite:Sprite = new Sprite (); mySprite.graphics.beginFill(); mySprite.graphics.drawRect (10, 10, 50, 50); mySprite.graphics.endFill(); mySprite.x = 10; mySprite.y = 10; stage.addChild(mySprite); *the stage thinks this:* mySprite.x = 10; mySprite.y = 10; mySprite.width = 50; mySprite.height = 50; *mySprite thinks this:* this.x = 10; this.y = 10; this.width = 50; this.height = 50; But what happened to the fact that the rectangle I drew lives at x:10, y:10 !!! *So how do you find out where the origin is from inside mySprite?* - mySprite.getBounds(mySprite); this will return the boundaries of mySprite, in relation to mySprite. The visual reality of mySprite is that its boundaries are this: x: 10 y: 10 width:50 height:50 your origin offset is x:10, y:10. This still doesn't account for the x and y placement of mySprite on the stage, but that is simple to calculate. *The next part, is compensating for the scale: ** *If you take our mySprite from above, and scale it to 2, there are some notable changes: - mySprite.scaleX = mySprite.scaleY = 2; mySprite thinks: x:10 y:10 width:100 height:100 mySprite.getBounds(mySprite) returns this: x:10 y:10 width:50 height:50 The visual elements inside of mySprite did not grow, but mySprite is telling it to grow (because of the scaleX | scaleY changes) But what is probably messing you up is that when you scale an object that has an origin offset, the distance between the origin offset is multiplied by the same scale. *Here's the example:* (same mySprite as above, and already scaleX and scaleY = 2) mySprite is located at x:10, y:10 mySprite is scaled to 2, with an origin offset of x:10,. y:10. multiply the origin offsets by the scale of the object and you get x:20, y:20 the visual position of mySprite is at x:30, y:30 We can verify this by using getBounds again, but in relation to the stage. mySprite.getBounds(stage); returns: x:30 y:30 width:100 height:100 So, an example to compensate for the offset and scale would go like this: (if you want mySprite to *look* like its at 0,0 on the stage) var myBounds:Rectangle = mySprite.getBounds(mySprite); var originOffset:Point = new Point() originOffset.x = -myBounds.x * mySprite.scaleX originOffset.y = -myBounds.y * mySprite.scaleY; mySprite.x = originOffset.x; mySprite.y = originOffset.y; Now, mySprite will appear to be at 0,0 on the stage, even though the origin is offset and the scale has been changed. *Solutions* You can try compensation for both the origin and scale, or you can change the way you scale, say by scaling the actual sin wave and not the containing parent. You could also just redraw the wave instead of changing the scale. Hope that helps. the end code I used: var mySprite:Sprite = new Sprite (); mySprite.graphics.beginFill(0); mySprite.graphics.drawRect (10, 10, 50, 50); mySprite.graphics.endFill(); mySprite.x = 10; mySprite.y = 10; stage.addChild(mySprite); mySprite.scaleX = mySprite.scaleY = 2; var props:Rectangle = new Rectangle(mySprite.x, mySprite.y, mySprite.width, mySprite.height); trace(mySprite x,y,width,height: + props); trace(mySprite.getBounds(mySprite) = + mySprite.getBounds(mySprite)); trace(mySprite.getBounds(stage) = + mySprite.getBounds(stage)); var myBounds:Rectangle = mySprite.getBounds(mySprite); var originOffset:Point = new Point() originOffset.x = -myBounds.x * mySprite.scaleX originOffset.y = -myBounds.y * mySprite.scaleY; mySprite.x = originOffset.x; mySprite.y = originOffset.y; On Tue, Aug 2, 2011 at 1:03 AM, nasim h iranebah...@yahoo.com wrote: Hi Could u help me . i draw wave( by code) inside empy movieClip that se regpoint (manualy) at middle of that when i scale it t it’s good but when i move align x or y It scaled by pevios position . I want to change reg point and refrence point too , like when i do it manualy , the refrence point means (0,0) point , how do i change that point plese help me what is diferent between reg point and origion point (cordinate system (0,0)) And how to change them ? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Using BitmapData.draw() with masked items
if you are using a rectangular mask, try just using scrollRect instead. var container:Sprite = new Sprite() container.addChild(myBitmap) container.scrollRect = new Rectangle (0, 0, myBitmap.width, myBitmap.height); make the rectangle whichever dimensions you care about, but that might do it... On Thu, Jul 28, 2011 at 12:26 PM, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: hmm interesting - okay - i'll give that a shot best a On 28 July 2011 17:12, Henrik Andersson he...@henke37.cjb.net wrote: Sounds like the classical mask not being in a display list issue, but in a new variation. Ensure that both the mask and the maskee is in the container passed to the draw call. __**_ Flashcoders mailing list Flashcoders@chattyfig.figleaf.**com Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Webcam - Menu / Allow access not working
This is a known issue in certain environments. Search the adobe bugs to find more information about it On Tue, Jul 26, 2011 at 7:47 AM, Karim Beyrouti ka...@kurst.co.uk wrote: Hello Flashcoders, Well - the adobe settings panel to allow access to my webcam is not responding to mouse click - it shows up - and I can't click 'Allow' or 'Deny'. It just simple does not respond to keyboard or mouse events. Anyone seen this before / or know how to resolve this issue ? Chrome / OsX 10.7. Thanks Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Input Validation and errors?
Hey List, looking for some feedback. Struggling with a utility function and input validation. * function ( ar1:Array, ar2:Array ) :Array* 1. Should I throw an error if either of the input arrays are empty? or should I just let the function run (effectively doing nothing)? 2. Should I throw an error if an input would cause bizarre results (but not cause any exceptions of its own)? 3. My input arrays can have multiple data types in them, and at runtime I must make sure that they are of a type I can expect. If I run across an element that I cannot accept, is that when I should throw an error? Here's some specific examples: 1. if ar1 and ar2 share the same object reference, I know that this function will produce results that can get pretty strange. Should I throw an error if that happens? 2. if ar1 has the same object reference twice or more, I am currently throwing an error, but it technically won't cause and problems, but the output will be strange -- Ktu; The information contained in this message may or may not be privileged and/or confidential. If you are NOT the intended recipient, congratulations, you got mail! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] RE: Flash AS editor preferences question
I use Anonymous http://www.ms-studio.com/FontSales/anonymous.html On Thu, Jun 2, 2011 at 10:16 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: Here's an odd one: what font do you use in the Actionscript editor window? Wait - hold the phone, you're editing Actionscript with the Flash IDE? If so, we need to TALK man. ( http://www.flashdevelop.org/wikidocs/index.php?title=Main_Page (free, awesome) http://www.jetbrains.com/idea/download/ (awesome++) http://www.fdt.powerflasher.com/ (awesome++) http://www.adobe.com/products/flash-builder.html (awesome, maybe you have this already?) ) Jason Merrill Instructional Technology Architect Bank of America Global Learning -- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to Sender are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] What is up with adobes documentation?
___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] player version messup
On windows, there 2 plugins for Flash active x control plugin for IE plugin for 'other' browsers and Chrome is special. It has flash player built in. And (from what I've heard) you have to put some effort in to be able to use the debug player in Chrome (or any other version). So you may have just uninstalled the active x plugin and not the ;other; plugin, and chrome is doing its own thing... this is based off of my memory with no googling so if I am wrong, I hope this at least points you in a useful direction. On Thu, Apr 7, 2011 at 10:41 AM, Rodrigo Augusto Guerra rodr...@alumni.org.br wrote: hi folks... trying to update and undestand some flash player version questions here, after close all programs, uninstalling FP and restarting I have the following: FF version: WIN 10,1,53,64 Your browser is Gecko engine (Mozilla, Netscape 6+ etc.) on the Windows platform. Chome: WIN 10,2,154,25 Your browser is Konqueror / Safari / OmniWeb 4.5+ on the Windows platform. IE: Your Flash Player version is You don't have the Flash Player installed. Your browser is Internet Explorer 5+ on the Windows platform. a) why after uninstalling it still present in FF and chrome? b) why FF and chrome don't show the same version? I always thought that they use the same FP engine and IE user another one (activex) c) even after downloading and installing a fresh FP, FF still shows the old version. thanks rodrigo. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] htmlText im src
I appreciate your responses Karl, but I think you're still a bit off. The img in htmlText can have a source of a library item, and an interactive MovieClip (say checkbox) can be inserted into the textfield and work. I want to put an interactive Sprite into the textfield, but not through a library linkage id, but through any arbitrary class reference. Has no one ever tried doing this? On Thu, Mar 10, 2011 at 11:27 PM, Karl DeSaulniers k...@designdrumm.comwrote: Ah I see. Something along these lines? http://stackoverflow.com/questions/203969/how-do-i-get-from-an-instance-of-a-class-to-a-class-object-in-actionscript-3 I googled:: AS3 return instance as image HTH, Best, Karl On Mar 10, 2011, at 10:08 PM, Ktu wrote: well, I'm not trying to embed an image. I want to use a MovieClip. maybe this 'ideal scenario' will help var numStep:NumericStepper = new NumericStepper (); var txt:TextField = new TextField (); txt.htmlText = age: img src=' + numStep + '/; (I know that will not work. I am just trying to get the point across that I don't want an image or linkage id, but I want an instance of class) On Thu, Mar 10, 2011 at 10:56 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hi Ktu, I believe you want it to be a function return. txt.htmlText = age: img src='getNumericStepper()'/ getNumericStepper could be a call to a createimage php file for example. when returning the image, php will send the data and content type of the image and the img tag interprets it as an image. like ... return imagepng($image); //the last line in my createimage.php file I did this with a captcha box I made. Made one in flash and html. both call on that php file for the image. That way if a user was viewing with flash or a non-flash user, both had to submit this captcha to register for instance. Hope im not too off. *:) Best, Karl On Mar 10, 2011, at 9:41 PM, Ktu wrote: Thanks for the responses Karl. Yes, I meant displaying html inside Flash. I am using Keith Peters' tiny components. I want to instantiate an instance of the NumericStepper inside an instance of a TextField. I know that you can use htmlText with an img tag to place Library Items, image files and external SWF, but I want to instantiate just a random class in there (in this case NumericStepper). vat txt:TextField = new TextField (); txt.htmlText = age: img src='NumericStepper'/ does that make more sense? On Thu, Mar 10, 2011 at 10:32 PM, Karl DeSaulniers k...@designdrumm.com wrote: Or Are you talking about displaying HTML in flash? I did that once in AS2. Don't know about AIR, hopefully it is much better at it than the flash player. Best, Karl On Mar 10, 2011, at 9:25 PM, Karl DeSaulniers wrote: You probably want to use flashVars to talk with some javascript that then calls the image and that, you put as the src? Best, Karl On Mar 10, 2011, at 9:10 PM, Ktu wrote: Hey List, I've been googling for an hour and haven't found a solution. My google fu is weak, I concede defeat. Pure AS3 AIR No Library No FLA I am dynamically building a TextField. In it I would like to place some instances of Sprites. What should the src attribute of the img tag be if I want it to instantiate an object? ex. img src='com.name.MySpriteClass'/ If you can't do it, are there any workarounds? thanks guys. -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders
Re: [Flashcoders] RegExp Help
I just plugged it into RegExr http://www.regexr.com and I can't make sense of it. Try using that tool to build it. It really helps On Fri, Mar 11, 2011 at 5:56 AM, Karim Beyrouti ka...@kurst.co.uk wrote: Hello lovely list...I am trying to run a RegExp pattern on a String, and am not too sure why it's not working, and am not too sure why. Here is the code: var tStr: String= '/a:value -big=this -test:123 -test2=th_3' var r : RegExp= new RegExp( '(?:\s*)(?=[-|/])(?name\w*)[:|=](((?value.*?)(?!\\))|(?value[\w]*))'); var result : Object= r.exec( str ); result returns null... Maybe you can shed some light on what i am doing wrong here? Thanks... Karim ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] htmlText im src
Hey List, I've been googling for an hour and haven't found a solution. My google fu is weak, I concede defeat. Pure AS3 AIR No Library No FLA I am dynamically building a TextField. In it I would like to place some instances of Sprites. What should the src attribute of the img tag be if I want it to instantiate an object? ex. img src='com.name.MySpriteClass'/ If you can't do it, are there any workarounds? thanks guys. -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] htmlText im src
Thanks for the responses Karl. Yes, I meant displaying html inside Flash. I am using Keith Peters' tiny components. I want to instantiate an instance of the NumericStepper inside an instance of a TextField. I know that you can use htmlText with an img tag to place Library Items, image files and external SWF, but I want to instantiate just a random class in there (in this case NumericStepper). vat txt:TextField = new TextField (); txt.htmlText = age: img src='NumericStepper'/ does that make more sense? On Thu, Mar 10, 2011 at 10:32 PM, Karl DeSaulniers k...@designdrumm.comwrote: Or Are you talking about displaying HTML in flash? I did that once in AS2. Don't know about AIR, hopefully it is much better at it than the flash player. Best, Karl On Mar 10, 2011, at 9:25 PM, Karl DeSaulniers wrote: You probably want to use flashVars to talk with some javascript that then calls the image and that, you put as the src? Best, Karl On Mar 10, 2011, at 9:10 PM, Ktu wrote: Hey List, I've been googling for an hour and haven't found a solution. My google fu is weak, I concede defeat. Pure AS3 AIR No Library No FLA I am dynamically building a TextField. In it I would like to place some instances of Sprites. What should the src attribute of the img tag be if I want it to instantiate an object? ex. img src='com.name.MySpriteClass'/ If you can't do it, are there any workarounds? thanks guys. -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] htmlText im src
well, I'm not trying to embed an image. I want to use a MovieClip. maybe this 'ideal scenario' will help var numStep:NumericStepper = new NumericStepper (); var txt:TextField = new TextField (); txt.htmlText = age: img src=' + numStep + '/; (I know that will not work. I am just trying to get the point across that I don't want an image or linkage id, but I want an instance of class) On Thu, Mar 10, 2011 at 10:56 PM, Karl DeSaulniers k...@designdrumm.comwrote: Hi Ktu, I believe you want it to be a function return. txt.htmlText = age: img src='getNumericStepper()'/ getNumericStepper could be a call to a createimage php file for example. when returning the image, php will send the data and content type of the image and the img tag interprets it as an image. like ... return imagepng($image); //the last line in my createimage.php file I did this with a captcha box I made. Made one in flash and html. both call on that php file for the image. That way if a user was viewing with flash or a non-flash user, both had to submit this captcha to register for instance. Hope im not too off. *:) Best, Karl On Mar 10, 2011, at 9:41 PM, Ktu wrote: Thanks for the responses Karl. Yes, I meant displaying html inside Flash. I am using Keith Peters' tiny components. I want to instantiate an instance of the NumericStepper inside an instance of a TextField. I know that you can use htmlText with an img tag to place Library Items, image files and external SWF, but I want to instantiate just a random class in there (in this case NumericStepper). vat txt:TextField = new TextField (); txt.htmlText = age: img src='NumericStepper'/ does that make more sense? On Thu, Mar 10, 2011 at 10:32 PM, Karl DeSaulniers k...@designdrumm.com wrote: Or Are you talking about displaying HTML in flash? I did that once in AS2. Don't know about AIR, hopefully it is much better at it than the flash player. Best, Karl On Mar 10, 2011, at 9:25 PM, Karl DeSaulniers wrote: You probably want to use flashVars to talk with some javascript that then calls the image and that, you put as the src? Best, Karl On Mar 10, 2011, at 9:10 PM, Ktu wrote: Hey List, I've been googling for an hour and haven't found a solution. My google fu is weak, I concede defeat. Pure AS3 AIR No Library No FLA I am dynamically building a TextField. In it I would like to place some instances of Sprites. What should the src attribute of the img tag be if I want it to instantiate an object? ex. img src='com.name.MySpriteClass'/ If you can't do it, are there any workarounds? thanks guys. -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Automatic quality toggle
I don't have personal experience with this problem, but I did come up with some questions and ideas that might further your search. First off, it sounds like to me the requirement is to have a seamless playback of animations. No jitter, frameskips, or lag times. You are right, its quite the complex problem. The elastic racetrackhttp://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/comes to mind when you explain your problem. The linked article has lots of information and great comments. Also, a link to Grant Skinner's look on optimization http://gskinner.com/talks/quick/ might help. Thus, I think the solution for you will have to include not only graphics rendering solutions, but logic and code execution solutions as well. My first thought was to consider the framerate you are aiming for. This will drastically effect the solution. A consideration of the human eye framerate may help you determine the optimal framerate for your program. With the framerate in mind, you could aim for a higher framerate, and drop a bit if frameskips happen, or not at all because if it's high enough you may not notice visually. However, this solution will only look fine if your animations are time based and not frame based. I think the framerate solution is directly related to the understanding of the elastic racetrack. Graphical enhancements could be turned off if noticing a problem with rendering like you said, removing filters or other 'nice to haves' for the graphics. Optimized algorithms could greatly benefit the visual rendering. Sometimes that means using 'hacks' to gain performance. Maybe multiple levels of hit detection for a game? If the machine is too slow, it could use a different type of hit detection. But to answer my own question, that would change the gameplay and create problems with high scoring or competition. So all of those may be things you can do to make performance better, they do not address the main issue which is, how do I know when to change things if they are not good enough. For this, there may be solution in writing a tool that would calculate how long each section of each slice of each frame is taking. Using the elastic racetrack article as a reference, one might be able to determine how to adjust certain aspects of the application to smooth out the time it takes for each section to finish. Maybe you can accomplish most of this task by listening to ENTER_FRAME, RENDER, EXIT_FRAME, FRAME_CONSTRUCTED events to calculate the timing of things. Then, when numbers pass specified thresholds, you could make changes to the appropriate sections. For example, you define a matrix of complexity for each 'section' of your program. These matrix define how much time each aspect of the racetrack can consume. So, during intense gameplay, maybe you want to allow more time for code execution and less on rendering. Then, if your thresholds are surpassed, an event could be fired and you could respond by, lowering the quality of the graphics, or turning off filters etc... To conclude, I wonder if the cost is worth the benefit. Ktu On Fri, Feb 25, 2011 at 6:19 AM, Henrik Andersson he...@henke37.cjb.netwrote: I have been thinking a lot about the problem of optimizing animation playback. I know that some people here are unfamiliar with working with real animations and have been doing applications instead. Please consider this aimed at real animations like in movies and games. While the best solution is to simply make the animation simpler so that it is easier to render, that is far from an easy, or even possible solution. Instead the idea is to dynamically adjust the rendering quality. But as I will explain, it is far from a simple task. Please excuse any too easy for me explanations, I aim for a post that any developer can read and understand. As most of you know the Flash player have three main rendering quality options, low, medium and high quality. There is also the option to go for best, but that is largely the same as high. What the rendering quality control mainly controls is the subpixel rendering. When flash detects that a shape has an edge on a non integer position it will do subpixel rendering for that pixel. The subpixel rendering is surprisingly simple, flash just scales up the area (factor 2 for medium, 4 for high) and renders the new pixels. It then takes the average value of the pixels and uses that as the value of the real pixel. Low quality skips subpixel rendering completely. Now, this does change the rendering cost quite a lot. As such, it is the stock option for controlling rendering cost in the player. What some people may not know is that the Flash renderer is smart enough to skip frames. What this means is that if it detects that it is too far behind it will simply skip the drawing step and move directly on to the next frame. This can happen multiple times in a row in severe cases. This is rather easy to detect
Re: [Flashcoders] Automatic quality toggle
But what can you do when you have exhausted your options to edit the content? You only got the quality setting left to use. - maybe then you've got to re-evaluate what you are doing or use the quality settings. How do you decide on the thresholds? Can you successfully predict when it is worth to change the quality? - Trial and error will probably be the only way,... ? I am looking for a generic solution to the issue of the graphics taking too long to draw. - Your solution will have to be based off of your requirements. A totally generic solution probably won't be actualized until more specific solutions are gathered, anaylized and merged. If your render phase of the elastic racetrack is consuming more than the entire frame/slice, then I think you will have a serious problem on your hands. If you share your requirements, maybe an appropriate solution could be determined. On Fri, Feb 25, 2011 at 12:19 PM, Henrik Andersson he...@henke37.cjb.netwrote: You bring up a lot of valid points, but you fail to focus on the main concern here, how to deal with the graphics being the most heavy part. Please keep in mind that I am trying to focus on how to deal with animations that can't be simplified much. I am looking for a generic solution to the issue of the graphics taking too long to draw. Reducing complexity is of course a good idea. And yeah, filters are expensive and provide little benefit most of the time. But what can you do when you have exhausted your options to edit the content? You only got the quality setting left to use. With that said, you bring up some important points about how much frameskip can be tolerated. Also, thanks for reiterating my own points about how to capture performance statics. That part is easy. But it is what to do with the gathered data that I worry about. How do you decide on the thresholds? Can you successfully predict when it is worth to change the quality? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 / OOP training
I spent quite some time looking for the same type of training a while back. It simply does not exist, or is hidden in the depths of atlantis. The problem is that all the education programs are designed for beginners. And even if you go to one (which I did), the trainer can only help you so much because he has the whole class to attend to. So while the trainer may be able to point you in more advanced directions, he cannot devote enough time to cover the concepts you need. Maybe the intro to AS3 will help, but not in the way you are looking (probably). One way to learn is to take it on yourself. Get the motivation to explore the new native classes. Learn that nasty display architecture. Never let yourself settle for mediocrity and you will continue to learn and grow. If you force yourself upon OOP, it may stop you in your tracks. Get high level with the concepts and patterns, and then when you find yourself in a situation that could implement the pattern, try it out. Don't be afraid to fail. The other way, is to incorporate the above mentioned solution with the addition of a mentor. Collaboration increase growth exponentially when coupled with the motivation to do so. books: Learning Actionscript 3.0 - Shupe Rosser Essential Actionscript 3.0 - Moock my 2cents. ktu On Thu, Feb 17, 2011 at 11:32 AM, Eric Dolecki edole...@gmail.com wrote: That is a good one Sent from my iPhone On Feb 17, 2011, at 11:13 AM, Sam Brown 4sambr...@gmail.com wrote: Although it's not training, I found this book very helpful: http://www.amazon.com/Object-Oriented-ActionScript-3-0-Todd-Yard/dp/1590598458 http://www.amazon.com/Object-Oriented-ActionScript-3-0-Todd-Yard/dp/1590598458 It has detailed explanations and examples to work through On Thu, Feb 17, 2011 at 9:48 AM, Sheehan, Conor conor_shee...@bose.com wrote: Hi List, I'm looking for a quality AS3 / OOP training program. I'm (pathetically) still writing everything in AS2, and have only a vague understanding of OOP. In my experience it's difficult to find training suitable for somebody at my level - not a newbie, but far from an expert. Anybody have any suggestions? I'm thinking a 3 to 5 day program, and I'm in the Greater Boston area, so preferably around here, but I can travel if necessary. Thanks very much, Conor ___ 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 -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Testing display object if its MovieClip or BitMap?
I know a solution may already be found but this was my first thought and I am curious how any of you feel about switch (true) for this problem switch (true) { case loadedDisplayObject is MovieClip: case loadedDisplayObject is Bitmap: } Is switch (true) just bad practice? and does 'is' not work in this case? Anyone want to stab at it? Ktu On Sat, Dec 4, 2010 at 11:26 PM, Micky Hulse mickyhulse.li...@gmail.comwrote: On Thu, Dec 2, 2010 at 3:17 AM, Karim Beyrouti ka...@kurst.co.uk wrote: Hopefully the line breaks here wont be too bad, pasting the code: Very nice!!! Many thanks Karim I will test it out and let you know how it goes. :) Have an excellent day/night! Cheers, Micky ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calling a Static Function
I'm curious if you solved the problem Kerry. Also, if the describeType helped you at all, and what your solution was. I'm doing a lot of swf loading nowadays and I will undoubtedly run into this same issue you are having/had. thanks Ktu On Wed, Nov 10, 2010 at 9:00 PM, Ktu ktu_fl...@cataclysmicrewind.comwrote: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/package.html#describeType%28%29 If the value parameter is an instance of a type, the returned XML object includes all the instance properties of that type, but does not include any static properties The instance properties are nested inside a tag named factory to distinguish them from the static properties. - So Static properties live outside it ;) Just learning this myself. Maybe that was the issue. My suggestion of .content property is an instance of the class. Try using your var AssetLibrary:Class; as the parameter for describeType(). If it still doesn't show up, you should seriously question whether the method was compiled. First though, try workarounds to call the method such as Keith's or Juan's suggestion or casting the content as a dynamic object and calling the method. var AssetLibrary:Object LoaderInfo(pEvent.target).content; try { AssetLibrary.initAssets(); //--the error is here } catch (e:ArgumentError) { trace (e); } just more thoughts. hope it helps... On Wed, Nov 10, 2010 at 3:17 PM, Kerry Thompson al...@cyberiantiger.bizwrote: Ktu wrote: try using describeType() to find out whats in the class and if the method has been compiled pEvent.target is a ContentLoaderInfo object right? You are using a Loader object to load the swf right? Yes, pEvent.target is a ContentLoaderInfo object. I'm downloading the swf with this: private function loadSwf():void { var urlRequest:URLRequest = new URLRequest(url); loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoadComplete); loader.load(urlRequest); } and, in the handleLoadComplete handler, I'm getting the class with this: pEvent.target.applicationDomain.getDefinition(AssetLibrary) as Class; describeType() gives me some XML, but I don't see any of my public vars or functions in it. Now I'm really confused, because I can see all my public vars in the debugger, but not the public function. In the XML produced by describeType(), I don't see much of anything I'm expecting. The only methods it lists are the inherited public events. Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calling a Static Function
try using describeType() to find out whats in the class and if the method has been compiled pEvent.target is a ContentLoaderInfo object right? You are using a Loader object to load the swf right? if so, import flash.utils.describeType; var swfContent:Object = LoaderInfo(pEvent.target).content; trace(describeType(swfContent)); not tested, hope it helps Ktu On Wed, Nov 10, 2010 at 1:22 PM, Kerry Thompson al...@cyberiantiger.bizwrote: Keith Reinfeld wrote: Have you tried calling the static function indirectly? // In the swf you are loading public function callInitAssets():void{ trace(\nLoadee:: callInitAssets() called); initAssets(); } // In the swf you are loading into private function handleLoadComplete(e:Event):void{ _assetLib = e.target.loader.contentLoaderInfo.content as MovieClip; trace(_assetLib =,_assetLib); _assetLib.callInitAssets(); } Thanks, Keith. I'll try that. And thanks, Juan and John. I'll try some things, but at the moment I'm leaning towards John's suggestion that the method isn't being compiled into the class. I've looked at the class in the debugger, and I can see all the public vars, but not the function. Juan, I'm assuming this is equivalent to using describe as you suggested. I'll try adding a call to the method in the class's constructor and see what happens. I'll let you know what I find out. Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calling a Static Function
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/package.html#describeType%28%29 If the value parameter is an instance of a type, the returned XML object includes all the instance properties of that type, but does not include any static properties The instance properties are nested inside a tag named factory to distinguish them from the static properties. - So Static properties live outside it ;) Just learning this myself. Maybe that was the issue. My suggestion of .content property is an instance of the class. Try using your var AssetLibrary:Class; as the parameter for describeType(). If it still doesn't show up, you should seriously question whether the method was compiled. First though, try workarounds to call the method such as Keith's or Juan's suggestion or casting the content as a dynamic object and calling the method. var AssetLibrary:Object LoaderInfo(pEvent.target).content; try { AssetLibrary.initAssets(); //--the error is here } catch (e:ArgumentError) { trace (e); } just more thoughts. hope it helps... On Wed, Nov 10, 2010 at 3:17 PM, Kerry Thompson al...@cyberiantiger.bizwrote: Ktu wrote: try using describeType() to find out whats in the class and if the method has been compiled pEvent.target is a ContentLoaderInfo object right? You are using a Loader object to load the swf right? Yes, pEvent.target is a ContentLoaderInfo object. I'm downloading the swf with this: private function loadSwf():void { var urlRequest:URLRequest = new URLRequest(url); loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoadComplete); loader.load(urlRequest); } and, in the handleLoadComplete handler, I'm getting the class with this: pEvent.target.applicationDomain.getDefinition(AssetLibrary) as Class; describeType() gives me some XML, but I don't see any of my public vars or functions in it. Now I'm really confused, because I can see all my public vars in the debugger, but not the public function. In the XML produced by describeType(), I don't see much of anything I'm expecting. The only methods it lists are the inherited public events. Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Designing for multiple screen sizes - and input types
flash.system.Capabilities will get you started On Wed, Oct 6, 2010 at 1:16 PM, Kevin Newman capta...@unfocus.com wrote: The more I dive into mobile design and development, the more I realize that the distinction between mobile and desktop has less to do with screen size, and a great deal more to do with input type. On a mobile device - even a big screen one like an iPad - touch interface means things need to (and can) work differently than on the desktop with a mouse and scrollwheel (or cursor/trackpad). The question - is there a way to detect interface method in addition to screensize and ppi? I need to tailor certain things based on the answer to that query. Kevin N. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Designing for multiple screen sizes - and input types
The Capabilities class tells you if there is a touch screen. If there is, turn on touch screen interfacing. I'm not sure I understand the issue (or workaround?) If (Capabilities.touchscreenType != TouchscreenType.NONE) { //addEventListeners and events for touchscreen usability } ? On Wed, Oct 6, 2010 at 2:02 PM, Kevin Newman capta...@unfocus.com wrote: I was hoping for a flag I could check in my setup phase, but that'll be a good workaround. Kevin N. On 10/6/10 1:50 PM, Tom Gooding wrote: I thought there were TouchEvents for mobile - presumably you could look for them getting fired somewhere and switch modes on that? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Designing for multiple screen sizes - and input types
also, flash.ui.MultiTouch On Wed, Oct 6, 2010 at 2:46 PM, Ktu ktu_fl...@cataclysmicrewind.com wrote: The Capabilities class tells you if there is a touch screen. If there is, turn on touch screen interfacing. I'm not sure I understand the issue (or workaround?) If (Capabilities.touchscreenType != TouchscreenType.NONE) { //addEventListeners and events for touchscreen usability } ? On Wed, Oct 6, 2010 at 2:02 PM, Kevin Newman capta...@unfocus.com wrote: I was hoping for a flag I could check in my setup phase, but that'll be a good workaround. Kevin N. On 10/6/10 1:50 PM, Tom Gooding wrote: I thought there were TouchEvents for mobile - presumably you could look for them getting fired somewhere and switch modes on that? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Apple changes their guidelines
It seems like everyone is concerned about the details of getting Flash on iDrones. Does this statement by Apple make anyone more upset with them? On Thu, Sep 9, 2010 at 12:47 PM, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: the downloaded code thing prevents oracle from creating a jvm and adobe from creating flash plugin although why they need it as it's already in their eula a On 9 September 2010 17:27, Kurt Dommermuth k...@kurtdommermuth.com wrote: Exactly. I don't think XML would be considered code, but they could justify anything they want. All in all, I'm pretty damn excited. Personally I was crushed when Apple blocked CS5 and unfortunately for Adobe I couldn't justify an upgrade. Now I can. I'm sure I'm not alone. I bet Adobe's sales will be up quite a bit in the coming weeks. Now that Apple seems to be making rational business decisions it makes me think that flash players will be on their mobile devices soon too. Maybe within a year. On Thu, Sep 9, 2010 at 12:04 PM, Nathan Mynarcik nat...@mynarcik.com wrote: I understand. I have slight concerns about that statement too. And the fact that it's to Apple's discretion on what they really mean... For example: Can we not access XML data stored on the web from our Apps? Nathan Mynarcik nat...@mynarcik.com 254.749.2525 www.mynarcik.com ___ 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 -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Link text indexes in a TextField
so whats your solution? On Tue, Aug 31, 2010 at 9:42 AM, Andrew Murphy amur...@delvinia.com wrote: Thank you, but I came up with a solution. :) -- Andrew Murphy Interactive Media Developer amur...@delvinia.com Delvinia 370 King Street West, 5th Floor, Box 4 Toronto Canada M5V 1J9 P (416) 364-1455 ext. 232 F (416) 364-9830 W www.delvinia.com -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karim Beyrouti Sent: August 31, 2010 05:37 am To: Flash Coders List Subject: Re: [Flashcoders] Link text indexes in a TextField I have textfield link detection in this class - https://code.google.com/p/kurstcode/source/browse/trunk/libs/com/kurst/utils /TextFieldUtils.as using it for link roll-over / roll-out events. And I think it could be extended to get the link's start/end position. Have a look at the 'detectMouseOver' function - could be a good starting point... - karim On 30 Aug 2010, at 19:47, Andrew Murphy wrote: Hello. :) Thank you, but I think that will give me the link's text from within the htmlText property of the TextField. What I need are the beginning and ending indexes of the link within the text property of the TextField. That is, after the HTML has been rendered into the displayed text. I've thought of finding the index of the TextEvent's text property (ie: block1) within the htmlText property of the TextField and using that to determine the indexes, but those indexes would be relative to the TextField's htmlText property, rather than it's text property. -- Andrew Murphy Interactive Media Developer amur...@delvinia.com Delvinia 370 King Street West, 5th Floor, Box 4 Toronto Canada M5V 1J9 P (416) 364-1455 ext. 232 F (416) 364-9830 W www.delvinia.com -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik Sent: August 30, 2010 14:35 pm To: Flash Coders List Subject: Re: [Flashcoders] Link text indexes in a TextField You will have to cull out what you want: **Psuedo Code** var stuff:String = [a href=event:block1]dolor sit[/a]; stuff.substr(stuff.indexOf([a href=event:block1]), stuff.indexOf([/a])); Nathan Mynarcik nat...@mynarcik.com 254.749.2525 www.mynarcik.com On Mon, Aug 30, 2010 at 1:46 PM, Andrew Murphy amur...@delvinia.com wrote: Hi. :) Does anyone know of a way to get the beginning and ending index of a link within a TextField? I want the indexes of the beginning and ending of the text that makes up the link. For example if I pass the following HTML text into the TextField: [p]Lorem ipsum [a href=event:block1]dolor sit[/a] amet.[/p] What I want is the beginning and ending indexes of the dolor sit text when the user clicks on it. The TextEvent.LINK event passes out the value of the href within the link text (ie: block1), which isn't terribly useful in this case. ( ps: I used square brackets in the example HTML text rather than angle brackets to try avoiding issues with the list's mailer, which doesn't like HTML code in emails. ) -- Andrew Murphy Interactive Media Developer amur...@delvinia.com Delvinia 370 King Street West, 5th Floor, Box 4 Toronto Canada M5V 1J9 P (416) 364-1455 ext. 232 F (416) 364-9830 W www.delvinia.com ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Could this be done more elegant.
This doesn't change the way it works, but you could rewrite the addValue stuff to this: buffer += (fps = 45) ? 1 : -1; On Fri, Aug 13, 2010 at 4:45 AM, Jiri jiriheitla...@googlemail.com wrote: Thanx for the answer, I am on a project where the whole thing is allready set up. The quality is now set to BEST as soon as the FPS goes under 30 (i used 45 in my example), but on fast machine this results in very short graphical glitches, because it is usually only 1 or 2 frames where the FPS is below 30. I wanted to prevent this and make the profiling a bit better. Not toggle all the time, but just wait a bit before doing the call. So it is not so much about the execution based on EnterFrame but more on how to write the function a bit cleaner. Jiri On 13-08-10 10:29, Henrik Andersson wrote: I use a different event than what you are most likely using. I use the Render event. It is a bit more effort since you have to request it again and again, but it is more accurate for the rendered fps. It differs from the enter frame event in that it is not dispatched when the player is skipping frames. ___ 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 -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FITC Excuses
I am going to FITC. I'm pretty styked. =] Also turns out I may have something better than a brick to play pong with too. Hope to see some of you there. On Fri, Jul 23, 2010 at 2:52 PM, co...@moock.org co...@moock.org wrote: if your brick can send dtmf, yup! by the way, for the record, this will *not* be the world's first ever massively multiplayer, on-location game of pong. it turns out that at SIGGRAPH in 1991, loren carpenter presented massively multiplayer pong to an audience of 5000 using an object-recognition system called cinematrix. the audience used painted wooden sticks as controllers. http://stage.itp.nyu.edu/history/timeline/cinematrix.html http://www.cinematrix.com/whatis.html formal retraction here: http://moock.org/pipermail/moock-updates/2010-July/63.html sorry for the confusion, colin Ktu wrote: Can I participate in pong using a brick as my controller? Sigh... On Wed, Jul 21, 2010 at 6:16 PM, co...@moock.org co...@moock.org wrote: you could tell them you'd get to be part of the world's first ever 600-player game of pong! http://www.moock.org/blog/archives/000302.html this might help too: http://www.fitc.ca/participate/SF_convince_your_boss.zip : ) if you've never been to an fitc before, i think you will be shocked at the amount of inspiration and knowledge you get out of it, and the number of connections you make with presenters and other attendees. it's like a condensed year's worth of research and professional development in a 3-day bottle. imho, colin Ktu wrote: Hey list, I'm trying to convince the C levels why they should drop 3k on sending two of us to FITC. Currently, they are 'on the fence.' They need convincing that this event offers more than what we can get locally. So, who's going? Why? How did you convince your superiors? What are you looking forward to and why? I'm personally excited about the Android content, the talk on the evolution of flash on devices, resource management, mobile performance, and the Flex intro for Flash Purists ___ 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 -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FITC Excuses
Can I participate in pong using a brick as my controller? Sigh... On Wed, Jul 21, 2010 at 6:16 PM, co...@moock.org co...@moock.org wrote: you could tell them you'd get to be part of the world's first ever 600-player game of pong! http://www.moock.org/blog/archives/000302.html this might help too: http://www.fitc.ca/participate/SF_convince_your_boss.zip : ) if you've never been to an fitc before, i think you will be shocked at the amount of inspiration and knowledge you get out of it, and the number of connections you make with presenters and other attendees. it's like a condensed year's worth of research and professional development in a 3-day bottle. imho, colin Ktu wrote: Hey list, I'm trying to convince the C levels why they should drop 3k on sending two of us to FITC. Currently, they are 'on the fence.' They need convincing that this event offers more than what we can get locally. So, who's going? Why? How did you convince your superiors? What are you looking forward to and why? I'm personally excited about the Android content, the talk on the evolution of flash on devices, resource management, mobile performance, and the Flex intro for Flash Purists ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] FITC Excuses
Hey list, I'm trying to convince the C levels why they should drop 3k on sending two of us to FITC. Currently, they are 'on the fence.' They need convincing that this event offers more than what we can get locally. So, who's going? Why? How did you convince your superiors? What are you looking forward to and why? I'm personally excited about the Android content, the talk on the evolution of flash on devices, resource management, mobile performance, and the Flex intro for Flash Purists -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FITC Excuses
true dat Matt. Hopefully that will change soon. On Tue, Jul 13, 2010 at 4:14 PM, Matt S. mattsp...@gmail.com wrote: Consider yourself blessed to be working somewhere where you can worry about convincing the C Levels of the value of a Flash *Conference*. Alot of us are spending a ridiculous amount of time trying to convince them of the continuing value of *Flash*, period. ;) .m ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Ktu; The information contained in this message may be privileged and/or confidential. If you are NOT the intended recipient, please notify the sender immediately and destroy this message. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ScrollRect and masking
you could try positioning it before you add the 'list' to the displayList of the container. Ktu; On Thu, Jul 8, 2010 at 12:49 PM, Omar Fouad omarfouad@gmail.com wrote: Hello, I'm working on some project where I have a big container Sprite and based on what I need, I add some ui inside of it. Once I add this ui, and I make sure that everything is there on its place, I align this container sprite to fir in the center of my stage: private var currentModule:Sprite; // the container private function updateScreen(e:MouseEvent):void { if(currentModule) { // when I switch to another module removeChild(currentModule); currentModule = null; // clean it up } currentModule = new Sprite(); addChild(currentModule); currentModule.addChild(children); //some children are added to currentModule currentModule.x = (stage.stageWidth * 0.5) - (currentModule.width *0.5) // aligns horizontally currentModule.y = (stage.stageHeight * 0.5) - (currentModule.height *0.5) // aligns horizontally } Now assume I add to the currentModule, a masked list. What I mean is a container that contains 100 list items one below the other, and a mask that shows just 5 items and the mask's height is 100. stage alignment doesn't work properly because the currentModule height is not just 100 px (as the mask's height) but it is actually the real height that the 100 list item are occupying and so, alignment fails. I could use myMask.height, but I need to align the whole currentModule as I use it as a wrapper to wrap some components under the same hood. What should I do? I tried tracing the mc's height after using scrollRect, as people said that it would return only the visible part's height but it didn't happen. I traced and the same number is there as if nothing were masked. Any Ideas? Thanks in advance ___ 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] Tweener still in development
If you like stricter more OO code, you can try GTween from Grant Skinner. Not quite as fast in performance as the TweenLite family. http://www.gskinner.com/libraries/gtween/ Ktu; On Thu, Jun 24, 2010 at 9:51 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: Second for TweenLite and TweenMax from greensock - I would guess the most popular tweening engine right now. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Zeh Fernando Sent: Thursday, June 24, 2010 9:47 AM To: Flash Coders List Subject: Re: [Flashcoders] Tweener still in development Development stopped because, quite frankly, some of the internal design of the engine didn't fit that well anymore - it did too many internal checks for the validity of objects and properties, and performance suffered. Coming from an AS2 frame of mind, if you will. Rather than radically changing the engine internally (and breaking backwards compatibility), it was better to just leave it where it is and let people move on to other things at their own time. My own personal views of how tween engines should work changed with time too. Nowadays I use a much, much simpler tweening engine, with no 'special' features whatsoever. But I know that approach is not for everyone. The good thing is that all other engines follow more or less the same syntax, so jumping from one engine to another (TweenMax/TweenLite seem to be the #1 choice in that regard) is not all that complicated. Zeh On Thu, Jun 24, 2010 at 8:05 AM, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: ah wow tweener was the first engine i used and while i jumped to tweenmax, i've been using tweener for the last year or so because the team i'm in is using it. I'm quite sad to see development stop really thanks for the info - good luck zeh best a On 24 June 2010 12:15, Paul Andrews p...@ipauland.com wrote: On 24/06/2010 11:58, allandt bik-elliott (thefieldcomic.com) wrote: hi guys does anyone know if tweener is still being developed as the updates seem to have gone quiet for the last year(ish)? I used to use Tweener, but have jumped to TweenLite and family thanks a ___ 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 ___ 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] Tweener still in development
sorry guys I'm missing something, where is this 'between as3 demo' ? Ktu; On Thu, Jun 24, 2010 at 3:35 PM, Steven Sacks flash...@stevensacks.netwrote: Jack, author of Greensock, has said that the Between AS3 demo is unfair because they purposefully used an inefficient way to tween in Greensock and a specifically optimized but not real world example of tweening with Between. You can ask him for more details. This is not in any way meant to slight the incredibly smart and talented authors of Between AS3. To be honest, most people aren't going to be tweening that many objects anyway, so it really comes down to whichever engine API and features you like better or need more. For most use, there's probably no difference in performance. On 6/24/2010 10:09 AM, allandt bik-elliott (thefieldcomic.com) wrote: That between as3 demo literally tore my face off - i didn't think it was possible to get faster than tweenlite On 24 Jun 2010 17:27, Ktuktu_fl...@cataclysmicrewind.com wrote: If you like stricter more OO code, you can try GTween from Grant Skinner. Not quite as fast in performance as the TweenLite family. http://www.gskinner.com/libraries/gtween/ Ktu; On Thu, Jun 24, 2010 at 9:51 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: Second... ___ 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] date modified
... http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/net/FileReference.html#modificationDate Ktu; On Thu, Jun 17, 2010 at 1:47 PM, Lehr, Theodore ted_l...@federal.dell.comwrote: Is it possible to grab the date a file was modified? ___ 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] date modified
rtfm On Thu, Jun 17, 2010 at 2:47 PM, Ktu ktu_fl...@cataclysmicrewind.comwrote: ... http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/net/FileReference.html#modificationDate Ktu; On Thu, Jun 17, 2010 at 1:47 PM, Lehr, Theodore ted_l...@federal.dell.com wrote: Is it possible to grab the date a file was modified? ___ 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] CameraDetection Update
Hey List, Thanks to Ben and Juan I have made an update to my CameraDetection class. ChangeLog: force settings dialog to open every time unless camera access is already allowed implement timer for checking permissions, sometimes the settings dialog does not dispatch some logic updates cleaner code (only 3 magic values) Check it out: link http://blog.cataclysmicrewind.com/webcamdetection Juan Pablo Califano! I noticed today that it was your response to a question on stackoverflow.comthat led Ben to my class. Thank you very much I greatly appreciate that. I also noticed that you mentioned my class had some problem with certain Windows laptops. Can you elaborate about when you said in the post that you're not sure if it covers some corner cases? I would love to know so I can help make it cover those cases. Thanks Ktu; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] CameraDetection Update
Its unfortunate there was a long break from when you ran across these problems. I wonder if the default amount of time to check each camera is not long enough. A stupid thing about camera objects is that when you first try to use it, the activity property spikes to 100 for a short period of time, then drops down. Maybe some of the cameras you were testing had excessively long spike periods and therefore the class did not see it as an acceptable camera. If you have access to those laptop still, it would be great if you could try extending the time it checks each camera. My default time is 1.5sec maybe try 3 as an extreme (time to check is determined by a timer.delay and timer.repeatCount). Example code: var cd:CameraDetection = new CameraDetection(); cd.detectionRepeatCount = 30; cd.addEventListener (CameraEvent.RESOLVE, onResolve); cd.begin(); Unfortunately I don't have access to a lot of different laptops to do testing on this class. If anyone else on the list wants to test their camera and send me some info that would be fantastic. I know this class has a much smaller niche but for the people who could use it this class is indispensable. Thanks Juan, Ktu; On Wed, Jun 16, 2010 at 9:24 AM, Juan Pablo Califano califa010.flashcod...@gmail.com wrote: Hi Ktu, I told you when you shared your code in this list I'd give you some feedback. I ended up using it a couple of months after that and totally forgot about telling you how it went, so sorry about that. But yes, it worked out great for Macs, which was the problem I was trying to solve. As I mentioned in my answer in SO, the code failed to get the correct camera for some laptops. I tried it in 2 machines, one was a Toshiba, the other one I can't remember for sure, but I think it was an HP. In both cases, it was Windows, one was running XP, the other one was running Vista, IIRC. The cameras were the ones that come built into the computer. I noticed I could detect those cameras fine the regular way, and since I was in a rush, I just checked if the client was running Mac or not. If Mac, I used your code; if not, just went with the regular way (read, calling getCamera naively). I really didn't put much though to it; it just worked in the cases I tested and since the time frame was rather limiting, I left it that way. So that's why I mentioned some other possible cases were it could fail. Not that I found them, but I didn't test thoroughly either. Anyway, thanks for your class, it was very helpful (and I apologize again for not giving you proper feedback at the moment, as I said I would! But better late than never) Cheers Juan Pablo Califano 2010/6/16 Ktu ktu_fl...@cataclysmicrewind.com Hey List, Thanks to Ben and Juan I have made an update to my CameraDetection class. ChangeLog: force settings dialog to open every time unless camera access is already allowed implement timer for checking permissions, sometimes the settings dialog does not dispatch some logic updates cleaner code (only 3 magic values) Check it out: link http://blog.cataclysmicrewind.com/webcamdetection Juan Pablo Califano! I noticed today that it was your response to a question on stackoverflow.comthat led Ben to my class. Thank you very much I greatly appreciate that. I also noticed that you mentioned my class had some problem with certain Windows laptops. Can you elaborate about when you said in the post that you're not sure if it covers some corner cases? I would love to know so I can help make it cover those cases. Thanks Ktu; ___ 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] CameraDetection Update
btw. I removed all magic values. Also, Thanks Juan for suggesting my class. Ktu On Wed, Jun 16, 2010 at 10:06 AM, Ktu ktu_fl...@cataclysmicrewind.comwrote: Its unfortunate there was a long break from when you ran across these problems. I wonder if the default amount of time to check each camera is not long enough. A stupid thing about camera objects is that when you first try to use it, the activity property spikes to 100 for a short period of time, then drops down. Maybe some of the cameras you were testing had excessively long spike periods and therefore the class did not see it as an acceptable camera. If you have access to those laptop still, it would be great if you could try extending the time it checks each camera. My default time is 1.5sec maybe try 3 as an extreme (time to check is determined by a timer.delay and timer.repeatCount). Example code: var cd:CameraDetection = new CameraDetection(); cd.detectionRepeatCount = 30; cd.addEventListener (CameraEvent.RESOLVE, onResolve); cd.begin(); Unfortunately I don't have access to a lot of different laptops to do testing on this class. If anyone else on the list wants to test their camera and send me some info that would be fantastic. I know this class has a much smaller niche but for the people who could use it this class is indispensable. Thanks Juan, Ktu; On Wed, Jun 16, 2010 at 9:24 AM, Juan Pablo Califano califa010.flashcod...@gmail.com wrote: Hi Ktu, I told you when you shared your code in this list I'd give you some feedback. I ended up using it a couple of months after that and totally forgot about telling you how it went, so sorry about that. But yes, it worked out great for Macs, which was the problem I was trying to solve. As I mentioned in my answer in SO, the code failed to get the correct camera for some laptops. I tried it in 2 machines, one was a Toshiba, the other one I can't remember for sure, but I think it was an HP. In both cases, it was Windows, one was running XP, the other one was running Vista, IIRC. The cameras were the ones that come built into the computer. I noticed I could detect those cameras fine the regular way, and since I was in a rush, I just checked if the client was running Mac or not. If Mac, I used your code; if not, just went with the regular way (read, calling getCamera naively). I really didn't put much though to it; it just worked in the cases I tested and since the time frame was rather limiting, I left it that way. So that's why I mentioned some other possible cases were it could fail. Not that I found them, but I didn't test thoroughly either. Anyway, thanks for your class, it was very helpful (and I apologize again for not giving you proper feedback at the moment, as I said I would! But better late than never) Cheers Juan Pablo Califano 2010/6/16 Ktu ktu_fl...@cataclysmicrewind.com Hey List, Thanks to Ben and Juan I have made an update to my CameraDetection class. ChangeLog: force settings dialog to open every time unless camera access is already allowed implement timer for checking permissions, sometimes the settings dialog does not dispatch some logic updates cleaner code (only 3 magic values) Check it out: link http://blog.cataclysmicrewind.com/webcamdetection Juan Pablo Califano! I noticed today that it was your response to a question on stackoverflow.comthat led Ben to my class. Thank you very much I greatly appreciate that. I also noticed that you mentioned my class had some problem with certain Windows laptops. Can you elaborate about when you said in the post that you're not sure if it covers some corner cases? I would love to know so I can help make it cover those cases. Thanks Ktu; ___ 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] HTML TextFields - 'A HREF' RollOvers..
This in a mouseMove or enterFrame event is what I've always used. var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY); var url = ; if (index = 0) { var fmt:TextFormat = txt.getTextFormat (index, index + 1); if (fmt.url) url = fmt.url; } if (url) { // begin tooltip code } ktu On Tue, Jun 15, 2010 at 8:49 AM, Glen Pike g...@engineeredarts.co.ukwrote: Why not use the mouse coordinates? On 15/06/2010 13:24, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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] HTML TextFields - 'A HREF' RollOvers..
sorry, I tacked on that last if statement. It should probably read if (url.length 0) { // begin tooltip code } maybe you want to check if its an appropriate web url with a regExp first, but I think you get the idea. Ktu On Tue, Jun 15, 2010 at 9:05 AM, Ktu ktu_fl...@cataclysmicrewind.comwrote: This in a mouseMove or enterFrame event is what I've always used. var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY); var url = ; if (index = 0) { var fmt:TextFormat = txt.getTextFormat (index, index + 1); if (fmt.url) url = fmt.url; } if (url) { // begin tooltip code } ktu On Tue, Jun 15, 2010 at 8:49 AM, Glen Pike g...@engineeredarts.co.ukwrote: Why not use the mouse coordinates? On 15/06/2010 13:24, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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] HTML TextFields - 'A HREF' RollOvers..
Regardless of whether you are using multiple TextFormat objects or htmlText, using getTextFormat(begin, end), the textFormat will have the appropriate url. This is a quick dirty test. Glad I could help out. I'm posting the code for my test in case anyone else finds it useful. One thing to note! If text in a textfield does not fill the text field, a error can appear. In my code below you can see that error. A link on the bottom line will register when the cursor is in empty space below the link, but not directly over it. The x property of the mouse is triggering the rollover. Maybe someone else can explain this issue better. AS3 - Timeline code var txt:TextField = new TextField (); txt.width = txt.height = 150; txt.multiline = true; txt.wordWrap = true; txt.htmlText = when registered, all a href=\www.google.com\links/a in text fields will update a href=\www.theflashblog.com\the status bar./a hahahahah txt.border = true; txt.x = txt.y = 100; addChild(txt); addEventListener (Event.ENTER_FRAME, captureEnterFrame) function captureEnterFrame (e:Event):void { var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY); var url = ; if (index = 0) { var fmt:TextFormat = txt.getTextFormat (index, index + 1); if (fmt.url) url = fmt.url; } if (url) { displayTooltip(url, new Point (mouseX, mouseY)); } else { removeTooltip(); } } function displayTooltip(url:String, pos:Point):void { if (getChildByName(ToolTip)) return; var tf:TextField = new TextField (); tf.name = ToolTip; tf.autoSize = left; tf.text = url; tf.background = true; tf.border = true; tf.backgroundColor = 0x00FF; tf.x = pos.x + 5; tf.y = pos.y + 15; addChild(tf); } function removeTooltip ():void { var t:TextField = getChildByName(ToolTip) as TextField; if (t) removeChild(t); } On Tue, Jun 15, 2010 at 9:06 AM, Karim Beyrouti ka...@kurst.co.uk wrote: The HREF link is only part the the textfields content, and each textfield can have more than one link amongst other copy and need to show relevant tooltip only when user is hovering over the 'a HREF' parts of the html textfield. On 15 Jun 2010, at 13:49, Glen Pike wrote: Why not use the mouse coordinates? On 15/06/2010 13:24, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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] Naming a loaded swf
Loader.content is a DisplayObject. DisplayObject have a .name property function onComplete(loadEvent:Event):void { var loadedContent = loadEvent.target.content; loadedContent.name = MyName; addChild(loadedContent); } Ktu P.S. this is all right in as3 livedocs... Not that this is for you specifically Ted, but more people need to learn how to read the documentation. On Tue, Jun 15, 2010 at 9:28 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: I am loading a swf via something like: var loader:Loader = new Loader(); function startLoad(dfile:String) { var nRequest:URLRequest = new URLRequest(dfile); loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete); loader.load(nRequest); } function onComplete(loadEvent:Event):void { addChild(loadEvent.currentTarget.content); } startLoad(some.swf); I want to be able to name the swf that gets loaded... right now it is just getting a random name like: instance77 How can I name 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
Re: [Flashcoders] Naming a loaded swf
There is no need to cast. The Loader.content property is defined as a DisplayObject - http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content but I should have been more strictly typed. function onComplete(loadEvent:Event):void { var loadedContent:DisplayObject = loadEvent.target.content; loadedContent.name = MyName; addChild(loadedContent); } On Tue, Jun 15, 2010 at 9:47 AM, Glen Pike g...@engineeredarts.co.ukwrote: Cast it to a DisplayObject then give that a name? var obj:DisplayObject = loadEvent.currentTarget as DisplayObject; obj.name = my instance; ... On 15/06/2010 14:28, Lehr, Theodore wrote: I am loading a swf via something like: var loader:Loader = new Loader(); function startLoad(dfile:String) { var nRequest:URLRequest = new URLRequest(dfile); loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete); loader.load(nRequest); } function onComplete(loadEvent:Event):void { addChild(loadEvent.currentTarget.content); } startLoad(some.swf); I want to be able to name the swf that gets loaded... right now it is just getting a random name like: instance77 How can I name 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
Re: [Flashcoders] Naming a loaded swf
It's possible that because the content property is the root class of the loaded swf that you have to set the name property of your document class. parent.swf Loader.load(child.swf) child.swf this.name = MyName; Maybe that is what you need to do. I'm going to run a test to find out Ktu On Tue, Jun 15, 2010 at 10:49 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: Actually - both ways are giving me the same error: Error #2078: The name property of a Timeline-placed object cannot be modified From: flashcoders-boun...@chattyfig.figleaf.com [ flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu [ ktu_fl...@cataclysmicrewind.com] Sent: Tuesday, June 15, 2010 9:49 AM To: Flash Coders List Subject: Re: [Flashcoders] Naming a loaded swf There is no need to cast. The Loader.content property is defined as a DisplayObject - http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content but I should have been more strictly typed. function onComplete(loadEvent:Event):void { var loadedContent:DisplayObject = loadEvent.target.content; loadedContent.name = MyName; addChild(loadedContent); } On Tue, Jun 15, 2010 at 9:47 AM, Glen Pike g...@engineeredarts.co.uk wrote: Cast it to a DisplayObject then give that a name? var obj:DisplayObject = loadEvent.currentTarget as DisplayObject; obj.name = my instance; ... On 15/06/2010 14:28, Lehr, Theodore wrote: I am loading a swf via something like: var loader:Loader = new Loader(); function startLoad(dfile:String) { var nRequest:URLRequest = new URLRequest(dfile); loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete); loader.load(nRequest); } function onComplete(loadEvent:Event):void { addChild(loadEvent.currentTarget.content); } startLoad(some.swf); I want to be able to name the swf that gets loaded... right now it is just getting a random name like: instance77 How can I name 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..
Did you know that for htmlText using a you can specify the href=event:myText Then register a TextEvent. This is how links inside of text fields can trigger functions http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#htmlText Ktu On Tue, Jun 15, 2010 at 12:14 PM, Karim Beyrouti ka...@kurst.co.uk wrote: Yep... However I was trying to get roll overs to trigger a function. Am going to build a textfield roll over utility class... Will post the results here when it's done... Thanks... Karim On 15 Jun 2010, at 16:08, Kevin Newman capta...@unfocus.com wrote: a:hover works in a css style sheet: var ss:StyleSheet = new StyleSheet(); ss.parseCSS(a:link{color: #FF;}a:hover{text-decoration: underline;color: #FF;}); var tf:TextField = new TextField(); tf.autoSize = TextFieldAutoSize.LEFT; tf.styleSheet = ss; tf.htmlText = 'pA link: a href=http://www.unfocus.com;unFocus Projects/a/p'; addChild(tf); Kevin N. On 6/15/10 8:24 AM, Karim Beyrouti wrote: Hi All - Wondering if there are any hacks to trigger a 'RollOver' script when hovering over a 'a href' link in an html textfield. Currently using TextEvent.LINK,to trigger links - but would like to show a tooltip on rollover (of that part of text). So far the only solution i can think of is using : TextField.getCharIndexAtPoint(x:Number, y:Number) create this - but it seems like this could be quite long winded solution. Any other ways of achieving this? Thanks Karim ___ 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] Job Openings at Bank of America for US/Canada and UK candidates
I am a developer. I code. I can barely design buttons. Layout is not as hard. Are there actually people out there who are Instructional Technology Architects (senior-level positions) in there ability to code and who also consider yourself a good graphic interface designer, not just have a mastery of Photoshop and Illustrator or Fireworks? I've always been curious.:\ Ktu On Fri, Jun 11, 2010 at 12:18 PM, Merrill, Jason jason.merr...@bankofamerica.com wrote: Once again, we have some job openings on my team at Bank of America. We have at least one job for a North American-based candidate and one or more for positions in London, UK. These are not entry level positions, nor do we seek intermediate level candidates. We have one of the best internal e-learning organizations in the industry and we have many instructional technology developers in our larger team, but these positions are for the special ops team of Instructional Technology Architects (senior-level positions) I am on. We don't just do the simple page-turner WBTs all the time - we build re-usable e-learning solutions, components, and systems. We are looking for what we call e-learning rock stars - candidates with the following REQUIRED skills and talents (if you don't have these, then you probably shouldn't apply). 1. Advanced knowledge of Actionscript 3.0 - meaning, you are comfortable writing all of your Actionscript in classes using object-oriented methods. You can do things like create and dispatch custom events, work with XML, create a code architecture, etc. You can create rich e-learning experiences in Flash or Flex and have a portfolio you can show that demonstrates this. 2. You have a good visual portfolio of work you have done. Meaning, you consider yourself a good graphic interface designer, not just have a mastery of Photoshop and Illustrator or Fireworks. 3. You have e-learning background and experience. An advanced degree in a related field is preferred. You understand adult learning theory and could switch into the role of an instructional designer if you had to (not that you would in this position, you wouldn't, but there is some collaboration with IDs where this helps immensely) Those three skills are required. Other desired skills would be (not necessarily required- obviously, we can't expect all of these, but some would be nice): 1. Knowledge of the Adobe Flex framework 2. Knowledge of HTML/Javascript/AJAX 3. Knowledge of SCORM, LMS and LCMS systems 4. Knowledge of Lectora / Saba Publisher 5. Knowledge of Adobe's video and sound editing tools 6. Knowledge of Microsoft Sharepoint - especially if you know CAML and using Sharepoint Lists and Webservices 7. Knowledge of utilizing Webservices 8. Knowledge of OOP design patterns 9. Knowledge of the other tools in Adobe's Creative Suite 10. Knowledge of micro architectures like Cairngorm and Pure MVC 11. Knowledge of third party Actionscript libraries like Papervision3D or Away3D 12. Knowledge of 3D modeling tools like Blender or Swift3D Of course, we would prefer candidates located in the Charlotte, NC area where we are headquartered, but being remote is completely OK as well. The London position(s) are located in London - no remote candidates for those. This is a GREAT job working on a TALENTED team at a FATASTIC Fortune 10 company. Send me your resumes if you're interested! Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx and visit our Instructional Technology Design Blog http://sharepoint.bankofamerica.com/sites/SDTeam/itdblog/default.aspx (Note: these resources are only available for Bank of America associates) ___ 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] Dynamic Text Boxes in Flash CS4
You can use multiple TextFormat object in one text field affecting different parts of the text. I think most people think that its more hassle that way than using htmlText. TextField.setTextFormat( format:Textformat, beginIndex:int = -1, endIndex:int = -1 ) :void Ktu http://help.adobe.com/en_US/AS3LCR/Flash_10.0/specialTypes.html#void On Wed, May 26, 2010 at 5:43 PM, Nathan Mynarcik nat...@mynarcik.comwrote: You have to embed the font for that textfield so it will render the text correctly. --Original Message-- From: Donald Talcott Sender: flashcoders-boun...@chattyfig.figleaf.com To: Flash Coders List ReplyTo: Flash Coders List Subject: [Flashcoders] Dynamic Text Boxes in Flash CS4 Sent: May 26, 2010 5:07 PM I have some static text boxes that I need to make dynamic. Questions; 1. Do you have to render text as HTML in a Dynamic text box in order to use multiple font sizes and colors within each box? 2. When I render the text as HTML, format the type, get it looking good. Then I click outside the text box, the text weight and line spacing changes. When I select the text box again with the text tool, the type appears correct as I originally set it. Is this normal or is Flash messing with my mind. Don Talcott 316 Greenwood Ave Decatur, GA 30030 404 538-1642 dtalc...@mindspring.com ___ 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] Blocking multiple logins on one computer
You could also try using the LocalConnection class. If you apps connect at some point, turn the second one off somehow. Ktu On Sun, May 23, 2010 at 4:43 PM, Karl DeSaulniers k...@designdrumm.comwrote: Thanks Dave, That is the consensus I am getting. Is there any way to tell how many browsers from one computer are being used? Or if a person is using a virtual machine or is sharing an ip? Karl On May 23, 2010, at 11:33 AM, Dave Watts wrote: Let me clarify a little more. How do I prevent multiple logins to my site from one computer regardless of the user? So that someone cant open safari and IE and log in to my site using both browsers on that one computer. Even if the usernames are different. I don't think you can guarantee this, but you can make it more difficult by looking at the user's IP address. Your web server will make that available as a CGI variable. This however may cause problems for users behind proxies - multiple legitimate users might then share the same IP address - and users can circumvent this by using multiple computers, including virtualized computers. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ 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] Line break in dynamic text imported from xml
and what goes in the CDATA is not parsed by the xml reader. On Thu, May 20, 2010 at 12:20 PM, Kerry Thompson al...@cyberiantiger.bizwrote: Paul Jinks wrote: I managed to get this to work by using !CDATA[...]] just as you suggested. I hadn't understood that it needed to go inside each of my xml tags. Just a clarification--it doesn't need to be inside each of your XML tags. Only the ones that contain text you're going to display, especially if they have HTML tags like b or \n. You don't need to make your nodes CDATA (which, by the way, stands for Character Data--i.e., text). Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] flash cs5 any good for coding? if not is it any good at all?
code assist is one of those features you never knew that you where missing. If you never knew you were missing it, then you were REALLY missing it. CS5 is better for coding. The code hinting is much better. Code hinting saves you millions of keystrokes when you get used to it. Also, CS5 has the snippets panel which when used properly can save even more keystrokes. I've you've only ever used the Flash IDE for coding, then yes, CS5 is much better for it. However, if you've used FDT, Flash Builder/Eclipse, or FlashDevelop, then there is nothing new. Ktu On Wed, May 19, 2010 at 8:43 AM, Eric E. Dolecki edole...@gmail.com wrote: It's better than CS4 for sure. Depends on how you like to work on whether or not it's for you. On Wed, May 19, 2010 at 1:44 AM, Henrik Andersson he...@henke37.cjb.net wrote: Better than cs 4. The improved code assist is one of those features you never knew that you where missing. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://ericd.net Interactive design and development ___ 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] Line break in dynamic text imported from xml
From what I remember when using xml with html, you need to wrap your html inside of a* ![CDATA[**]]* to get it to render properly. You can put a \r or \n in it as well. On Wed, May 19, 2010 at 10:56 AM, Paul Jinks p...@pauljinks.co.uk wrote: It's been a long time since I've done any coding. I think this is pretty straightforward but it has me beat. Can you help? I'm working on a quiz using AS1 (I think) that reads questions and answers from an xml file. (see below for the script). I'd like to introduce line breaks into the feedback, how do I do this? I've tried using \r but it just displays this as text. Ideally I'd like to display the text as html but so far my efforts to do this have broken the script - any pointers? Here's the action script for the quiz. I hope it makes sense: function QuizItem(question) { this.question=question; this.answers=new Array(); this.feedbacks=new Array(); this.numOfAnswers=0; this.correctAnswer=0; this.getQuestion=function() { return this.question; } this.addAnswer=function(answer, isCorrectAnswer, feedback) { this.answers[this.numOfAnswers]=answer; this.feedbacks[this.numOfAnswers]=feedback; if (isCorrectAnswer) this.correctAnswer=this.numOfAnswers; this.numOfAnswers++; } this.getAnswer=function(answerNumberToGet) { return this.answers[answerNumberToGet]; } this.getFeedback=function(answerNumberToGet) { return this.feedbacks[answerNumberToGet]; } this.getCorrectAnswerNumber=function() { return this.correctAnswer; } this.checkAnswerNumber=function(userAnswerNumber) { if (userAnswerNumber==this.getCorrectAnswerNumber()) { numOfQuestionsAnsweredCorrectly++; } else { numOfQuestionsAnsweredIncorrectly++; } feedback = _root[feedback+parseInt((userAnswerNumber+1))] gotoAndPlay(Feedback); } } function onQuizData(success) { var quizNode=this.firstChild; var quizTitleNode=quizNode.firstChild; title=quizTitleNode.firstChild.nodeValue; var i=0; // items follows title var itemsNode=quizNode.childNodes[1]; while (itemsNode.childNodes[i]) { var itemNode=itemsNode.childNodes[i]; // item consists of question and one or more answer // question always comes before answers (node 0 of item) var questionNode=itemNode.childNodes[0]; quizItems[i]=new QuizItem(questionNode.firstChild.nodeValue); var a=1; // answer follows question var answerNode=itemNode.childNodes[a++]; while (answerNode) { //trace(answerNode); var isCorrectAnswer=false; if (answerNode.attributes.correct==y) isCorrectAnswer=true; //get answer tempAnswer = answerNode.firstChild.nodeValue; //go to next node answerNode=itemNode.childNodes[a++]; //get feedback tempFeedback = answerNode.firstChild.nodeValue; //add answer and feedback to current answer/feedback 'pair' quizItems[i].addAnswer(tempAnswer, isCorrectAnswer, tempFeedback); // goto the next answer answerNode=itemNode.childNodes[a++]; } i++; } gotoAndStop(Start); } var quizItems=new Array(); var myData=new XML(); myData.ignoreWhite=true; myData.onLoad=onQuizData; myData.load(google_quiz.xml); stop(); And this is what the xml file looks like: !DOCTYPE quiz [ !ELEMENT quiz (title, items) !ELEMENT title (#PCDATA) !ELEMENT items (item)+ !ELEMENT item (question, answer, answer+) !ELEMENT question (#PCDATA) !ELEMENT answer (#PCDATA) !ELEMENT feedback (#PCDATA) !ATTLIST answer correct (y) #IMPLIED ] quiz titleMy quiz/title items item questionWhat colour are greenfly/question answerRed/answer feedbackYou chose answer [a]. This is incorrect. The correct answer is [d]./feedback answerBlue/answer feedbackYou chose answer [b]. This is incorrect. The correct answer is [d]./feedback answerCheese/answer feedbackSorry, cheese is not a colour./feedback answer correct=yGreen/answer feedbackCorrect!/feedback
[Flashcoders] Flash Player integrated with Chrome
How did I miss this? I searched the list and saw no posts about it. Is that true? Bringing improved support for Adobe Flash Player to Google Chromehttp://blog.chromium.org/2010/03/bringing-improved-support-for-adobe.html How does this make you feel? - It makes me feel a bit funny inside. Ktu ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Oh the irony
From all of this crazy stuff going on the last couple of months, I can't wait to see what happens. apple blatantly bashed Flash. They still offer Flash in their own store (because Adobe products have helped keep apple alive). Their policy changes. the new iad network. the iBad TLF Flash on Android and other smartphones Google's support CS5 Shit is changing, and all I can say is; lets do our part to make it change the way we want it to change. I've never been a huge fan of apple (and their keyboard shortcuts just don't make sense). The more of this type of information to fuel the conflict will only cause more change. Keep finding the good stuff. Ktu (sorry for my troll comment earlier) On Sat, May 15, 2010 at 11:20 AM, Matt S. mattsp...@gmail.com wrote: that being said, I just looked at it from a different computer and it was using video so I'll just go ahead and put the mud on my own face ;) . Apparently on the previous computer it rolled back to Quicktime for some reason. .m On Sat, May 15, 2010 at 11:16 AM, Matt S. mattsp...@gmail.com wrote: On Sat, May 15, 2010 at 9:58 AM, Kerry Thompson al...@cyberiantiger.biz wrote: I don't see anything ironic about using QuickTime. It's one of Apple's big success stories. I can kind of see them pushing HTML5 over Flash, for business reasons. But why would they want to use HTML5 over their own product? Of course you're right, *IF* you acknowledge that Steve Jobs' recent decisions have primarily been based on cold hard business calculations, which most of us do. But that's not the argument *he*, or other anti-Flashers are making. You hear all the time that the problem with Flash is that, as a plug-in, it exists outside the stack, in its own isolated box, whereas HTML5 is standards compliant and completely open and exists as part of the natural code flow. That is certainly true to a large extent, but the exact same thing can be said of Quicktime. Secondly, Jobs has made a very specific distinction between the iPhone vs the browser. While acknowledging that the iPhone is obviously a closed garden, he has said that when it comes to the *browser*, Apple is all about open, non-proprietary, standards compliant, HTML5, etc etc. And clearly, Quicktime is just as closed and proprietary as Flash, if not more so. Thirdly, I dont need to tell anyone here just how central the video tag has been in the whole debate. How often do you hear people saying that with the video tag, Flash is dead, completely ignoring everything else Flash does? If ever there was a proof of concept where Jobs Co. should be putting their money where their mouth is, video is it. Especially since this video isnt DRM or in need of any other of the more advanced features that HTML5 can't handle yet. .m ___ 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] Oh the irony
amazing On Fri, May 14, 2010 at 2:24 PM, Matt S. mattsp...@gmail.com wrote: the other irony: When you watch the iPad ad, it plays with the Quicktime plugin, at least for me, despite my being in Safari, which ostensibly supports HTML5. Apparently some plugins are better than others... http://www.apple.com/ipad/gallery/#ad ___ 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] help with CameraDetection class
thanks glen, If anyone else is feeling up to it, the more info I get the better. Thanks in advance. more mac users? Ktu On Wed, May 12, 2010 at 4:50 AM, Glen Pike g...@engineeredarts.co.ukwrote: Hi, Flash, Windows (Actual = Reported by Flash): Logitech Quickcam Pro E3500 = USB Video Device Logitech Quickcam C200 = USB Video Device Logitech Webcam C905 = Quickcam Pro for Notebooks. Flash, Linux, Gentoo using Kernel 2.6.29 with kernel module uvcvideo: Logitech Quickcam Pro E3500 = UVC Camera (046d:0805) (V4L2) Logitech Quickcam C200 = UVC Camera (046d:0802) (V4L2) Logitech Webcam C905 = UVC Camera (046d:0991) (V4L2) As you can see from the 2nd list, the names are not very helpful to a layperson user - if Linux is going to become mainstream, this really needs to be a bit more user-friendly... This page is really useful help for Logitech's Linux camera stuff http://www.quickcamteam.net/ HTH Glen On 12/05/2010 04:07, Ktu wrote: Hey List, I wanted to throw together a list of Camera.name together. If you have a webcam that you use on your computer (or built in) could you please reply with the names of all the cameras that are connected. 1. Open a .swf (internet, local whatever) 2. Right click anywhere 3. choose settings from the context menu 4. go to camera tab (last one) 5. send me all the names that show up in your drop down Specifically I would love if a macbook user could help. macbooks tend to have three always there, and the last one is normally the webcam. I'm updating the macbook detection in my class. I'm not sure what I'm going to do with the list of webcams, but I'll compile it and put it on my blog just in case. Thanks list, Ktu blog.cataclysmicrewind.com/webcamdetection/ ___ 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] help with CameraDetection class
Hey List, I wanted to throw together a list of Camera.name together. If you have a webcam that you use on your computer (or built in) could you please reply with the names of all the cameras that are connected. 1. Open a .swf (internet, local whatever) 2. Right click anywhere 3. choose settings from the context menu 4. go to camera tab (last one) 5. send me all the names that show up in your drop down Specifically I would love if a macbook user could help. macbooks tend to have three always there, and the last one is normally the webcam. I'm updating the macbook detection in my class. I'm not sure what I'm going to do with the list of webcams, but I'll compile it and put it on my blog just in case. Thanks list, Ktu blog.cataclysmicrewind.com/webcamdetection/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Apple developing flash-like alternative
oh apple. Why do you have so many secrets? On Sat, May 8, 2010 at 2:48 AM, Jared jared.stan...@gmail.com wrote: http://thenextweb.com/apple/2010/05/08/apple-is-developing-a-flash-alternative-and-has-been-for-almost-a-year/ Don't know how valid this is but it would explain a lot Sent from my iPhone ___ 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] debugging Flash apps
I tend to use MonsterDebugger a lot. It is easy to debug stuff in almost any setting outside of mobile devices. I use that and a combo of trace statements and the IDE Debugger. http://www.demonsterdebugger.com/ Ktu On Fri, May 7, 2010 at 8:00 PM, Jim Andrews j...@vispo.com wrote: Thanks, Steven. Does this require Eclipse? What flavour of Eclipse, if so? ja FDT. End of story. On 5/7/2010 2:46 PM, Jim Andrews wrote: I'm finding the debugger in the Flash IDE almost unusably slow. How do people debug their apps? And I've taken to using FlashDevelop for editing code because the editor in the Flash IDE is equally slow. ___ 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:drawrect: get the linestyle drawing inside
So, I haven't quite figured it out, but I think I am getting closer. It is possible, the math is just a bit beyond my normal skills so it may take some more time. Thanks for asking about this. I have always wanted to have inner strokes and strokes that don't overlap. You asking just pushed me to work on it. I hate the getBounds() when you have a shape with a stroke. Best, Ktu On Tue, Apr 13, 2010 at 3:13 PM, Ktu ktu_fl...@cataclysmicrewind.comwrote: I think the static method would work if I were just doing rectangles, but with lineTo, curveTo I think it needs to be an object. A new thought that occurred to me: Have an object that will have a fill sprite and a stroke sprite, separate from each other. Then if you call lineStyle() with the inner:Boolean = true anytime you call a drawing command it would draw a stroke in the stroke Sprite but offset all the values so the stroke is inside. If you specify overlap:Boolean = false; then the object would compensate so that the stroke does not overlap the fill. It may work, but it would only really work if lineStyle pixelHinting = true, and better still, if I forced all values to be int. There's no reason for it not to be anyway. Does that make sense? Ktu On Tue, Apr 13, 2010 at 2:40 PM, Latcho spamtha...@gmail.com wrote: Thanks for thinking out loud :) Can do that too if I need it. But if you ever write something generic I'd love to use / see it because I don't have the time for this now. Personally I wouldn't extend directly on shape but create some static methods like GraphicsInnerStroke.drawRect(myDispObj.graphics, linestyleObject, method arguments ); Cheers, Latcho atm the best thing I can come up with is an object that can recreate the draw methods, assuming that you want a stroke on it. If I am just going to stick with drawRect, drawRoundRect, and drawRoundRectComplex I can do that. Looking into 'drawing' an inner stroke when using lineTo curveTo etc and other draw commands will take a bit more work and time. I kind of feel like it might end up being InnerStroke extends Shape, and creating public methods that are 'override's of the graphics drawing api. Just thoughts out loud. Ktu On Tue, Apr 13, 2010 at 12:09 PM, Latcho spamtha...@gmail.com mailto: spamtha...@gmail.com wrote: Hi Ktu, Thanks for your supportive emails. I'm not a newbie but I thought I might have missed something on the API that wasn't apparent in the as3 docs. It sucks to have it confirmed it isn't supported :) The thing is I want to stay as close to the original api as possible preferably without wrappers (we're not only talking about rects but also curved shapes are possible you see...). Though I'd be happy to see what you're take on it looks like :) Thanks, Latcho On 13-04-10 16:59, Ktu wrote: From my experience, there is no API support for it. It sucks I know. I deal with this problem all the time. For transparency, the beginFill(color:uint, alpha:Number); you can specify alpha. With the system I have shown you, the stroke would be transparent over top of the original color, so a red square with a semi transparent blue border would produce purple as your border. If you want the stroke to be unaffected by the inside square it wouldn't be that hard to write a class to handle that. In fact, I use this so often I think I will do that. I should be able to finish by Thursday at the latest and I'll share when I'm done. If you are eager for it, the idea would be to have build an object, that you would specify dimensions for, and fill color and alpha, and also the border fill and alpha, then when it draws the rectangle, it incorporates the stroke width into consideration so that there are no graphics behind it. Ktu On Tue, Apr 13, 2010 at 7:50 AM, spank man spamtha...@gmail.com mailto:spamtha...@gmail.com mailto:spamtha...@gmail.com mailto:spamtha...@gmail.com wrote: nice and simple sollution, but not so fine if you want the inner to be semi-transparent Other ideas ? So no API support on this ? On Tue, Apr 13, 2010 at 4:11 AM, Ktu ktu_fl...@cataclysmicrewind.com mailto:ktu_fl...@cataclysmicrewind.com mailto:ktu_fl...@cataclysmicrewind.com mailto:ktu_fl...@cataclysmicrewind.com wrote: When I want inside borders I do this: var spr:Sprite = new Sprite(); addChild(spr); var g:Graphics = spr.graphics; g.beginFill(0xFF45A3); g.drawRect(0, 0, 100, 100); g.endFill(); drawInsideStroke(g, 0, 0, 100, 100, 1, 0x32010B); function drawInsideStroke(graphics:Graphics, x:int, y:int, width:int, height:int, thickness:int = 1, color:uint
Re: [Flashcoders] Re:drawrect: get the linestyle drawing inside
atm the best thing I can come up with is an object that can recreate the draw methods, assuming that you want a stroke on it. If I am just going to stick with drawRect, drawRoundRect, and drawRoundRectComplex I can do that. Looking into 'drawing' an inner stroke when using lineTo curveTo etc and other draw commands will take a bit more work and time. I kind of feel like it might end up being InnerStroke extends Shape, and creating public methods that are 'override's of the graphics drawing api. Just thoughts out loud. Ktu On Tue, Apr 13, 2010 at 12:09 PM, Latcho spamtha...@gmail.com wrote: Hi Ktu, Thanks for your supportive emails. I'm not a newbie but I thought I might have missed something on the API that wasn't apparent in the as3 docs. It sucks to have it confirmed it isn't supported :) The thing is I want to stay as close to the original api as possible preferably without wrappers (we're not only talking about rects but also curved shapes are possible you see...). Though I'd be happy to see what you're take on it looks like :) Thanks, Latcho On 13-04-10 16:59, Ktu wrote: From my experience, there is no API support for it. It sucks I know. I deal with this problem all the time. For transparency, the beginFill(color:uint, alpha:Number); you can specify alpha. With the system I have shown you, the stroke would be transparent over top of the original color, so a red square with a semi transparent blue border would produce purple as your border. If you want the stroke to be unaffected by the inside square it wouldn't be that hard to write a class to handle that. In fact, I use this so often I think I will do that. I should be able to finish by Thursday at the latest and I'll share when I'm done. If you are eager for it, the idea would be to have build an object, that you would specify dimensions for, and fill color and alpha, and also the border fill and alpha, then when it draws the rectangle, it incorporates the stroke width into consideration so that there are no graphics behind it. Ktu On Tue, Apr 13, 2010 at 7:50 AM, spank man spamtha...@gmail.com mailto: spamtha...@gmail.com wrote: nice and simple sollution, but not so fine if you want the inner to be semi-transparent Other ideas ? So no API support on this ? On Tue, Apr 13, 2010 at 4:11 AM, Ktu ktu_fl...@cataclysmicrewind.com mailto:ktu_fl...@cataclysmicrewind.com wrote: When I want inside borders I do this: var spr:Sprite = new Sprite(); addChild(spr); var g:Graphics = spr.graphics; g.beginFill(0xFF45A3); g.drawRect(0, 0, 100, 100); g.endFill(); drawInsideStroke(g, 0, 0, 100, 100, 1, 0x32010B); function drawInsideStroke(graphics:Graphics, x:int, y:int, width:int, height:int, thickness:int = 1, color:uint = 0x00) { graphics.endFill(); // for good measure, but maybe not? graphics.beginFill(color); graphics.drawRect(x, y, width, height); graphics.drawRect( x + thickness, y + thickness, width - (thickness * 2), height - (thickness * 2) ); graphics.endFill(); } trace(spr.width,spr.height); // - 110 110 trace(spr.getBounds(this)) // - (x=-5, y=-5, w=110, h=110) On Mon, Apr 12, 2010 at 7:14 PM, Latcho spamtha...@gmail.com mailto:spamtha...@gmail.com wrote: Hello, Something i still can't solve is that when drawing for example a rect in a Shape graphics object with a fat lineStyle, the line drawn is always half it's thicknes in the inner part of the rect and half outside; This always gives me headaches when aligning, measuring, skinning or bitmapping stuff since half the line is in the negative x / y coordinate space of the shape.. I know that I can use the getBounds method to get me the accurate negative x and y offset of the (line) graphics, but what I really want is to have the line beign drawn totally within the rect. Is that possible by the default graphics api ? Then please expand on my example. Thanks. Latcho. var spr:Sprite = new Sprite(); addChild(spr); var g:Graphics = spr.graphics; g.lineStyle(10,0xff); g.beginFill(0xff); g.drawRect(0,0,100,100); g.endFill(); trace(spr.width,spr.height); // - 110 110 trace(spr.getBounds(this)) // - (x=-5, y=-5, w=110, h=110) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com mailto:Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re:drawrect: get the linestyle drawing inside
I think the static method would work if I were just doing rectangles, but with lineTo, curveTo I think it needs to be an object. A new thought that occurred to me: Have an object that will have a fill sprite and a stroke sprite, separate from each other. Then if you call lineStyle() with the inner:Boolean = true anytime you call a drawing command it would draw a stroke in the stroke Sprite but offset all the values so the stroke is inside. If you specify overlap:Boolean = false; then the object would compensate so that the stroke does not overlap the fill. It may work, but it would only really work if lineStyle pixelHinting = true, and better still, if I forced all values to be int. There's no reason for it not to be anyway. Does that make sense? Ktu On Tue, Apr 13, 2010 at 2:40 PM, Latcho spamtha...@gmail.com wrote: Thanks for thinking out loud :) Can do that too if I need it. But if you ever write something generic I'd love to use / see it because I don't have the time for this now. Personally I wouldn't extend directly on shape but create some static methods like GraphicsInnerStroke.drawRect(myDispObj.graphics, linestyleObject, method arguments ); Cheers, Latcho atm the best thing I can come up with is an object that can recreate the draw methods, assuming that you want a stroke on it. If I am just going to stick with drawRect, drawRoundRect, and drawRoundRectComplex I can do that. Looking into 'drawing' an inner stroke when using lineTo curveTo etc and other draw commands will take a bit more work and time. I kind of feel like it might end up being InnerStroke extends Shape, and creating public methods that are 'override's of the graphics drawing api. Just thoughts out loud. Ktu On Tue, Apr 13, 2010 at 12:09 PM, Latcho spamtha...@gmail.com mailto: spamtha...@gmail.com wrote: Hi Ktu, Thanks for your supportive emails. I'm not a newbie but I thought I might have missed something on the API that wasn't apparent in the as3 docs. It sucks to have it confirmed it isn't supported :) The thing is I want to stay as close to the original api as possible preferably without wrappers (we're not only talking about rects but also curved shapes are possible you see...). Though I'd be happy to see what you're take on it looks like :) Thanks, Latcho On 13-04-10 16:59, Ktu wrote: From my experience, there is no API support for it. It sucks I know. I deal with this problem all the time. For transparency, the beginFill(color:uint, alpha:Number); you can specify alpha. With the system I have shown you, the stroke would be transparent over top of the original color, so a red square with a semi transparent blue border would produce purple as your border. If you want the stroke to be unaffected by the inside square it wouldn't be that hard to write a class to handle that. In fact, I use this so often I think I will do that. I should be able to finish by Thursday at the latest and I'll share when I'm done. If you are eager for it, the idea would be to have build an object, that you would specify dimensions for, and fill color and alpha, and also the border fill and alpha, then when it draws the rectangle, it incorporates the stroke width into consideration so that there are no graphics behind it. Ktu On Tue, Apr 13, 2010 at 7:50 AM, spank man spamtha...@gmail.com mailto:spamtha...@gmail.com mailto:spamtha...@gmail.com mailto:spamtha...@gmail.com wrote: nice and simple sollution, but not so fine if you want the inner to be semi-transparent Other ideas ? So no API support on this ? On Tue, Apr 13, 2010 at 4:11 AM, Ktu ktu_fl...@cataclysmicrewind.com mailto:ktu_fl...@cataclysmicrewind.com mailto:ktu_fl...@cataclysmicrewind.com mailto:ktu_fl...@cataclysmicrewind.com wrote: When I want inside borders I do this: var spr:Sprite = new Sprite(); addChild(spr); var g:Graphics = spr.graphics; g.beginFill(0xFF45A3); g.drawRect(0, 0, 100, 100); g.endFill(); drawInsideStroke(g, 0, 0, 100, 100, 1, 0x32010B); function drawInsideStroke(graphics:Graphics, x:int, y:int, width:int, height:int, thickness:int = 1, color:uint = 0x00) { graphics.endFill(); // for good measure, but maybe not? graphics.beginFill(color); graphics.drawRect(x, y, width, height); graphics.drawRect( x + thickness, y + thickness, width - (thickness * 2), height - (thickness * 2) ); graphics.endFill(); } trace(spr.width,spr.height); // - 110 110 trace
Re: [Flashcoders] drawrect: get the linestyle drawing inside
When I want inside borders I do this: var spr:Sprite = new Sprite(); addChild(spr); var g:Graphics = spr.graphics; g.beginFill(0xFF45A3); g.drawRect(0, 0, 100, 100); g.endFill(); drawInsideStroke(g, 0, 0, 100, 100, 1, 0x32010B); function drawInsideStroke(graphics:Graphics, x:int, y:int, width:int, height:int, thickness:int = 1, color:uint = 0x00) { graphics.endFill(); // for good measure, but maybe not? graphics.beginFill(color); graphics.drawRect(x, y, width, height); graphics.drawRect( x + thickness, y + thickness, width - (thickness * 2), height - (thickness * 2) ); graphics.endFill(); } trace(spr.width,spr.height); // - 110 110 trace(spr.getBounds(this)) // - (x=-5, y=-5, w=110, h=110) On Mon, Apr 12, 2010 at 7:14 PM, Latcho spamtha...@gmail.com wrote: Hello, Something i still can't solve is that when drawing for example a rect in a Shape graphics object with a fat lineStyle, the line drawn is always half it's thicknes in the inner part of the rect and half outside; This always gives me headaches when aligning, measuring, skinning or bitmapping stuff since half the line is in the negative x / y coordinate space of the shape.. I know that I can use the getBounds method to get me the accurate negative x and y offset of the (line) graphics, but what I really want is to have the line beign drawn totally within the rect. Is that possible by the default graphics api ? Then please expand on my example. Thanks. Latcho. var spr:Sprite = new Sprite(); addChild(spr); var g:Graphics = spr.graphics; g.lineStyle(10,0xff); g.beginFill(0xff); g.drawRect(0,0,100,100); g.endFill(); trace(spr.width,spr.height); // - 110 110 trace(spr.getBounds(this)) // - (x=-5, y=-5, w=110, h=110) ___ 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] ASDoc third party libraries
I'm assuming you've already googled it, and that your google foo is strong because I did not search. If there doesn't seem to be a way to do it there is the annoying way: copy just the files you want ASDoc'ed into a different directory... I've done it before for its simplicity, but not a great long term solution Ktu On Thu, Apr 8, 2010 at 10:30 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: Those of you who use ASDoc I'm sure have come across this before. If you use FlashDevelop and ASDoc - then even better as that is my setup. How do you handle running ASDoc on a Flash or Flex project where you are also using other third party libraries? If you run ASDoc on a project that uses a third party library like Greensock's TweenLite or Papervision3D, as I am, you can get all kinds of compiler errors because it tries to include those in the documentation as well (since they are imported into your classes), and those are not necessarily set up for ASDoc. I know in FlashDevelop, the Actionscript Documentation Generator has a field for classes to exclude - but it would be impossible to list out all those third party classes - is there a way to exclude an entire package? Thanks, Jason Merrill Bank of America Global Learning Learning Performance Solutions Join the Bank of America Flash Platform Community http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx and visit our Instructional Technology Design Blog http://sharepoint.bankofamerica.com/sites/SDTeam/itdblog/default.aspx (note: these are for Bank of America employees only) ___ 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] @#$% New iPhone Developer Agreement Bans the Use ofAdobe's Flash-to-iPhone Compiler
Jason Merrill Doing something just for spite in the business world is not really all that smart. It may not be smart business wise, but when a someone attacks you so bluntly, its not bad form to stand up for yourself. Companies making decisions on whats most profitable (like Jobs Adobe, sure) *tends* to be a bad thing for the consumer. Its this type of mentality that helps makes the United States a crappy place for consumers and a great place for business. If it were me running Adobe, I would try in some way to publicly humiliate Jobs and Apple through use of reason, logic, economics and most of all human relevance. Then, give them the middle finger and start acting like a real company should; with dignity, pride, honesty, and care for the products, services, and customers that make my business survive. ( Cause we all know Adobe has its own flaws) :) Ktu P.S. *odd thoughts* from a young individual, who happens to be an Apple hater. You and your iDrone can go play in the ocean, and when the rip tide sucks you in over and over again, you won't ask for help, cause you have an iDrone and don't need saving. Please, for my sake, mis-interpret what I am saying and why, so that you can bash me just like I bashed the Apple fanboys. On Fri, Apr 9, 2010 at 11:26 AM, Mark Winterhalder mar...@gmail.com wrote: On Fri, Apr 9, 2010 at 5:12 PM, Merrill, Jason jason.merr...@bankofamerica.com wrote: What you may see happen is consumers getting tired of not having Flash on their iPhone and switching to an Android phone. Which is why I can't wait to see FP 10.1 and AIR on Android. If it's done well, it will tear the technical-reasons veil right from Job's face and consumers will begin asking questions. Instead of pulling CS for OSX, Adobe should try to port it to Linux instead. I know that's easier said than done, but it would send a strong signal, also to other companies, that Linux has become a viable alternative. ___ 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] Prevent children from listening to parent mouse events
If none of the children require any mouse events you could always do: parent.mouseChildren = false; Ktu On Sun, Mar 28, 2010 at 11:45 PM, confustic...@gmail.com confustic...@gmail.com wrote: Hey list, I'm surprised I didn't notice this behaviour sooner, and I wonder how to get around it. Suppose you have a parent sprite and a child sprite. The child is small enough to fit within the parent. The parent has a mouseOut event listener. It seems that the child sprite's mouseOuts are also listened for, although the mouse is still within the parent. Is it possible to listen ONLY for the parent's mouse events, not the child's? Example code: var parentSprite:Sprite = new Sprite(); addChild(parentSprite); parentSprite.graphics.beginFill(0xFF); parentSprite.graphics.drawRect(0, 0, 100, 100); parentSprite.name = parental var childSprite:Sprite = new Sprite(); parentSprite.addChild(childSprite); childSprite.graphics.beginFill(0xFF); childSprite.graphics.drawRect(0, 0, 20, 20); childSprite.x = childSprite.y = 30; childSprite.name = kiddie; parentSprite.addEventListener(MouseEvent.MOUSE_OUT, mouseHandler) function mouseHandler (e:MouseEvent):void { trace(e.target.name: + e.target.name) trace(e.currentTarget.name: + e.currentTarget.name) trace() } ___ 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] Has everyone seen this yet?
Looks like a great example of how Flash with AIR can create experiences that would otherwise be impossible. Too bad it will be on the iPad. On Tue, Feb 16, 2010 at 3:29 PM, Gregory Boudreaux gjboudre...@fedex.comwrote: Pretty cool. http://mashable.com/2010/02/16/wired-magazine-ipad-demo/ gregb ___ 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] Has everyone seen this yet?
My mistake for saying such a strong statement. Of course there are other frameworks available to do the same thing. Glad its not actually an iPad. I think I'm just glad to see Flash being used for more than just flashy websites and games. Flash can do a lot more than I see it get credit for on a day to day basis. (And I know flash is used for more than just websites. I've developed quite a few things outside the website realm) I would like to see it in my hands to evaluate the usability. In theory it could be brilliant but yes, people will have to warm up to it, and it will have to be standardized. Strictly out of curiosity Jon, would anyone actually choose a different framework to develop this type of application? Does it make sense considering development life cycle and platform availability? Ktu On Tue, Feb 16, 2010 at 9:02 PM, Eric E. Dolecki edole...@gmail.com wrote: It's how printed media might be transformed if people warm up to the whole concept. It doesn't really matter what platform or device it runs on. We saw some AIR and some Cocoa-touch. Looks pretty juicy but also a little confusing and non-standardized (yet). On Tue, Feb 16, 2010 at 8:45 PM, Jon Bradley shiftedpix...@gmail.com wrote: It's an Adobe AIR application running on an unknown tablet device. It's not an iPad and has nothing to do with it. Someone made a mistake with the copy for the article. FYI, it's not impossible to do this in other languages or environments. There are other, more powerful frameworks that are robust for UI development and multi-touch systems than Flash. - jon On Feb 16, 2010, at 7:55 PM, Ktu wrote: Looks like a great example of how Flash with AIR can create experiences that would otherwise be impossible. Too bad it will be on the iPad. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://ericd.net Interactive design and development ___ 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] Combining embedded and device fonts in one textfield
If you have Flash CS4 or Flex, you could embed just that one character from that font using the [Embed] syntax. Check out this tutorial http://gotoandlearn.com/play?id=102 Ktu On Wed, Feb 10, 2010 at 11:08 PM, confustic...@gmail.com confustic...@gmail.com wrote: I have paragraphs of text which includes phonemic symbols: pretty much any character found here should be included: http://www.e-lang.co.uk/mackichan/call/pron/type.html I thought I was home and hosed, as Lucida Sans Unicode / Lucida Grande, which seems pretty standard, covers all that. The problem came when I found out that I also have to be able to display the undertie character: http://en.wikipedia.org/wiki/Tie_(typography)http://en.wikipedia.org/wiki/Tie_%28typography%29(HTML code #8255;) It seems that the only font on Windows that covers the undertie is Arial Unicode MS. Unfortunately, Arial Unicode MS doesn't seem to be a standard font. I don't want to have to embed Arial Unicode MS because that would really add to my file sizes, as well as restricting my ability to do things like textfield.htmlText = bbold/b text. It seems like such overkill for ONE SINGLE GLYPH. Would anyone be able to suggest any alternatives? ALL I WANT IS AN UNDERTIE ... *sob* ___ 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] detect and remove listeners
Have you seen Grant Skinner's Janitor class? http://gskinner.com/talks/resource-management/ - slide 32 talks about it click download source at the bottom to get the code. even this looks interesting: http://blog.open-design.be/2009/01/29/events-manager-as3-classes/ I just googled AS3 event listener manager and got a few hits. Ktu On Wed, Jan 6, 2010 at 4:58 PM, ktt kestuti...@yahoo.com wrote: Thank you all for answers. Method with array recording really works nicely :-) BTW - while searching for this method I've found other useful listener tips too: http://www.almogdesign.net/blog/actionscript-3-event-listeners-tips-tricks/ --- On Wed, 1/6/10, Taka Kojima t...@gigafied.com wrote: From: Taka Kojima t...@gigafied.com Subject: Re: [Flashcoders] detect and remove listeners To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Wednesday, January 6, 2010, 9:02 PM Yeah, that is the best way... that way you can also properly make sure you handle removing all of them when you no longer need an object. You can either create a helper class, with static methods or extend MovieClip or Sprite and have all of your classes extend from the new class. Store everything in a multidimensional array and you're good to go, then you can create a removeAllListeners() method that saves a lot of time and headaches for garbage collection purposes. This is how I handle event listeners for major application components and it has worked very well thus far. - Taka On Wed, Jan 6, 2010 at 3:35 AM, Karl DeSaulniers k...@designdrumm.com wrote: Maybe create a class or function that applies and removes the listeners? Karl On Jan 6, 2010, at 5:21 AM, Henrik Andersson wrote: ktt wrote: Hello, What is the best method to iterate through MovieClip children, check if they have listeners and if they have - remove them? It is not possible to get a list of the listeners. This means that you can not remove them. You can however detect if there is any at all for a given event. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ 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] Detect child parent
Are you sure that the child you are trying to remove is in a display list? Ktu On Sun, Nov 22, 2009 at 3:08 AM, Karl DeSaulniers k...@designdrumm.comwrote: Maybe.. var childParent:Object = mychild.parent; childParent.removeChild(mychild) or var childParent:Object = mychild._parent; childParent.removeChild(mychild) Karl On Nov 22, 2009, at 1:58 AM, Karl DeSaulniers wrote: mychild.parent.removeChild(mychild) Karl DeSaulniers Design Drumm http://designdrumm.com ___ 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] Weird auto format
I copy pasted that into CS4 stock and I could not reproduce the error. I tried it on the timeline and in a class file with no luck. Could there be any updates you've done to your version of flash that could cause this? Ktu On Tue, Nov 17, 2009 at 2:02 AM, Karl DeSaulniers k...@designdrumm.comwrote: Interesting. Thanks. Any wild guesses as to why it happens?? Karl On Nov 17, 2009, at 12:55 AM, Henrik Andersson wrote: Karl DeSaulniers wrote: So it is a bug? Karl To be blunt, yes, yes it is. I filed a bug report, maybe it will be fixed in CS 5. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ 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] Auto Webcam Detection
I must apologize to all who have downloaded my class. I have forgotten a very simple yet important piece of code. I forgot to check if there were no cameras at all available. Please replace the begin function with this one: public function begin ():void { _numCameras = Camera.names.length; /* FAIL */if (_numCameras == 0) { dispatchEvent (new WebcamEvent (WebcamEvent.RESOLVE, null, noCameras) ); // No cameras available return; } if (Capabilities.os.substr (0, 6) == Mac OS) _isMac = true; _video = new Video(); getDefaultCamera (); } Thanks, and again I'm sorry. Ktu On Sat, Nov 14, 2009 at 2:01 AM, Ktu ktu_fl...@cataclysmicrewind.comwrote: Thanks Eric, I have not heard about the bluetooth cameras and any related issues. I wonder if the fps works there as well. It is hard enough for me to get access to Macs and that's half the reason I made the class. I initially chose 1.5 seconds for each camera and so far almost all cameras I have tested have come out of their initial init phase before 1.1 seconds. I don't have a lot of experience with a lot of cameras so if you say FW cameras tend to be really slow maybe I should change the default for a bit longer, but there are properties in the class so you can tell the object how long it should check for. I put those in for exactly the reason you are describing. Some cameras take longer, and if the developer using my class wants to test each camera for a longer period of time he has the ability to. Thanks for the feedback. Ktu On Fri, Nov 13, 2009 at 2:16 PM, eric socolofsky e...@transmote.comwrote: hey ktu et al, i also ran into this problem with FLARManager. my solution is not as reusable as yours, as it's wrapped inside a larger framework, but i used some of the same logic you did. you can find it here: http://transmote.com/codeshare/FLARManager/dev/src/com/transmote/flar/source/FLARCameraSource.as FLARCameraSource checks activity level, just like your WebcamDetection. however, some users have reported that newer sony vaios have a 'bluetooth camera' driver that is not attached to a camera (kind of like OSX's 'DV Video'), but that an activity check on the vaio cam returns activity even when there is none. FLARCameraSource gets around this by differencing frames to check for a change in the camera feed. it looks like you're also checking the reported camera fps; i don't have a vaio so can't check that technique against the 'bluetooth camera', but i wonder if it works there too... also, i notice you're checking across 1.5 seconds for each camera. i have double that time in FLARCameraSource, tho i'm not happy about it...can take a while to cycle through cameras. i've found that 2 seconds is borderline, and 3 is safer, but i'm not sure i trust 1.5 seconds to be enough for all cameras (some are very slow to init, particulary external FW cameras). any thoughts on that? nice work, wish i had found this a month ago, would have saved me some headaches... -eric Message: 1 Date: Thu, 12 Nov 2009 12:51:33 -0500 From: Ktu ktu_fl...@cataclysmicrewind.com Subject: Re: [Flashcoders] Auto Webcam Detection To: Flash Coders List flashcoders@chattyfig.figleaf.com Message-ID: e4b6bdf30911120951k2ea2ef73pa8045b585e61b...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 I've made an update to my class. I added better Mac detection so the process goes quicker on Macs. I've also updated the detection math in general. Please if you downloaded it, re-download and update with the new version. Feedback is nice, and I hope you like it. WebcamDetection http://blog.cataclysmicrewind.com/webcamdetection/ Ktu On Fri, Nov 6, 2009 at 4:31 PM, Ktu ktu_fl...@cataclysmicrewind.com wrote: Thanks Juan, I hope you find it beneficial and easy to use. I also plan on making another update to it this week to make its detection a little more robust. Since most of my reasoning for creating the class was because Macs suck and always have three cameras in the list, I am going to add some special Mac detection which should speed up the process for all Mac laptops. Ktu On Wed, Nov 4, 2009 at 11:08 AM, Juan Pablo Califano califa010.flashcod...@gmail.com wrote: The test code works fine for me (Win XP, FP 10). I'll be working on a project that includes webcam soon and this could be useful. I'll let you know how it goes if I use it. Thanks for sharing! Cheers Juan Pablo Califano 2009/11/4 Ktu ktu_fl...@cataclysmicrewind.com So I've noticed that Facebook will automatically detect which Camera object to use on your computer. It seems on most if not all macs there are at least three (3) Camera objects always available. So, I've made a class that will automatically detect which webcam is active and running. Feedback anyone? Download it here http
Re: [Flashcoders] Auto Webcam Detection
Thanks Eric, I have not heard about the bluetooth cameras and any related issues. I wonder if the fps works there as well. It is hard enough for me to get access to Macs and that's half the reason I made the class. I initially chose 1.5 seconds for each camera and so far almost all cameras I have tested have come out of their initial init phase before 1.1 seconds. I don't have a lot of experience with a lot of cameras so if you say FW cameras tend to be really slow maybe I should change the default for a bit longer, but there are properties in the class so you can tell the object how long it should check for. I put those in for exactly the reason you are describing. Some cameras take longer, and if the developer using my class wants to test each camera for a longer period of time he has the ability to. Thanks for the feedback. Ktu On Fri, Nov 13, 2009 at 2:16 PM, eric socolofsky e...@transmote.com wrote: hey ktu et al, i also ran into this problem with FLARManager. my solution is not as reusable as yours, as it's wrapped inside a larger framework, but i used some of the same logic you did. you can find it here: http://transmote.com/codeshare/FLARManager/dev/src/com/transmote/flar/source/FLARCameraSource.as FLARCameraSource checks activity level, just like your WebcamDetection. however, some users have reported that newer sony vaios have a 'bluetooth camera' driver that is not attached to a camera (kind of like OSX's 'DV Video'), but that an activity check on the vaio cam returns activity even when there is none. FLARCameraSource gets around this by differencing frames to check for a change in the camera feed. it looks like you're also checking the reported camera fps; i don't have a vaio so can't check that technique against the 'bluetooth camera', but i wonder if it works there too... also, i notice you're checking across 1.5 seconds for each camera. i have double that time in FLARCameraSource, tho i'm not happy about it...can take a while to cycle through cameras. i've found that 2 seconds is borderline, and 3 is safer, but i'm not sure i trust 1.5 seconds to be enough for all cameras (some are very slow to init, particulary external FW cameras). any thoughts on that? nice work, wish i had found this a month ago, would have saved me some headaches... -eric Message: 1 Date: Thu, 12 Nov 2009 12:51:33 -0500 From: Ktu ktu_fl...@cataclysmicrewind.com Subject: Re: [Flashcoders] Auto Webcam Detection To: Flash Coders List flashcoders@chattyfig.figleaf.com Message-ID: e4b6bdf30911120951k2ea2ef73pa8045b585e61b...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 I've made an update to my class. I added better Mac detection so the process goes quicker on Macs. I've also updated the detection math in general. Please if you downloaded it, re-download and update with the new version. Feedback is nice, and I hope you like it. WebcamDetection http://blog.cataclysmicrewind.com/webcamdetection/ Ktu On Fri, Nov 6, 2009 at 4:31 PM, Ktu ktu_fl...@cataclysmicrewind.com wrote: Thanks Juan, I hope you find it beneficial and easy to use. I also plan on making another update to it this week to make its detection a little more robust. Since most of my reasoning for creating the class was because Macs suck and always have three cameras in the list, I am going to add some special Mac detection which should speed up the process for all Mac laptops. Ktu On Wed, Nov 4, 2009 at 11:08 AM, Juan Pablo Califano califa010.flashcod...@gmail.com wrote: The test code works fine for me (Win XP, FP 10). I'll be working on a project that includes webcam soon and this could be useful. I'll let you know how it goes if I use it. Thanks for sharing! Cheers Juan Pablo Califano 2009/11/4 Ktu ktu_fl...@cataclysmicrewind.com So I've noticed that Facebook will automatically detect which Camera object to use on your computer. It seems on most if not all macs there are at least three (3) Camera objects always available. So, I've made a class that will automatically detect which webcam is active and running. Feedback anyone? Download it here http://blog.cataclysmicrewind.com/webcamdetection/ It's pretty simple to use: import com.crp.utils.WebcamDetection; import com.crp.events.WebcamEvent; var wd:WebcamDetection = new WebcamDetection(); wd.addEventListener (WebcamEvent.RESOLVE, onResolve); wd.begin(); function onResolve (e:WebcamEvent):void { trace(e.code); switch (e.code) { case success: var myCamera:Camera = e.camera; break; case noPermission: // the user denied permission break; case noCameras: // no suitable camera's were found break; } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders
Re: [Flashcoders] Auto Webcam Detection
I've made an update to my class. I added better Mac detection so the process goes quicker on Macs. I've also updated the detection math in general. Please if you downloaded it, re-download and update with the new version. Feedback is nice, and I hope you like it. WebcamDetection http://blog.cataclysmicrewind.com/webcamdetection/ Ktu On Fri, Nov 6, 2009 at 4:31 PM, Ktu ktu_fl...@cataclysmicrewind.com wrote: Thanks Juan, I hope you find it beneficial and easy to use. I also plan on making another update to it this week to make its detection a little more robust. Since most of my reasoning for creating the class was because Macs suck and always have three cameras in the list, I am going to add some special Mac detection which should speed up the process for all Mac laptops. Ktu On Wed, Nov 4, 2009 at 11:08 AM, Juan Pablo Califano califa010.flashcod...@gmail.com wrote: The test code works fine for me (Win XP, FP 10). I'll be working on a project that includes webcam soon and this could be useful. I'll let you know how it goes if I use it. Thanks for sharing! Cheers Juan Pablo Califano 2009/11/4 Ktu ktu_fl...@cataclysmicrewind.com So I've noticed that Facebook will automatically detect which Camera object to use on your computer. It seems on most if not all macs there are at least three (3) Camera objects always available. So, I've made a class that will automatically detect which webcam is active and running. Feedback anyone? Download it here http://blog.cataclysmicrewind.com/webcamdetection/ It's pretty simple to use: import com.crp.utils.WebcamDetection; import com.crp.events.WebcamEvent; var wd:WebcamDetection = new WebcamDetection(); wd.addEventListener (WebcamEvent.RESOLVE, onResolve); wd.begin(); function onResolve (e:WebcamEvent):void { trace(e.code); switch (e.code) { case success: var myCamera:Camera = e.camera; break; case noPermission: // the user denied permission break; case noCameras: // no suitable camera's were found break; } } ___ 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] Capturing TextEvent from image in textfield
Maybe this is what you need to do... You will have to have the a not around the image, but you can use the same function to handle the a and the img click. txt.htmlText = This is a movieClip inside of a text field img src='Symbol1' id='myMC'/ Isn't it sweet?; txt.getImageReference(myMC).addEventListener (MouseEvent.ROLL_OVER, onRollOver); function onRollOver (e:MouseEvent):void { trace(oh Ya); } Ktu On Wed, Nov 11, 2009 at 12:07 AM, Mattheis, Erik (MIN - WSW) ematth...@webershandwick.com wrote: Karl, Gerry - Thanks, I just tried the code I posted below at home and it works as expected. I must have done something funky elsewhere in the code with the version at work: when I click on Our world-class scientists, the event fires, when I click on the movieclip in the textfield it doesn't. In the problematic version, I'm altering the externally loaded text at runtime, inserting an image in places that need a visual indicator for this text expands. I'm guessing the way I'm doing it doesn't add the event listener to the movieclip because it's not yet been added to the display list. From: flashcoders-boun...@chattyfig.figleaf.com [ flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Gerry [ noentour...@gmail.com] Sent: Tuesday, November 10, 2009 8:57 PM To: Flash Coders List Subject: Re: [Flashcoders] Capturing TextEvent from image in textfield http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html#event:link On Nov 10, 2009, at 7:47 PM, Mattheis, Erik (MIN - WSW) wrote: How do I send an event from a click on an image in a textfield? Clicking on the actual text fires the event, but it doesn't fire when clicking on an image from the library placed inline: pageText.displayValue.htmlText = 'pa href=event:a1bimg src=plus /Our world-class scientists/b/a/p'; pageText.displayValue.addEventListener(TextEvent.LINK, toggleVisibility); function toggleVisibility(e:Event) { trace('text event triggered'); } Thanks! ___ 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] Weak eventListener Problem
@Steven, I know anonymous functions are horrible, but I was trying to anything to get the GC to pick it up. I'm really just testing, to see how GC might react, and how the weak event listeners work. I know mediocre practice (and higher) you need to remove event listeners. I was just wondering, I've made a few classes that use weak references so that the person using my class does not have to worry about GC with the object. I wanted to make sure that it works how I thought it would. Ktu On Sun, Nov 8, 2009 at 10:59 AM, Keith H kh...@nc.rr.com wrote: I make destroy methods, avoid using extra references to listeners and am compulsive about cleaning them up, still some continue to execute imperviously. I hate when this happens cause its unpredictable and unexplainable. All I know is the Real garbage collectors are sometimes late picking up my garbage after I put it outside for them. -- Keith H -- www.keith-hair.net Steven Sacks wrote: No, it's not true. You're misunderstanding how weak listeners work, how anonymous functions work (you shouldn't use those anyway), and you're also misunderstanding how the garbage collector works. Whenever you addEventListener, immediately write a function that removes the event listener (such as a destroy method). If you get into this habit, you will never forget to do it and you'll never have this issue ever again. ___ 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] Weak eventListener Problem
That is true, however, this eventListener fires indefinitely. Garbage collection should pick it up after 30 seconds right? I have tried this on the main timeline, and in a document class, but GC never cleans up the object. Why? Ktu On Sat, Nov 7, 2009 at 5:29 AM, Henrik Andersson he...@henke37.cjb.netwrote: Ktu wrote: When the code below is run, the eventListener still fires. I was under the impression that it would not because the eventListener uses a weak reference, and thus get garbage collected. var sp:Sprite = new Sprite (); sp.addEventListener (Event.ENTER_FRAME, function (e:Event):void { trace(getTimer()); }, false, 0, true); sp = null; Am I just wrong? Yes and No. Yes, in that you assume that just removing all references will stop the listener right there and then. No, in that it will be eligible for garbage collection. But there is no guarantee when the garbage collection is performed, and until it has been performed, the listener will keep on working. If you need things to stop doing things _now_, turn them off yourself. ___ 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] Weak eventListener Problem
So I used the LocalConnection hack to force GC to run, and it cleaned up the object. I was not aware that GC might not run because there isn't enough of a reason to. If I had put this code into a fairly large application, GC would have more of a reason to run and thus probably end up cleaning up that object right? Ktu Lesson learned: You must remove all event listeners yourself. On Sat, Nov 7, 2009 at 12:36 PM, Henrik Andersson he...@henke37.cjb.netwrote: Ktu wrote: That is true, however, this eventListener fires indefinitely. Garbage collection should pick it up after 30 seconds right? I have tried this on the main timeline, and in a document class, but GC never cleans up the object. Why? There is no set time when it will run. It runs when Flash thinks that it would be a good idea. The exact time is left intentionally unspecified so that they can change their minds if needed. There isn't even a guarantee that garbage collection will ever collect eligible objects. ___ 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] Auto Webcam Detection
So I've noticed that Facebook will automatically detect which Camera object to use on your computer. It seems on most if not all macs there are at least three (3) Camera objects always available. So, I've made a class that will automatically detect which webcam is active and running. Feedback anyone? Download it here http://blog.cataclysmicrewind.com/webcamdetection/ It's pretty simple to use: import com.crp.utils.WebcamDetection; import com.crp.events.WebcamEvent; var wd:WebcamDetection = new WebcamDetection(); wd.addEventListener (WebcamEvent.RESOLVE, onResolve); wd.begin(); function onResolve (e:WebcamEvent):void { trace(e.code); switch (e.code) { case success: var myCamera:Camera = e.camera; break; case noPermission: // the user denied permission break; case noCameras: // no suitable camera's were found break; } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Auto Webcam Detection
Henrik, The detection is based off of the activity level, so yes the moving image, but its also based off of the fps of the Camera. That way, if my user is a stiff and doesn't move much, but the Camera is good, the fps should be going strong even though the activity is not. Also, I know a lot of users are just too stupid to figure out this whole webcam thing. Heck, I hadn't even used a webcam until I got one on my laptop in April. One thing I have learned is that in your applications, do as much for the user as possible while still making them feel like they have control (but they really don't who are you kidding). Ktu On Wed, Nov 4, 2009 at 6:11 AM, Glen Pike g...@engineeredarts.co.uk wrote: So, the idea is to try each camera until you find one that has a moving image? I still think that it is better to just tell the user to properly select the default camera in the options. ___ When you are using a 1280 x 1024 touchscreen, that's a bit difficult because the buttons are too small. Also, if you have 2 cameras which are the same, then the user does not know which one to pick... On our system, we use another program to capture the webcam output and then applications all load the stream / still images. Flash, and other programs, don't share the webcam, so we have to do it this way to enable multiple applications to use the webcam at once. It's a bit different from the normal PC setup, where you have one webcam for personal desktop use, so bit of an edge-case, but... 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] regex issue when validating unicode range
Have you tried looking at Grant Skinner's RegExp App? It might help http://gskinner.com/RegExr/ Ktu On Mon, Oct 19, 2009 at 1:24 PM, Matt Muller matthewmul...@gmail.comwrote: Hi there, issue with regex when trying to test if a char is within a unicode range var testIsArabic:Boolean = /\u0627/.test(str.charAt(0)); // this works testing for arabic chars of unicode 0627 var testIsArabic:Boolean = /[\u0627-\u]/.test(str.charAt(0)); this range does not work, returns false NOTE: the str.charAt(0) is 0627 any ideas? cheers, 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
Re: [Flashcoders] shared objects as a sort of scratch disk file
I like the sound of that. It certainly seems like something someone should look into. I'm not great with checking speed in code, but I want to try to look into that. I'm interested in what types of applications would benefit from it. Can you share anything about yours? Ktu [k-two] On Wed, Sep 30, 2009 at 3:39 AM, Anthony Pace anthony.p...@utoronto.cawrote: -Now, if the user sets the local storage amount to unlimited, it is possible to save and modify heaps of data; yet, at what cost speed wise? -Is there a max size to a shared object, even if the user selects unlimited? -Is there something wrong with my idea, other than having to ask the user to set the storage capacity to unlimited? -Has anyone clocked speed of read and write access when files get extremely large? -Has anyone come up with a better solution when the app has to run in the browser? I worked with shared objects a while back; however, I never really needed to use them to store much more than cookie data. I am thinking about asking the user to set the local storage to unlimited, in an attempt to decrease the amount of memory that is required by an application, especially when it gets to the 40mb or more of dynamically generated content and the user has limited memory on their system. The user needs to be able to load multiple files to be modified, and the modifications could be rather intense and have very large file sizes; yet, not all files and resultant data will be required for modification at the same time, and I was hoping that storage on the system as a shared object, would be able to act as a scratch file. I know this isn't new, but I was also thinking that if the file is used properly, and storage is set to unlimited, one could make an application with most of the interface elements stored in the shared object; therefore, even if the user clears their cache, the swf can check the shared object to see when it was last updated and reuse what's stored if nothing has changed. (reducing bandwidth and download time requirements)... Is this a pipe dream? ___ 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] Error when trying to embed a font
The only thing I can suggest is looking at Lee Brimelow's tutorial on using [Embed] for fonts. Maybe going through that tutorial will enlighten you. http://gotoandlearn.com/play?id=102 Kttu On Mon, Aug 31, 2009 at 3:10 PM, Andrew Murphy amur...@delvinia.com wrote: Hi again, Ian. :) I have tried a few different variations on the font name, but I hadn't tried using Font.enumerateFonts() to list the system's names for the fonts. Thank you for that suggestion. :) I gave it a try, listing out the fontName and fontStyle props and ended up with this: name: Akzidenz Grotesk BE style: regular name: Akzidenz Grotesk BE Bold style: regular name: Akzidenz Grotesk BE BoldEx style: regular name: Akzidenz Grotesk BE Ex style: regular name: Akzidenz Grotesk BE Light style: regular name: Akzidenz Grotesk BE LightEx style: regular name: Akzidenz Grotesk BE LightOsF style: regular name: Akzidenz Grotesk BE LightSC style: regular name: Akzidenz Grotesk BE MdEx style: regular name: Akzidenz Grotesk BE Super style: regular I'd already tried Akzidenz Grotesk BE but just in case I gave it another try, like this: [Embed( systemFont=Akzidenz Grotesk BE, fontName=AkzidenzOTF, mimeType=application/x-font, unicodeRange=U+0021-U+00FF )] var akzidenz_otf:Class; Font.registerFont(akzidenz_otf); And it throws the exact same error. However I have managed to get it working, sort of, by just creating Font Symbols in my FLA's Library. It means embedding the whole dern font, rather than a smaller subset of characters, but at least it works. I guess this is solved. More-or-less. Thank you for your help. ^_^ Andrew Murphy Interactive Media Specialist amur...@delvinia.com Delvinia 214 King Street West, Suite 214 Toronto Canada M5H 3S6 P 416.364.1455 ext. 232 F 416.364.9830 W www.delvinia.com CONFIDENTIALITY NOTICE This email message may contain privileged or confidential information. If you are not the intended recipient or received this communication by error, please notify the sender and delete the message without copying or disclosing it. AVIS DE CONFIDENTIALITÉ Ce message peut contenir de l'information légalement privilégiée ou confidentielle. Si vous n'êtes pas le destinataire ou croyez avoir reçu par erreur ce message, nous vous saurions gré d'en aviser l'émetteur et d'en détruire le contenu sans le communiquer a d'autres ou le reproduire. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian Thomas Sent: Monday, August 31, 2009 1:31 PM To: Flash Coders List Subject: Re: [Flashcoders] Error when trying to embed a font Sorry! My poor reading! The normal reason for such errors is that the name of the font (when using systemFont) does not exactly match the name your system thinks it should be. This can be complicated by font variants - you say you've already tried combinations of fontStyle, fontWeight etc. Have you tried those variants within the name? Could it be something like the name should be Berthold Akzidenz Grotesk Bold and you should have fontWeight set to bold? Have you tried Font.enumerateFonts() to list what fonts your Flash Player thinks is available on your system, and what their names are? Ian On Mon, Aug 31, 2009 at 6:01 PM, Andrew Murphyamur...@delvinia.com wrote: Hi, Ian. :) Thanks, but I tried that already, I mentioned it in my first post. It throws the same error. Andrew Murphy Interactive Media Specialist amur...@delvinia.com Delvinia 214 King Street West, Suite 214 Toronto Canada M5H 3S6 P 416.364.1455 ext. 232 F 416.364.9830 W www.delvinia.com CONFIDENTIALITY NOTICE This email message may contain privileged or confidential information. If you are not the intended recipient or received this communication by error, please notify the sender and delete the message without copying or disclosing it. AVIS DE CONFIDENTIALITÉ Ce message peut contenir de l'information légalement privilégiée ou confidentielle. Si vous n'êtes pas le destinataire ou croyez avoir reçu par erreur ce message, nous vous saurions gré d'en aviser l'émetteur et d'en détruire le contenu sans le communiquer a d'autres ou le reproduire. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian Thomas Sent: Monday, August 31, 2009 12:35 PM To: Flash Coders List Subject: Re: [Flashcoders] Error when trying to embed a font You could try directly referencing the TTF or OTF file with the 'source' argument instead of using the 'systemFont' argument: [Embed( source=/Path/To/FontFile.TTF, HTH, Ian On Mon, Aug
[Flashcoders] Express Install Help
Hey Flashers, I'm working with SWFObject 2.2 using the expressInstall.swf that comes with the package. I understand that the swf is loading in another swf from an adobe server which is the actual express install. My problem is that when it loads, it loads at a larger dimension than I can handle and causes my flash to wrap onto another line and makes the site terribly ugly. Any ideas on how to prevent the dimensions from growing once the express install is loaded? (btw, no matter what dimension I change the expressInstall.swf to, it always becomes something bigger than I can have on the screen) Thanks guys, Ktu [k-two] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Is this error prone? [loading multiple images]
I think I see a problem with this. I don't know how often GarbageCollection runs, but if the loader you create has no references to it, and the only event listener to it is set to have a weakReference, then the loader could get discarded before it finishes, unless the act of loading doesn't allow it to be removed. Otherwise, as far as I know, that looks like it should be fine to get reference to the loader again and remove the event listener. ? Ktu On Tue, Jul 7, 2009 at 12:50 PM, Joel Stransky j...@stranskydesign.comwrote: I'm wondering if I can use a for loop to create local Loader objects, assign listeners to their LoaderInfo objects without overwriting any of them and still be able to clean up after. Say I have the following inside a function body var img:Loader = new Loader(); img.contentLoaderInfo.addEventListener(Event.COMPLETE, onThumb, false, 0, true); img.load(new URLRequest(someImage.jpg)); and the following handler private function onThumb(e:Event):void { var loader:Loader = Loader( LoaderInfo(e.target).loader ); loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onThumb); var thumbNail:Bitmap = new Bitmap(Bitmap(loader.content).bitmapData); thumbNail.x = (itemWidth - thumbNail.width) / 2; addChild(thumbNail); } Will the handler work its way back to the Loader that was created temporarily and remove a listener from it? Is there a better way to using throw away loaders? -- --Joel Stransky stranskydesign.com ___ 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