Re: [Flashcoders] Accessing .fla var
You need to dispatch the event after your F instance is added to the stage. Right now the order of operations is like this: 1. instantiate root class 2. instantiate F 3. dispatch event from F 4. add listener to F 5. add F to root class display hierarchy Obviously 4 and 5 need to be done before #3. So you'll want to add an ADDED_TO_STAGE listener in F and then dispatch the event in that listener callback. -jonathan On Mon, Aug 30, 2010 at 11:31 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: So now I am trying this: in .fla: var countF:int=0; function incCountF(e:Event):void { countF++; } for .. { var newF:MDot = new MDot(); newF.addEventListener(increaseF,incCountF); addChild(newF); } then in the .as I have: package { [Event(name=increaseF)]; public function ... { var e:Event = new Event(increaseF); dispatchEvent(e); } } for some reason I think my listener is not catching it From: flashcoders-boun...@chattyfig.figleaf.com [ flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [ he...@henke37.cjb.net] Sent: Monday, August 30, 2010 1:43 PM To: Flash Coders List Subject: Re: [Flashcoders] Accessing .fla var Lehr, Theodore skriver: In my .fla I have: var countF:int=0; then in the library I have a mc with linkage to an .as file In that .as file, I want to be able to: countF++; Main timeline |frame 1 |___variable |___instance of symbol |_Symbol |_assigned class |_code to access the variable DocumentClass(parent).var++ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Reverse Compiling
Obvious but perhaps helpful: Installing a source control server on the same machine that you're working won't get you too far in terms of disaster recovery. For the lightweight developer who does not have a setup for a separate machine running as a server or hosted solution, I would just recommend the usual frequent backups on an external drive. Iterate your fla filenames from time to time as they can become corrupt. I also use LiveMesh to sync between several machines, which in essence becomes a cloud-based ersatz backup, (although without any provisions for rollback/versioning). -jonathan On Tue, Jun 22, 2010 at 10:16 AM, Kerry Thompson al...@cyberiantiger.bizwrote: Gustavo Duenas wrote: how can I install a subversion server on a mac? Do you want an SVN client on a Mac, or do you want to have a Mac SVN server? I've installed SVN on a Linux server, and the client on Mac and PC. I've never used the Mac as the host, though. Here's a link to the SVN Mac download page: http://subversion.apache.org/packages.html. If you look around a bit, there's quite a bit of documentation. Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 newbie question: how can I correct this to makean object appear on the stage?
To supplement Nathan's answer: I think the common thing that is tricky to note for people transitioning from AS2 to AS3: Your library objects with 'Linkage' are now AS3 Classes that (with the default setting) extend MovieClip. You need to instantiate this new class to create an instance of your linked symbol. -jonathan On Fri, Jun 11, 2010 at 4:52 PM, Nathan Mynarcik nat...@mynarcik.comwrote: First you are not importing your mybox class correctly. Second, the external class should start with a capital (MyBoxx.as). Third, your declaration of the instance is incorrect for how you have it setup. import myBoxxflash; var myBoxx:MyBoxx = new MyBoxx(); addChild(myBoxx); Your external class needs some work as well. I would read up on some tutorials on how to implement external Classes. -Original Message- From: Paul Freedman p...@freedmania.com Date: Fri, 11 Jun 2010 19:21:55 To: Flash Coders Listflashcoders@chattyfig.figleaf.com Subject: [Flashcoders] AS3 newbie question: how can I correct this to make an object appear on the stage? I don't understand why this doesn't work... I have a MovieClip, myClass.fla, with one symbol in the library, myBox_mc. Frame 1 of myClass.fla has the following actions: import flash.display.MovieClip; var myBoxx:MovieClip = MovieClip(myBox_mc); addChild(myBoxx); The symbol is exported for ActionScript. Its class remains myBox_mc. Its base class has been changed to myBoxx. The classPath has been properly configured and ends in the classes folder. myBoxx.as is in this folder. The contents of myBoxx.as are: package { import flash.display.MovieClip; public class myBoxx extends MovieClip { public function myBoxx(m:MovieClip) { trace(09myBoxx parent +this.parent); var dmc:MovieClip = m.MovieClip(myBox_mc); m.addChild(dmc); } } } When I run this, I get:Symbol myBox_mcerror #1023No default construtor found in base class myBoxx. I can't find any other example, or any lesson that tells me what's wrong. Any help would be greatly appreciated. Thanks, - Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flashing Flash
Looping in frame code, looping in ENTER_FRAME event or looping via a timer? On Wed, May 19, 2010 at 1:16 PM, Bob Wohl bob.w...@gmail.com wrote: W/O seeing what is exactly going on... maybe set the alpha to 0 till it's been added? On Wed, May 19, 2010 at 9:19 AM, John Singleton johnsingleton...@yahoo.comwrote: Hi; I have this code: big_container.removeChild(container_middle); big_container.removeChild(container_middle2); container_middle = new Sprite(); big_container.addChild(container_middle) It loops and is called in each iteration except the first. The problem is, when it runs, the image in the container momentarily disappears then reappears, which doesn't look good. How work around this? TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Changing Values Programmatically
Tha'ts a lot of code for email. Any way you can isolate the problem for us? -jonathan On Sat, May 15, 2010 at 1:36 PM, John Singleton johnsingleton...@yahoo.comwrote: Full View Hi; I have the following code. When it runs through BigContainer the second time, for some reason my containers disappear and nothing shows on the screen. This happens even if I take out my removeChild statements, and that's what's got me puzzled. Ideas? var start_flag:Boolean = true; var start_flag2:Boolean = true; function BigContainer() { if(start_flag == false) { start_flag2 = false; } if(start_flag == true) { LoadImages(); start_flag = false; } else { if(i == 4) { i = 1; } else if(i == 3) { j = 1; } var timeline:TimelineLite = new TimelineLite({onComplete:LoadImages()}); timeline.append(new TweenLite(container_left, 3, {alpha: 1})); } } function LoadImages() { LoadLeft(); } function LoadLeft():void { if(start_flag == true) { container_left = new Sprite(); } else { big_container.removeChild(container_left); container_left = container_left2; } big_container.addChild(container_left) var path:String = images/left + i + .png; var req:URLRequest = new URLRequest(path); var loader:Loader = new Loader(); loader.load(req); loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void{ trace(e) }); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadLeftLoaded); } function LoadLeftLoaded(evt:Event):void { var loaderInfo:LoaderInfo = evt.target as LoaderInfo; var displayObject:DisplayObject = loaderInfo.content; displayObject.width = 319; displayObject.height = 502; big_container.removeChild(container_left2); container_left.addChild(displayObject); if(start_flag2 == true) { container_left.x = 1000; container_left.y = 20; } else { container_left.x = 30; container_left.y = 20; } var timeline:TimelineLite = new TimelineLite({onComplete:SpinLeft}); timeline.append(new TweenLite(container_left, 1, {x:30, y:20})); } function SpinLeft() { big_container.addChild(container_left2) var path:String = images/left + j + .png; var req:URLRequest = new URLRequest(path); var loader:Loader = new Loader(); loader.load(req); loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void{ trace(e) }); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, SpinLeftLoaded); } function SpinLeftLoaded(evt:Event):void { var loaderInfo:LoaderInfo = evt.target as LoaderInfo; var displayObject:DisplayObject = loaderInfo.content; displayObject.width = 319; displayObject.height = 502; container_left2.addChild(displayObject); container_left2.x = 30; container_left2.y = -482; var rand:Number = new Number(randomNumber(rand_low, rand_high)); var timeline:TimelineLite = new TimelineLite({onComplete: CompleteLeft}); timeline.append(new TweenLite(container_left, rand/100, {alpha: 1})); timeline.append(new TweenLite(container_left, 1, {x:30, y:522})); var timeline2:TimelineLite = new TimelineLite(); timeline2.append(new TweenLite(container_left2, rand/100, {alpha: 1})); timeline2.append(new TweenLite(container_left2, 1, {x:30, y:20})); } function CompleteLeft() { left_done = true; AllDone(); } function AllDone() { if(right_done == true mid_done == true left_done == true) { right_done = false; mid_done = false; left_done = false; i += 1; j += 1; BigContainer() } } TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] RE: changing parent from child
As soon as you removeChild on child1, it loses the reference to the parent. If you want to continue on that tightly-coupled path, I would store a temporary reference to the parent, then unload child one and use the temporary reference to parent to load the new child. The design I would choose is to create an event that is broadcast from child1. In the parent, I would add an event listener to child1. When the event fires, unload 1 and load 2 from the eventlistener in parent. -jonathan On Tue, May 11, 2010 at 12:33 PM, Mattheis, Erik (MIN - WSW) ematth...@webershandwick.com wrote: Did you mean to say removeChildAt(0)? Have you tried Loader.unload()? _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Tuesday, May 11, 2010 10:15 AM To: Flash Coders List Subject: [Flashcoders] changing parent from child I have a container swf - with a child... I want to have a button in the child that will change the child in the parent... so if I have: Parent.swfChild 1.swf Once I click on a button in child 1, I will have Parent.swfChild 2.swf I have tried removeChild(0) to take out the original swf, but that only seems to work once ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] XML Question
You forgot your break; statements, sir. On Wed, May 5, 2010 at 11:12 AM, John Singleton johnsingleton...@yahoo.comwrote: - Original Message From: allandt bik-elliott (thefieldcomic.com) alla...@gmail.com i'd also recommend having a root node and an xml type declaration at the start Right. Ok, here's my revised code: ?xml version=1.0? SITE PAGE pg_name='index' DETAILSThis is some more of the home page./DETAILS /PAGE PAGE pg_name='contact' DETAILSThis is some more of the contact page./DETAILS /PAGE /SITE function completeXMLListener(e:Event):void { var xmlData:XML = XML (e.target.data); trace(xmldata.pa...@pg_name.tostring()) switch (xmldata.pa...@pg_name.tostring()) { case index: pageDetails = xmlData.PAGE.DETAILS.toString(); case contact: pageDetails = xmlData.PAGE.DETAILS.toString(); default: pageDetails = xmlData.PAGE.DETAILS.toString(); trace(pageDetails); } MyTextBlock(); } The first trace nicely prints out what I would expect (I think, should have been on two lines): indexcontact The second trace also prints: DETAILSThis is some more of the home page./DETAILS DETAILSThis is some more of the contact page./DETAILS indicating, of course, that the default is firing. Why? TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Changing display index on the stage
My interpretation of the question was we want the depth of the added object to be lower than the object that is already on the stage. So I don't think the x coordinate is the answer. So the first answer where Robert re-addChilds mc1 technically works in the simple situation, but if you have other objects on the stage, you'll start to mess up the depth order of your stage objects. I would recommend using addChildAt and setting the depth of mc2 to that of mc1's: this.addChildAt(mc2, this.getChildIndex(mc1)); That way, everything in the stack from mc1 + up is promoted instead of mc1 being popped to the top of the stack. -jonathan On Wed, May 5, 2010 at 1:56 PM, Mattheis, Erik (MIN - WSW) ematth...@webershandwick.com wrote: Look into getChildByName to get a reference to the MC on the stage, ie getChildByName('instanceName').x. _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of natalia Vikhtinskaya Sent: Wednesday, May 05, 2010 12:17 PM To: Flash Coders List Subject: [Flashcoders] Changing display index on the stage Hi Is it possible to have mc1 manually placed on stage be over mc2 created dynamically mc2=new MovieClip(); addChild(mc2) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Changing display index on the stage
I would like to point out that use of empty clips is a polarizing technique in terms of public opinion. Some people find that they make projects difficult to maintain. -jonathan On Wed, May 5, 2010 at 4:12 PM, Henrik Andersson he...@henke37.cjb.netwrote: natalia Vikhtinskaya wrote: Please explain. Do you mean to create empty holder manually? How to add stuff to it? Create a new empty movielclip symbol. Do not give it any class. Do not put any content in it. Now place an instance of this symbol on the timeline. Give this instance an instance name. Then use the instance name as a property to access the mc when adding: holder_mc.addChild(stuff); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] arranging
This is also the part of the program where we discourage explicit references to root, as it will break if the swf is ever loaded by another swf, etc. etc. On Wed, Apr 28, 2010 at 3:52 PM, Henrik Andersson he...@henke37.cjb.netwrote: Nathan Mynarcik wrote: stage stage!=root as I always say. The stage has only one object by default, the main timeline. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Infinitely Looping Image
Hi, John, The first reference to cloudTween I see is here: cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation); So I'm guessing you need to declare and assign that object before you try attaching an event listener to it. In the future, the quality of the feedback you'll get will reflect the effort you put into describing the problem. It ain't working isn't helpful for someone analysing: Throws an exception? Doesn't compile? Animation starts but then doesn't loop? -joanthan On Mon, Apr 26, 2010 at 10:02 AM, John Singleton johnsingleton...@yahoo.com wrote: Hi; I would like to have a background image of clouds loop infinitely.Here's my code: function BigPic():void { parent_container2 = new MovieClip(); var square:Sprite = new Sprite(); parent_container2.mask = square; addChild(square); square.graphics.lineStyle(3,0x065566); square.graphics.beginFill(0xff); square.graphics.drawRoundRect(22, 22, 966, 146, 20); square.graphics.endFill(); addChild(parent_container2) var path:String = images/clouds.png; var req:URLRequest = new URLRequest(path); var loader:Loader = new Loader(); loader.load(req); loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent):void{ trace(e) }); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, BigPicLoaded); } function BigPicLoaded(evt:Event):void { var loaderInfo:LoaderInfo = evt.target as LoaderInfo; var displayObject:DisplayObject = loaderInfo.content; displayObject.width = 2000; displayObject.height = 150; displayObject.x = 20; displayObject.y = 20; parent_container2.addChild(displayObject); // TweenLite.to(parent_container2, 50, {x:-1000}); cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation); } function restartAnimation(oEvent:Event):void { cloudTween.start(); } But it ain't working. Ideas? TIA, John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and iThingammybob
They would have to be jailbreaked (jailbroken?) iPhones to run that. All apps require a digital certificate, which is managed through their developer program to be loaded onto the phone and run. The type of certificate controls whether how they can be distributed. Non store-distributed apps are restricted to 100 phones. -jonathan On Tue, Apr 20, 2010 at 9:06 AM, Matt S. mattsp...@gmail.com wrote: If the Agreement doesnt currently prevent it, you can be quite certain a couple sentences would be added in a hurry to make sure it does. .m On Tue, Apr 20, 2010 at 8:46 AM, Nathan Mynarcik nat...@mynarcik.com wrote: Come to think of it, I wonder if you could just make a website for support and download of your app. Sell it on the site via Paypal or a shopping cart. Can Apple prevent developers from doing this? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash and iThingammybob
Paul, That's an interesting distinction. Does the agreement say you can't even test locally those kind of prototypes? I thought the blocking was just for distribution through the store. -jonathan On Tue, Apr 20, 2010 at 10:57 AM, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: that's the problem with apple's closed system - it's their way or the high way android supports both models - you can put your software in their appstore or provide a direct link on the net a On 20 April 2010 15:46, Paul Andrews p...@ipauland.com wrote: On 20/04/2010 15:31, allandt bik-elliott (thefieldcomic.com) wrote: sure but you can compile to your own handset for testing as much as you like - it just won't get through the appstore approval process testing isn't much use to me. I can't build software for internal use at a company on the basis of using a development environment where I am in breach of the licensing agreement. I can't go demonstrating software prototypes and have companies ask me about how they were developed only to have to explain that my working practices are based on broken agreements. On 20 April 2010 15:24, Paul Andrewsp...@ipauland.com wrote: On 20/04/2010 15:01, allandt bik-elliott (thefieldcomic.com) wrote: note: to roll out an app to your dev handset requires a 100$ iphone developer license Which now forbids you to use the Adobe cross compiler. You have to agree to those terms. ___ 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 -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Interaction between clips and main timeline in AS3.
So, my untested proposal is this: Root timeline, don't instantiate your subclip with code. Just put it on the stage with an instance name, and refer to it then. In the subclip, you can then refer to parent.counter or whatever your variable is, because you're guaranteed that you have a parent if you never instantiate the subclip with code. I think the problem was, you instantiated clip_mc before adding it to the stage (of course), but then it's constructor you are asking for something in its parent - but it doesn't have a parent yet. Eventually learn classes and work it out that way, but we shouldn't stonewall you from using timeline code for a simple animator's task (this is one reason why Flash is so pervasive guys, because it was easy for you to jump into with basic interactivity, right?). -jonathan , On Fri, Apr 16, 2010 at 2:24 AM, Henrik Andersson he...@henke37.cjb.netwrote: Karl DeSaulniers wrote: I think its not simple because you are scripting timeline wise. Got to pick. AS2 or AS3. I believe what they were trying to say was if you have all the code in classes, you can communicate between the root and the added movie clip because the classes reference each other, not the timeline. Plus you will be referencing objects, so communicating between the objects through the classes is how it's done in AS3. Am I on the right track guys? You are not. You have gotten tangled up in the elitism spread by people who doesn't actually work with Flash. There is no reason not to use the properties that you have to get the references. You just need to remember to cast them to the proper type. The trick is to know when to apply the fancy rules and when not to. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] @#$% New iPhone Developer Agreement Bans the Use of Adobe's Flash-to-iPhone Compiler
This really bugs me, as I have spent a lot of time with the Beta and the misery of figuring out all the stupid certificate process and paying for a developer membership... (a paid membership just to test an application on the device, from what I gathered). It's not enough to have a financial grip on the majority of content that appears on those things but now they need you to only use their tools? My wife is a Massage Therapist, and is terrible with computers. After the 100th there's an app for that ad she finally asked me what the heck an app is. I explained and she said, So it's kind of like web sites that you have to buy? -jonathan On Thu, Apr 8, 2010 at 9:45 PM, Jared jared.stan...@gmail.com wrote: Someone said that this was just a proposed version of the policy, and that the 4.0 SDK isn't out until summer so they won't finalize it until then...we'll see Sent from my iPhone On Apr 8, 2010, at 6:25 PM, Merrill, Jason jason.merr...@bankofamerica.com wrote: I know BRUTAL. I mean, wow - Apple knows Adobe is announcing CS5 on Monday. Should be interesting to see how they address that new Apple policy on the call. Some other links: Wired magazine: http://www.wired.com/gadgetlab/2010/04/iphone-developer-policy/ Peter Elst: http://www.peterelst.com/blog/2010/04/09/apple-versus-developers-this-ti me-its-personal/ So many interesting power struggles going on right now between Adobe, Apple, Microsoft and Google. Makes you wonder who will come out on top. Jason Merrill Bank of America Global Learning Learning Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (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 -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange RegExp behaviour
I think Jiri wants all clips, not all but one. You've repro'd the last one not showing up. Jiri, why are you shaving 1 off your numChildren? I'ts a count, not an index. Try var childnum:int=this.numChildren; instead. -jonathan On Thu, Mar 18, 2010 at 8:20 PM, Anthony Pace anthony.p...@utoronto.cawrote: While I really don't understand why you would want to do things this way, but... I tested this code below, with several clips on the stage: sq_1, sq_12, sq_122, sq_1222a, sq_1212_1212, sq_6dad_12, sq_6d_6d it worked fine and outputed the obvious results: sq_1 sq_12 sq_122 sq_1212_1212 sq_6dad_12 var childnum:int=this.numChildren-1; var pat:RegExp=/_[0-9]+$/; var instance:DisplayObject; while (childnum!=-1) { instance = this.getChildAt(childnum); if (pat.test(instance.name)) { trace(instance.name); } --childnum; } On 3/18/2010 2:08 PM, Jiri wrote: Hello, i would like some help, because I am confused. If have a Movieclip that holds several sprites some of them have instance names like so frame_n where n is a number. I then loop through every child of the MovieClip and test the instance name using regExp. var childs:int = clip.numChildren-1; var pat:RegExp = /_[0-9]+$/ig; while(childs = 0){ var instance:DisplayObject = clip.getChildAt( childs ); if( pat.test(instance.name) ){ Logger.debug( info box frame , instance.name ); } childs-- } I have three movieclips called 'frame_0' , 'frame_1' and 'frame_2' for sure, but it when I run the above code, it only show 1 and 0?? Anybody has an idea? Jiri On 11/03/2010 22:16, Guest Services, City Concierge wrote: We're looking for a coder to some small contract work We're in Los Angeles Should know action script very well, and be able to get the flash scripts to work in .asp and .php and use XML Ask for Jefferson 323-874-6610 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange RegExp behaviour
Just so there is no confusion... that is not the only change you would have to make. When you do the getChildAt call you'll need to adjust by one for the index at that time. I could see why Jiri would have to do this technique if he was handed a bunch of Stage-authored content from another party and had to access it somehow. -jonathan On Fri, Mar 19, 2010 at 9:34 AM, jonathan howe jonathangh...@gmail.comwrote: I think Jiri wants all clips, not all but one. You've repro'd the last one not showing up. Jiri, why are you shaving 1 off your numChildren? I'ts a count, not an index. Try var childnum:int=this.numChildren; instead. -jonathan On Thu, Mar 18, 2010 at 8:20 PM, Anthony Pace anthony.p...@utoronto.cawrote: While I really don't understand why you would want to do things this way, but... I tested this code below, with several clips on the stage: sq_1, sq_12, sq_122, sq_1222a, sq_1212_1212, sq_6dad_12, sq_6d_6d it worked fine and outputed the obvious results: sq_1 sq_12 sq_122 sq_1212_1212 sq_6dad_12 var childnum:int=this.numChildren-1; var pat:RegExp=/_[0-9]+$/; var instance:DisplayObject; while (childnum!=-1) { instance = this.getChildAt(childnum); if (pat.test(instance.name)) { trace(instance.name); } --childnum; } On 3/18/2010 2:08 PM, Jiri wrote: Hello, i would like some help, because I am confused. If have a Movieclip that holds several sprites some of them have instance names like so frame_n where n is a number. I then loop through every child of the MovieClip and test the instance name using regExp. var childs:int = clip.numChildren-1; var pat:RegExp = /_[0-9]+$/ig; while(childs = 0){ var instance:DisplayObject = clip.getChildAt( childs ); if( pat.test(instance.name) ){ Logger.debug( info box frame , instance.name ); } childs-- } I have three movieclips called 'frame_0' , 'frame_1' and 'frame_2' for sure, but it when I run the above code, it only show 1 and 0?? Anybody has an idea? Jiri On 11/03/2010 22:16, Guest Services, City Concierge wrote: We're looking for a coder to some small contract work We're in Los Angeles Should know action script very well, and be able to get the flash scripts to work in .asp and .php and use XML Ask for Jefferson 323-874-6610 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Strange RegExp behaviour
Hi, Anthony, You're totally right - I shouldn't have contradicted you. I saw a very simple problem in either the start of the index or the limiter of the index needed to be altered - so in that essence we are saying the same thing. I read your email too quickly and I thought you were saying Jiri, your code works fine for me instead of here's how I modified it to work. -jonathan On Fri, Mar 19, 2010 at 12:55 PM, Anthony Pace anthony.p...@utoronto.cawrote: Johnathan: if there are 6 items on the stage, numChildren = 6 but to access the 6th item you need to be at position [5] of the array, so for ease of implementation he used: this.numChildren-1 My test showed that it if he has some screwed up object that does not match his regex, it will not show, so that is why it shaved one off when tracing. It still went through the entire array, it just chose not to output what it didn't like. I would also like to point out that I changed the loop conditional expression to see if the counter childnum!=-1 , meaning that if there were 6 items on the stage, that position 5, 4, 3, 2, 1, and 0 would be checked, but it would not go further. So again, the code I tested does work fine, and if you want to be sure, you can even trace out the childnum value before or after the if statement in the loop, to see how far it goes. On 3/19/2010 9:39 AM, jonathan howe wrote: Just so there is no confusion... that is not the only change you would have to make. When you do the getChildAt call you'll need to adjust by one for the index at that time. I could see why Jiri would have to do this technique if he was handed a bunch of Stage-authored content from another party and had to access it somehow. -jonathan On Fri, Mar 19, 2010 at 9:34 AM, jonathan howejonathangh...@gmail.com wrote: I think Jiri wants all clips, not all but one. You've repro'd the last one not showing up. Jiri, why are you shaving 1 off your numChildren? I'ts a count, not an index. Try var childnum:int=this.numChildren; instead. -jonathan On Thu, Mar 18, 2010 at 8:20 PM, Anthony Paceanthony.p...@utoronto.ca wrote: While I really don't understand why you would want to do things this way, but... I tested this code below, with several clips on the stage: sq_1, sq_12, sq_122, sq_1222a, sq_1212_1212, sq_6dad_12, sq_6d_6d it worked fine and outputed the obvious results: sq_1 sq_12 sq_122 sq_1212_1212 sq_6dad_12 var childnum:int=this.numChildren-1; var pat:RegExp=/_[0-9]+$/; var instance:DisplayObject; while (childnum!=-1) { instance = this.getChildAt(childnum); if (pat.test(instance.name)) { trace(instance.name); } --childnum; } On 3/18/2010 2:08 PM, Jiri wrote: Hello, i would like some help, because I am confused. If have a Movieclip that holds several sprites some of them have instance names like so frame_n where n is a number. I then loop through every child of the MovieClip and test the instance name using regExp. var childs:int = clip.numChildren-1; var pat:RegExp = /_[0-9]+$/ig; while(childs= 0){ var instance:DisplayObject = clip.getChildAt( childs ); if( pat.test(instance.name) ){ Logger.debug( info box frame , instance.name ); } childs-- } I have three movieclips called 'frame_0' , 'frame_1' and 'frame_2' for sure, but it when I run the above code, it only show 1 and 0?? Anybody has an idea? Jiri On 11/03/2010 22:16, Guest Services, City Concierge wrote: We're looking for a coder to some small contract work We're in Los Angeles Should know action script very well, and be able to get the flash scripts to work in .asp and .php and use XML Ask for Jefferson 323-874-6610 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
I apologize for misusing the word 'sum' earlier, thereby confusing this already terrifying conversation! I edited the last response to try to undo my mistake. -jonathan On Wed, Mar 17, 2010 at 8:28 AM, Steve Abaffy st...@msmarketing.biz wrote: The question what is 15% of 3000 is different then 450 is what percentage of 3000. The equation part/whole * 100 = percent is valid. In the first question we have part/3000 * 100 = 15 solves to part = 450 In the second question 450/3000 * 100 = percent solves to 15 -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik (MIN - WSW) Sent: Wednesday, March 17, 2010 9:58 AM To: Flash Coders List Subject: RE: [Flashcoders] Calculator What's the difference between a sum and a total? Knock knock. Who's there? Nose! Nose who? Who knows? _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson Sent: Wednesday, March 17, 2010 4:11 AM To: Flash Coders List Subject: Re: [Flashcoders] Calculator Karl DeSaulniers wrote: Hey Jonathan, Isn't it sum*total / 100 = percentage? Karl No, it is not and has never been. *mumbeling about kids these days* ___ 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 __ Information from ESET NOD32 Antivirus, version of virus signature database 4952 (20100317) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 4952 (20100317) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
Funny thing is, I'm in a talk right now with Grant Skinner presenting and he just threw up this slide: Math At a bare minimum, you will require basic knowledge of elementary math, spatial math, bitwise operations, and trigonometry. Advanced trig and some calculus or physics can pay off as well. -jonathan On Wed, Mar 17, 2010 at 9:18 AM, jonathan howe jonathangh...@gmail.comwrote: I apologize for misusing the word 'sum' earlier, thereby confusing this already terrifying conversation! I edited the last response to try to undo my mistake. -jonathan On Wed, Mar 17, 2010 at 8:28 AM, Steve Abaffy st...@msmarketing.bizwrote: The question what is 15% of 3000 is different then 450 is what percentage of 3000. The equation part/whole * 100 = percent is valid. In the first question we have part/3000 * 100 = 15 solves to part = 450 In the second question 450/3000 * 100 = percent solves to 15 -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik (MIN - WSW) Sent: Wednesday, March 17, 2010 9:58 AM To: Flash Coders List Subject: RE: [Flashcoders] Calculator What's the difference between a sum and a total? Knock knock. Who's there? Nose! Nose who? Who knows? _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson Sent: Wednesday, March 17, 2010 4:11 AM To: Flash Coders List Subject: Re: [Flashcoders] Calculator Karl DeSaulniers wrote: Hey Jonathan, Isn't it sum*total / 100 = percentage? Karl No, it is not and has never been. *mumbeling about kids these days* ___ 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 __ Information from ESET NOD32 Antivirus, version of virus signature database 4952 (20100317) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 4952 (20100317) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
What are you looking for beyond regular math i.e. sum/total * 100 = percentage? On Tue, Mar 16, 2010 at 9:07 PM, Karl DeSaulniers k...@designdrumm.comwrote: Hello, I have been asked to see if I can set up an online calculator. I was wondering if anyone had some pointers on where I can lear/find a script that calculates percentages. The regular math part I think I can figure out. Its not a complicated calc, just basic math and percentages calc, a payment calc if you will. TIA Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Synchronous code?
Hi, Glen, Sounds pretty wacky to me. I'm going to ask a dumb question just to be sure... In the code snippet, the event handler is inside the Sprite subclass itself? In other words, I wanted to make sure that your reference to stage is indeed the property of the event source, i.e. would this be functionally equivalent: Sprite(e.target).stage.addEventListener(MouseEvent.MOUSE_UP, _stageMouseUpHandler, false, 0, true); Just trying to cover all the bases. -jonathan On Tue, Mar 9, 2010 at 6:39 AM, Glen Pike g...@engineeredarts.co.uk wrote: Hi, More of a strange encounter that I would like to share / get some input on than something I need to fix this one... I have recently encountered an issue where I am getting null for the stage property of a Sprite subclass in it's event handler for ADDED_TO_STAGE. I have managed to work-around the problem, but have not addressed the core issue I think. My app has states for operation and uses an XML socket to communicate. States are: NORMAL, ADMIN and ERROR. ERROR means the XML socket has disconnected, the other two states just have different levels of access control. Each state has a corresponding AppScreen subclass, some containing lots of the above Sprites. I can go into my ADMIN state from the ERROR state, but when the Admin screen was added to the stage it tried to send something via the XML socket class which sent an Error event to the App and resulted in the application switchin back to the ERROR state. The Admin screen contained lots of the Sprite subclasses with the ADDED_TO_STAGE handler, but it seems that stage property of the Sprite subclass was actually null'd between the calling of the event and the accessing of the stage property and I end up with an exception in my Sprite subclass, e.g. protected function _addedToStageHandler(e:Event):void { //This would throw an exception because the stage is null at this point? ///... some setup code, then: stage.addEventListener(MouseEvent.MOUSE_UP, _stageMouseUpHandler, false, 0, true); } So any ideas why this would happen? Is it because I am calling send on the socket which is an OS level thing and outside the normal Flash Player thread of execution, or am I fantasizing here? I have worked around the problem which does flag an error when commands are sent to the disconnected socket (I still catch the exception, but listen for the error in a different place). Thanks for any insights. Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Local Storage Flash Player Settings alert
It's possible to have your player configured so that NO local storage is allowed. Have him right click, choose settings... click on third tab and see what the settings for local storage permissions slider is set to. Within your own app, iIt may be possible to test for permission before calling your function, and then instruct the user from there... but I don't remember specifics. -jonathan On Mon, Mar 1, 2010 at 2:54 PM, Merrill, Jason jason.merr...@bankofamerica.com wrote: Has the data grown excessively large? Jason Merrill Bank of America Global Learning Learning Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Andrew Sinning Sent: Monday, March 01, 2010 2:51 PM To: Flash Coders Subject: [Flashcoders] Local Storage Flash Player Settings alert On his Mac under Safari, my boss is getting an Adobe Flash Player Settings alert regarding Local Storage whenever my application tries to access a SharedObject.getLocal(). I've never seen this in my own testing, and I'm using the same code that I've used in other projects and he's never reported this before. Any idea what's wrong here? We really don't want customers to get this alert. It's very tacky. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Using parent Sprites coordinates
Yep. You will have to instantiate a point object with the x and y properties of your sprite, apply any localToGlobal/globalToLocal changes*, and then set your sprite's x (and y) to the new point's x and y. Once you do this a few times it might be time to write yourself a few helper functions - ex. a function that takes a sprite and global x and global y and positions the sprite, for example. -jonathan *The way I'm writing this makes it sound like the localToGlobal() function alters the point it's passed, when actually I think it returns a new altered point. Don't get caught by this. On Thu, Feb 25, 2010 at 7:04 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: hmmm unless I am misunderstanding localToGlobal seems to relate to points - not sprites From: flashcoders-boun...@chattyfig.figleaf.com [ flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [ he...@henke37.cjb.net] Sent: Tuesday, February 23, 2010 4:03 PM To: Flash Coders List Subject: Re: [Flashcoders] Using parent Sprites coordinates Lehr, Theodore wrote: Is there a way to have a child sprite reference the parent sprite when seeting it's x and y say I have a Sprite: You must have missed localToGlobal and globalToLocal. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] WIRED hates Flash
I have to agree - seems much more likely that someone will develop a animator-friendly UI comparable to Flash CSx that exports, for example, HTML5 content, than a successful version of this plugin replacement (and all of potential incompatibilities). -jonathan On Mon, Feb 1, 2010 at 11:32 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: I guess what's the point then? Just displaying cartoons so people don't have to use the Flash player? Impressive technically, but nothing to be too excited about regarding feasibility I suppose. Jason Merrill Bank of America Global Learning Learning Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto: flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Carl Welch Sent: Monday, February 01, 2010 11:19 AM To: Flash Coders List Subject: Re: [Flashcoders] WIRED hates Flash I looked into it last night. It only handles frame based animation. oh well. On Mon, Feb 1, 2010 at 7:58 AM, Merrill, Jason jason.merr...@bankofamerica.com wrote: I think apple store and adobe flash have big chance to be flipfloped anyway: http://paulirish.com/work/gordon/demos/ None of those samples worked for me on IE7. It's a great idea ,but I guess I'm skeptical of any Javascript engine being able to fully replicate all or even most the features of the Flash player. At least enough to have widespread adoption. Do you know what percentage of Flash player 10 features this is supposed to be able to handle? Jason Merrill Bank of America Global Learning Learning Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Carl Welch http://www.carlwelch.com 805.403.4819 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] WIRED hates Flash
Regarding learning Objective-C iPhone SDK, we already have a path coming via CS5 to get Flash - iPxxx App. The contested space is the browser, not the app. -jonathan On Fri, Jan 29, 2010 at 11:37 AM, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: apple will be the closed tablet / smartphone that will never have flash. ever. look out for the android / windows clones that will run flash. apple will do to it's hand-held appliance marketshare what it has done to it's computer marketshare - piss off enough devs that they start talking up the other platforms until they overtake apples marketshare based on sheer amount of software / hardware. Apple won't care because they will be left with a core of hardened fanboys who will buy anything that apple puts out i know - i'm an old mac guy (still am to a point) but since i've become a full-time developer i have become more and more jaded with the closed option a On Fri, Jan 29, 2010 at 3:54 PM, Glen Pike g...@engineeredarts.co.uk wrote: I've wondered if a future iteration of Flash will take that into account and give us an Export as HTML 5 button :-) Brian Mays ___ More likely an Apple publish template with QuiickTime Movie, iPhone App and HTML 5 buttons + a price doubler option. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] strange Text Rendering Bug
Yup, the page loads I don't know what I'm looking for. I see a lot of broken looking stuff. Try some descriptive text next time. On Fri, Jan 29, 2010 at 4:51 PM, Nathan Mynarcik nat...@mynarcik.comwrote: Why what happens? That link has nothing flash on it. --Original Message-- From: artur Sender: flashcoders-boun...@chattyfig.figleaf.com To: Flash Coders List ReplyTo: ar...@artur.com ReplyTo: Flash Coders List Subject: [Flashcoders] strange Text Rendering Bug Sent: Jan 29, 2010 3:20 PM http://skitch.com/menslow/n18yk/main Mac 10.5 with FireFox 3.6 and Safari 4.0.4 flash vrsn is: 10.0.42.34 any ideas why this is happens? thanks - art ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Nathan Mynarcik Interactive Web Developer nat...@mynarcik.com 254.749.2525 www.mynarcik.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Exporting a movie file
I recommend Macromedia Generator!* -jonathan *joking. I spent a lot of time messing around with Generator as a way to streamline image production about 10 years ago. I'm glad it can be a punchline now. On Mon, Jan 18, 2010 at 2:59 PM, Barry Hannah ba...@shift.co.nz wrote: This is much more complicated than you might imagine. To export video from dynamic elements (such as your textfield) Flash has to export the entire movie as a bitmap sequence frame by frame. Then you stitch those bitmaps (pngs or whatever) together server side using something like FFMPEG. There is no easy way to accomplish any of this. Have a look at Animoto.com, it's doing something similar, though more complex. They take users images/text/music and stitch it all up. Hopefully one day they release an export to video API! Also, they've open sourced a filmstrip project which is more geared to applying motion blur to actionscript based animations and exporting them as video, but there might be something you can use: http://labs.animoto.com/2009/06/07/presenting-filmstrip/ Barry. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Ross (N-SGIS) Sent: Tuesday, 19 January 2010 8:04 a.m. To: Flash Coders List Subject: RE: [Flashcoders] Exporting a movie file Here's the scenario. I have a .swf with a movie clip and a text box. I want to allow a user to add whatever kind of text he wants in the text box, he clicks a button, and flash will make a Quicktime of the movie with his text that the user can use anywhere. Thanks -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason Sent: Monday, January 18, 2010 1:43 PM To: Flash Coders List Subject: RE: [Flashcoders] Exporting a movie file but can flash export a movie clip to a video file (.mov)? File Export Movie select Quicktime Jason Merrill Bank of America Global Learning Learning Performance Soluions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] as3 to iphone app
So I've watched the video and one thing concerns me a little. From what I can tell, there is no way to simulate the touch and gesture events on your machine (Adobe has stated in the past that an iPhone virtual machine will not work). So to debug, you have to: Export (a process the video's narrator says is much slower than swf export) Uninstall, old version (maybe) Install new version Manually Launch This is a lot of steps for those of us used to quick testing! Additionally, it looks like you have to be an apple developer before you can even export a test app, meaning a $100 fee just to experiment. -jonathan On Fri, Dec 11, 2009 at 12:38 PM, Kevin Newman capta...@unfocus.com wrote: Thanks! Can't wait for the beta!! Where is that thing?!! :-D Kevin N. On 12/10/09 8:13 PM, David Hunter wrote: bit of an old thread but thought people might like to check out lee brimelow's new video (in case you hadn't seen it) showing you a quick demo on how to make an iphone app in flash CS5: http://www.gotoandlearn.com/play?id=116 best, david. Date: Thu, 5 Nov 2009 13:13:50 -0500 From: capta...@unfocus.com To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] as3 to iphone app I was actually asking about a lower level implementation detail - dealing with regular non-iphonen swfs - than what that link answers. That link information about product releases - which is great. You did seem to suggest that regular MXML swfs do get run through LLVM in an earlier post on this thread, but I wasn't sure if you meant for iPhones only, or for web swfs too. I guess I'll just wait till the beta is released and find out for myself how it works. :-) I really can't wait for the beta! Thanks! Kevin N. On 11/5/09 11:20 AM, Mike Chambers wrote: This is covered in the FAQ: http://labs.adobe.com/wiki/index.php/Applications_for_iPhone#Which_Flash_Platform_tools_and_technologies_can_be_used_to_build_content_for_the_iPhone.3F Which Flash Platform tools and technologies can be used to build content for the iPhone? The primary tool for developing iPhone applications using Flash will be Adobe Flash Professional CS5. We are also looking at adding this feature to other Flash Platform tools and technologies. It is on the road map for Flash Builder, but the release cycles may not line up perfectly initially. mike chambers m...@adobe.com On Nov 5, 2009, at 7:58 AM, Kevin Newman wrote: I'm not sure what No. was answering, but thanks for the clarification on the compile pipeline. This is good info. One more - will the regular swf compiler run MXMLC swfs through LLVM to pick up some possible optimizations from LLVM? That would be MXMLC - SWF / ABC - LLVM - SWF / ABC. Kevin N. On 11/5/09 1:22 AM, Mike Chambers wrote: It is MXMLC - SWF / ABC - LLVM - arm byte code. ___ 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 _ Use Hotmail to send and receive mail from your different email accounts http://clk.atdmt.com/UKM/go/186394592/direct/01/___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Allowing website user to record video and voice
Paul, Hopefully they have already thought of this but keep your eye on COPPA (child privacy) regulations. Could be a doozy. http://www.coppa.org/comply.htm -jonathan On Mon, Nov 16, 2009 at 8:20 AM, Paul Steven paul_ste...@btinternet.comwrote: I have been commissioned to create an online game type thing that allows users to records a video and audio of them singing a song, using their web cam and a microphone I guess. I haven't done any flash work before doing this kind of thing so just wanted to get a heads up on what I need to achieve this. Essentially I just need to get the video footage and audio to the client server. The client will deal with it after this. Here is a link to a site with something vaguely similar http://www.overlay.tv/clients/disney/jonas/demo.html My main question is do I need some special software on the server side or is this something that can be done using the flash player alone? I have no restrictions on the version of Flash to create this with/for. Thanks in advance Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Inheritance and Static properties
Just double checking but in your trace statement you are looking for the NAME property on the event? trace(event.NAME)// undefined You probably mean event.target.NAME but I'm just checking the obvious. -jonathan On Thu, Oct 22, 2009 at 12:38 PM, Helmut Granda cont...@helmutgranda.comwrote: So I understand that I can access static properties only child-parent but not if we instantiate the subclass some where else within the application but what would be the best way to go around this? -ButtonParent -contains basic rollover/rollout/click events and does dispatchEvent (new Event (BUTTON_CLICK)); -Children inherit ButtonParent and I want to be able to listen for the event and also get the Name of the child. var button1 : ButtonParent = new Child(); button1.addEventListener (Child.BUTTON_CLICK, doClickStuff) // of course wont work because we cant access the static constants from child button1.addEventListener (ButtonParent.BUTTON_CLICK, doClickStuff)// this works but now I cant access the NAME from the child private function doClickStuff ( event : Event ) : void { trace(event.target )// Child trace(event.NAME)// undefined } // here is some more about the child public class Child extends ButtonParent extends IButton { public static const NAME : String = ChildName; } Any ideas or recommendations? I did get around the issue but not using static constants for the BUTTON_CLICK constant and just setting it up as a public var button1.addEventListener ( button1.BUTTON_CLICK, doClickStuff)// now this works but looks such an ugly hack. TIA ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Converting .swf playback to .mov
My experience with SWF to Video is that it's using a pretty low-tech solution - essentially it stepped through your movie one frame at a time and captured encoded that frame. So, it tended to not work well on MovieClips, scripted animation, etc. A great tool for, say, converting a popular cartoon website into DVD, but lousy for anything with modern/script-based techniques. -jonathan On Wed, Oct 21, 2009 at 2:38 PM, Ashim D'Silva as...@therandomlines.comwrote: Pretty sure CS4 handles it fine. Including actionscripted animation. Haven't pushed it hard, but worth a shot. Cheers, Ashim The Random Lines My online portfolio www.therandomlines.com 2009/10/21 Joel Stransky j...@stranskydesign.com: Ok, I'm well aware of the limitation in exporting an .fla to quicktime. You only get the main timeline, no sub clips or scripted animation. What I'm asking is if there's some new product on the market that has tackled this issue successfully. So far is looks like a screen reader is the way to go, I'd just like to get some alpha (key) control over the output that doesn't require me recording it over a green background. Thanks for any direction. -- --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 -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] instantiate symbol linked to parent movie's library
Totally forget in AS2, but maybe research getDefinitionByName() - it can retrieve a class based on a classname string - and maybe there are some comments about AS2 vs. AS3 -jonathan On Tue, Sep 22, 2009 at 2:54 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi, I don't remember the exact details, but if I remember correctly there are 2 ways: 1. let the child attach the clip at the root, copy its bitmap data and use that to create a clip in its own root, but this will result in static bitmaps only 2. -declare an empty clip with linkage id in the root and export it for runtime sharing -in the child import the clip from the parent for runtime sharing It was one of those hacks, but it's been a long time, so I'm not sure I got the steps all right, I might have those files somewhere. Hope that helps! Hans On Tue, Sep 22, 2009 at 5:50 AM, Andrew Sinning and...@learningware.com wrote: How would one instantiate a symbol instance linked to the parent movie's library? E.g., there's an asset in top most movie's library called Asset. The presentation engine is a separate swf that gets loaded into the top most movie. From within this movie, using AS2, I need to create an instance of Asset. The child swf uses _lockRoot. 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 -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] problem with dictonary on dynamic buttons
Your dictionary is built off of that goto attribute but then you're passing in an instance of the object into the dictionary array. You have not assigned a name property to your assets. So when defining them you might also set the .name property to the @goto attribute. e.target as String will return undefined if you don't manually assign a name string. (A Sprite does not know the name of the instance variable that was used to store it). Haven't read all of your code but you might also consider trace(dict[e.target.no...@goto]); but you'll probably have to do some casting. -jonathan On Thu, Sep 3, 2009 at 1:19 PM, thomas hornertho...@megawattmedia.co.uk wrote: ok i'm creating a dictionary to store the values contained by some sprites that im using as button but i keep getting term undefined when i click on the item in the output. //create dictionary to store data public var dict:Dictionary = new Dictionary(); for (var Wi:int=0; Wi len; Wi++) { if (assetArray[Wi] is IBitmapSprite) { trace(assetArray[Wi]); var myBitmap=IBitmapSprite(assetArray[Wi]).container; IBitmapSprite(assetArray[Wi]).content.visible=true; //assign data to dictionary item dict[(assetArray[Wi]).no...@goto] myBitmap.visible=true; myBitmap.x=xPos; myBitmap.y=0; xPos=xPos+myBitmap.width+padding; myBitmap.alpha=1; trace(myBitmap.x); trace(myBitmap.width); // new stuff myBitmap.buttonMode=true; myBitmap.addEventListener(MouseEvent.CLICK, bitmapClick); scroller.holder.addChild(myBitmap); } function bitmapClick(e:Event) { trace(dict[e.target]); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] problem with dictonary on dynamic buttons
Most of those zoomers use preprocessed images. I.e. there are large and small versions already on the server. A more extreme example is Zoomer which during setup you run an app that cuts your image into bunches of squares and then during runtime web client load squares as needed. I would start with just large and small versions, use a mask on the large, figure out the ratio between the large and the small and position the large image in reverse proportion to the dragged hourglass frame times the ratio. -jonathan On Fri, Sep 4, 2009 at 9:43 AM, thomas hornertho...@megawattmedia.co.uk wrote: thanks i figured this out in the end my self. you dont happen to know anything about building a java style zoom viewer in as3; http://www.magictoolbox.com/magiczoom/ i assume you need to use bitmapdata -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of jonathan howe Sent: 04 September 2009 14:34 To: Flash Coders List Subject: Re: [Flashcoders] problem with dictonary on dynamic buttons Your dictionary is built off of that goto attribute but then you're passing in an instance of the object into the dictionary array. You have not assigned a name property to your assets. So when defining them you might also set the .name property to the @goto attribute. e.target as String will return undefined if you don't manually assign a name string. (A Sprite does not know the name of the instance variable that was used to store it). Haven't read all of your code but you might also consider trace(dict[e.target.no...@goto]); but you'll probably have to do some casting. -jonathan On Thu, Sep 3, 2009 at 1:19 PM, thomas hornertho...@megawattmedia.co.uk wrote: ok i'm creating a dictionary to store the values contained by some sprites that im using as button but i keep getting term undefined when i click on the item in the output. //create dictionary to store data public var dict:Dictionary = new Dictionary(); for (var Wi:int=0; Wi len; Wi++) { if (assetArray[Wi] is IBitmapSprite) { trace(assetArray[Wi]); var myBitmap=IBitmapSprite(assetArray[Wi]).container; IBitmapSprite(assetArray[Wi]).content.visible=true; //assign data to dictionary item dict[(assetArray[Wi]).no...@goto] myBitmap.visible=true; myBitmap.x=xPos; myBitmap.y=0; xPos=xPos+myBitmap.width+padding; myBitmap.alpha=1; trace(myBitmap.x); trace(myBitmap.width); // new stuff myBitmap.buttonMode=true; myBitmap.addEventListener(MouseEvent.CLICK, bitmapClick); scroller.holder.addChild(myBitmap); } function bitmapClick(e:Event) { trace(dict[e.target]); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem understanding Class heirarchy issue
Are you defining a subclass constructor and then failing to explicitly call the super() (superclass's constructor)? On Mon, Aug 31, 2009 at 8:37 AM, Sajid Saiyed sajid.fl...@gmail.com wrote: I am already importing all the classes in the package. Still cant seem to get my head around this. Maybe later today I will post excerpts of my classes here. That might help. Regards Sajid On Mon, Aug 31, 2009 at 6:14 PM, Corc...@chello.nl wrote: Not knowing what you are trying to do, you have to import ClassB to instantiate it in ClassA. HTH Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sajid Saiyed Sent: maandag 31 augustus 2009 12:06 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Problem understanding Class heirarchy issue Hi, I have following Class structure: ClassA extends ClassC ClassB extends ClassC ClassC extends ClassD ClassD extends MovieClip Now, If I instantiate ClassB from ClassA, the constructor does not execute. note: Inside ClassB, I am instantiating another ClassE which extends MovieClip Is there something I am doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] RE: Flash speech-to-text
Are you trying to do text-to-speech or speech-to-text? The latter is better searched for under 'voice recognition'. Seems like there are a bunch of results for the former: http://www.bing.com/search?q=flash+text-to-speechform=QBLHqs=n -jonathan On Tue, Aug 25, 2009 at 5:30 AM, juju jlee...@gmail.com wrote: HI All, I searched Google and the forums but could not find an answer, hope you actionscript sages can help. There's plenty of text to speech solutions, but how do you do Speech-to-text with Flash? Can you do speech-to-text with ribbit http://www.ribbit.com/? Thanks, juju ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Reach a single attribute value on a XML node withxpath AS3
I think Mark is looking for a way to invoke a function call with a string. The fastest is to use bracket notation: Assuming you have the function defined in the scope of this, you can invoke the function like this: this[on + event.target.name + anotherVariable](); I'm not sure I would use this technique/architecture myself. On Tue, Jun 30, 2009 at 6:17 AM, Karl DeSaulniers k...@designdrumm.comwrote: Are you using AS2 or AS3? I believe for as2 you would use: function onSaveFile() { //do something code here } then call on the function: Eg: saveFile_btn.onPress = function() { onSaveFile(); }; HTH Karl DeSaulniers Design Drumm http://designdrumm.com On Jun 30, 2009, at 5:04 AM, Mark Mulhollam wrote: Hi all, I want to run a function like onSaveFile() where I create onSaveFile from some variables ala: on + event.target.name + anotherVariable = onSaveFile I tried Function (on + event.target.name + anotherVariable )( ) but error says Function not supported to do that. The string creation works but how to execute that string as a function since eval has been removed from Flash? Mark ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] cms solution for flash sites?
Hi, Glen, That xml editor thing looks cool for a few applications that I have... but what I don't see is where it is available for download. Seems like he has just finished it and hasn't released it yet. Have you been using it? -jonathan On Mon, Jun 29, 2009 at 7:02 AM, Glen Pike g...@engineeredarts.co.ukwrote: It's not free, but probably the simplest / easiest to configure and timesaving when compared to a lot of software. http://www.flashxmleditor.com/demo/ There are tons of open source cms systems out there that you can plug flash into. Drupal supports a nice way of connecting from Flash sites into the CMS, but for some jobs this is a sledghammer vs nut problem. The system above is designed to work with Flash, does not seem to have much setting up / server side baggage and is streamlined enough for the customer to deal with (possibly :) ) HTH Glen jared stanley wrote: hey all, when building basic portfolio sites for clients(i.e. galleries containing image + text, showcasing photos, projects, etc) what is the best cms to use? Best meaning simple + free. Basically something enabling the client to add a new item in the gallery, change the order of the gallery, and possibly image upload but not even necessarily that. any suggestions? saw this one, http://www.codeandvisual.com/rainbow but haven't used it. wondering what other people use. I know joomla, drupal, etc are all popular cms's but don't know if you can use these for what i'm talking about above. 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 -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] What is the space relationship between a SWF and its surrounding html?
Hi, John, I think you would get a similar experience if you had an image of size 320 x 250, so it's not really a Flash problem per se but rather an HTML/browser co-compatibility. Basically, the browsers treat the window size property differently - I think IE includes the width of the scrollbars in calculations but not Firefox or vice versa or ... do some research from that angle and maybe you will find a solution to making the right size. Hopefully someone has made a little javascript calculator that keeps up to date with latest browser eccentricities. -jonathan On Sat, Jun 27, 2009 at 4:01 PM, John McCormack j...@easypeasy.co.ukwrote: Hi List, I have some SWFs that will be launched from someone else's GUI based on IE6 which uses exactly this code... In Multiplication.htm is a link... a href=javascript:void(0) onclick=window.open('Multiplication2.htm', 'welcome','width=335,height=265')strongobjects/strong/a The Multiplication2.htm that opens has... body object width=320 height=250 param name=movie value=flash/Multiplication2.swf embed src=flash/Multiplication2.swf width=320 height=250 /embed /object /body The opened SWFs all have a stage set to 320x250. The Multiplication2.swf has settings width=320 and height=250 The Multiplication.htm opens a window width=335 and height=265 On my Vista if I use IE8 or Firefox to open the html pages and click the link, they open up the SWFs at the correct size and the creator of the html reports that the SWFs run without scroll bars. When I run the GUI on my PC the SWFs all have scroll bars. I have the debug version of player 10. Would you expect the SWF to have any border or html to use any space in some circumstances that cause the desgin size to not be enough, and therfore create the scroll bars? There is some white space top and left of the SWFs. You advice would really be appreciated. Thank you. John ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] strange TypeError: Error #1034:
Hi, Preston, What does the AboutLandingButton class extend in the class definition? And what do you have set for the two values in Linkage in the library symbol? If all else fails, blame Nat Harris. -jonathan On Thu, Jun 25, 2009 at 2:08 PM, Preston Parris prestonpar...@gmail.comwrote: Hey all, I have three buttons set up that are tweening in on the timeline, they each are movieclips with the same associated class, two of the buttons work and have no problems, the other one give me: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::moviec...@3b70b431 to com.mellowmushroom.ui.about.AboutLandingButton. I have made sure that the instance names and movieclip are the same through out the animation, I even tried creating an entirely new clip and not animating at all, I still get the same thing. The other wierd thing is that the button still works even though it gives me an error, like the properties that are set in the AboutLandingButton class still apply and work for that button. This is driving me crazy, any help in the right direction would be very awesome. Thank you! -- Preston Parris ppar...@modevisual.com cell: 704.450.9299 www.modevisual.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] swf doesn't work
Michael, Sometimes things that appear to be player issues turn out to be loader issues. When you first publish for external people, it's often the first time you go over the web AND the first time you get configurations. Can you be sure the app handles the loading of those sprite assets properly, using Test Download and reviewing the code? -jonathan On Thu, Jun 11, 2009 at 10:03 AM, Mendelsohn, Michael michael.mendels...@fmglobal.com wrote: Hi list... [CS3, dev machine has FP10 installed] I have a swf rendering problem on the pc. Two people are viewing my swf with player 9,0,16,0. When the swf initializes, there are a series of animations that occur where sprites are faded in on the stage. These two people only see the last sprite fade in, without seeing all the other sprites accumulate on the stage. My gut tells me it's a player version issue somehow. I am not sure why they aren't seeing it correctly. I'm publishing for 9, but I'm not sure if it's publishing a 9 build higher than 9,0,16,0. I target 9,0,16 in the html. I'm really puzzled. Thanks for any advice, - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Flash CS4 very slow
Hmm. I don't know what you guys are talking about. I am also using a 2.2 ghz duo core laptop, and it's been plenty fast for me. Perhaps it helps that I have 4 GB of ram? Not sure. But I really enjoy the upgrade--things feel a lot more efficient and consistent. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: Wednesday, June 10, 2009 3:16 AM To: Flash Coders List Subject: Re: [Flashcoders] Flash CS4 very slow Guess the great Adobe resource hogging feature has been added, just like with PhotoShop. Anthony Pace wrote: CS4 is totally slow and on a 2.2 ghz duo core laptop; yet, mx was lightening fast on a 633 mhz system. What the hell happened to all the great coders at Macromedia? did they get lost in the acquisition? Alan Neilsen wrote: Does Flash CS4 run very slowly for everyone, or might there be something wrong with my installation? Just about anything I do takes ages to happen. For instance, if I open Properties to type in an Instance Name, when I click somewhere else after that it takes 4 or 5 seconds before I can do anything - it just locks up for those seconds. 4 or 5 seconds does not sound much, but when it happens again and again and again day after day it really slows my work down. Alan Neilsen This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or; lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. GOULBURN OVENS INSTITUTE OF TAFE and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of any such entity. # This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal # ___ 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 The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns?
Here is a sample of the XHTML from inside the copy div: div id=copy div id=body pDeepak Thadhani is the founder and President of Cram Crew. He has extensive experience and a real passion for education-based businesses. Deepak completed his undergraduate degrees in Mathematics and Biology, with a minor in Chemistry at the University of Houston. He did follow-up work at Ben Taub Hospital and while there, completed the MCAT with the intentions of a career in medicine. He decided that medicine was not his real passion and returned to the University of Houston. He received his MBA in Marketing along with a certificate of entrepreneurship at the Center for Entrepreneurship in the Bauer School of Business. This broad educational background turned out to be the perfect combination for an education-based business.br /br /Deepak began more than 14 years ago under the name 'Academic Solutions Group.' He changed the name to Cram Crew in 2005 to better align the brand with his market.br /br /Prior to Cram Crew, Deepak marked success by creating other service-based businesses. He has always harbored a love for tutoring, having provided academic services in the midst of his own educational experience and business ventures.br /br /With his extensive educational experience, Deepak possesses a unique combination of educational exposure, teaching acumen, and a genuine interest in the achievement of every student. Together these three elements not only give an edge over the competition but also provide the solid foundation on which Cram Crew is built. By combining professionalism and vision with a focus on trusted relationships with customers and partners, he has achieved success in building and growing Cram Crew, Inc./p /div /div Basically, all I want is this (which sounds simpler than it is, I suppose!): Two columns of text with basic HTML formatting (as discussed earlier, which I mostly figured out), from an SEO-friendly XHTML file. I wouldn't mind manually setting up separate span tags, but when I played with that method I was even more confused. I guess what really confused me was this portion that I borrowed from the code you showed as an example: var label:TextLabel = new TextLabel(); label.htmlText = xml.toString(); columns.addChild(label); } columns.y = 95; The first thing that confuses me with that method is that TextLabel doesn't seem to be supported. Is that your own function? That might be why. The second thing that confused me is what columns must refer to. Is that the instance name of the MC, or would the instance name have to be label? I was researching on google what the structure of x.addChild(x) means, and I get the second part, but the first part, where columns goes, is throwing me through a loop. In any case, you don't have to waste your time teaching me AS if this is more complicated than necessary; again, all I want is two columns fed from the XHTML file with some basic HTML properties. Whatever method you think would be easiest/best, I'm all ears. Thanks! Best, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Tuesday, May 26, 2009 6:17 PM To: Flash Coders List Subject: Re: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns? Could you show some sample of the XHTML you are reading in? Specifically, what does body.p trace out? On May 26, 2009, at 4:00 PM, Jonathan Wing wrote: Using Gaia, I am trying to load content within flash from an XHTML file, and have the text flow from a p into two columns. This is what I have so far (AS3): In the .fla file, I have two columns set as dynamic text, with the instance names column1 and column2, respectively. In the corresponding .as file, here is my code, including only the relevant portions: package pages { import flash.display.*; import flash.events.*; import flash.text.*; import flash.external.*; import flash.xml.*; public class AboutPage extends AbstractPage { public var column1:TextField; public var column2:TextField; public function AboutPage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; var i:int = 1; column1.htmlText = body.p; addChild(column1); if (body.length() 13) { column2.htmlText = column1
RE: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns?
Oh, sorry, and body.p traces out: pDeepak Thadhani is the founder and President of Cram Crew. He has extensive experience and a real passion for education-based businesses. Deepak completed his undergraduate degrees in Mathematics and Biology, with a minor in Chemistry at the University of Houston. He did follow-up work at Ben Taub Hospital and while there, completed the MCAT with the intentions of a career in medicine. He decided that medicine was not his real passion and returned to the University of Houston. He received his MBA in Marketing along with a certificate of entrepreneurship at the Center for Entrepreneurship in the Bauer School of Business. This broad educational background turned out to be the perfect combination for an education-based business.br/br/Deepak began more than 14 years ago under the name 'Academic Solutions Group.' He changed the name to Cram Crew in 2005 to better align the brand with his market.br/br/Prior to Cram Crew, Deepak marked success by creating other service-based businesses. He has always harbored a love for tutoring, having provided academic services in the midst of his own educational experience and business ventures.br/br/With his extensive educational experience, Deepak possesses a unique combination of educational exposure, teaching acumen, and a genuine interest in the achievement of every student. Together these three elements not only give an edge over the competition but also provide the solid foundation on which Cram Crew is built. By combining professionalism and vision with a focus on trusted relationships with customers and partners, he has achieved success in building and growing Cram Crew, Inc./p Just as it is in the XHTML file... Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Tuesday, May 26, 2009 6:17 PM To: Flash Coders List Subject: Re: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns? Could you show some sample of the XHTML you are reading in? Specifically, what does body.p trace out? On May 26, 2009, at 4:00 PM, Jonathan Wing wrote: Using Gaia, I am trying to load content within flash from an XHTML file, and have the text flow from a p into two columns. This is what I have so far (AS3): In the .fla file, I have two columns set as dynamic text, with the instance names column1 and column2, respectively. In the corresponding .as file, here is my code, including only the relevant portions: package pages { import flash.display.*; import flash.events.*; import flash.text.*; import flash.external.*; import flash.xml.*; public class AboutPage extends AbstractPage { public var column1:TextField; public var column2:TextField; public function AboutPage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; var i:int = 1; column1.htmlText = body.p; addChild(column1); if (body.length() 13) { column2.htmlText = column1.htmlText; for(i=0; icolumn1.bottomScrollV; i++) { column2.htmlText += br /; } column2.scrollV = column1.bottomScrollV + 1; addChild(column2); } TweenLite.to(this, 0.1, {alpha:1, onComplete:transitionInComplete}); } So far, the text is indeed loading fine into column1, but then that's it. The remainder of the content disappears, and does not load into column2. I took some of Steven's suggestions and looked around Google, but I still cannot get it to work. Does anyone else have any advice? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified
RE: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns?
By the way, if anyone is curious, there is a half-solution here: http://danielmclaren.net/2008/03/multi-column-layouts-in-flash-and-flex It works for me, but only with .text, not .htmlText, which I definitely need. The developer of this method says he still can't figure out how to get it to work with html. Perhaps someone out there might have a clue? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Tuesday, May 26, 2009 6:17 PM To: Flash Coders List Subject: Re: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns? Could you show some sample of the XHTML you are reading in? Specifically, what does body.p trace out? On May 26, 2009, at 4:00 PM, Jonathan Wing wrote: Using Gaia, I am trying to load content within flash from an XHTML file, and have the text flow from a p into two columns. This is what I have so far (AS3): In the .fla file, I have two columns set as dynamic text, with the instance names column1 and column2, respectively. In the corresponding .as file, here is my code, including only the relevant portions: package pages { import flash.display.*; import flash.events.*; import flash.text.*; import flash.external.*; import flash.xml.*; public class AboutPage extends AbstractPage { public var column1:TextField; public var column2:TextField; public function AboutPage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; var i:int = 1; column1.htmlText = body.p; addChild(column1); if (body.length() 13) { column2.htmlText = column1.htmlText; for(i=0; icolumn1.bottomScrollV; i++) { column2.htmlText += br /; } column2.scrollV = column1.bottomScrollV + 1; addChild(column2); } TweenLite.to(this, 0.1, {alpha:1, onComplete:transitionInComplete}); } So far, the text is indeed loading fine into column1, but then that's it. The remainder of the content disappears, and does not load into column2. I took some of Steven's suggestions and looked around Google, but I still cannot get it to work. Does anyone else have any advice? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ 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 The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views
[Flashcoders] How do I flow text from an XML/XHTML file into two columns?
Using Gaia, I am trying to load content within flash from an XHTML file, and have the text flow from a p into two columns. This is what I have so far (AS3): In the .fla file, I have two columns set as dynamic text, with the instance names column1 and column2, respectively. In the corresponding .as file, here is my code, including only the relevant portions: package pages { import flash.display.*; import flash.events.*; import flash.text.*; import flash.external.*; import flash.xml.*; public class AboutPage extends AbstractPage { public var column1:TextField; public var column2:TextField; public function AboutPage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; var i:int = 1; column1.htmlText = body.p; addChild(column1); if (body.length() 13) { column2.htmlText = column1.htmlText; for(i=0; icolumn1.bottomScrollV; i++) { column2.htmlText += br /; } column2.scrollV = column1.bottomScrollV + 1; addChild(column2); } TweenLite.to(this, 0.1, {alpha:1, onComplete:transitionInComplete}); } So far, the text is indeed loading fine into column1, but then that's it. The remainder of the content disappears, and does not load into column2. I took some of Steven's suggestions and looked around Google, but I still cannot get it to work. Does anyone else have any advice? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] stop() not working
Any chance that you are actually putting the code on the symbol definition instead of a frame on the main timeline, thereby creating User within User within ... ? You'd probably get a recursion crash, but it's possible. I would at this point try to isolate the problem a little more. If you think it's the loader, what happens when you comment out the loader? What about if user is an empty class? -jonathan 2009/5/24 Alexander Farber alexander.far...@gmail.com Hello, if I create a new Flash file (AS3), press F9 and enter stop(); trace(-); then it will print that line just once as expected. But if I enter: stop(); trace(-); var user:User = new User(); addChild(user); user.x = user.y = 200; user.userid = 53; user.username = 'Алекс'; user.trix = 4; user.bid = 117; user.scaleX = user.scaleY = 0.8; user.avatar = '2_1211369175.jpg'; user.avatar = '458_1211369175.jpg'; Then I will see - being printed again and again. I wonder what's happening here. My class User uses a Loader and is listed at http://pastebin.com/m60cbb775 Thank you for any hints Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Well, I have actually searched over and over and I have read and re-read Steven's article as well, but I can't seem to get it just right. I think the problem is, Steven's article is written to an audience of more experienced AS coders (at least it seems so), and I'm pretty new to AS, so I don't get the context. The article does not state exactly *where* to put such code in my files, just that I need to do it. So I took some guesses and tried multiple ways, yet still to no avail. Yet I didn't want to bother him, as I've already asked him so many noob questions! Mostly what I'm concerned about are parsing the h1 and a tags. Do you have any suggestions as to how and where I can implement Steven's points in his article? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: Thursday, May 21, 2009 3:21 AM To: Flash Coders List Subject: Re: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Hi, This article written by Steven looks just like what you are looking for... http://www.stevensacks.net/2008/07/02/parsing-xhtml-with-e4x-in-as3/ To keep your formatting, you can use css - the TextField in Flash supports a subset of css that allows you to apply bold, colours and link formatting... Not sure if you are searching for EX4 or E4X! HTH Glen Jonathan Wing wrote: Hi, I'm new to this group, so forgive me if I'm going about asking this the wrong way. Is there a practical way to search old questions? Anyway, I'm using the Gaia Framework and I'm trying to parse basic tags such as h1 and a in flash via an XHTML file. Steven over at the Gaia forum suggests I make use of EX4, but I've spent two days searching google and reading up on it and I'm honestly confused where to start. To show you what I mean, view the source on this page Steven created: http://stevensacks.net/clients/hello/press.html#/agency/press Note how those columns are set using HTML tags, and pulled into flash from that XHTML file. How do I maintain the formatting such as bold and also the links, just the way he has done (strictly in terms of functionality)? Thank you! Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ 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 The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Well, I think I know how to import XML. var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, getXML); loader.load(new URLRequest(http://xmlfeedURL;)); function getXML(event:Event):void { var xmlData:XML = new XML(event.target.data); trace(xmlData); } At least, that is the code I picked up while doing research, though I'm not entirely sure how to use any of that to apply to what I'm doing in the Gaia Framework. This is what I have now, minus the irrelevant code: package pages { import flash.xml.*; import flash.text.TextField; XML.ignoreWhitespace = false; XML.prettyPrinting = false; public class HomePage extends AbstractPage { public var dynamic_text:TextField; override public function transitionIn():void { super.transitionIn(); TweenLite.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); dynamic_text.text = this.copy.intro; } [there's a lot more code, but I'm only focusing on the relevant parts from the XHTML page] } } So what it does is pull info from this content in my XHTML page: div id=copy p id=introLorem ipsum/p /div And places that Lorem ipsum in my corresponding MC with an instance name of dynamic_text. But then, if I want to do something like: div id=copy p id=introh1Lorem ipsum/h1 a href=page.swfClick here/a to learn more. /p/div It will not parse the HTML tags; it will treat them like a regular string of text, even though my text box has render text as HTML selected. Now, Steven's suggestions in his article seem helpful, but since I am pretty new to this sort of code, I am still unsure as to where things should go, and how to make it work for h1 and a tags. I'm not planning to use many other tags, as I am trying to keep things simple. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason Sent: Thursday, May 21, 2009 10:13 AM To: Flash Coders List Subject: RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file? If it's truly XHTML, you can in theory parse it as XML - but if it's not, meaning they mixed case and didn't close tags, then you're out of luck. First things first, do you know how to load in XML? Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jonathan Wing Sent: Thursday, May 21, 2009 11:08 AM To: Flash Coders List Subject: RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Well, I have actually searched over and over and I have read and re-read Steven's article as well, but I can't seem to get it just right. I think the problem is, Steven's article is written to an audience of more experienced AS coders (at least it seems so), and I'm pretty new to AS, so I don't get the context. The article does not state exactly *where* to put such code in my files, just that I need to do it. So I took some guesses and tried multiple ways, yet still to no avail. Yet I didn't want to bother him, as I've already asked him so many noob questions! Mostly what I'm concerned about are parsing the h1 and a tags. Do you have any suggestions as to how and where I can implement Steven's points in his article? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: Thursday, May 21, 2009 3:21 AM To: Flash Coders List Subject: Re: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Hi, This article written by Steven looks just like what you are looking for... http://www.stevensacks.net/2008/07/02/parsing-xhtml-with-e4x-in-as3/ To keep your formatting, you can use css - the TextField in Flash supports a subset of css that allows you to apply bold, colours and link formatting... Not sure if you are searching for EX4 or E4X! HTH Glen Jonathan Wing wrote: Hi, I'm new to this group, so forgive me if I'm going about asking this the wrong way. Is there a practical way to search old questions? Anyway, I'm using the Gaia
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Jason, The funny thing is, Steven said that my question was a bit off-topic for the Gaia forum, and recommended I try this place. ;) I know it's possible as I've seen it done, for example, on Steven's page here: http://stevensacks.net/clients/hello/press.html#/agency/press (if you look at the code, it's pretty straightforward HTML tags, without CDATA around them) And also: http://flashden.net/item/elite-html-content-page-with-scroller/full_scre en_preview/27908 (but that is using AS2, and I'm coding the site in AS3). If I may explain, basically all I'm trying to do is create SEO-friendly XHTML pages on which the written content for each page is stored and that is where I will pull the content from. On occasion, I will need to provide links to other pages. If anyone knows of a better way of doing this, I'm all ears! Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason Sent: Thursday, May 21, 2009 12:29 PM To: Flash Coders List Subject: RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Well, part of your question is a Gaia framework question which is off-topic for this forum. I don't know much about that framework other than it's purpose and creator. As for your question about the tags parsing: It will not parse the HTML tags; it will treat them like a regular string of text, even though my text box has render text as HTML selected. Two issues: 1) Flash only has a limited set of tags it supports in HTML for text. Tags like div and h1 I don't believe are one of them. You could read the XHTML in as a string (not XML right away) and use a Regular Expression to remove those tags from the text and insert something else if you like, however: 2) The entire XHTML should be treated as XML, so that means tags like p will be treated as an XML node, not a new HTML text paragraph. So you may have to use some Regular Expressions to at least add a ![CDATA[ before and ]] to wrap around the text you want to read in the HTML so it escapes the characters. THEN convert the string to XML once it's clean. In short, what you're asking to do is pretty challenging. Flash isn't really set up to read and render HTML pages. It's mean to take the place of them. :) Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jonathan Wing Sent: Thursday, May 21, 2009 1:14 PM To: Flash Coders List Subject: RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Well, I think I know how to import XML. var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, getXML); loader.load(new URLRequest(http://xmlfeedURL;)); function getXML(event:Event):void { var xmlData:XML = new XML(event.target.data); trace(xmlData); } At least, that is the code I picked up while doing research, though I'm not entirely sure how to use any of that to apply to what I'm doing in the Gaia Framework. This is what I have now, minus the irrelevant code: package pages { import flash.xml.*; import flash.text.TextField; XML.ignoreWhitespace = false; XML.prettyPrinting = false; public class HomePage extends AbstractPage { public var dynamic_text:TextField; override public function transitionIn():void { super.transitionIn(); TweenLite.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); dynamic_text.text = this.copy.intro; } [there's a lot more code, but I'm only focusing on the relevant parts from the XHTML page] } } So what it does is pull info from this content in my XHTML page: div id=copy p id=introLorem ipsum/p /div And places that Lorem ipsum in my corresponding MC with an instance name of dynamic_text. But then, if I want to do something like: div id=copy p id=introh1Lorem ipsum/h1 a href=page.swfClick here/a to learn more. /p/div It will not parse the HTML tags; it will treat them like a regular string of text, even though my text box has render text as HTML selected. Now, Steven's suggestions in his article seem helpful, but since I am pretty new to this sort of code, I am still unsure as to where things should go, and how to make it work for h1 and a tags. I'm not planning to use many other tags
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Thanks Steven! That clears a few things up, and like you suggest, I will experiment with it until I get it just right. The only reason I've been so anxious is that I'm working on a deadline; so, for the time being, may I simply ask you this? What is the best (and most SEO-friendly) way of presenting links within the copy content? Should I be doing this within the XHTML using a tags to other swf files, or is there a better method? I guess that is the only thing I'm getting hung up on, as my pages will occasionally have links within the body paragraphs. Okay, so I figured out one thing that helps, which is to set my text fields to htmlText (it was only text before). That helps a lot, and it appears that the links are showing up and they function--sorta. They actually want to open a new page, even if a swf, and even if the target is set to _self. Really, all I want to do (on my deadline) is have links from one swf to another in the website, but have it all be SEO-friendly. Should be pretty simple, right? I bet I'm making it more complicated for myself than it probably needs to be. ;) My I present my own guess, and you could tell me if I'm wrong? I'm guessing it has something to do with the following, which I found in the Gaia demo site (I'm pasting only what I assume is the relevant code): public var textContent:TextField; var myStyleSheet = new StyleSheet as StyleSheet; var myURL:String; var mySection:XMLList; myURL = Gaia.api.getCurrentBranch(); myStyleSheet = IStyleSheet(Gaia.api.getPage(index).assets.xmlCss).style; textContent.styleSheet = myStyleSheet for each ( var u:XML in mySection) { if (myURL == u...@url) { textContent.htmlText = u.copy; } Could I use this in tandem with my Gaia-produced XHTML pages? I do not see where the actual copy node is included in the instance from the demo site's XML, but only the url part. How is the rest of the text being included? Sorry to be impatient! I just did not expect this specific aspect of development to feel like starting from scratch! Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Thursday, May 21, 2009 1:43 PM To: Flash Coders List Subject: Re: [Flashcoders] Parsing HTML tags within flash from an XHTML file? http://www.gaiaflashframework.com/index.php/topic,1847.msg7817.html#msg7 817 Just so everyone is familiar with the context here, the above is the thread on the forum about this. The question is about how to use E4X to parse XHTML. I provide a code example of how easy it is to do this, but Jonathan's question is more of a general one about how to use E4X to parse nodes. Flash doesn't support div in its htmlText, so that's why you use E4X to grab the node content like var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; I believe the challenge for Jonathan is what the above lines of code mean and how they work. value is the XHTML. value.div returns an XMLList of all div nodes on the first level within the XHTML. value.div.(@id == body) means give me an XMLList of the div nodes that have an attribute id=body. valid.div.(@id == body)[0] means give me the first XML node in that XMLList. This is how E4X works. A lesson on E4X is out of scope of my forum. However, there are lots of resources out there for E4X in AS3. I highly recommend Colin Moock's Essential Actionscript 3.0 book, which is how I learned it. That and the internet. And Jason, you do not need to complicate things with RegEx. E4X does enough. XHTML is technically XML and can be parsed the same using E4X. Also, while Flash doesn't SEEM to support newer HTML tags like strong and em for b and i, it actually DOES if you write css to do it. strong { font-family: FFScala-Bold; display: inline; } em { font-family: FFScala-Italic; display: inline; } In this case, I am using a bold and italic font to show them, and by defining the node types in css (and setting them to display: inline), it works like a champ! Here's a detailed code sample: http://www.gaiaflashframework.com/wiki/index.php?title=Runtime_Font_Load ing#StyleSheet_Example Now, I can keep my valid XHTML and use it directly in Flash. It's really straightforward. The challenge is learning how to parse the nodes using E4X, which, once you get your head around it (and it took me a lot of experimenting to learn how awesome and powerful E4X is and how to leverage it), you can do stuff like this easily. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com
[Flashcoders] Problem with footer fixed to bottom of page
This is probably a silly question, but I've searched google and can't seem to find the right answer, which is strange as this is seems to be a common thing on pages. Basically, I have a footer that is fixed to the bottom of a page and for the width of a page, so that no matter what size a user sets a window for, it will always fix to the bottom. This is what I have so far (using AS3): In my .fla, I have a long gray bar with the instance name footer. Then, over in my .as file, I have the following: import flash.display.*; footer.y = stage.stageHeight - footer.height; stage.addEventListener(Event.RESIZE, resizeHandler); public function resizeHandler(e:Event):void { footer.y = stage.stageHeight - footer.height; footer.width = stage.stageWidth; } All of this works without a hitch. However, my problem arises when I want to add text. If I add text in its own mc, then it won't adjust with the page. If I add text inside the footer mc, it will stretch with the width of the page when I resize. So then I thought maybe I could make them two mc's embedded in one main mc, and only define the width for the bar. That is, something like: footer.y = stage.stageHeight - footer.height; footer_bar.width = stage.stageWidth; With footer as the main mc, and footer_bar as the long gray bar embedded inside. However, this results in a mess of errors. Any ideas? This seems so common, I'm surprised I can't find anything via Google. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Problem with footer fixed to bottom of page
Thanks Pinatti! That was the problem exactly--nesting not properly defined. Works great now. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Fabio Pinatti Sent: Thursday, May 21, 2009 2:53 PM To: Flash Coders List Subject: Re: [Flashcoders] Problem with footer fixed to bottom of page I suppose it should be: footer.y = stage.stageHeight - footer.height; footer[footer_bar].width = stage.stageWidth; since footer_bar is nested into footer. Kind Regards, Pinatti On Thu, May 21, 2009 at 4:41 PM, Jonathan Wing jw...@cramcrew.com wrote: This is probably a silly question, but I've searched google and can't seem to find the right answer, which is strange as this is seems to be a common thing on pages. Basically, I have a footer that is fixed to the bottom of a page and for the width of a page, so that no matter what size a user sets a window for, it will always fix to the bottom. This is what I have so far (using AS3): In my .fla, I have a long gray bar with the instance name footer. Then, over in my .as file, I have the following: import flash.display.*; footer.y = stage.stageHeight - footer.height; stage.addEventListener(Event.RESIZE, resizeHandler); public function resizeHandler(e:Event):void { footer.y = stage.stageHeight - footer.height; footer.width = stage.stageWidth; } All of this works without a hitch. However, my problem arises when I want to add text. If I add text in its own mc, then it won't adjust with the page. If I add text inside the footer mc, it will stretch with the width of the page when I resize. So then I thought maybe I could make them two mc's embedded in one main mc, and only define the width for the bar. That is, something like: footer.y = stage.stageHeight - footer.height; footer_bar.width = stage.stageWidth; With footer as the main mc, and footer_bar as the long gray bar embedded inside. However, this results in a mess of errors. Any ideas? This seems so common, I'm surprised I can't find anything via Google. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Fabio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Steven, It does make sense for the most part, except that I'm not sure if I'm placing it in the right place. I have it in my HomePage.as file (just using this page as an example, as I assumed that was what you might have meant when you said parsing code), and I guess I need to define a or put it in the right place? Because right now, it gives me an error #1120: Access of undefined property a. This is how I put it in my code (minus some of the extra stuff): public class HomePage extends AbstractPage { public var dynamic_text:TextField; public function HomePage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); TweenLite.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); var href:String = a...@href; href = href.substr(0, href.length - 4); var internalTitle:String = href.toUpperCase(); Gaia.api.goto(Pages[internalTitle]); dynamic_text.htmlText = this.copy.intro; } } Sorry to paste it directly into my code like that; it's just that I can only guess where it might go... Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Thursday, May 21, 2009 2:57 PM To: Flash Coders List Subject: Re: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Do you mean you want to have links in your a tags that call Gaia.api.goto()? You can do that, but obviously, those links wouldn't work in the XHTML. After thinking about it a bit, I think what might work is this a href=contact.htmlGo to contact page/a With that being the link to the SEO XHTML page that is generated for that page. In your parsing code, you would change the href to call an actionscript method that would take page.html and convert it to var href:String = a...@href; href = href.substr(0, href.length - 4); var internalTitle:String = href.toUpperCase(); Gaia.api.goto(Pages[internalTitle]); That is just an example, but basically you're converting contact.html to CONTACT and, there should be a public static const in Pages called CONTACT which has the branch for that title. Does this make sense? (this part of the question is definitely appropriate for the Gaia forum, too) On May 21, 2009, at 12:29 PM, Jonathan Wing wrote: Thanks Steven! That clears a few things up, and like you suggest, I will experiment with it until I get it just right. The only reason I've been so anxious is that I'm working on a deadline; so, for the time being, may I simply ask you this? What is the best (and most SEO-friendly) way of presenting links within the copy content? Should I be doing this within the XHTML using a tags to other swf files, or is there a better method? I guess that is the only thing I'm getting hung up on, as my pages will occasionally have links within the body paragraphs. Okay, so I figured out one thing that helps, which is to set my text fields to htmlText (it was only text before). That helps a lot, and it appears that the links are showing up and they function--sorta. They actually want to open a new page, even if a swf, and even if the target is set to _self. Really, all I want to do (on my deadline) is have links from one swf to another in the website, but have it all be SEO-friendly. Should be pretty simple, right? I bet I'm making it more complicated for myself than it probably needs to be. ;) My I present my own guess, and you could tell me if I'm wrong? I'm guessing it has something to do with the following, which I found in the Gaia demo site (I'm pasting only what I assume is the relevant code): public var textContent:TextField; var myStyleSheet = new StyleSheet as StyleSheet; var myURL:String; var mySection:XMLList; myURL = Gaia.api.getCurrentBranch(); myStyleSheet = IStyleSheet(Gaia.api.getPage(index).assets.xmlCss).style; textContent.styleSheet = myStyleSheet for each ( var u:XML in mySection) { if (myURL == u...@url) { textContent.htmlText = u.copy; } Could I use this in tandem with my Gaia-produced XHTML pages? I do not see where the actual copy node is included in the instance from the demo site's XML, but only the url part. How is the rest of the text being included? Sorry to be impatient! I just
[Flashcoders] Parsing HTML tags within flash from an XHTML file?
Hi, I'm new to this group, so forgive me if I'm going about asking this the wrong way. Is there a practical way to search old questions? Anyway, I'm using the Gaia Framework and I'm trying to parse basic tags such as h1 and a in flash via an XHTML file. Steven over at the Gaia forum suggests I make use of EX4, but I've spent two days searching google and reading up on it and I'm honestly confused where to start. To show you what I mean, view the source on this page Steven created: http://stevensacks.net/clients/hello/press.html#/agency/press Note how those columns are set using HTML tags, and pulled into flash from that XHTML file. How do I maintain the formatting such as bold and also the links, just the way he has done (strictly in terms of functionality)? Thank you! Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Feasibility of xml file for high score data storage
they will deal with problems like concurrent connections for you :) Glen Paul Steven wrote: I was considering using an xml file to store high score data for a game. It is quite possible that this game will have a significant amount of traffic (certainly in the first few days after launch) and I am now wondering if an xml file would be suitable. I am not sure what happens in the scenario where multiple players want to update the highscore at the same time - they will all need to write to the file. I assume this is the same scenario with a database but think perhaps updating a database is more efficient. Anyone care to offer any insight into whether an xml file would be suitable or not? Thanks Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Smart Preloading
Does it have to be in the Library? Seems like you would have to externalize it to get any control over when it was loaded anyway. On Thu, Apr 16, 2009 at 9:55 AM, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: in as3, i'd recommend looking up the Loader class in the helpfiles :) On Thu, Apr 16, 2009 at 2:48 PM, Dennis - I Sioux den...@isioux.nl wrote: Hey, Tried to use a UILoader to check the bytes loaded of a single movieclip(in the library).. but this isn't working. Has anyone got a suggestion to check the loaded bytes of an mc? Thought the LoaderInfo only reffers to the mc's owner. Goal is to preload each game level seperately when it is needed.(if it hasn't loaded while playing the previous level yet). With kind regards, Dennis Isioux ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Smart Preloading
Actually, there is a crude way to do it which is uncheck the export on first frame and then place each level on a subsequent keyframe in the main timeline (frames you'll never actually reach during playback). Flash will load the keyframes in order so essentially, it will do what you're seeking to do. On Thu, Apr 16, 2009 at 10:08 AM, jonathan howe jonathangh...@gmail.comwrote: Does it have to be in the Library? Seems like you would have to externalize it to get any control over when it was loaded anyway. On Thu, Apr 16, 2009 at 9:55 AM, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: in as3, i'd recommend looking up the Loader class in the helpfiles :) On Thu, Apr 16, 2009 at 2:48 PM, Dennis - I Sioux den...@isioux.nl wrote: Hey, Tried to use a UILoader to check the bytes loaded of a single movieclip(in the library).. but this isn't working. Has anyone got a suggestion to check the loaded bytes of an mc? Thought the LoaderInfo only reffers to the mc's owner. Goal is to preload each game level seperately when it is needed.(if it hasn't loaded while playing the previous level yet). With kind regards, Dennis Isioux ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Nintedo experiencewii ( how did they do that ? )
Stephen, I think the answer is one word: Money. My theory is that the whole page is paid advertising. On Tue, Apr 14, 2009 at 1:03 PM, Stephen Matthews st...@gingerman.co.ukwrote: Hi, I know that the whole YouTube area is a Flash movie, but... does anyone have any idea how they got to embed this Flash movie onto the YouTube site? http://www.youtube.com/experiencewii ( I see the Flash movie is served from the facebook.com server - even weirder ). Regards - and thanks Steve ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] multiple masked mcs
Hi, Fabio, I believe it is only possible to mask with a single clip at any one time using the DisplayObject.mask property (note that this accepts only type DisplayObject and therefore does not accept Arrays, etc.). There is nothing stopping you from making a composite sprite that contains all the clips you want to make be a mask, though... except if you have other dependencies on the visual tree not changing. public function set mask(value:DisplayObjecthttp://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObject.html ):voidhttp://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/specialTypes.html#void -jonathan On Sun, Apr 12, 2009 at 8:52 AM, Fabio Pinatti fpina...@gmail.com wrote: Hello list, straight and forward, sorry if the question is stupid: In flash timeline, I can mask any elements as I wish, with just a single mask. isn't it possible with actionscript? I know, I can add everything to a holder movieclip and mask it, but there's nothing like setup a mask property to several movieclips, right? Thanks! -- Fabio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] multiple masked mcs
Ok, I read the request backwards. Any DisplayObject can have 0 or 1 mask Any DisplayObject can be a mask for 0 to n other display objects. -jonathan On Sun, Apr 12, 2009 at 11:38 AM, Cor c...@chello.nl wrote: No, you can use the same mask on multiple objects var sqr:SquareMC = new SquareMC(); var sqr2:SquareMC = new SquareMC(); var msk:MaskerMC = new MaskerMC(); sqr.mask = msk; sqr2.mask = msk; -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of jonathan howe Sent: zondag 12 april 2009 17:32 To: Flash Coders List Subject: Re: [Flashcoders] multiple masked mcs Hi, Fabio, I believe it is only possible to mask with a single clip at any one time using the DisplayObject.mask property (note that this accepts only type DisplayObject and therefore does not accept Arrays, etc.). There is nothing stopping you from making a composite sprite that contains all the clips you want to make be a mask, though... except if you have other dependencies on the visual tree not changing. public function set mask(value:DisplayObject http://livedocs.adobe.com/flash/9.0/ActionScriptLan gRefV3/flash/display/DisplayObject.html ):void http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/specialType s.html#void -jonathan On Sun, Apr 12, 2009 at 8:52 AM, Fabio Pinatti fpina...@gmail.com wrote: Hello list, straight and forward, sorry if the question is stupid: In flash timeline, I can mask any elements as I wish, with just a single mask. isn't it possible with actionscript? I know, I can add everything to a holder movieclip and mask it, but there's nothing like setup a mask property to several movieclips, right? Thanks! -- Fabio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.287 / Virus Database: 270.11.53/2054 - Release Date: 04/11/09 10:51:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Creating Dynamic addEventListeners with AS3
Whatever the parent of the State_XX buttons are, you can refer to them as named children of that parent. So, if it's the current class use the this keyword: this[State_ + rs[i]].addEventListener(etc...); If it's another clip, etc, just refer to it by name: someClipThatHasTheStateButtons[State_ + rs[i]].addEventListener(etc...); Make sure you've named the instances via the IDE Instance name property or have explicitly set the name property of the Buttons. -jonathan On Sun, Apr 5, 2009 at 8:33 PM, Graham Pearson gpear...@yourcfpro.comwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On my flash stage I have 50 buttons all named with the convention of State_IN, State_MI, State_WI, etc. At the present time I have 50 lines like the one line below of: State_IN.addEventListener(MouseEvent.CLICK, StateButtonClicked); What I am trying to do is when I retrieve the recordset back from the coldfusion component is to loop through the results like function GetClientsWithinCategory_Result(rs.Object) { for (var i:int = 0; i rs.length; i++) { State_rs[i].addEventListener(MouseEvent.CLICK, StateButtonClicked); // The Value of rs[i] will return the 2 letter abriviation of the State eg: IN, WI, etc } } How do I go about combining State_ + the result from rs[i] so that when a user clicks on Indiana it will run the actionscript within the State Button Clicked Function -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.8 (MingW32) Comment: GnuPT 2.6.2.1 by EQUIPMENTE.DE http://equipmente.de/ Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJ2U323GqPAgBSy90RAkayAJ95GlmD+MktDr++9Snhl5iSjk9fvACglA8m MwJ4iFh/Q6BivYcmxHfPyIw= =r37m -END PGP SIGNATURE- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Bitwise selection
Jiri, I think Hans's advice will get you what you want. case RESTRICTION1 : tRestrict +=\u0020-\u007E; trace('all'); break; case RESTRICTION2: tRestrict = 0-9; trace('num'); break; case RESTRICTION4: tRestrict = A-Z a-z; trace('char'); break; I think there might be communication confusion. On Thu, Apr 2, 2009 at 7:44 AM, Jiri jiriheitla...@googlemail.com wrote: Thanks Hans, I am aware of that, so if-else would be the only way to go I guess. Jiri Hans Wichman wrote: Hi, isn't the absence of break statements messing things up? greetz JC On Thu, Apr 2, 2009 at 12:08 PM, Jiri jiriheitla...@googlemail.com wrote: I am new to bitwise operators, so I am trying to learn it. I have the following code and it works half. I am using a switch case to get the result, but this is messing things up. I could revert to and if - else statement, but I was wondering if there is a more elagant way of doing it. I post my code below, and would have some advice. var NO_RESTRICTION:int = 1; var NUM_ONLY:int = 2; var CHAR_ONLY:int = 4; var RESTRICTION:int = NUM_ONLY ; function setInputCharRestriction(tInt:int):void { RESTRICTION = tInt | tInt2 | tInt3; } function getRestrict():String{ var tRestrict:String = ''; trace('all ' , Boolean(RESTRICTION1)) trace('num ' , Boolean(RESTRICTION2)) trace('char ' ,Boolean(RESTRICTION4)) switch(RESTRICTION){ case RESTRICTION1 : tRestrict +=\u0020-\u007E; trace('all') case RESTRICTION2: tRestrict = 0-9; trace('num') case RESTRICTION4: tRestrict = A-Z a-z; trace('char') } trace('restrict field ' , tRestrict) return tRestrict; } getRestrict() Thank you. Jiri ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] as3 rollover rolloff issue..
Preston, There are two possible issues: 1. The scaled image is overlapping other scaled images and messing up your chain of events fired 2. The tween method you are using to scale is not being properly terminated and restarted/triggered. (How are you scaling the images?) I would start by putting a trace action on both my event handlers for each image (maybe tracing image name/id # for clarity) and seeing what the output is: if everything happens in the expected order then I would look towards blaming #2. -jonathan On Thu, Apr 2, 2009 at 10:24 AM, Preston Parris prestonpar...@gmail.comwrote: So basically I have a bunch of thumbnail images set up in a grid form, each is the same movieclip just multiple instances of it. This movie clip has a rollover and rolloff state that basically scales the image up, this is done with external as that loops through and creates the event listeners for each one. If i roll over a movie clip and then roll off at normal speed, everything works as intended, the old one scales down to normal size, and then new one scales up. The issue comes when you quickly roll off and then back on. The movieclip gets stuck in scaling down to about half way. Any ideas on how to fix this? Also I dont want to remove all of the event listeners for the other clips until it scales back down because it would take away from the visual effect. thank you! -- Preston Parris ppar...@modevisual.com cell: 704.450.9299 www.modevisual.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Full screen mode and KeyboardEvents
The reasoning behind disabling all/most (9/10 respectively) keyboard input in fullscreen is because someone could easily make a fake login screen that looks like the OS. Carl, I hope that you don't have too much riding on it being able to do that because I don't know of a workaround (maybe use the browser in fullscreen... ??). If it's not essential that it be web deployed consider AIR... -jonathan 2009/3/29 Fabio Pinatti fpina...@gmail.com http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_03.html#head5 On Sun, Mar 29, 2009 at 6:25 PM, Carl Welch carlwelchdes...@gmail.com wrote: Hi all, I've built an app uses KeyboardEvents. All works fine until I go into FULLSCREEN Mode, the KeyboardEvents seem to stop working... and, of course when I go back to normal mode the KeyboardEvents start working again. Is there a work around for this issue? Thanks! -- Carl Welch http://www.carlwelch.com http://blog.jointjam.com carlwelchdes...@gmail.com 805.403.4819 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Fábio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 examples of amoeba or microbes
This may sound a little kooky but if you have access to a copy of Resident Evil 5, you might want to check out the game setup menu screens for inspiration. At each level of the menu, they have different cells... one trick that they do is tween the blur of an item so it looks like it's moving in/out of the depth of field of the microsoft. I'm sure you can see the way they apply transformations to a shape by watching it for a little bit. -jonathan On Mon, Mar 23, 2009 at 11:19 AM, Alan Shaw noden...@gmail.com wrote: Check this out: http://www.nicoptere.net/blog/index.php/2008/10/13/51-bacteria-generator-actionscript-flash On Sun, Mar 22, 2009 at 11:11 PM, Anthony Pace anthony.p...@utoronto.ca wrote: I am looking for some really good examples of amoeba or microbe simulations done in as3 I know that it is probably just done using beziers; yet, I am also wondering what the best way would be to connect hair feelers to the edges, so if the microbe changes shape the hairs move accordingly. Do I break down the curve along a larger bezier to find the distance it covers and then based on averaging the distance of the hairs place them? or would it be better to just make a curve that has more control points; thus, making it easier to track the position of the feelers along the curve but having to process a kappas(? not sure if the term really applies here, just guessing) value for each added control point? What do you think? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Advice on creating random grid of pairs for a game
Hi, Paul, Can you explain what you mean by a clear path. For example, when I look at this example below: 1,2,1 2,0,3 4,4,3 In this simple example, a user could clear all tiles by matching in the following order: 4 - 4 3 - 3 2 - 2 1 - 1 I don't see the clear path between 1 - 1. Seems like it jumps from one square to another. So is a clear path just a straight or diagonal line between the next number in the sequence that is unobstructed by a non-used pair, or what? -jonathan On Wed, Mar 11, 2009 at 12:59 PM, Paul Steven paul_ste...@btinternet.comwrote: Thanks Anthony Perhaps I am overcomplicating things but I am under the impression I need to ensure there is a clear path between each pair as I add them. My current algorithm is as follows: Step 1. Choose a random tile position (Random Row, Random Column) Step 2. Create an array of all possible tiles that this random tile can be paired with. To create this array, I use a path finding function to check there is a clear path between the 2 tiles Step 3. Choose one of the possible tiles from the array (currently I am just choosing a random one) and update grid data to reflect the 2 paired tiles are not on the grid. Repeat from Step 1 again This works fine until around 26 pairs have been placed then it gets stuck as it cannot find any more tiles that have a clear path. I have even added code to ensure that no isolated empty tiles are created as a result of creating a pairing. I have tried putting several timed break points in my code to restart the entire process if it fails to complete the entire grid. However it just doesn't seem to ever be able to generate an entire grid. Perhaps this process is really time consuming and I need to leave it for hours to generate a grid but I wouldn't have thought so. Any advice much appreciated! Thanks Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Anthony Pace Sent: 11 March 2009 16:31 To: Flash Coders List Subject: Re: [Flashcoders] Advice on creating random grid of pairs for a game Sounds like one of my old high-school projects, I see several ways of doing what you want that make sense: * -random population always of an array 81 units long (80 if you want the last to always be blank) o --you could create a function that loops 41(or 40 if last always blank)times tracking the positions in a temp array and then returning the completed array (if 41st loop choosing unfilled position with a 0 for blank card/wild card) o --there are other ways of doing this; yet, they use more loops and if statements. * -random population of an array 81 units long and then shuffling the deck sort of o --shuffling by swapping only positions that have not been swapped (you could even isolate left and right sides to simulate a card deck getting shuffled by hand) o --shuffling by swapping from 1 to 81 to ensure all positions get swapped o --there are most definitely more ways of doing this * -static population and then shuffling the deck same as above. As well, although I think you may not need to be told this, when you want to display the positions, you need to know and track which row level of the grid you are on and what column position you are in, in order to properly find the x and y values; thus, in your case testing if the modulus of 9 equals 0 will be handy. I hope the concepts help, Anthony Paul Steven wrote: I am trying to write the code to populate a 9 by 9 grid of tiles with 40 pairs of matching tiles. I have 4 different types of tiles and I want to create a grid that has 40 matching pairs and 1 blank tile. I do not want the pairs all to be next to each other but there needs to be at least one solution that enables a player to match each and every pair. To match a pair there needs to be a clear path between each member of the pair. 1,2,1 2,0,3 4,4,3 In this simple example, a user could clear all tiles by matching in the following order: 4 - 4 3 - 3 2 - 2 1 - 1 Note that until they have matched the pair of 2's they cannot match the 1's as there would be no clear path between them. All my attempts so far to create this grid is resulting in script errors due to my code being unable to find a solution. My code basically gets about 60% of the board created then finds it cannot any more clear paths to create the remainder of the grid. I would really appreciate any help cracking this function. Thanks Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Advice on creating random grid of pairs for a game
A simpler way to ask would be if 1,2,2,1 is also a clear path (provided 2 has been removed). On Wed, Mar 11, 2009 at 1:43 PM, jonathan howe jonathangh...@gmail.comwrote: Hi, Paul, Can you explain what you mean by a clear path. For example, when I look at this example below: 1,2,1 2,0,3 4,4,3 In this simple example, a user could clear all tiles by matching in the following order: 4 - 4 3 - 3 2 - 2 1 - 1 I don't see the clear path between 1 - 1. Seems like it jumps from one square to another. So is a clear path just a straight or diagonal line between the next number in the sequence that is unobstructed by a non-used pair, or what? -jonathan On Wed, Mar 11, 2009 at 12:59 PM, Paul Steven paul_ste...@btinternet.comwrote: Thanks Anthony Perhaps I am overcomplicating things but I am under the impression I need to ensure there is a clear path between each pair as I add them. My current algorithm is as follows: Step 1. Choose a random tile position (Random Row, Random Column) Step 2. Create an array of all possible tiles that this random tile can be paired with. To create this array, I use a path finding function to check there is a clear path between the 2 tiles Step 3. Choose one of the possible tiles from the array (currently I am just choosing a random one) and update grid data to reflect the 2 paired tiles are not on the grid. Repeat from Step 1 again This works fine until around 26 pairs have been placed then it gets stuck as it cannot find any more tiles that have a clear path. I have even added code to ensure that no isolated empty tiles are created as a result of creating a pairing. I have tried putting several timed break points in my code to restart the entire process if it fails to complete the entire grid. However it just doesn't seem to ever be able to generate an entire grid. Perhaps this process is really time consuming and I need to leave it for hours to generate a grid but I wouldn't have thought so. Any advice much appreciated! Thanks Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Anthony Pace Sent: 11 March 2009 16:31 To: Flash Coders List Subject: Re: [Flashcoders] Advice on creating random grid of pairs for a game Sounds like one of my old high-school projects, I see several ways of doing what you want that make sense: * -random population always of an array 81 units long (80 if you want the last to always be blank) o --you could create a function that loops 41(or 40 if last always blank)times tracking the positions in a temp array and then returning the completed array (if 41st loop choosing unfilled position with a 0 for blank card/wild card) o --there are other ways of doing this; yet, they use more loops and if statements. * -random population of an array 81 units long and then shuffling the deck sort of o --shuffling by swapping only positions that have not been swapped (you could even isolate left and right sides to simulate a card deck getting shuffled by hand) o --shuffling by swapping from 1 to 81 to ensure all positions get swapped o --there are most definitely more ways of doing this * -static population and then shuffling the deck same as above. As well, although I think you may not need to be told this, when you want to display the positions, you need to know and track which row level of the grid you are on and what column position you are in, in order to properly find the x and y values; thus, in your case testing if the modulus of 9 equals 0 will be handy. I hope the concepts help, Anthony Paul Steven wrote: I am trying to write the code to populate a 9 by 9 grid of tiles with 40 pairs of matching tiles. I have 4 different types of tiles and I want to create a grid that has 40 matching pairs and 1 blank tile. I do not want the pairs all to be next to each other but there needs to be at least one solution that enables a player to match each and every pair. To match a pair there needs to be a clear path between each member of the pair. 1,2,1 2,0,3 4,4,3 In this simple example, a user could clear all tiles by matching in the following order: 4 - 4 3 - 3 2 - 2 1 - 1 Note that until they have matched the pair of 2's they cannot match the 1's as there would be no clear path between them. All my attempts so far to create this grid is resulting in script errors due to my code being unable to find a solution. My code basically gets about 60% of the board created then finds it cannot any more clear paths to create the remainder of the grid. I would really appreciate any help cracking this function. Thanks Paul
Re: [Flashcoders] HTMLLoader problem
Yes, that class is only for AIR. Adding rendering of HTML content using Webkit engine was one of the 3 or 4 most significant features introduced by AIR. In the docs, AIR only classes usually have the little red pinwheel icon next to them. -jonathan On Mon, Feb 23, 2009 at 8:36 AM, Lehr, Theodore M (N-SGIS) theodore.m.l...@lmco.com wrote: I'm having a funny issue with HTMLLoader. I'm getting a 1046: Type was not found or was not a compile-time constant: HTMLLoader. Error for the line of code below. public var _htmlLoader:HTMLLoader = new HTMLLoader(); I'm importing HTMLLoader and URLLoader. The odd part to me is the code I am using to create a simple browser window works perfectly for an AIR application, but when I try it in a Flash program I get the error. Is HTMLLoader only for AIR? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Javascript Flash resizing
As I'm sure you've discovered, Flash Player security model will block you from doing this directly: The ActionScript that initiates full-screen mode can be called only in response to a mouse event or keyboard event. If it is called in other situations, Flash Player throws an exception. Users cannot enter text in text input fields while in full-screen mode. All keyboard input and keyboard-related ActionScript is disabled while in full-screen mode, with the exception of the keyboard shortcuts (such as pressing the Esc key) that return the application to normal mode. So I take it that you are trying to fake it somehow by forcing the browser itself into fullscreen mode and then javascripting the Flash window to the entire size of the window? Sounds pretty tricky. -jonathan On Fri, Feb 20, 2009 at 7:32 AM, Cor c...@chello.nl wrote: I know, its not for websites but company learningapps. I can't use AIR. All my apps are to be launched from Moodle. Thanks! -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ashim D'Silva Sent: vrijdag 20 februari 2009 12:53 To: Flash Coders List Subject: Re: [Flashcoders] Javascript Flash resizing I wouldn't really like that as a user, a webpage that takes my screen without asking.If it's an app, try AIR, that might have something. You should be able to launch a window with javascript without interaction (window.open - look it up) Other than that, I'm really not sure. 2009/2/20 Cor c...@chello.nl Hi Ashim, Thanks. I have it already working with StageDisplayMode.FULLSCREEN, but this still needs a user interaction. And I would like to open my app fullscreen without any browser visuals, and even better if the user is not able to switch to any other display mode. Kind regards cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ashim D'Silva Sent: donderdag 19 februari 2009 11:23 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Javascript Flash resizing Hey Cor, I'm just putting this back on the list because I actually don't really know javascript. I write basic stuff because it resembles actionscript (ECMA). Specific stuff I'd look up. I'd imagine you'll need to launch a new window for that but maybe somebody else will know. You could also go fullscreen from flash by setting the stage.displayMode property to StageDisplayMode.FULLSCREEN (check that, gmail doesn't have intellisense). Ashim 2009/2/18 Cor c...@chello.nl Hello Ashim, I am not familiair with JS. I hope I may ask you a question. Is it possible to set my index.htm maximized, so only my Flash is showing maximized? So there will be no browser items, like the menubar, browser buttons, etc.? Kind regards Cor van Dooren -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ashim D'Silva Sent: woensdag 18 februari 2009 1:14 To: Flash Coders List Subject: Re: [Flashcoders] Javascript Flash resizing Javascript and flash can do some interesting things together. I built a flash gallery that would load up images and depending on how much space it needed, resize the div the flash was sitting in so browser scroll-bars came into effect if necessary. Then, when a certain image is displayed large, scrolling in the browser would move the large image inside the flash so it's always centred within the browser window. Here's my javascript, the flash should be simple to work out: script type=text/javascript if (window.addEventListener) { window.addEventListener('scroll',scrollingDetector,false); window.addEventListener('resize',resizeDetector,false); } else if (document.addEventListener) { document.addEventListener('scroll',scrollingDetector,false); document.addEventListener('resize',resizeDetector,false); } function scrollingDetector() { var scrollY; if (navigator.appName == Microsoft Internet Explorer) { scrollY = document.body.scrollTop; } else { scrollY = window.pageYOffset; } getFlashMovie(excl).setScrollY(scrollY); } function resizeDetector() { var height; if (navigator.appName == Microsoft Internet Explorer) { height = documentbody.offsetHeight; } else { height = window.innerHeight; } getFlashMovie(excl).setHeight(height); } function runFirst() { scrollingDetector(); resizeDetector(); } function getFlashMovie(movieName) { var isIE = navigator.appName.indexOf(Microsoft) != -1; return (isIE) ? window[movieName] : document[movieName]; } function setFlashHeight(newH) { gid = document.getElementById(flashHolder
Re: [Flashcoders] AS3 Fullscreen mode w/ Windows Projectors
Glen, thanks for the response. As an interesting (?) complication to this matter, I recently installed the new versions of the players to CS3 Professional IDE: http://kb.adobe.com/selfservice/viewContent.do?externalId=b62ce659sliceId=2 Before I updated, the stage.displayState = StageDisplayState.FULL_SCREEN; command worked but full screen was completely black on Vista. After I updated, fullscreen wasn't black but the fullscreen didn't work anymore. Did adobe sneak in more stringent security? If so, why does my fscommand work? Glen, would you mind telling me what player version shows up when you export a projector from your IDE? -jonathan On Sun, Feb 15, 2009 at 6:43 PM, Glen Pike postmas...@glenpike.co.ukwrote: Hi, I have no problem with this when publishing a projector from CS3: this.stage.displayState = StageDisplayState.FULL_SCREEN; The projector I created is just a shell that loads in another SWF containing the App. But I did run into problems with trying to make a non-projector SWF go full screen without using fscommand - (we were running flash player from the command line in Linux because we are compiling the SWF on Windows and it is virtually impossible to create a projector when you are running the system without a desktop manager.) I think keeping fingers crossed that fscommand does not get deprecated would be a good thing because there are cases where this would cause serious problems :) Glen jonathan howe wrote: Hello, According to docs Full-screen mode is always permitted in the stand-alone player or in a projector file. Yet I get a SecurityError: Error #2152 when I call stage.displayState = StageDisplayState.FULL_SCREEN; from a projector. But I don't get it when I use the old fscommand method of going fullscreen. For projectors, shouldn't the mouseevent-click security requirement be waived in order to automatically go fullscreen? Why would it work with fscommand but not the official way, displayState? Anyone do this regularly who has a hint? Should I just be glad fscommand works? -jonathan -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 Fullscreen mode w/ Windows Projectors
Well, it doesn't disprove my theory - that is the packaged version prior to the security patch. The version of projectors that my IDE now creates is 9.0.151.0 So, the mystery remains. Anyone with the unpatched version: Test your fullscreen projectors in Vista. Anyone with the patched version: Test your fullscreen (if it's called outside a button event and is invoked by stage.displayState) to make sure it actually works Mystery #2: why doesn't the Adobe Updater apply the patches to the Players/ directory if this is such an important security fix? -jonathan (Glen, I think I beat your test score by 0.0.106. Booyah.) On Mon, Feb 16, 2009 at 2:06 PM, Glen Pike postmas...@glenpike.co.ukwrote: My IDE published to 9.0.45.0 for that projector. HTH Glen jonathan howe wrote: Glen, thanks for the response. As an interesting (?) complication to this matter, I recently installed the new versions of the players to CS3 Professional IDE: http://kb.adobe.com/selfservice/viewContent.do?externalId=b62ce659sliceId=2 Before I updated, the stage.displayState = StageDisplayState.FULL_SCREEN; command worked but full screen was completely black on Vista. After I updated, fullscreen wasn't black but the fullscreen didn't work anymore. Did adobe sneak in more stringent security? If so, why does my fscommand work? Glen, would you mind telling me what player version shows up when you export a projector from your IDE? -jonathan On Sun, Feb 15, 2009 at 6:43 PM, Glen Pike postmas...@glenpike.co.uk wrote: Hi, I have no problem with this when publishing a projector from CS3: this.stage.displayState = StageDisplayState.FULL_SCREEN; The projector I created is just a shell that loads in another SWF containing the App. But I did run into problems with trying to make a non-projector SWF go full screen without using fscommand - (we were running flash player from the command line in Linux because we are compiling the SWF on Windows and it is virtually impossible to create a projector when you are running the system without a desktop manager.) I think keeping fingers crossed that fscommand does not get deprecated would be a good thing because there are cases where this would cause serious problems :) Glen jonathan howe wrote: Hello, According to docs Full-screen mode is always permitted in the stand-alone player or in a projector file. Yet I get a SecurityError: Error #2152 when I call stage.displayState = StageDisplayState.FULL_SCREEN; from a projector. But I don't get it when I use the old fscommand method of going fullscreen. For projectors, shouldn't the mouseevent-click security requirement be waived in order to automatically go fullscreen? Why would it work with fscommand but not the official way, displayState? Anyone do this regularly who has a hint? Should I just be glad fscommand works? -jonathan -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AS3 - getDefinitionByName and external swfs
Hello, I have some classes with a lot of code that I may or may not need depending on the situation. These classes all extend a superclass that I refer to in my main application. My ideal would be to define subclasses only in external swfs, load the swfs and then instantiate the classes via a string passed to getDefinitionByName so that the subclasses are not included in the main application. So the model is: Main.swf / Main.as contains SupClass.as but does not have references to Subclass1 or Subclass2 Subclass1.swf / Subclass1.as Subclass2.swf / Subclass2.as Main.as decides it wants Subclass1, loads Subclass1.swf, load inits and completes, Main.as tries to instantiate Of course, when I try this, I get the typical ReferenceError: Error #1065: Variable Subclass1 is not defined. Is there any way that anyone knows of to instantiate a class this way? I would love to keep it out of the Main.swf. Here seems to be a well phrased argument that seems to insist that the class always be included in the swf that is trying to instantiate (and thus all the code will be duplicated). http://nwebb.co.uk/blog/?p=186 Thanks dudes and dudettes, -jonathan -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 - getDefinitionByName and external swfs
Cool, thanks Ian, I had assumed that the currentDomain would be the default (or at least the related behavior). I read this from the documentation: By putting the loaded SWF file in the same application domain, you can access its classes directly. This can be useful if you are loading a SWF file that contains embedded media, which you can access via their associated class names, or if you want to access the loaded SWF file's methods... That's exactly the kind of @#! I'm talkin' about! So I will try using Loader with the ApplicationDomain.currentDomain parameter. -jonathan On Sun, Feb 15, 2009 at 10:33 AM, Ian Thomas i...@eirias.net wrote: It definitely works (to do as you describe). I think you need to take a good look at the ApplicationDomain class - make sure that the loaded SWF is in the same application domain as your loading SWF, and it should all be fine. Alternatively, you can specifically query the child's applicationDomain via the loader - caling getDefinitionByName() on just that applicationDomain. HTH, Ian On Sun, Feb 15, 2009 at 3:08 PM, jonathan howe jonathangh...@gmail.com wrote: Hello, I have some classes with a lot of code that I may or may not need depending on the situation. These classes all extend a superclass that I refer to in my main application. My ideal would be to define subclasses only in external swfs, load the swfs and then instantiate the classes via a string passed to getDefinitionByName so that the subclasses are not included in the main application. So the model is: Main.swf / Main.as contains SupClass.as but does not have references to Subclass1 or Subclass2 Subclass1.swf / Subclass1.as Subclass2.swf / Subclass2.as Main.as decides it wants Subclass1, loads Subclass1.swf, load inits and completes, Main.as tries to instantiate Of course, when I try this, I get the typical ReferenceError: Error #1065: Variable Subclass1 is not defined. Is there any way that anyone knows of to instantiate a class this way? I would love to keep it out of the Main.swf. Here seems to be a well phrased argument that seems to insist that the class always be included in the swf that is trying to instantiate (and thus all the code will be duplicated). http://nwebb.co.uk/blog/?p=186 Thanks dudes and dudettes, -jonathan -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AS3 Fullscreen mode w/ Windows Projectors
Hello, According to docs Full-screen mode is always permitted in the stand-alone player or in a projector file. Yet I get a SecurityError: Error #2152 when I call stage.displayState = StageDisplayState.FULL_SCREEN; from a projector. But I don't get it when I use the old fscommand method of going fullscreen. For projectors, shouldn't the mouseevent-click security requirement be waived in order to automatically go fullscreen? Why would it work with fscommand but not the official way, displayState? Anyone do this regularly who has a hint? Should I just be glad fscommand works? -jonathan -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OT: Internet Explorer 8
Regarding being able to test in older versions of IE (since you can't run parallel versions). I used this program for a little while: http://www.my-debugbar.com/wiki/IETester/HomePage I think they actually use the real rendering engine via OLE but it has its flaws as well. It's been a year or so since I've done that kind of work and thus since I've used the product but give it a shot. Looks like they included IE8 beta 2.. -jonathan P.S. My gmail client is broken in IE8 beta as I type this, so if it's bad enough for Google, it's bad enough for your client! (Oh, wait, Gmail claims it's still in beta itself) On Tue, Feb 3, 2009 at 11:55 PM, Vayu Robins v...@vayu.dk wrote: Thanks for all the good feedback on this! :-) On 2/3/09 8:25 PM, John Dowdell jdowd...@adobe.com wrote: Vayu Robins wrote, when finding that an existing HTML site was reported to not render correctly in this week's IE8 release candidate: Does anybody have any comments on this? Should I download the IE8 version and find the problem? I am on a mac, using Parallels Desktop, Windows XP. I've heard other reports of newer HTML clients not supporting existing websites, but I haven't tracked the pre-release details. Best resource I know of for user-experience changes is the IE team's own weblog: http://blogs.msdn.com/ie/ That said, it may be a client/developer contractual agreement about which browsers to test against. If they specified IE6 and IE7 for the Microsoft-branded browsers, then it doesn't seem quite fair to suddenly add another version (particularly a pre-release) to that matrix. But if the required clientside runtimes were not specified in the original contract, then that could make things stickier... it sounds like they accepted the project, then wanted to make changes after the project was finished. Tricky problem! :( jd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Adding a property to an AS3-component
Seems like Cor's Array solution would make it through the compiler but would still throw a runtime error, right? I would much more strongly recommend the extending solution that Dave suggests. On Sat, Jan 24, 2009 at 12:14 PM, Dave Watts dwa...@figleaf.com wrote: is it actually possible to add a new property to an AS3-component, like button? In AS3, classes will only allow this if they're dynamic classes, and most classes aren't dynamic. You could, however, write a new class to extend Button. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [AS2] Set the default value of a ComboBox
That sounds like a potential for unneeded redundancy/potential sync errors if things change later.. Better to use the ComboBox.getItemAt() method, right? trace(myBox.getItemAt(4).label); -jonathan On Thu, Jan 8, 2009 at 12:12 PM, Eric E. Dolecki edole...@gmail.com wrote: populate with an array, and then go through the array, and use the matching index. On Thu, Jan 8, 2009 at 11:29 AM, FlashDev fl...@funkdaweb.com wrote: Hi Guys, happy new year to you all! I have a combobox added to the stage in the flash IDE and it is populated via Actionscript 2 from an external XML file. The trouble is I want to automatically select a label in the combobox rather than showing the first label which is the current default. I populate my combobox like this: combobox1.addItem({data:data1, label:lable1}); combobox1.addItem({data:data2, label:lable2}); Now I have a combobox with 2 labels, label1 and label2. I want label2 to display as the default instead of label1, now I understand I could do: combobox1.selectedIndex = 1; but I actually want to loop through the combobox labels and match if label2 = label2 then select that index, so is there any way I can read the labels / data of a combobox? I have tried combobox1.data and combobox1.labels, but it just returns undefined? Thanks in advance SJM ___ 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 -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
Depends on the application whether you can afford this... I would think that in some cases you would want to use rounding so that there is more accurate rendering... you want your object to snap to the nearest pixel, and nearest may be up instead of floored. I do want to emphasize that it is not simply enough to set the DisplayObject's own coordinates to an integer; if the DO in question is inside a parent DO with non-integer coordinates, it won't be correct. That's why I was recommending the localToGlobal technique. -jonathan On Wed, Dec 17, 2008 at 11:55 AM, Jiri Heitlager jiriheitla...@googlemail.com wrote: Math should be avoided when possible, I believe it is quit slow. Maybe Number 0 is even faster for rounding of ;) Jiri laurent wrote: int( ) is casting the content to integer, it has the effect to drop off the decimal part. Same as Math.floor but lots faster L Cor a écrit : If the sprite.x is not an exact round number (so not an correct integer) wouldn't that throw an error??? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri Heitlager Sent: woensdag 17 december 2008 15:11 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ 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 No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] use get / set functions or make your own
The magic Context code completion hotkey, which by default is Ctrl-Shift-1, when your cursor is over a variable declaration. This awesome hotkey also does cool stuff like generates an event handler when your cursor is inside an addEventListener declaration... definitely check it out in the FD docs! On Tue, Dec 9, 2008 at 3:26 PM, Cor [EMAIL PROTECTED] wrote: Yes I prefer FD also, but what is the shortcut for getters and setters?? -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Eric E. Dolecki Sent: dinsdag 9 december 2008 15:16 To: Flash Coders List Subject: Re: [Flashcoders] use get / set functions or make your own Since I like FlashDevelop, with a keyboard shortcut and a click I create setters and getters. On Tue, Dec 9, 2008 at 9:02 AM, Hans Wichman [EMAIL PROTECTED] wrote: Hi, I'm still in the middle. I used to use getMyVariable setMyVariable for everything, now I usually use public variables for entity/value objects. I still hate not being able to see whether something is a variable or function, so for everything else than very simple objects I prefer setMyVariable getMyVariable instead of get set. I find it way easier to read back my code that way, so it depends on whether I know whether I am going to have to read it back or not ;). greetz JC On Tue, Dec 9, 2008 at 12:28 PM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: i would have to agree - i use the built in ones and can't see any benefit from using bespoke ones apart from maybe being able to use the variable name i want rather than adding extra characters to it (although i use a leading underscore for class variables anyway) On Tue, Dec 9, 2008 at 10:48 AM, Ian Thomas [EMAIL PROTECTED] wrote: I use Actionscript getters and setters. Because I can start off using ordinary public properties, and change them into getters and setters if I need more control/notification without changing any of the code that _uses_ my class. In order to achieve that otherwise, I'd have to make a getValue() and setValue() for every single public property (as is done in Java). And a fair few of those would simply be this._property=value (setter) or return this._property (getter) i.e. essentially just placeholder methods that bloat the code. The beauty of the actionscript get and set functions is that they are indistinguishable from public properties from the outside of the class. It's a huge improvement over Java. Ian On Tue, Dec 9, 2008 at 10:24 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: hi guys quick poll - Do you use the actionscript getter/setter functions or do you make your own, and why. I've noticed with a lot of the public domain code (like SWFAddress, for instance) that you see a lot of 'public function getVariable()' type getters instead of using the flash 'public function get variable()' adobe recommended getters(and setters) and i was wondering why people do this? 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 -- http://ericd.net Interactive design and development ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.15/1839 - Release Date: 9-12-2008 9:59 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] FP9 vs FP10 behavior differences
Last week I went to launch a project that had been published for FP9, tested mostly in FP9, and then when we tested in FP10, we noticed a tragic difference... I was using the old uncheck 'Export in First Frame' and put everything on a single keyframe on Frame 2 method of preloading. In FP9, it worked fine, but in FP10, I could hear all the movie clips that had sound looping endlessly, even though the movie stopped on frame 1 and skipped over frame 2 after loading. So, I am confused as to why these clips on the timeline were ever instantiated when the frame they existed on was never truly reached. We ended up just using a parent swf to load the main movie and go back to everything Export in first frame which is arguably more elegant anyway, but I'm a little shaken by the last-minute discovery. Does anyone have a recommendation as to how to avoid this? Is there a more modern way to Export classes from the Library and keep them off the first frame so that accurate load progress can be displayed? (keeping the non-Flex, Flash IDE workflow in mind, please). -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flash IDE workflow with SWC
Hallo, In Flash CS3 or CS4, does anyone know how to control the target location of a .swc independant of the .swf location? Usually in Flash Publish Settings I target a directory different than that of my source files that I call deploy. So, typically I would use ../deploy/swfname.swf This keeps the source and deploy files separate. Now, in my new project, I need to use some classes as swc files during compliation but the .swf during runtime, so the .swc needs to be in the source directory but the .swf I want in the deploy... anyone have an idea? -jonathan -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Audio lag on KeyboardEvent.KEY_DOWN
I'm very interested in the solution to this. I notice it on certain machines and not others... it does not seem to have anything to do with the input part, and in some cases can stutter the display updating. For example, if you were to have a timer trigger the sound and print something at the screen, they would both 'appear' at the same time but if you also measured the time difference between the trigger's execution and after the sound call, there would be latency. The superstitious/uneducated part of me supposes that Flash is establishing a modal call to the sound card, and some perform cards respond faster than others. -jonathan On Mon, Dec 8, 2008 at 2:37 PM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: did you use updateAfterEvent() to force it to play immediately? if not, it might be waiting for the next frame to process the event On Mon, Dec 8, 2008 at 12:14 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi List, I'm dipping my toe into AS3 and thought I'd play around with sound by making a little piano keyboard which is played by pressing keys on the computer keyboard. It works - the appropriate sounds play on KeyboardEvent.KEY_DOWN - however, I've noticed that there is often a lag between the keyboard event and the actual sound playing. The occurrence of the lag seems pretty random. The sounds are MP3s which are load()ed into Sound objects on init(). On KeyboardEvent.KEY_DOWN, the appropriate Sound is play()ed. I've checked all the MP3s, and they don't have extra silence at the beginning. I don't think it has to do with the number of MP3s involved (14), because I noticed the lag even when I was testing it out with 2 sounds. Has anyone dealt with this before, and know what the problem might be? You can see (or rather, hear) the lag for yourself here: http://snipurl.com/7ndr2-meep Thanks! In hope, CB. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Audio lag on KeyboardEvent.KEY_DOWN
That part was actually confusticate's and I do believe that he was implying that the sounds had load() called prior to the KeyboardEvent, and the latency happens on the 100th keystroke as well as the first. By way of comparison, I had the same problem in sounds attached from the library. I wonder if it would make a difference if new Sound objects (in AS2) or SoundChannels (in AS3) were or weren't instantiated every time. On Mon, Dec 8, 2008 at 4:49 PM, Sidney de Koning [EMAIL PROTECTED]wrote: Hi Jonathan, You say: The sounds are MP3s which are load()ed into Sound objects on init(). Does this mean you preload the sounds? If so; If you press a key before the whole sound is loaded in it takes some time to play it, because it is still loading. You can make sure of this by showing the application AFTER all the sounds are loaded in, this can be done by creating a loader que (place items in an array after they are loaded and check if the total amount of items loaded in is equal to the array length). This way you always know that nothing shows up before all the sounds are loaded. Hope this helps you, Sid On Dec 8, 2008, at 4:31 PM, jonathan howe wrote: I'm very interested in the solution to this. I notice it on certain machines and not others... it does not seem to have anything to do with the input part, and in some cases can stutter the display updating. For example, if you were to have a timer trigger the sound and print something at the screen, they would both 'appear' at the same time but if you also measured the time difference between the trigger's execution and after the sound call, there would be latency. The superstitious/uneducated part of me supposes that Flash is establishing a modal call to the sound card, and some perform cards respond faster than others. -jonathan On Mon, Dec 8, 2008 at 2:37 PM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: did you use updateAfterEvent() to force it to play immediately? if not, it might be waiting for the next frame to process the event On Mon, Dec 8, 2008 at 12:14 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi List, I'm dipping my toe into AS3 and thought I'd play around with sound by making a little piano keyboard which is played by pressing keys on the computer keyboard. It works - the appropriate sounds play on KeyboardEvent.KEY_DOWN - however, I've noticed that there is often a lag between the keyboard event and the actual sound playing. The occurrence of the lag seems pretty random. The sounds are MP3s which are load()ed into Sound objects on init(). On KeyboardEvent.KEY_DOWN, the appropriate Sound is play()ed. I've checked all the MP3s, and they don't have extra silence at the beginning. I don't think it has to do with the number of MP3s involved (14), because I noticed the lag even when I was testing it out with 2 sounds. Has anyone dealt with this before, and know what the problem might be? You can see (or rather, hear) the lag for yourself here: http://snipurl.com/7ndr2-meep Thanks! In hope, CB. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Sidney de Koning Flash / AIR Developer @ www.funky-monkey.nl Technical writer @ www.insideria.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [AS2] Catching clicks in child clip?
I forget but doesn't the _mc.enabled property cascade downwards? So once loaded you could set the container for the loaded swf as enabled = false... ? On Wed, Dec 3, 2008 at 9:07 AM, mike cann [EMAIL PROTECTED] wrote: Hello List, I have been forced to go back to AS2 recently for a work project and oh my is it annoying me. Part of the project I am writing a simple advertising loader, its basically just a swf that loads other swfs into it. The problem is that the adverts that are loaded in sometimes contain clicks within them so without access to the source code i need a method of preventing those clicks from happening. To my knowledge this should be doable by implementing a cover over the top of the loaded swf with a onPress, onRelease etc functions defined correct? Well for some reason this isnt happenining. See the source output below. You can download the project here: http://www.mikecann.co.uk/DumpingGround/AS2_StrippedBare.zip import flash.geom.Matrix; import mx.controls.Loader; import mx.utils.Delegate; /** * ... * @author DefaultUser (Tools - Custom Arguments...) */ class GJAdJacket { // Privates private var _mc : MovieClip; private var _adContainter : MovieClip; private var _sizeWidth:Number; private var _sizeHeight:Number; public function GJAdJacket(attachToMC:MovieClip) { // The MC we are to attach to _mc = attachToMC; // Set the stage scale modes Stage.scaleMode = noScale; Stage.align = TL; // Init _sizeWidth = 300; _sizeHeight = 250; loadAdvert( http://gjacket-images.adbureau.net/gjacket/_clientcreative/Eidos/BattleMail021208.swf ); } private function loadAdvert(advertURL:String) { // Make a mask for those naughty ads that dont mask var mask : MovieClip = _mc.createEmptyMovieClip(mask, _mc.getNextHighestDepth()); mask.beginFill(0, 255); mask.moveTo(0,0); mask.lineTo(_sizeWidth,0); mask.lineTo(_sizeWidth,_sizeHeight); mask.lineTo(0,_sizeHeight); mask.lineTo(0,0); mask.endFill(); _mc.setMask(mask); mask.onMouseUp = Delegate.create(this, advertClickthrough); mask.onRelease = function() { } mask.onPress = function() { } mask.onMouseDown = function() { } mask.onMouseMove = function() { } _adContainter = _mc.createEmptyMovieClip(container, _mc.getNextHighestDepth()); _adContainter.loadMovie(advertURL); } public function advertClickthrough() { getURL(http://www.google.com;, _blank) } } Cheers. -- Mike Cann http://www.mikecann.co.uk/ http://www.artificialgames.co.uk/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] reusing symbol is there something I am missing? most likely.
Hi, Anthony, You need to specify the full pathname in the IDE Linkage Properties. Also, there seems to be capitaization mismatch between what you've entered in the IDE and the class. Based on the class you pasted, the Class field in LinkageProperties should be blah.rightArrow (not blah.RightArrow) -jonathan On Wed, Nov 26, 2008 at 3:39 PM, Anthony Pace [EMAIL PROTECTED]wrote: Hmm, I set it to export for actionscript in the IDE give it the desired className RightArrow its instance has the name rightArrow I defined section for it in my file, yet it is under a package does that matter? package blah{ } import flash.display.MovieClip; class rightArrow extends MovieClip { public function rightArrow( ) { } } and in the class ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: AS3: Mouse.hide() + ContextMenu
Hi, everyone, Just a little update on this issue, for the starlwart few who are interested. I discovered that a Event.MOUSE_LEAVE is fired when the Right Click (ContextMenu) menu is opened. I wish there was a complement to Event.MOUSE_LEAVE, but I didn't see one. What I now do is listen for stage's MouseEvent.MOUSE_OVER and Mouse.hide(); every time this is fired (I wish this didn't have to be called so often but it's not a performance hit for me. If anyone has a better solution, I would love to hear it). This created the additional side effect that the Mouse doesn't always automatically show when you open the context menu (right clicking twice in a row or using Esc) so I used Event.MOUSE_LEAVE to ensure that Mouse.show() is called every time. -jonathan On Sun, Nov 23, 2008 at 2:18 PM, jonathan howe [EMAIL PROTECTED]wrote: AS3, FP9 I am using a substitute mouse cursor, so I use Mouse.hide(); When a user right-clicks, the Mouse is unhidden (good) but then it doesn't return to the state it was before the context menu was open (unfortunate, perhaps understandable). When a user selects an item, I can listen for ContextMenuEvent.MENU_ITEM_SELECT and rehide the mouse. But, when a user clicks outside the context menu, the menu is dismissed and the mouse item returns. I can't figure out what event if any is raised so that I can rehide the Mouse. Ideally, it would raise a CLOSE, CANCEL, etc. Does anyone know how to return the Mouse to hidden after the context menu is closed again? -jonathan -- -jonathan howe -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AS3: Mouse.hide() + ContextMenu
AS3, FP9 I am using a substitute mouse cursor, so I use Mouse.hide(); When a user right-clicks, the Mouse is unhidden (good) but then it doesn't return to the state it was before the context menu was open (unfortunate, perhaps understandable). When a user selects an item, I can listen for ContextMenuEvent.MENU_ITEM_SELECT and rehide the mouse. But, when a user clicks outside the context menu, the menu is dismissed and the mouse item returns. I can't figure out what event if any is raised so that I can rehide the Mouse. Ideally, it would raise a CLOSE, CANCEL, etc. Does anyone know how to return the Mouse to hidden after the context menu is closed again? -jonathan -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] showing code progress with progress bar
Yikes! I don't think he actually wants the loop to take any longer than necessary. I'm assuming he's got some sort of computationally expensive operation (huge parse or something) that he wants to show the progress. How about subdividing your loop into more manageable chunks that get called once a frame? On Fri, Nov 21, 2008 at 4:42 PM, Joel Stransky [EMAIL PROTECTED]wrote: Just simulate a for loop with an ENTER_FRAME listener. var total:int = 1; var i:int = 0; root.addEventListener(Event.ENTER_FRAME, simLoop); private function simLoop(e:Event):void { if(i = total){ root.removeEventListener(Event.ENTER_FRAME, simLoop); }; pbar.setProgress(i, total); i++; } On Fri, Nov 21, 2008 at 4:23 PM, Mac Angell [EMAIL PROTECTED] wrote: Is it possible to show the progress of a code loop on a progress bar? For example, if I have a progress bar named pbar already defined on the stage, and I execute the following function: private function init():void { var total:int = 10; for (var i:int = 0; i total; i++) { pbar.setProgress(i, total); stage.invalidate(); } } The progress bar jumps from 0% to 100% after a long pause (the for loop executing). I am pretty sure this happens because the entire code loop executes before the next frame gets rendered. As you can see I even tried stage.invalidate(), but my guess is that it just tells the stage to update on the next frame, instead of forcing the stage to update at that exact time. Is there any way to get this to work in AS3? In other words, is there any way to force the screen to update in the middle of a code thread? Thanks! -Mac Angell ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- --Joel Stransky stranskydesign.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: [Flash CS3] Extremely weird playhead action
Hi, Joel, I'm taking a longshot guess that you had the same problem I had last week when the list helped me...? I had an instance on a keyframe of the stage and it (sometimes) wasn't available i.e. null when I gotoAndPlay() to the frame it first appears? Did you find a solution? I have had good success with the CustomWait class from http://www.lecrabe.net/blog/index.php?post/2008/08/05/41-as3-gotoandstop-gotoandplay-issue . It is a sucky bug. Yeah: I call it a bug, not a feature. -jonathan On Fri, Nov 21, 2008 at 4:37 PM, Joel Stransky [EMAIL PROTECTED]wrote: Don't worry, I doubt it even fk'ing matters anyway. I can't access a stage instance on frame 2 or higher without some psychotic hack I've yet to find on google. How the f*ck did macromedia expect any common flash designers to keep up? I don't want to write a custom class for each stage instance just to utilize ADDED_TO_STAGE. What good is that to code on the timeline looking for that object? I just want to write a basic flash site with dynamic content and avoid showing two preloaders just to load the home page by default. Jesus fk'ing christ! Very frustrated atm. On Fri, Nov 21, 2008 at 2:57 PM, Joel Stransky [EMAIL PROTECTED] wrote: So I'm writing the most basic of timeline preloaders and flash seems to have a mind of its own. My test.fla has two frames. Frame 1 has a text field and a progress bar movieclip. Frame 2 has a very large image. There is no code what so over. The document class is set to Test.as and is essentially: package { import flash.display.MovieClip; import flash.text.TextField; import flash.events.*; public class Test extends MovieClip { //stage instances public var info_txt:TextField; public var loadBar:MovieClip; public function Test() { this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress); this.loaderInfo.addEventListener(Event.COMPLETE, onComplete); } private function onProgress(e:ProgressEvent):void { trace(e.bytesLoaded); //on progress updates } private function onComplete(e:Event):void { //clean up } } } This all works fine except for the playhead activity. In my sample you'll notice there are no stop(); commands so when do Control - Test Movie, it just loops over the timeline flickering between frames 1 and 2 as you would expect. Oddly enough however, when I hit ctrl+enter again (Simulate Download), it stops, outputs the traces and then proceeds to flicker. Wha!? It gets weirder. Just add a stop(); as the first line in the document class constructor right? Now Test Movie just sits on frame one and never broadcasts any ProgressEvent's. Seems fine but now when I Simulate Download, it stops, outputs the traces... AND THEN PROCEEDS TO FLICKER! My onComplete does NOT tell the playhead to play() or gotoAndPlay() or anything. Who the heck it telling the playhead to play? -- --Joel Stransky stranskydesign.com -- --Joel Stransky stranskydesign.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] 1172: definition flash.desktop:NativeApplication
Hmm... pretty strange. I did see one post about someone having Flash installed somewhere other than C: or something... can you try adding the location of the air classes to your document classpath and see if they still come up as unfound. It's possible that the Publish Settings template for AIR makes certain assumptions about the location of those classes On Tue, Nov 18, 2008 at 5:11 PM, Michael Stocke [EMAIL PROTECTED] wrote: OK. I installed what I think is the latest AIR extension for Flash -- beta 3. I deleted old beta files and ran the cleanup utility. I selected AIR 1.0 in the Publish Settings. I still get the error. I really want to learn how to use AIR with the Flash IDE, but for some reason it won't work for me right now. Any other suggestions? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jonathan howe Sent: Monday, November 17, 2008 5:17 PM To: Flash Coders List Subject: Re: [Flashcoders] 1172: definition flash.desktop:NativeApplication It does sound like you don't have Adobe Air as the version value in the Publish Settings dialog. Can you check that? There should be no problem in including that code in a class... references to NativeApplication are static and it could easily be put in a main document class or deeper. Pedro, there is a way to get a temporary certificate via the Commands - Air and Application Settings dialog. There are good tutorials on Lynda.com that are part of the free intro videos (i.e. membership is not required). http://movielibrary.lynda.com/html/modPage.asp?ID=535 -jonathan On Mon, Nov 17, 2008 at 2:28 PM, Pedro Kostelec [EMAIL PROTECTED] wrote: I tried your code and it works well. I got no error. (using Fl cs4). I mean, when i press Cntrl+ENTER the app runs all right. (But i have no idea how to actually make it a real AIR app; when i click on publish i get a window asking for a digital certificate! Where can i get it?)Maybe you don't have the latest update Air plug-in? I just started playing with AIR yesterday, so i don't have any ideas what else could be the reason for your problem. Pedro On Mon, Nov 17, 2008 at 5:46 PM, Michael Stocke [EMAIL PROTECTED] wrote: Good afternoon group. I didn't get a response on the Flash Tiger list last week, so that's why I'm cross-posting. Hopefully this isn't off-topic. I am in the process of going through some AIR tutorials using the Flash IDE, and I have encountered some errors. I am following the instructions exactly and I still can't get the app to compile (although I did discover that the tutorial did leave out some key info). I even tried the sample file and that won't compile. I am simply trying to make an application with custom chrome that is draggable, that can be closed, and that can be minimized. I haven't added any other functionality at this time. The tutorial says to put the code on a frame in the timeline (which I wasn't really comfortable with, but what do I know?). Here is the relevant code: import flash.desktop.NativeApplication; import flash.events.MouseEvent; back.addEventListener(MouseEvent.MOUSE_DOWN, back_CLICK); function back_CLICK(e:MouseEvent):void { stage.nativeWindow.startMove(); } minimize.addEventListener(MouseEvent.CLICK, minimize_CLICK); function minimize_CLICK(e:MouseEvent):void { stage.nativeWindow.minimize(); } closeButton.addEventListener(MouseEvent.CLICK,closeButton_CLICK); function closeButton_CLICK(e:MouseEvent):void { NativeApplication.nativeApplication.exit(); } Here is a link to the tutorial: http://www.adobe.com/devnet/air/flash/articles/custom_chrome_app.html Among other things, I get the following error: 1172: definition flash.desktop:NativeApplication. I have installed the Flash AIR plug-in, and I do get code prompts in the actions window. Does anyone have any idea why I am getting this error and how I might overcome it? Also, I'd prefer to include this code in a class, but I'm not quite sure how I would go about doing that, so any ideas on that would be appreciated as well. Thanks in advance for any advice. Mike Stocke Interface Engineer Organic, Inc. | Detroit 2600 S. Telegraph Road -- Suite 100, Bloomfield Hills, MI 48302 t: 248.454.4015 | f: 248.454.3370 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Blog: http://Threeminds.Organic.com http://threeminds.organic.com/ http://threeminds.organic.com/ http://threeminds.organic.com/ Website: www.Organic.com http://www.organic.com/ http://www.organic.com/ http://www.organic.com/ ___ Flashcoders mailing list Flashcoders
Re: [Flashcoders] 1172: definition flash.desktop:NativeApplication
It does sound like you don't have Adobe Air as the version value in the Publish Settings dialog. Can you check that? There should be no problem in including that code in a class... references to NativeApplication are static and it could easily be put in a main document class or deeper. Pedro, there is a way to get a temporary certificate via the Commands - Air and Application Settings dialog. There are good tutorials on Lynda.com that are part of the free intro videos (i.e. membership is not required). http://movielibrary.lynda.com/html/modPage.asp?ID=535 -jonathan On Mon, Nov 17, 2008 at 2:28 PM, Pedro Kostelec [EMAIL PROTECTED] wrote: I tried your code and it works well. I got no error. (using Fl cs4). I mean, when i press Cntrl+ENTER the app runs all right. (But i have no idea how to actually make it a real AIR app; when i click on publish i get a window asking for a digital certificate! Where can i get it?)Maybe you don't have the latest update Air plug-in? I just started playing with AIR yesterday, so i don't have any ideas what else could be the reason for your problem. Pedro On Mon, Nov 17, 2008 at 5:46 PM, Michael Stocke [EMAIL PROTECTED] wrote: Good afternoon group. I didn't get a response on the Flash Tiger list last week, so that's why I'm cross-posting. Hopefully this isn't off-topic. I am in the process of going through some AIR tutorials using the Flash IDE, and I have encountered some errors. I am following the instructions exactly and I still can't get the app to compile (although I did discover that the tutorial did leave out some key info). I even tried the sample file and that won't compile. I am simply trying to make an application with custom chrome that is draggable, that can be closed, and that can be minimized. I haven't added any other functionality at this time. The tutorial says to put the code on a frame in the timeline (which I wasn't really comfortable with, but what do I know?). Here is the relevant code: import flash.desktop.NativeApplication; import flash.events.MouseEvent; back.addEventListener(MouseEvent.MOUSE_DOWN, back_CLICK); function back_CLICK(e:MouseEvent):void { stage.nativeWindow.startMove(); } minimize.addEventListener(MouseEvent.CLICK, minimize_CLICK); function minimize_CLICK(e:MouseEvent):void { stage.nativeWindow.minimize(); } closeButton.addEventListener(MouseEvent.CLICK,closeButton_CLICK); function closeButton_CLICK(e:MouseEvent):void { NativeApplication.nativeApplication.exit(); } Here is a link to the tutorial: http://www.adobe.com/devnet/air/flash/articles/custom_chrome_app.html Among other things, I get the following error: 1172: definition flash.desktop:NativeApplication. I have installed the Flash AIR plug-in, and I do get code prompts in the actions window. Does anyone have any idea why I am getting this error and how I might overcome it? Also, I'd prefer to include this code in a class, but I'm not quite sure how I would go about doing that, so any ideas on that would be appreciated as well. Thanks in advance for any advice. Mike Stocke Interface Engineer Organic, Inc. | Detroit 2600 S. Telegraph Road -- Suite 100, Bloomfield Hills, MI 48302 t: 248.454.4015 | f: 248.454.3370 Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Blog: http://Threeminds.Organic.com http://threeminds.organic.com/ http://threeminds.organic.com/ Website: www.Organic.com http://www.organic.com/ http://www.organic.com/ This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this email or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this email in error, please immediately notify us by calling our Help Desk at (415) 581-5552 or by e-mailing us at [EMAIL PROTECTED] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Stage instances, nested clips frames (AS3)
Great links, Olivier! One of the additional oddities called out in the second link: if i trace the number of children i get 1 still, but if i do getChildAt(0), it traces null on the first frame That is something I noticed myself but forgot to include in my link. Really amazing! I am going to give the CustomWait static helper a shot. Can anyone confirm for me that it's fixed (sorry changed) in FP10? -jonathan On Thu, Nov 13, 2008 at 11:14 AM, Olivier Besson [EMAIL PROTECTED] wrote: hi, this old as3 feature has upset so many people that, as far as I remember, this has been fixed in flash player 10. Meanwhile, you have to resort to tricks, sorry I don't know which one is the best. This one seems to be what you suggested: http://www.lecrabe.net/blog/index.php?post/2008/08/05/41-as3-gotoandstop-gotoandplay-issue Here senocular suggests listening ADDED event from a parent node: (because ADDED bubbles ;)) http://www.kirupa.com/forum/showthread.php?t=247040 Olivier jonathan howe a écrit : Hello, I've got a situation where animators hand me a clip that has a bunch of frame labels, each representing an animation sequence. At each frame label, I've got labelled MovieClips inside the clip. So, for example, on each frame I have a clip called character_mc, talkbubble_mc, hitarea_mc. The reason for the setup like this is that the animators position the key clips in different ways depending on the state of the character (walking, running, etc.). They like it all in one clip so they can make sure the transitions between the states are smooth. So, the problem I have is that in AS3, I'll tell the parent clip to go to a frame, and the value of character_mc will return null ... sometimes. This never used to happen in AS2; it always seemed that as soon as I executed gotoAndStop on a parent clip, the stage instances of that parent clip were available to me on the very next line of code. [OR, perhaps I was fooled into thinking this because of AS2's permissive ways (i.e. I was actually calling operations on a null instance)?] What I find strange is that character_mc is not null the line before the gotoAndStop execution. Almost as if the parent clip is in a halfway state ... So my question is, how can I make sure that the instances on the stage are initialized, defined and ready to access? Is there a way to force this? Do I have to create a deferred part of the code and add an ENTER_FRAME event every time I want to access the clip? Or to get away from this, do I really have to convert all of the animators' clips into a structure that doesn't rely on the parent clip's timeline? -jonathan -- Olivier Besson (gludion) - (33 1) 44 64 78 99 http://.gludion.com http://blog.gludion.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 text fitting in variable box
Is there an important distinction between scaling a TextField object and changing the font size? Perhaps you are storing the formatting or there are visual rendering implications or anything?? Otherwise, it seems like Joel's solution would work nicely to achieve what you want. -jonathan On Wed, Nov 12, 2008 at 6:18 PM, Latcho [EMAIL PROTECTED] wrote: I'm talking about font size, not stretching a container. Increasing / decreasing font size to get an optimal fill of a box which will have a fixed width and a certain height which can only be determined during load time. I could increase the font size of a textfield in a loop and measure it's height on every point increase; when it overflows my wanted box-height I take the font size of the previous step. Is there an easier way ? Stijn Joel Stransky wrote: Sounds like a bad design decision to make titles of the same category various sizes. But I think you can just set the .width property, then set the .scaleY equal to the .scaleX or visa versa depending on which dimension is more important. On Wed, Nov 12, 2008 at 9:40 AM, Latcho [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: I need to place project-titles in a multiline textfield, wherof the width will be fixed, but sometimes this box might be of less height because of more space used by other displaying project elements. Is there a class that can dynamically regulate the font it's size to fit the loaded text to a certian textfield height of a multile textfield? The project titles are variable in character word length. How is this solvable. Thanks ! Stijn ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com mailto:Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- --Joel ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Stage instances, nested clips frames (AS3)
Hello, I've got a situation where animators hand me a clip that has a bunch of frame labels, each representing an animation sequence. At each frame label, I've got labelled MovieClips inside the clip. So, for example, on each frame I have a clip called character_mc, talkbubble_mc, hitarea_mc. The reason for the setup like this is that the animators position the key clips in different ways depending on the state of the character (walking, running, etc.). They like it all in one clip so they can make sure the transitions between the states are smooth. So, the problem I have is that in AS3, I'll tell the parent clip to go to a frame, and the value of character_mc will return null ... sometimes. This never used to happen in AS2; it always seemed that as soon as I executed gotoAndStop on a parent clip, the stage instances of that parent clip were available to me on the very next line of code. [OR, perhaps I was fooled into thinking this because of AS2's permissive ways (i.e. I was actually calling operations on a null instance)?] What I find strange is that character_mc is not null the line before the gotoAndStop execution. Almost as if the parent clip is in a halfway state ... So my question is, how can I make sure that the instances on the stage are initialized, defined and ready to access? Is there a way to force this? Do I have to create a deferred part of the code and add an ENTER_FRAME event every time I want to access the clip? Or to get away from this, do I really have to convert all of the animators' clips into a structure that doesn't rely on the parent clip's timeline? -jonathan -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Slightly OT, IDE panel stacking...
Hi, Glen, I don't know how to fix it (other than restarting flash) but I have notice stacking bugs start to surface when you: Start Build Movie or Debug Movie and then switch applications (a natural thing to do when you're bored of watching the bar move) and don't switch back in time. Are you having the problem right from startup? -jonathan On Mon, Nov 10, 2008 at 6:24 PM, Glen Pike [EMAIL PROTECTED]wrote: Hi, Before I go completely mad, does anyone know how to rearrange the stacking order of floating panels in the Flash CS3 IDE. My library panel disappears behind my properties panel and the Debug Flash Player window is now stacked behind the properties panel and the 2 docks - left and right. Is there anyway I can force the Debug Player to be on top - don't mind the output window appearing, that makes sense, but hiding it behind the other panels is really starting to get my goat. Thanks in advance. Glen -- Glen Pike 01326 218440 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash Authortime vs Runtime children
Hi, Glen, It would be interesting to know for triage: How are you referring to the components in your main class, i.e. - are your contributors using the automatically declare stage instances or - you are creating matching variables in the main class or - not even giving them instance names and relying on the ADDED_TO_STAGE handler to fire to 'make themselves known'? -jonathan On Mon, Nov 3, 2008 at 10:17 PM, sebastian [EMAIL PROTECTED] wrote: forget to addChild()? The problem I have run into is that when I instanciate an AppScreen symbol from my library - it's not on stage - and add it to the stage I handle the ADDED_TO_STAGE event for wiring the components up. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flash Authortime vs Runtime children
I don't think this is really Glen's problem. You should not have to addChild() an object placed on the stage via the authoring environment. On Tue, Nov 4, 2008 at 6:27 PM, sebastian [EMAIL PROTECTED] wrote: If you don't do addChild() it won't actually be on the stage - even if you add it to an array or a variable inside of the clip. Consider: public class Tree blabla () { private var apple:Apple;//where 'Apple' is some item you want to attach to this class public function Tree () { apple = new Apple(); addChild(apple); } } If I don't do an 'addChild' the Apple class will simply be assigned to the variable apple but it will NOT be opn the stage until I add it via addChild(); Make sense? Google it otherwise, it's a basic AS3 concept that differs from AS2. :) Seb. Glen Pike wrote: Hi, If I create my AppScreens dynamically and add them - the added to stage event handler for the AppScreen sub-class is called. I am not calling addChild() for the components in the AppScreen sub-class because they are placed at authortime inside the clip - I should not have to call addChild for these surely? Glen sebastian wrote: forget to addChild()? The problem I have run into is that when I instanciate an AppScreen symbol from my library - it's not on stage - and add it to the stage I handle the ADDED_TO_STAGE event for wiring the components up. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders