[Flashcoders] pass variables between classes in AS3
I have an AS3 document class where I load and parse an xml file into an array. I would like to pass that array to a movieclip(?) class - basically its a button that will create new movieclips that will differ based on my xml array. How in the world do I get the array from the document class to other classes... arggg! as3 is blowing my mind. I've googled but I can't find anything that make sense to my as2 brain. Thanks again. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] pass variables between classes in AS3
Depends on the structure, but, in the end, it sounds like it will boil down to having some static method for the the document class to find the movieclip, or the movieclip to find the document class. The simplest variant of this approach is the Singleton pattern. Is there only one instance of your document class, ever? Or only one instance of your movieclip class? -- T. Michael Keesey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carl Welch Sent: Thursday, July 27, 2006 12:09 AM To: Flashcoders mailing list Subject: [Flashcoders] pass variables between classes in AS3 I have an AS3 document class where I load and parse an xml file into an array. I would like to pass that array to a movieclip(?) class - basically its a button that will create new movieclips that will differ based on my xml array. How in the world do I get the array from the document class to other classes... arggg! as3 is blowing my mind. I've googled but I can't find anything that make sense to my as2 brain. Thanks again. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] blank flash movie (what is this)
I have recently produced a simple movie that appears not to work. The movie is : http://www.stairclimber-uk.com/images/movie.html http://www.stairclimber-uk.com/images/movie.swf http://www.stairclimber-uk.com/images/movie.fla When I try to see that movie on my localhost - it looks fine. When I look at it on the above server, it is blank. Do you think that I have done something wrong with the flash? Or is it possible that it is the (Windows) server? -- Gavin Lilley. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] blank flash movie (what is this)
Have you uploaded 'video.flv' (the resource specified in contentPath)? Adrian On 7/27/06, Gavin Lilley [EMAIL PROTECTED] wrote: I have recently produced a simple movie that appears not to work. The movie is : http://www.stairclimber-uk.com/images/movie.html http://www.stairclimber-uk.com/images/movie.swf http://www.stairclimber-uk.com/images/movie.fla When I try to see that movie on my localhost - it looks fine. When I look at it on the above server, it is blank. Do you think that I have done something wrong with the flash? Or is it possible that it is the (Windows) server? -- Gavin Lilley. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Array Empowerment
How about setting it up on www.osflash.org? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ Sent: 26 July 2006 23:04 To: Flashcoders mailing list Subject: RE: [Flashcoders] Array Empowerment It's not done yet. I've identified some bugs in certain functions and I'm also optimizing it still with everyone's help. Don't want to jump the gun too quick until it's absolutely ready. :) I think once it's ready, though, SVN would be a great place to keep this open source project. BLITZ | Steven Sacks - 310-551-0200 x209 -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Chris Hill Sent: Wednesday, July 26, 2006 2:56 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Array Empowerment Done! :D http://ubergeek.tv/XArray/XArray.as I'll put it up there from now on instead of spamming people's inboxes more. -C Steven Sacks | BLITZ wrote: Chris, You rock! How about calling it PowerArray or XArray instead. :) -Steven BLITZ | Steven Sacks - 310-551-0200 x209 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] blank flash movie (what is this)
http://www.stairclimber-uk.com/images/video.flv not found Serge I have recently produced a simple movie that appears not to work. The movie is : http://www.stairclimber-uk.com/images/movie.html http://www.stairclimber-uk.com/images/movie.swf http://www.stairclimber-uk.com/images/movie.fla When I try to see that movie on my localhost - it looks fine. When I look at it on the above server, it is blank. Do you think that I have done something wrong with the flash? Or is it possible that it is the (Windows) server? -- Gavin Lilley. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Array Empowerment
To me it has always seemed more logical to use if this.length == 0 for the very reason of explicitness that you stated; and thus, using the alternative !this.length was less enticing. I speculated (wrongly) after reading your post that there might be some sort of speed optimization inherent to checking if something is false than actually checking for a specific length defined explicitly in your code. I don't know why I thought that, and obviously I am wrong for the various reasons stated earlier. Further, !this.length is very likely slower. Conditions are meant to resolve to a boolean, but the implicit cast is to a string, which means walking the prototype to find the property, and if it exists (!=undefined), casting it to a string, and then recasting it to a boolean. Meanwhile, this.length==0 resolves directly to a boolean, and, as such, should be a bit faster. It wouldn't be a noticable difference in speed in a single condition, but in a recursive loop where it might be evaluated thousands of times, it could make a significant difference. ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] How to change reference?
Hi I attach clip with this code: _root.attachMovie(as,as,100); Is it possible to change reference to this clip? Instead of as.something to have _root.something Another words I want to find way to say _root instead of _root.as. Is it possible? Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] blank flash movie (what is this)
Hi there Adrian, Yes, I have uploaded this file. Im thinking that it is some permissions problem or relative path problem. -- Gavin Lilley. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How to change reference?
you dun have to put _root.attachMovie since you are already attaching it right from your current maintimeline. Instead just: attachMove(as,as,100); will do the job. Regrads! On 7/27/06, natalia Vikhtinskaya [EMAIL PROTECTED] wrote: Hi I attach clip with this code: _root.attachMovie(as,as,100); Is it possible to change reference to this clip? Instead of as.something to have _root.something Another words I want to find way to say _root instead of _root.as. Is it possible? Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Discipline can be painful, but it helps when you give it a chance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] blank flash movie (what is this)
Hi Gavin, As pointed out in Serge's message, http://www.stairclimber-uk.com/images/video.flv still doesn't work. According to your contentPath, video.flv should be in the same folder as the other assets. If it isn't, then you do indeed have a relative path problem. A. On 7/27/06, Gavin Lilley [EMAIL PROTECTED] wrote: Hi there Adrian, Yes, I have uploaded this file. Im thinking that it is some permissions problem or relative path problem. -- Gavin Lilley. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] blank flash movie (what is this)
I have seen this on windows servers before, it may be because the filetype is not registered on the server. You can test by checking the file is uploaded ftp wise and it is not accessible via a browser with the correct URL. Toby -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gavin Lilley Sent: 27 July 2006 10:59 To: Flashcoders mailing list Subject: Re: [Flashcoders] blank flash movie (what is this) Hi there Adrian, Yes, I have uploaded this file. Im thinking that it is some permissions problem or relative path problem. -- Gavin Lilley. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] catching errors by webservice : solution
I finally found the solution... thanks to google and forums: flash is not 100% soap compatible !!! the 1.1 SOAP standard turns the exceptions in 500 header error, wich causes a lost of the connection in flash, instead of reading the faultString. here's the link to Adobe's technote PendingCall.onFault cannot capture SOAP:FAULT responses: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=3c6784bc ++ PiR PR Durand a écrit : Hi List Has anyone any way to receive the exceptions thrown by a webservice server please? as it's asynchronous, the classical try...catch can't work on the service method call. but, as soon as the server throws an exception (the sent SOAP is a correct fault soap file if I call it from a browser), I only receive an event in my Log listener, saying unable to connect to endpoint... How do you actually do to receive and interpret the server faults? ++ PiR ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How to change reference?
Maybe I was not clear. Clip as has function funk1 To call this function from root I should say as.func1 or from another clip: _root.as.func1. I want to find way to call this function as _root.func1 even if she is in clip with name as. 2006/7/27, denfi [EMAIL PROTECTED]: you dun have to put _root.attachMovie since you are already attaching it right from your current maintimeline. Instead just: attachMove(as,as,100); will do the job. Regrads! On 7/27/06, natalia Vikhtinskaya [EMAIL PROTECTED] wrote: Hi I attach clip with this code: _root.attachMovie(as,as,100); Is it possible to change reference to this clip? Instead of as.something to have _root.something Another words I want to find way to say _root instead of _root.as. Is it possible? Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Discipline can be painful, but it helps when you give it a chance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] How to change reference?
you can make an additional cross-reference _root.func1 = _root.as.func1; but why would you want to do that? Why don´t you create the function directly on the root? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of natalia Vikhtinskaya Sent: Thursday, July 27, 2006 12:40 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] How to change reference? Maybe I was not clear. Clip as has function funk1 To call this function from root I should say as.func1 or from another clip: _root.as.func1. I want to find way to call this function as _root.func1 even if she is in clip with name as. 2006/7/27, denfi [EMAIL PROTECTED]: you dun have to put _root.attachMovie since you are already attaching it right from your current maintimeline. Instead just: attachMove(as,as,100); will do the job. Regrads! On 7/27/06, natalia Vikhtinskaya [EMAIL PROTECTED] wrote: Hi I attach clip with this code: _root.attachMovie(as,as,100); Is it possible to change reference to this clip? Instead of as.something to have _root.something Another words I want to find way to say _root instead of _root.as. Is it possible? Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Discipline can be painful, but it helps when you give it a chance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Shared Fonts in Flash 7
What's the best approach for sharing a font in Flash 7? In Flash 6, I could place the font in a base movie and create text fields in loaded movies dynamically using the font in base. This doesn't appear to work in Flash 7. There were lots of problems using shared fonts in Flash 6. Branden Hall outlined these a long time ago: http://chattyfig.figleaf.com/pipermail/flashcoders/2002-August/045588.html. Have things changed? Do shared fonts work properly in Flash 7? Thanks, Raymond Simmons ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] blank flash movie (what is this)
Glad you solved it and that's a handy thing to remember. A. On 7/27/06, Gavin Lilley [EMAIL PROTECTED] wrote: Good morning All, Thank you for looking at this. it is a very basic thing, but for some reason I just couldnt see the wood for the trees! Toby was correct, it was a setting on iis, next time i will look at the simple problems before jumping in two feet first! -- Gavin Lilley. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Creating dynamic text field using font embedded in parent movie clip
Hi Raymond, I missed your reply to this. You're absolutely right, it's less than ideal but I thought I'd mention it because it works :) The onnly reason our project is structured in this way was because several people were working on various child .swfs in various locations. I haven't been given the time to rationalise it all. I intended to try removing all the symbols in the child clips as a test for you but haven't had a chance yet. I'll try this this afternoon and report back to you what my findings are. Cheers Adrian On 7/26/06, Raymond Simmons [EMAIL PROTECTED] wrote: Adrian, Thanks for your reply. I'm afraid I might be missing something, but with the technique you described for Flash 7, wouldn't the end result be that the child FLAs are exported with the font as well? By adding the font symbols to the libraries of the child FLAs, that's causing the font to be included in the both the base SWF and the child SWFs, which would explain why the technique works :( Please help me see if I've missed something. My hope is to avoid embedding the font in the child FLAs. That way if the font changes, I only have to change it in one place. Also, if we have to work with a Mac-only font, it can be embedded in base.fla, and the folks working on PCs can still develop the child FLAs even though they don't have the font. Kind regards, Raymond Simmons - Original Message - From: Adrian Park [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, July 26, 2006 12:55 AM Subject: Re: [Flashcoders] Creating dynamic text field using font embedded inparent movie clip I have successfully used this exact technique when targeting Flash 6 but, as I think about it, I haven't used it in any Flash 7 projects yet. That said, due to a quirk in the way a current project has evolved, it has ended up using this technique but with the addition of identical Symbols in the library of 'base.fla' and every child .fla. So, base.fla has 2 Font Symbols in the library for the Normal and Bold versions of the Font. 2 text fields exist on stage with the fonts embedded (we've assigned the Font name given to the Symbols to the text field, not the original font). The font symbols are then duplicated in each sub library but the text fields are not. This seems to be working with no problems. I'm doing a bit of optimisation at the moment and was considering using a Shared Font Library to tidy things up but you hav me worried now :) HTH Adrian On 7/26/06, Raymond Simmons [EMAIL PROTECTED] wrote: In Flash 6, I was able to embed a font in an FLA (we'll call it base.fla ), load into base.swf an external SWF (we'll call it main.swf), and create a text field in main.swf using the font embedded in base.swf. However, I can't seem to get this approach to work in Flash 7. More specifically, in Flash 6, I can add a text field off stage in base.fla, and embed the font. Let's say the font is Proxima Nova Bold. In main.fla, I can create a text field using the Proxima Nova Bold font with the following code: createTextField(myText,1,0,0,100,25); var myStyle = new TextFormat(); myStyle.font = Proxima Nova Bold; myText.setNewTextFormat(myStyle); myText.embedFonts = true; myText.text = Hello World!; But if I export main.fla as Flash 7, the technique no longer works. Has anyone else used this approach successfully in Flash 6, and found that it does not work in Flash 7? Or is it possible I'm missing something. I would rather avoid the use of a shared font library, because I've heard they have the potential to corrupt FLAs. However, if anyone would like to convince me my fears are unfounded, I'm open to being convinced. Thanks, Raymond Simmons ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf
Re: [Flashcoders] pass variables between classes in AS3
I could not get your problem exactly, but is this what you are looking for? //The document class package { import flash.display.MovieClip; public class myClass extends MovieClip { public static var myArr:Array=[1,2,3]; private var myC2 = new myClass2 function myClass() { sendArrays() } function sendArrays() { var someArr = [5,6,7] myC2.getArrays(myArr,someArr) } } } // the other class package { import flash.display.MovieClip; public class myClass2 extends MovieClip { function myClass2() { } function getArrays(a,b) { trace(hey = +a) trace(hey2 = +b) } } } If this is not what you are looking for, could you explain your question a bit more in detail? thanks - Original Message - From: Carl Welch [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, July 27, 2006 12:39 PM Subject: [Flashcoders] pass variables between classes in AS3 I have an AS3 document class where I load and parse an xml file into an array. I would like to pass that array to a movieclip(?) class - basically its a button that will create new movieclips that will differ based on my xml array. How in the world do I get the array from the document class to other classes... arggg! as3 is blowing my mind. I've googled but I can't find anything that make sense to my as2 brain. Thanks again. -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Mac IDE for AS !
I'm not working actually in Mac, but a I used to. In those times the best code editor I got was BBEdit by barebones. Cause it's modular development, you could add support for any languages. Check it. Regards -- SalU2 f a r i d | s i l v a | a b o i d www.e-foco.com.ar tel: +54 11 4300-1042 cel: 15-6475-3021 Moderador de Salas Dreamweaver y Programación Multimedia User Group Adobe Argentina http://www.mmug-ar.com.ar ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Array Empowerment
That's the real source of sloppiness, Java has eliminitaed these discussions by the simple expeditent of requiring that the conditional resolves to a boolean, nothing wlse will do. THe real question to me is does AS3 change this behavior? On 7/27/06, ryanm [EMAIL PROTECTED] wrote: To me it has always seemed more logical to use if this.length == 0 for the very reason of explicitness that you stated; and thus, using the alternative !this.length was less enticing. I speculated (wrongly) after reading your post that there might be some sort of speed optimization inherent to checking if something is false than actually checking for a specific length defined explicitly in your code. I don't know why I thought that, and obviously I am wrong for the various reasons stated earlier. Further, !this.length is very likely slower. Conditions are meant to resolve to a boolean, but the implicit cast is to a string, which means walking the prototype to find the property, and if it exists (!=undefined), casting it to a string, and then recasting it to a boolean. Meanwhile, this.length==0 resolves directly to a boolean, and, as such, should be a bit faster. It wouldn't be a noticable difference in speed in a single condition, but in a recursive loop where it might be evaluated thousands of times, it could make a significant difference. ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Weldon MacDonald ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Trap browser interaction.
I'm working on a navigation system using named anchors in the main timeline to direct users to different states of my application from user interaction with the browser. I would prefer to do it more dynamically. Anyone who knows how the interaction is handled browser/flash with named anchors, and if it is possible to skip the timeline stuff, and trap the events directly from actionscript ? /Eskil -- http://www.eskilstina.com ---eskilStina -- Eskil Janson Mobil: +46 0735 31 68 52 Slupskjulsvägen 38 E-post: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 111 49 Stockholm Webb: www.eskilstina.com http://www.eskilstina.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Weird problem with encryption...
I found that typing all kinds of sequences did the trick. Typing ato z and copying it in a few times did the trick too. Then I backspaced to the '1' (Small L) and when replaced with other letters it was okay. Put the 'l' back and it reappeared. It seems to be the encoding process. Sometimes you get garbage after deleting the text but pressing the delete key removes the hidden char in the input field and the output clears. I noticed in the Flash debugger that a letter 'a' turns up as a/r ie with a carraige return. Hope that helps. I am new to the game so can't help more. If the debugger gave you more support I might be able to help. John - Original Message - From: ryanm [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, July 25, 2006 7:37 AM Subject: [Flashcoders] Weird problem with encryption... I'm working on some encryption classes, and I've run into an extremely odd problem. Let me give you an example: http://www.horsefish.net/businesstools/sample.html Scroll to the bottom to the Encryption Test and type asdf in the clear text string field. You'll notice that it breaks when you type the f. However, if you change any character in the string or any character in the key, it works fine. If you continue typing asdf repeatedly you'll see that it breaks at predictable intervals. My first thought was that something must be wrong with the characters being used to pad the strings, since it always seems to break when you reach half a block. So I spent all kinds of time going through the algorhithm and replacing the pad characters to see what I was doing wrong, etc, but found nothing. Then I noticed something odd. If you switch to XXTEA using the combobox in the top right corner, you can produce the same error. Type Hello, my name is (including the space at the end) and you'll see the same thing happening. Add a character or change any character in the string and it encrypts and decrypts correctly. Needless to say, I find it exceedingly odd that both ciphers would suffer the same flaw, despite the same flawed developer working on both of them. I don't know if the MD5 class suffers the same problem, since it's one way and I don't have a good way to check it short of using someone else's implementation to repeatedly check strings until I find a key/message pair that produce the wrong result. So, the point of all of this is that I believe, after banging on this for some time, that there must be some character that is being generated by the cipher that Flash isn't handling properly. The encrypted string is generated in both classes by using bitwise operators to alter character codes, and what I think may be happening is some non-printable or otherwise unimplemented or incorrectly implemented character code is being generated in the cipher text, which is causing it to output garbage instead of valid cipher text. Of course, when I try to decrypt the garbage, it only returns garbage. Does anyone have any ideas on this? Has anyone experienced anything similar? Any light you guys can shed on this would be helpful. ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] _global.styles.TextArea.embedFonts=true - problem
quote _global.styles.TextArea.embedFonts=true; _global.styles.TextArea.fontFamily=hnm;//hnm is a non system font embeded and linked as so in my library. then txt.text=asdbrasdbrasd;//txt is a v2 textarea component on the stage named as so. PROBLEM=embedFonts is causing nothing to display - why does this not act like a global style sheet? /quote This works: import mx.controls.TextArea; import mx.styles.CSSStyleDeclaration; _global.styles.TextArea.embedFonts = true; _global.styles.TextArea.fontFamily = hnm; this.createClassObject(TextArea, txt, 1); txt.text = asd\nasd\nasd; But it won't work with html=true, my theory is because Flash adds font tag with its face set to the default font (Times New Roman) which is not embeded in your TextArea therefore nothing will be displayed. Kenneth Kawamoto http://www.materiaprima.co.uk ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] loadComplete but no loadInit
Exactly the problem I encountered a few days ago - but no solution to it yet. The only clue I have is that in the testing environment both onLoadComplete and onLoadInit were successfully working. It was when I tried launching either a standalone projector or the swf independently, that the onLoadInit became erratic - it would fail on certain pages and not on others. I am loading external swfs as page content using movieClipLoader, and I know it isn't the page content or size, because all are identical ( small files of about 15k with exactly the same content). I have tried using delegates and cleaning the Listener and Loader (removing and deleting, then recreating) up completely after each load - same result. The answer is out there somewhere . T Fairfield ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Array Empowerment
On 7/27/06, Weldon MacDonald [EMAIL PROTECTED] wrote: That's the real source of sloppiness, Java has eliminitaed these discussions by the simple expeditent of requiring that the conditional resolves to a boolean, nothing wlse will do. THe real question to me is does AS3 change this behavior? I don't know about AS3, but haXe doesn't allow that kind of sloppiness, either. Generally, it beats any AS flavour hands down when it gets to typing, and those of you who consider such things important should definitely check out haxe.org -- you can easily learn how to do the same things you can do with AS and then still have what was a whole new world for me to explore to further improve your code, especially when typing is concerned. AS allows if(a.length), that's why I always did it that way and never felt bad about it. Why bother to differ between an undefined length property and one that is 0 while iterating over an array that itself can contain objects of any kind, potentially of mixed types, and I having to trust an unsafe cast if I don't want the overhead of checking the type at runtime? Just my two cents worth to a potentially endless discussion that might turn into a flame war à la whether or not to use _root. Mark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Loading Remote Images Cross Domain files
Hi all, I'm having a bit of trouble figuring out this cross domain policy stuff. I've read Macromedia's tutorial and Colin Moock's explanation and while I understand the principle, I'm still unable to get it working. Quite simply, I want to load images from a remote server. I've set it all up and it just fails silently. I checked what's happpening in the background with LiveHTTPHeaders and the request for the crossdomain.xml file never gets sent, even when I explicitly set it with System.security.loadPolicyFile. I'm publishing as Flash 7, and using the Flash 9 plugin. This seems like it should work straight off from reading the tutorials, so i'm really at a bit of a loss. To eliminate the chance that this was my server, i've also tried loading things from flickr with the same result. Any suggestions, I'd really appreciate it. - Kevin ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Loading Remote Images Cross Domain files
Is the cross domain file on the server you want to connect to and stating your server with the .swf is OK to have access? Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Kevin Cannon Sent: Thursday, July 27, 2006 9:56 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Loading Remote Images Cross Domain files Hi all, I'm having a bit of trouble figuring out this cross domain policy stuff. I've read Macromedia's tutorial and Colin Moock's explanation and while I understand the principle, I'm still unable to get it working. Quite simply, I want to load images from a remote server. I've set it all up and it just fails silently. I checked what's happpening in the background with LiveHTTPHeaders and the request for the crossdomain.xml file never gets sent, even when I explicitly set it with System.security.loadPolicyFile. I'm publishing as Flash 7, and using the Flash 9 plugin. This seems like it should work straight off from reading the tutorials, so i'm really at a bit of a loss. To eliminate the chance that this was my server, i've also tried loading things from flickr with the same result. Any suggestions, I'd really appreciate it. - Kevin ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Hebrew in Flash?
yeah, hebrew is very tricky, but if you don't have input text fields there, it's still manageable.. look into X-FONTS in which every character has been flipped. place a textfield with an XFONT font on the stage and make its text aligh-left. Then flip the textfield horizontally and your hebrew text will display correctly. Mixing hebrew and english in the same field can bring new issues which are too numerous to mention here.. Good luck! Uri http://www.flashmagician.net -- Original Message -- From: iestyn lloyd [EMAIL PROTECTED] Reply-To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Date: Thu, 27 Jul 2006 14:42:27 +0100 Hi List, I'm going to be working on a flash project that will need to be in 10 languages, one of which is Hebrew. I'll be using the Strings Panel and XLIFF to do the localisation. After a quick google, I see that people have had some problems with Hebrew, as it's Right-to-left, and uses some special kind of character set. Has anyone here dealt with Hebrew in flash? If you have, could you outline some of the problems I might face? Cheers! iestyn ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com h Sent via the WebMail system at flashmagician.net ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Row Height in Tree Components
I'm having a problem setting the row height in a Tree component. Since Tree extends List, you'd think tree.rowHeight = 50 or tree.setRowHeight( 50 ) would do the trick, but neither seems to be doing squat. I tried using icons of varying heights and failed to see any corresponding change in row heights -- just icons that overlap each other. Can anyone point me int he right direction here? Do I have to write a cellRenderer to accomplish something this dinky? -Mark -- John Mark Hawley The Nilbog Group 773.968.4980 (cell) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Hebrew in Flash?
Should work without too many problems as Flash supports unicode. Nik On 7/27/06, iestyn lloyd [EMAIL PROTECTED] wrote: Hi List, I'm going to be working on a flash project that will need to be in 10 languages, one of which is Hebrew. I'll be using the Strings Panel and XLIFF to do the localisation. After a quick google, I see that people have had some problems with Hebrew, as it's Right-to-left, and uses some special kind of character set. Has anyone here dealt with Hebrew in flash? If you have, could you outline some of the problems I might face? Cheers! iestyn ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Nik C ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] AS3 scripting, first try - some Q's
OK having a dabble in AS3 for the first time and I ported a simple particle script over to the timeline: [as] import flash.events.Event; var numBots:int = 50; var balls:Array=new Array(); // for(var i=0; i=numBots; i++){ var bl:Ball=new Ball(); var tmpBall=addChild(bl); tmpBall.xmin = tmpBall.width/2; tmpBall.ymin = tmpBall.height/2; tmpBall.xmax = 550-tmpBall.xmin; tmpBall.ymax = 400-tmpBall.ymin; // tmpBall.x = Math.floor(Math.random()*(550-tmpBall.width))+tmpBall.xmin; tmpBall.y = Math.floor(Math.random()*(400-tmpBall.height))+tmpBall.ymin; // tmpBall.xVel = Math.floor(Math.random()*20)-10; tmpBall.yVel = Math.floor(Math.random()*20)-10; tmpBall.alpha=Math.random()*1 tmpBall.scaleX=tmpBall.scaleY=Math.random()*1 balls.push(tmpBall); } addEventListener(Event.ENTER_FRAME, moveme); function moveme(event:Event):void{ var l=balls.length; for(var i=0; i=l; i++){ var bot:Ball = balls[i]; var nextX = bot.xVel+bot.x; var nextY = bot.yVel+bot.y; if (nextXbot.xmax) { bot.xVel = bot.xVel*-1; nextX = bot.xmax-(nextX-bot.xmax); } else if (nextXbot.xmin) { bot.xVel = bot.xVel*-1; nextX = bot.xmin+(bot.xmin-nextX); } if (nextYbot.ymax) { bot.yVel = bot.yVel*-1; nextY = bot.ymax-(nextY-bot.ymax); } else if (nextYbot.ymin) { bot.yVel = bot.yVel*-1; nextY = bot.ymin+(bot.ymin-nextY); } bot.x = nextX; bot.y = nextY; } } [/as] Gives me this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Timeline0_5bf5ad1effb5f4693f4c3e71f1bcfc7/moveme() What am I missing here? And while I'm at it, what's the simple AS3 scripting way (I know the class way) of doing myObj.onEnterFrame=function(){ this.x+=1 //Etc. } Cheers Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 scripting, first try - some Q's
its not an AS3 problem, its a small problem in your logic in the function moveme find it out :) - Original Message - From: Mike Mountain [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, July 27, 2006 9:07 PM Subject: [Flashcoders] AS3 scripting, first try - some Q's OK having a dabble in AS3 for the first time and I ported a simple particle script over to the timeline: [as] import flash.events.Event; var numBots:int = 50; var balls:Array=new Array(); // for(var i=0; i=numBots; i++){ var bl:Ball=new Ball(); var tmpBall=addChild(bl); tmpBall.xmin = tmpBall.width/2; tmpBall.ymin = tmpBall.height/2; tmpBall.xmax = 550-tmpBall.xmin; tmpBall.ymax = 400-tmpBall.ymin; // tmpBall.x = Math.floor(Math.random()*(550-tmpBall.width))+tmpBall.xmin; tmpBall.y = Math.floor(Math.random()*(400-tmpBall.height))+tmpBall.ymin; // tmpBall.xVel = Math.floor(Math.random()*20)-10; tmpBall.yVel = Math.floor(Math.random()*20)-10; tmpBall.alpha=Math.random()*1 tmpBall.scaleX=tmpBall.scaleY=Math.random()*1 balls.push(tmpBall); } addEventListener(Event.ENTER_FRAME, moveme); function moveme(event:Event):void{ var l=balls.length; for(var i=0; i=l; i++){ var bot:Ball = balls[i]; var nextX = bot.xVel+bot.x; var nextY = bot.yVel+bot.y; if (nextXbot.xmax) { bot.xVel = bot.xVel*-1; nextX = bot.xmax-(nextX-bot.xmax); } else if (nextXbot.xmin) { bot.xVel = bot.xVel*-1; nextX = bot.xmin+(bot.xmin-nextX); } if (nextYbot.ymax) { bot.yVel = bot.yVel*-1; nextY = bot.ymax-(nextY-bot.ymax); } else if (nextYbot.ymin) { bot.yVel = bot.yVel*-1; nextY = bot.ymin+(bot.ymin-nextY); } bot.x = nextX; bot.y = nextY; } } [/as] Gives me this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Timeline0_5bf5ad1effb5f4693f4c3e71f1bcfc7/moveme() What am I missing here? And while I'm at it, what's the simple AS3 scripting way (I know the class way) of doing myObj.onEnterFrame=function(){ this.x+=1 //Etc. } Cheers Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 scripting, first try - some Q's
for the second question myObj.addEventListener(enterFrame,fun) function fun(evt) { this.x++ } Supriya. - Original Message - From: Mike Mountain [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, July 27, 2006 9:07 PM Subject: [Flashcoders] AS3 scripting, first try - some Q's OK having a dabble in AS3 for the first time and I ported a simple particle script over to the timeline: [as] import flash.events.Event; var numBots:int = 50; var balls:Array=new Array(); // for(var i=0; i=numBots; i++){ var bl:Ball=new Ball(); var tmpBall=addChild(bl); tmpBall.xmin = tmpBall.width/2; tmpBall.ymin = tmpBall.height/2; tmpBall.xmax = 550-tmpBall.xmin; tmpBall.ymax = 400-tmpBall.ymin; // tmpBall.x = Math.floor(Math.random()*(550-tmpBall.width))+tmpBall.xmin; tmpBall.y = Math.floor(Math.random()*(400-tmpBall.height))+tmpBall.ymin; // tmpBall.xVel = Math.floor(Math.random()*20)-10; tmpBall.yVel = Math.floor(Math.random()*20)-10; tmpBall.alpha=Math.random()*1 tmpBall.scaleX=tmpBall.scaleY=Math.random()*1 balls.push(tmpBall); } addEventListener(Event.ENTER_FRAME, moveme); function moveme(event:Event):void{ var l=balls.length; for(var i=0; i=l; i++){ var bot:Ball = balls[i]; var nextX = bot.xVel+bot.x; var nextY = bot.yVel+bot.y; if (nextXbot.xmax) { bot.xVel = bot.xVel*-1; nextX = bot.xmax-(nextX-bot.xmax); } else if (nextXbot.xmin) { bot.xVel = bot.xVel*-1; nextX = bot.xmin+(bot.xmin-nextX); } if (nextYbot.ymax) { bot.yVel = bot.yVel*-1; nextY = bot.ymax-(nextY-bot.ymax); } else if (nextYbot.ymin) { bot.yVel = bot.yVel*-1; nextY = bot.ymin+(bot.ymin-nextY); } bot.x = nextX; bot.y = nextY; } } [/as] Gives me this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Timeline0_5bf5ad1effb5f4693f4c3e71f1bcfc7/moveme() What am I missing here? And while I'm at it, what's the simple AS3 scripting way (I know the class way) of doing myObj.onEnterFrame=function(){ this.x+=1 //Etc. } Cheers Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 scripting, first try - some Q's
function moveme(event:Event):void{ You aren't passing in an event there... so perhaps that is causing the vomit? - Eric On 7/27/06, Supriya [EMAIL PROTECTED] wrote: its not an AS3 problem, its a small problem in your logic in the function moveme find it out :) - Original Message - From: Mike Mountain [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, July 27, 2006 9:07 PM Subject: [Flashcoders] AS3 scripting, first try - some Q's OK having a dabble in AS3 for the first time and I ported a simple particle script over to the timeline: [as] import flash.events.Event; var numBots:int = 50; var balls:Array=new Array(); // for(var i=0; i=numBots; i++){ var bl:Ball=new Ball(); var tmpBall=addChild(bl); tmpBall.xmin = tmpBall.width/2; tmpBall.ymin = tmpBall.height/2; tmpBall.xmax = 550-tmpBall.xmin; tmpBall.ymax = 400-tmpBall.ymin; // tmpBall.x = Math.floor(Math.random()*(550-tmpBall.width))+tmpBall.xmin; tmpBall.y = Math.floor(Math.random()*(400-tmpBall.height))+tmpBall.ymin; // tmpBall.xVel = Math.floor(Math.random()*20)-10; tmpBall.yVel = Math.floor(Math.random()*20)-10; tmpBall.alpha=Math.random()*1 tmpBall.scaleX=tmpBall.scaleY=Math.random()*1 balls.push(tmpBall); } addEventListener(Event.ENTER_FRAME, moveme); function moveme(event:Event):void{ var l=balls.length; for(var i=0; i=l; i++){ var bot:Ball = balls[i]; var nextX = bot.xVel+bot.x; var nextY = bot.yVel+bot.y; if (nextXbot.xmax) { bot.xVel = bot.xVel*-1; nextX = bot.xmax-(nextX-bot.xmax); } else if (nextXbot.xmin) { bot.xVel = bot.xVel*-1; nextX = bot.xmin+(bot.xmin-nextX); } if (nextYbot.ymax) { bot.yVel = bot.yVel*-1; nextY = bot.ymax-(nextY-bot.ymax); } else if (nextYbot.ymin) { bot.yVel = bot.yVel*-1; nextY = bot.ymin+(bot.ymin-nextY); } bot.x = nextX; bot.y = nextY; } } [/as] Gives me this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at Timeline0_5bf5ad1effb5f4693f4c3e71f1bcfc7/moveme() What am I missing here? And while I'm at it, what's the simple AS3 scripting way (I know the class way) of doing myObj.onEnterFrame=function(){ this.x+=1 //Etc. } Cheers Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS3 scripting, first try - some Q's
function moveme(event:Event):void{ You aren't passing in an event there... so perhaps that is causing the vomit? The event gets passed auotmatically, it traces out fine On 7/27/06, Supriya [EMAIL PROTECTED] wrote: its not an AS3 problem, its a small problem in your logic in the function moveme find it out :) Y'see if I could work it out I wouldn't have posted would I? This may be a wood for trees situation, but posts like that just aren't helpful, so what's the point in posting? M ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS3 scripting, first try - some Q's
for(var i=0; il; i++){ Not for(var i=0; i=l; i++){ M -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Mountain Sent: 27 July 2006 17:17 To: Flashcoders mailing list Subject: RE: [Flashcoders] AS3 scripting, first try - some Q's function moveme(event:Event):void{ You aren't passing in an event there... so perhaps that is causing the vomit? The event gets passed auotmatically, it traces out fine On 7/27/06, Supriya [EMAIL PROTECTED] wrote: its not an AS3 problem, its a small problem in your logic in the function moveme find it out :) Y'see if I could work it out I wouldn't have posted would I? This may be a wood for trees situation, but posts like that just aren't helpful, so what's the point in posting? M ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] AS3 scripting, first try - some Q's
Anyone got an answer to the second part: what's the simple AS3 scripting way (I know the class way) of doing myObj.onEnterFrame=function(){ this.x+=1 //Etc. } Cheers Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 scripting, first try - some Q's
add an event listener to the mc Obj? On 7/27/06, Mike Mountain [EMAIL PROTECTED] wrote: Anyone got an answer to the second part: what's the simple AS3 scripting way (I know the class way) of doing myObj.onEnterFrame=function(){ this.x+=1 //Etc. } Cheers Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] AS3 Compiler For MAC OS X
Hi, Just installed Flash Player 9, and after reading the following: (http://www.senocular.com/flash/tutorials/as3withmxmlc), is a special compiler needed for MAC OS X? Return True, CK Principal/Designer/Programmer -Bushidodeep www.bushidodeep.com ___ An ideal is merely the projection, on an enormously enlarged scale, of some aspect of personality. -- Aldus Huxley ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 scripting, first try - some Q's
Y'see if I could work it out I wouldn't have posted would I? and u worked it out now! ~Arul Prasad On 7/27/06, Mike Mountain [EMAIL PROTECTED] wrote: for(var i=0; il; i++){ Not for(var i=0; i=l; i++){ M -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Mountain Sent: 27 July 2006 17:17 To: Flashcoders mailing list Subject: RE: [Flashcoders] AS3 scripting, first try - some Q's function moveme(event:Event):void{ You aren't passing in an event there... so perhaps that is causing the vomit? The event gets passed auotmatically, it traces out fine On 7/27/06, Supriya [EMAIL PROTECTED] wrote: its not an AS3 problem, its a small problem in your logic in the function moveme find it out :) Y'see if I could work it out I wouldn't have posted would I? This may be a wood for trees situation, but posts like that just aren't helpful, so what's the point in posting? M ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 scripting, first try - some Q's
Hi Mike, I didnt know FlashCoders was a place to get one's code reviewed for silly mistakes in logic. Hence I just cleared your way from thinking its an AS3 problem. Anyways glad to know you figured it out. And for your second question, I had already replied to it. On 7/27/06, Mike Mountain [EMAIL PROTECTED] wrote: Anyone got an answer to the second part: what's the simple AS3 scripting way (I know the class way) of doing myObj.onEnterFrame=function(){ this.x+=1 //Etc. } Cheers Mike ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Components in Flash 4/MX
Does anyone know some good resources how to make components for Flash MX/4 ? Yours, Weyert de Boer ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: Re: [Flashcoders] Mac IDE for AS !
I'm using the FDT plugin for Eclipse for my AS2 development. It's got some issues, but the features that do work more than make up for it. Auto-completion, code snippets, navigation through classes, basic refactoring like renaming class files, error checking as you type. etc... You can find it here: http://fdt.powerflasher.com/flashsite/flash.htm My only gripe with the product besides the price tag, is that they haven't updated and fixed many of the known bugs for at least a year. Plus, support and documentation are extremely limited or non-existent. I'm hoping that the guys at ASDT come out with an update soon. It's been way too long on that one too, and I'd much rather use an open source product. Hope that helps. -Chris ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Components in Flash 4/MX
flash MX - it was the age of AS1 Flash V1 components.. V1 component tutorials on the net should help u .. flash 4 ... umm... i dint even know Flash then :D On 7/27/06, Weyert de Boer [EMAIL PROTECTED] wrote: Does anyone know some good resources how to make components for Flash MX/4 ? Yours, Weyert de Boer ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Components in Flash 4/MX
This might help: http://www.communitymx.com/content/article.cfm?cid=A06B3C7D7B74030D jimbo *** REPLY SEPARATOR *** On 7/27/2006 at 6:42 PM Weyert de Boer wrote: Does anyone know some good resources how to make components for Flash MX/4 ? Yours, Weyert de Boer ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ï ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Components in Flash 4/MX
Here's another by Joey Lott - possibly a duplicate of the first link: http://www.person13.com/articles/components/creatingcomponents.html *** REPLY SEPARATOR *** On 7/27/2006 at 6:42 PM Weyert de Boer wrote: Does anyone know some good resources how to make components for Flash MX/4 ? Yours, Weyert de Boer ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com - ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] AntiAlias Type and CacheBitmap = Jumbled Text???
I have been using the advanced antiAlias prop for text in Flash with great success until I tried to place my text in a movieclip that was set to cacheBitmap. Now the text looks all jumbled, has anyone had this issue before or has anyone found a workaround? I am loading the text in dynamically via xml as well. Thank you in advance! Ash ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] How to change reference?
It's a hack, but you can do: as.func1.apply(_root); Might be better to change func1 so that it takes a MovieClip as a parameter. Then you could just do: as.func1(_root); (Although that's still a bit of a hack.) -- T. Michael Keesey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of natalia Vikhtinskaya Sent: Thursday, July 27, 2006 3:40 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] How to change reference? Maybe I was not clear. Clip as has function funk1 To call this function from root I should say as.func1 or from another clip: _root.as.func1. I want to find way to call this function as _root.func1 even if she is in clip with name as. 2006/7/27, denfi [EMAIL PROTECTED]: you dun have to put _root.attachMovie since you are already attaching it right from your current maintimeline. Instead just: attachMove(as,as,100); will do the job. Regrads! On 7/27/06, natalia Vikhtinskaya [EMAIL PROTECTED] wrote: Hi I attach clip with this code: _root.attachMovie(as,as,100); Is it possible to change reference to this clip? Instead of as.something to have _root.something Another words I want to find way to say _root instead of _root.as. Is it possible? Thank you for help. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Discipline can be painful, but it helps when you give it a chance. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] loadComplete but no loadInit
Random thought--is it possible that the initialization code for the loaded SWF is throwing an error? (I have no idea if this would stop onLoadInit from being called, though.) It's a long shot, but -- T. Michael Keesey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony Fairfield Sent: Thursday, July 27, 2006 6:30 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] loadComplete but no loadInit Exactly the problem I encountered a few days ago - but no solution to it yet. The only clue I have is that in the testing environment both onLoadComplete and onLoadInit were successfully working. It was when I tried launching either a standalone projector or the swf independently, that the onLoadInit became erratic - it would fail on certain pages and not on others. I am loading external swfs as page content using movieClipLoader, and I know it isn't the page content or size, because all are identical ( small files of about 15k with exactly the same content). I have tried using delegates and cleaning the Listener and Loader (removing and deleting, then recreating) up completely after each load - same result. The answer is out there somewhere . T Fairfield ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Components in Flash 4/MX
I hope you're bald, otherwise you'll be pulling your hair out very soon. C Weyert de Boer wrote: Does anyone know some good resources how to make components for Flash MX/4 ? Yours, Weyert de Boer ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Components in Flash 4/MX
Oh really, then I should have a look at Smart Clips then ;-) Oh well. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Mac IDE for AS !
Eclipse with FDT. On 27/07/06, f a r i d | s i l v a | a b o i d [EMAIL PROTECTED] wrote: I'm not working actually in Mac, but a I used to. In those times the best code editor I got was BBEdit by barebones. Cause it's modular development, you could add support for any languages. Check it. Regards -- SalU2 f a r i d | s i l v a | a b o i d www.e-foco.com.ar tel: +54 11 4300-1042 cel: 15-6475-3021 Moderador de Salas Dreamweaver y Programación Multimedia User Group Adobe Argentina http://www.mmug-ar.com.ar ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Array Empowerment
After thinking about it, I believe the eql method is fine how it is and here's why. If there is an object in there with the same exact properties, but it's a different instance of the object, then I don't think it should be a match. If it points to the same place in memory (same instance) then it should match, which is how Flash handles MovieClips, Objects, Classes, etc. as illustrated in this trivial example: x = {}; y = x; trace(x == y); -- true x = {}; y = {}; trace(x == y); -- false This is as it should be. If the pointer in the array points to the same object in memory, the it's a match, otherwise, it's not. If you want to do some deeper comparison to see if objects in an array are identical in content but different instances, then I think 'every' is the proper method to use and you just pass your comparison function as the argument. Any thoughts? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Array Empowerment
Latest and greatest! http://paste.plone.org/7317 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] constrain image pans with Zoomify
This is apropos of nothing, but I want to share this so it is in the archive. If you are using Zoomify and want your image to stay within the viewer's boundaries, you can use this code. After not getting a response from Zoomify I muddled for days to come up with this. Sad, but true. I hope this will help others avoid some frustration. In the ZoomifyViewer's MousePan function you'll find this line of code: this.gCurrentTier_mc.startDrag(); Replace it with this code: // determine bounds to keep map in viewer var w = this.tier1_mc._width; var h = this.tier1_mc._height; var left = -((1 - this.getWindowRight()) * w); var right = (this.getWindowLeft() * w); var top = -((1 - this.getWindowBottom()) * h); var bottom = (this.getWindowTop() * h); this.gCurrentTier_mc.startDrag(false, left, top, right, bottom); That should keep the user from seeing the outer edges of your image, or dragging it out of the viewer entirely. Note: this works particularly well if your image's proportions are the same as your view window's. Thanks everybody, Kirk FINE DESIGN GROUP 551 Natoma StreetSan Francisco, CA 94103http:// www.finedesigngroup.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Array Empowerment
If you want to do some deeper comparison to see if objects in an array are identical in content but different instances, then I think 'every' is the proper method to use and you just pass your comparison function as the argument. Any thoughts? I think you need both. Maybe name this one same (or sameAs) and the other one equal (I'd add the s: equals), because what the strict comparison is really doing is saying that this is a reference to the *same* object as the one passed as an argument, not that they are equivalent. Equivalency really suggests a comparison between different objects, not just a check to see if they are the same object. Basically, you need an Object.compare function that you can call from this function. That would make life much easier, and you could even have it return a tri-state value, e.g. 0=false (not equivalent), 1=true (equivalent), 2 or -1 or null or whatever = duplicate reference (a==b). ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Array Empowerment
That's the real source of sloppiness, Java has eliminitaed these discussions by the simple expeditent of requiring that the conditional resolves to a boolean, nothing wlse will do. THe real question to me is does AS3 change this behavior? Well, the Flash answer to this is that all conditionals are cast to boolean, so if(condition) is effectively executed as if(Boolean(condition)), which makes it work, but at the same time it makes it easy to be sloppy. ryanm ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Hebrew in Flash?
Nik, While Flash does support Unicode the TextField object doesn't render properly when Left To Right. Your data will be intact and correctly formatted but it will render incorrectly. Expect to have tons of problems when mixing Hebrew and English and punctuations. Best regards, Yotam. On 27/07/06, nik crosina [EMAIL PROTECTED] wrote: Should work without too many problems as Flash supports unicode. Nik On 7/27/06, iestyn lloyd [EMAIL PROTECTED] wrote: Hi List, I'm going to be working on a flash project that will need to be in 10 languages, one of which is Hebrew. I'll be using the Strings Panel and XLIFF to do the localisation. After a quick google, I see that people have had some problems with Hebrew, as it's Right-to-left, and uses some special kind of character set. Has anyone here dealt with Hebrew in flash? If you have, could you outline some of the problems I might face? Cheers! iestyn ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Nik C ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Yotam Laufer | Flash Developer | mobile +44 (0) 79 205 17 212 | skype: ubermutt ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] OT: New Flash e-learning list
Annoucement: Mark Tomlinson from the Authorware list started up a new Flash list specifically for e-learning related questions. Users can subscribe by sending email to [EMAIL PROTECTED] with 'subscribe' in the Subject field This however has been problematic for Outlook some users. If anyone has any problems subscribing then try the web interface at http://www.freelists.org/cgi-bin/lsg2.cgi If that fails, with discretion, try contacting Mark to be manually added to the list. [EMAIL PROTECTED] To post on your mailing list, simply send email to [EMAIL PROTECTED] Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Known issues with flv playback component in flash 9 player?
I just updated my browser to use flash layer 9 (browser is IE) and now a previously working swf that has a flv-playback component in it stopped working. Are there any known issues that could cause this? When using flash player 8 all works fine! Thanx a lot, Wouter ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Hebrew in Flash?
I'll remember that as I will probably have to transcode a huge Director-based project into Flash because of Directors lack of Unicode support. Even though having problems rendering the text it sounds positively refreshing should that be the ...'only' problems. So I'll be watching this space closely, until ti's my turn to start asking the questions ;) Thanks, Nik On 7/27/06, Yotam Laufer [EMAIL PROTECTED] wrote: Nik, While Flash does support Unicode the TextField object doesn't render properly when Left To Right. Your data will be intact and correctly formatted but it will render incorrectly. Expect to have tons of problems when mixing Hebrew and English and punctuations. Best regards, Yotam. On 27/07/06, nik crosina [EMAIL PROTECTED] wrote: Should work without too many problems as Flash supports unicode. Nik On 7/27/06, iestyn lloyd [EMAIL PROTECTED] wrote: Hi List, I'm going to be working on a flash project that will need to be in 10 languages, one of which is Hebrew. I'll be using the Strings Panel and XLIFF to do the localisation. After a quick google, I see that people have had some problems with Hebrew, as it's Right-to-left, and uses some special kind of character set. Has anyone here dealt with Hebrew in flash? If you have, could you outline some of the problems I might face? Cheers! iestyn ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Nik C ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Yotam Laufer | Flash Developer | mobile +44 (0) 79 205 17 212 | skype: ubermutt ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Nik C ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] String Empowerment
My follow up to the Array extensions is this set of String extension methods, again, borrowed from other languages. Time for optimization! Some methods are still in development - some pretty tricky checking. I also need to make _parseParams a bit more robust in allowing multiple arguments to be passed with the intersections of those strings being the result. -- // XString // Returns a copy of this with the first character converted to uppercase and the remainder to lowercase. String.prototype.capitalize = function() { var a = this.length; if (a == 0) return ; var c; var s = ; while (--a -(-1)) { c = this.charCodeAt(a); if ((c 64 c 91 a 0) || (c 96 c 123 a == 0)) c = c ^ 32; s = String.fromCharCode(c) + s; } return s; }; // If n is greater than the length of str, returns a new String of // length n with str centered between r; otherwise, returns str. // If r is not passed, r is a space String.prototype.center = function(n, r) { var a = this.length; if (n a) { if (r.length == 0) r = ; var d = n - a; var cl = Math.floor(d / 2); sl = ; while (--cl -(-1)) { sl += r; } var cr = Math.ceil(d / 2); sr = ; while (--cr -(-1)) { sr += r; } return sl + this + sr; } return this; }; // Returns a new String with the given record separator removed from the end of this (if present). String.prototype.chomp = function(str) { var n = this.length; var s = str.length; if (s == 0) { if (this.charCodeAt(n - 1) == 13 || this.charCodeAt(n - 1) == 10) { return this.substring(0, n - 1); } } else { if (this.substring(n - s, n) == str) { return this.substring(0, n - s); } } return undefined; }; // Returns a new String with the last character removed. If the string ends with \r\n, // both characters are removed. Applying chop to an empty string returns an empty string. // String.chomp is often a safer alternative, as it leaves the string unchanged if it // doesn't end in a record separator. String.prototype.chop = function() { var n = this.length; if (n 0) { if (this.charCodeAt(n - 1) == 10 this.charCodeAt(n - 2) == 13) { return this.substring(0, n - 2); } return this.chomp(this.charAt(n - 1)); } return ; }; // str parameter defines a set of characters to count. The intersection of this set // defines the characters to count in str. Any str that starts with a caret (^) is negated. // The sequence c1--c2 means all characters between c1 and c2. String.prototype.count = function(str) { var a = this.length; if (a == 0) return 0; var s = 0; var c; if (!str.length) return 0; var o = this._parseParams(str); if (o == undefined) return undefined; var p = o.compare; var except = o.except; while (--a -(-1)) { c = this.charAt(a); if ((p.indexOf(c) == -1) == except) { s++ } } return s; }; // If n is greater than the length of this, returns a new String of length n with this // left justified and r padded; otherwise, returns this. (see String.center) String.prototype.ljust = function(n, r) { var a = this.length; if (n a) { if (!r.length) r = ; var d = n - a; var sr = ; while (--d -(-1)) { sr += r; } return this + sr; } return this; }; // Returns a copy of str with all characters in the intersection of its arguments deleted. // Uses the same rules for building the set of characters as String.count String.prototype.remove = function(str) { var a = this.length; if (a == 0) return ; var s = ; var c; if (!str.length) return this; var o = this._parseParams(str); if (o == undefined) return undefined; var p = o.compare; var except = o.except; while (--a -(-1)) { c = this.charAt(a); if ((p.indexOf(c) == -1) != except) { s = c + s; } } return s; }; // Returns a new string with the characters from str in reverse order. String.prototype.reverse = function() { return this.split().reverse().join(); }; // If n is greater than the length of this, returns a
RE: [Flashcoders] String Empowerment
Pseudocode examples of usage: hello.capitalize() Hello HELLO.capitalize() Hello 123ABC.capitalize() 123abc hello.center(4) hello hello.center(20, _) ___hello hello.chomp() hello hello\n.chomp() hello hello \n there.chomp() hello \n there hello.chomp(llo) he string\r\n.chop() string string\n\r.chop() string\n string\n.chop() string string.chop() strin x.chop().chop() a = hello world a.count(lo) 5 a.count(^hello ) 3 a.count(ej-m) 4 a.count(^e-t) 3 a = hello a.ljust(4) hello a.ljust(20) hello a = hello world a.remove(l) heo word a.remove(lo ) hewrd a.remove(^aeiou) eoo a.remove(ej-m) ho word a.remove(^e-t) helloorl stressed.reverse() desserts a = hello a.rjust(4) hello a.rjust(20, -) ---hello yellow moon.squeeze() yelow mon now is the.squeeze( )now is the putters shoot balls.squeeze(m-z) puters shot balls hello world.squeeze(^ ) helo world hello.strip() hello \tgoodbye\r\n.strip() goodbye Hello.swapcase hELLO cYbEr_PuNk11.swapcase CyBeR_pUnK11 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AntiAlias Type and CacheBitmap = Jumbled Text???
Hi Ash, what do you mean with jumbled? As always with Flash there are a thousand quirks and unexpected behavior, but thankfully, after a bit of trial and error, we have also come up with a thousand workarounds! Please elaborate and explain what your problem is, and I am sure we can provide you with a way to solve it. Regards, Fred On Jul 27, 2006, at 18:55, Ash Warren wrote: I have been using the advanced antiAlias prop for text in Flash with great success until I tried to place my text in a movieclip that was set to cacheBitmap. Now the text looks all jumbled, has anyone had this issue before or has anyone found a workaround? I am loading the text in dynamically via xml as well. Thank you in advance! Ash ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Text Shuffle Class
Hi, everyone I found this script online awhile back and would like to make a class file from it since I use it a lot. I'd love to just be able to pass a few variables for the different strings to shuffle. I've tried making the class file but I'm not so great with class construction. Any help would be great! Thanks, Dave btnChange.onRelease = function(){ prev_text = text; text = This is the text to fill in. How are you today? We hope you're doing well.; reset(); }; this.onLoad = function() { tf = ; // shadow prev_text = Hello everybody. How are you today? We hope you're doing well. Things are looking on the up and up for us over here. The weather is nice and we're all having a blast!/font; // end shadow text = Sven-Goran Eriksson this afternoon described as 'a pity' Rio Ferdinand's exclusion from Saturday's Euro 2004 qualification decider in Turkey.\r\nThe Football Association insisted it would be 'inappropriate' to select Rio Ferdinand for the match in Istanbul because of the player's failure to take a drugs test last month. ; _root.tf_max = text.length; // Set whatever speed you like! The function below takes care of any problems. If the speed wacks it out, the tf is set to the text string without error. // you don't notice anything becuase the text is moving fast anyway. speed = 6; // shadow num = 2; // end shadow }; this.onEnterFrame = function() { if (_root.tf_max=1) { // This sets the tf to the text string. This is the fix for it wacking out the first words in the text becuase of the max length. output = substring(text, 1, -1); tf = output; tf2 = output; break; } else { tfLength = _root.tf_max-speed; _root.tf_max = tfLength; output = substring(text, tfLength, speed); // shadow tf2 = output+tf; tf2 = tf2+ +font color=\#99\+prev_text; num = num+Math.round(speed/2); grab = _root.tf2.length-num; new_tf2 = substring(_root.tf2, 1, grab); tf2 = new_tf2; // end shadow tf = output+tf; } }; MovieClip.prototype.reset = function() { tf = ; // shadow tf2 = ; // end shadow // Reset the tf_max to allow it to retype the text _root.tf_max = text.length; // shadow _root.num = 2; // end shadow }; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 Compiler For MAC OS X
You can use the command line compiler than comes with flex2. You'll have to copy stuff from the windows version, though. http://labs.adobe.com/wiki/index.php/Flex_Builder:tutorials:compiling_mxmlc_osx CK wrote: Hi, Just installed Flash Player 9, and after reading the following:(http://www.senocular.com/flash/tutorials/as3withmxmlc), is a special compiler needed for MAC OS X? Return True, CK Principal/Designer/Programmer -Bushidodeep www.bushidodeep.com ___ An ideal is merely the projection, on an enormously enlarged scale, of some aspect of personality. -- Aldus Huxley ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] swf to AVI
Hi, You can try Moyea Flash to Video Converter at http://www.flash-video-mx.com/flash_to_video_web/ master 2006-07-28 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [SPAM] RE: [Flashcoders] String Empowerment
Dear Steven Sacks, I greatly appreciate the efforts. Long time back we started ActionScript Standard Library project in Sourceforge (http://sourceforge.net/projects/fasl) unfortunately it was discontinued :( On those days I wrote Code.Flash MX: String.changeCase(Title || Sentence || Toggle) http://www.shockwave-india.com/blog/?archive=2002_11_01_archive.xml#83915217 Just a quick note on capitalize() String.toUpperCase() and String.toLowerCase() are part of ActionScript 1 since Flash 5 Regards, Arul Adobe Community Expert for Flash http://www.shockwave-india.com/blog __ toUpperCase (String.toUpperCase method) public toUpperCase() : String Returns a copy of the String object, with all lowercase characters converted to uppercase. The original value is unchanged. Availability: ActionScript 1.0; Flash Player 5 Returns String - A string. Example The following example creates a string with all lowercase characters and then creates a copy of that string using toUpperCase(): var lowerCase:String = lorem ipsum dolor; var upperCase:String = lowerCase.toUpperCase(); trace(lowerCase: + lowerCase); // output: lowerCase: lorem ipsum dolor trace(upperCase: + upperCase); // output: upperCase: LOREM IPSUM DOLOR An example is also found in the Strings.fla file in the ActionScript samples folder. The following list gives typical paths to this folder: a.. Windows: boot drive\Program Files\Macromedia\Flash 8\Samples and Tutorials\Samples\ActionScript b.. Macintosh: Macintosh HD/Applications/Macromedia Flash 8/Samples and Tutorials/Samples/ActionScript __ - Original Message - From: Steven Sacks | BLITZ [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Friday, July 28, 2006 6:59 AM Subject: [SPAM] RE: [Flashcoders] String Empowerment Pseudocode examples of usage: hello.capitalize() Hello HELLO.capitalize() Hello 123ABC.capitalize() 123abc ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com