RE: [Flashcoders] stop caching
so if it is local - anyway to get around caching? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Juan Pablo Califano [califa010.flashcod...@gmail.com] Sent: Thursday, December 09, 2010 9:03 PM To: Flash Coders List Subject: Re: [Flashcoders] stop caching If you are loading the swf directly from the file system (that is, localy) appending parameters to the querystring won't work because they'll be considered part of the file name. So those parameters will not be interpreted as such. In a http environment (i.e. a server, local or remote), on the other hand, the querystring will not be considered part of the file name. So yes, it's a local / server issue. Cheers Juan Pablo Califano 2010/12/9 Lehr, Theodore ted_l...@federal.dell.com I am trying to prevent caching via: function startLoad(dfile:String) { var ran:int = Math.round(Math.random()*10); var dfileb:String = new String(); dfileb = dfile+?ran=+ran; var mRequest:URLRequest=new URLRequest(dfileb); } startLoad(moive.swf); but I get an error 2044: Unhandled IOErrorEvent:text=Error #2035: URL Not Found What am I doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] stop caching
I am trying to prevent caching via: function startLoad(dfile:String) { var ran:int = Math.round(Math.random()*10); var dfileb:String = new String(); dfileb = dfile+?ran=+ran; var mRequest:URLRequest=new URLRequest(dfileb); } startLoad(moive.swf); but I get an error 2044: Unhandled IOErrorEvent:text=Error #2035: URL Not Found What am I doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] stop caching
I think it is the ?whatever=xxx that it is having issues with - so I am not sure doing it another way does not change it, I don;t think - it seems to only want xxx.swf not xxx.swf?whatever=whatever From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [nat...@mynarcik.com] Sent: Thursday, December 09, 2010 2:01 PM To: Flash Coders List Subject: Re: [Flashcoders] stop caching You could add a new Date variable at the end of your swf like: var d:Date = new Date() var nc:String = ?nocache= + d.getTime(); startLoad(moive.swf+nc); Nathan Mynarcik nat...@mynarcik.com www.mynarcik.com http://www.mynarcik.com/feed/rss.xml http://www.twitter.com/NMynarcik http://www.facebook.com/pages/Nathan-Mynarcik-Interactive-Web-Developer/265263144230 http://www.linkedin.com/in/nathanmynarcik On Thu, Dec 9, 2010 at 1:07 PM, Lehr, Theodore ted_l...@federal.dell.comwrote: I am trying to prevent caching via: function startLoad(dfile:String) { var ran:int = Math.round(Math.random()*10); var dfileb:String = new String(); dfileb = dfile+?ran=+ran; var mRequest:URLRequest=new URLRequest(dfileb); } startLoad(moive.swf); but I get an error 2044: Unhandled IOErrorEvent:text=Error #2035: URL Not Found What am I doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Finda and Replace
Say you have the following string: var s:String = This is a test. Is this a test? Yes.; I am trying: var findAndReplace:RegExp = new RegExp(Is this a test?, gi); s=s.replace(findAndReplace,xxx); I would expect to get back: This is a test. xxx Yes. but there seem to be an issue with the ? - how would I handle a ? in this case? Thanks! Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Finda and Replace
OK - so what if I have multiple ? - s.replace(?, ); seems to just get the first one From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike [postmas...@glenpike.co.uk] Sent: Monday, November 15, 2010 1:34 PM To: Flash Coders List Subject: Re: [Flashcoders] Finda and Replace Hi, For really simple replacements like single characters and strings, you are probably better off using s.replace(?, ); For RegExp grab a copy of Grant Skinners RegExr tool - it's invaluable: http://gskinner.com/RegExr/desktop/ HTH Glen On 15/11/2010 17:26, Lehr, Theodore wrote: Say you have the following string: var s:String = This is a test. Is this a test? Yes.; I am trying: var findAndReplace:RegExp = new RegExp(Is this a test?, gi); s=s.replace(findAndReplace,xxx); I would expect to get back: This is a test. xxx Yes. but there seem to be an issue with the ? - how would I handle a ? in this case? Thanks! Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Scrollbar Component
The scrollbar component seems like it should be failry easy to work with - drag it over the dynamic text field and bam - if that textfield has too much text then it will scroll... I have it working that way in another movie that way (I think)... If I hard code text i the textfield - it works... but I am loading text via xml - and the scrollbar shows up - but is not active to scroll any thoughts? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Scrollbar Component
It is not the visibility of the scrollbar I am trying to fool with - it is having the scrollbar be functional and actually scroll - hoe that makes sense... the visibility I have working - it shows up when it should - it just does not scroll or even have the little scroll thing you would drag to make it scroll or the arrows... it does if I hardcose in text From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [nat...@mynarcik.com] Sent: Wednesday, November 10, 2010 10:09 AM To: Flash Coders List Subject: Re: [Flashcoders] Scrollbar Component Do an if statement checking to see if the textfields height is greater than the scrollbars height. If false, scrollbar.visible = false. Is that what you want to do? On Nov 10, 2010 8:51 AM, Lehr, Theodore ted_l...@federal.dell.com wrote: The scrollbar component seems like it should be failry easy to work with - drag it over the dynamic text field and bam - if that textfield has too much text then it will scroll... I have it working that way in another movie that way (I think)... If I hard code text i the textfield - it works... but I am loading text via xml - and the scrollbar shows up - but is not active to scroll any thoughts? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Scrollbar Component
thanks - that does seem to fix it... From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [nat...@mynarcik.com] Sent: Wednesday, November 10, 2010 10:50 AM To: Flash Coders List Subject: Re: [Flashcoders] Scrollbar Component You could also implementing the scrollbar via code: *//Create the scrollBar instance *var scrollBar:UIScrollBar = new UIScrollBar();*//assign the target of the scrollBar to your textfield* //theOutput is the TF instance name scrollBar.scrollTarget = theOutput; *//make the height the same as the textfield* scrollBar.height = theOutput.height; *//Move the scrollbar to the righthand side *scrollBar.move(theOutput.x + theOutput.width, theOutput.y); *//add it to the stage* addChild(scrollBar); *//check if it is required if so show it,put this function right after updating your textfield contents with added text *function updateScrollBar():void{ scrollBar.update(); if (scrollBar.enabled == false) { scrollBar.alpha = 0; } else { scrollBar.alpha = 100; } } Nathan Mynarcik nat...@mynarcik.com www.mynarcik.com http://www.mynarcik.com/feed/rss.xml http://www.twitter.com/NMynarcik http://www.facebook.com/pages/Nathan-Mynarcik-Interactive-Web-Developer/265263144230 http://www.linkedin.com/in/nathanmynarcik On Wed, Nov 10, 2010 at 10:42 AM, Nathan Mynarcik nat...@mynarcik.comwrote: Have you checked the component inspector and see if it is being linked to your dynamic TF? Nathan Mynarcik nat...@mynarcik.com www.mynarcik.com http://www.mynarcik.com/feed/rss.xml http://www.twitter.com/NMynarcik http://www.facebook.com/pages/Nathan-Mynarcik-Interactive-Web-Developer/265263144230 http://www.linkedin.com/in/nathanmynarcik On Wed, Nov 10, 2010 at 10:19 AM, Lehr, Theodore ted_l...@federal.dell.com wrote: It is not the visibility of the scrollbar I am trying to fool with - it is having the scrollbar be functional and actually scroll - hoe that makes sense... the visibility I have working - it shows up when it should - it just does not scroll or even have the little scroll thing you would drag to make it scroll or the arrows... it does if I hardcose in text From: flashcoders-boun...@chattyfig.figleaf.com [ flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [ nat...@mynarcik.com] Sent: Wednesday, November 10, 2010 10:09 AM To: Flash Coders List Subject: Re: [Flashcoders] Scrollbar Component Do an if statement checking to see if the textfields height is greater than the scrollbars height. If false, scrollbar.visible = false. Is that what you want to do? On Nov 10, 2010 8:51 AM, Lehr, Theodore ted_l...@federal.dell.com wrote: The scrollbar component seems like it should be failry easy to work with - drag it over the dynamic text field and bam - if that textfield has too much text then it will scroll... I have it working that way in another movie that way (I think)... If I hard code text i the textfield - it works... but I am loading text via xml - and the scrollbar shows up - but is not active to scroll any thoughts? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Counting xml attributes
Is there a way to return the attributes name of an xml node? So if I have: tag a=1 b=2 c=3/ I would get back: a, b, c ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Counting xml attributes
Thanks - that gives me the values of the attribs - but not the attrib names: if I have: tag a=1 b=2 c=3/ I am getting: 1,2,3 I am trynig to get: a,b,c Anyway to do that? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) [alla...@gmail.com] Sent: Monday, November 08, 2010 9:00 AM To: Flash Coders List Subject: Re: [Flashcoders] Counting xml attributes oops var listAttribs:XMLList = myxml.t...@*; var noOfAttribs:int = listAttribs.length(); var attrib:XML; for (var i:int = 0; i noOfAttribs; i++) { attrib = listAttribs[i]; } On 8 November 2010 13:58, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: yep var listAttribs:XMLList = myxml.t...@*; trace(listAttribs.length()); best a On 8 November 2010 13:42, Lehr, Theodore ted_l...@federal.dell.comwrote: Is there a way to return the attributes name of an xml node? So if I have: tag a=1 b=2 c=3/ I would get back: a, b, c ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Counting xml attributes
I found an answer: for each (var listA:XML in tag.children[i].attributes()) { trace(listA.name()); } Thanks! From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) [alla...@gmail.com] Sent: Monday, November 08, 2010 9:00 AM To: Flash Coders List Subject: Re: [Flashcoders] Counting xml attributes oops var listAttribs:XMLList = myxml.t...@*; var noOfAttribs:int = listAttribs.length(); var attrib:XML; for (var i:int = 0; i noOfAttribs; i++) { attrib = listAttribs[i]; } On 8 November 2010 13:58, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: yep var listAttribs:XMLList = myxml.t...@*; trace(listAttribs.length()); best a On 8 November 2010 13:42, Lehr, Theodore ted_l...@federal.dell.comwrote: Is there a way to return the attributes name of an xml node? So if I have: tag a=1 b=2 c=3/ I would get back: a, b, c ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Counting xml attributes
sweet - thanks From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) [alla...@gmail.com] Sent: Monday, November 08, 2010 9:25 AM To: Flash Coders List Subject: Re: [Flashcoders] Counting xml attributes no worries var listAtt:XMLList = myxml.t...@*; var noOfAtt:int = listAtt.length(); var att:XML; for (var i:int = 0; i noOfAtt; i++) { att = listAtt[i]; trace(att.name().toString() + = + att); // note leaving .toString() off will result in @a, @b and @c rather than a, b, c } best a On 8 November 2010 14:17, Lehr, Theodore ted_l...@federal.dell.com wrote: Thanks - that gives me the values of the attribs - but not the attrib names: if I have: tag a=1 b=2 c=3/ I am getting: 1,2,3 I am trynig to get: a,b,c Anyway to do that? From: flashcoders-boun...@chattyfig.figleaf.com [ flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) [alla...@gmail.com] Sent: Monday, November 08, 2010 9:00 AM To: Flash Coders List Subject: Re: [Flashcoders] Counting xml attributes oops var listAttribs:XMLList = myxml.t...@*; var noOfAttribs:int = listAttribs.length(); var attrib:XML; for (var i:int = 0; i noOfAttribs; i++) { attrib = listAttribs[i]; } On 8 November 2010 13:58, allandt bik-elliott (thefieldcomic.com) alla...@gmail.com wrote: yep var listAttribs:XMLList = myxml.t...@*; trace(listAttribs.length()); best a On 8 November 2010 13:42, Lehr, Theodore ted_l...@federal.dell.com wrote: Is there a way to return the attributes name of an xml node? So if I have: tag a=1 b=2 c=3/ I would get back: a, b, c ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Saving to clipboard
So I have a button that will save a mc as a jpg - what I am wondering is is there a way to save a mc so someone could just cut and past it into, say, powerpoint? No, I have not googled it yet but I will ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Printing a datagrid
Does anyone know why a datagrid header will only show the bottom half in print? Is there anything to do about it? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flash Pivot table
Anyone have any guidance on doing a pivot table in Flash? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flash to Powerpoint
Anyone have a link to a tutorial or something that gives siome guidance on how to create a powerpoint presentation from Flash - like I want to click a button and then be given a prompt to open or save a pps - and the presentation would be made up of, say, an image (object) on each slide No - I have not googled yet but I will :-) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Flash to Powerpoint
I want to do it dynamically... the data in the movieclips will be changing From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik [nat...@mynarcik.com] Sent: Friday, October 22, 2010 11:36 AM To: Flash Coders List Subject: Re: [Flashcoders] Flash to Powerpoint You could always go the oldschool route of taking screenshots and pasting on the slide(s). On Fri, Oct 22, 2010 at 10:40 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: Anyone have a link to a tutorial or something that gives siome guidance on how to create a powerpoint presentation from Flash - like I want to click a button and then be given a prompt to open or save a pps - and the presentation would be made up of, say, an image (object) on each slide No - I have not googled yet but I will :-) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] FileReference
I have two files where I use: var file:FileReference(); var jpgSource:BitmapData = new BitmapData(x,y); jpgSource.draw(sprite); var jpgEncoder:JPGEncoder = new JPGENcoder(85); var jpgStream:ByteArray = jpgEncoder.encode(jpgSource); file.save(jpgStream, 'fileName.jpg'); it works fine in one file, but in another (both in the same directory) I get: 1061: Call to a possibly undefined method save through a reference with static type flash.net:FileReference Why would it work in one but not the other? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] FileReference
sorry - error in transmition - I do have it correctly in my file... just wrote it wrong in the email... From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cédric Muller [flashco...@benga.li] Sent: Thursday, October 21, 2010 8:55 AM To: Flash Coders List Subject: Re: [Flashcoders] FileReference don't, but given your example I /think/ that's logical: var file:FileReference(); - this is not instanciation var file:FileReference = new FileReference() should be better and by doing such you shoudn't see the error message I have two files where I use: var file:FileReference(); var jpgSource:BitmapData = new BitmapData(x,y); jpgSource.draw(sprite); var jpgEncoder:JPGEncoder = new JPGENcoder(85); var jpgStream:ByteArray = jpgEncoder.encode(jpgSource); file.save(jpgStream, 'fileName.jpg'); it works fine in one file, but in another (both in the same directory) I get: 1061: Call to a possibly undefined method save through a reference with static type flash.net:FileReference Why would it work in one but not the other? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] FileReference
Yes! A publish setting indeed! Thanks! From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Thursday, October 21, 2010 10:40 AM To: Flash Coders List Subject: Re: [Flashcoders] FileReference Lehr, Theodore skriver: 1061: Call to a possibly undefined method save through a reference with static type flash.net:FileReference Why would it work in one but not the other? Because only one of them targets FP 10 where the method was added. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Dynamically Size ComboBox
Is there a way to dynamically aize a combo box like a textfirl (i.e. TextFieldAutoSize)? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] OT: Resizing AS window
My AS window is too tall for my monitor (not sure how that happened) and I can figure out how to resize it? Anyone know? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] OT: Resizing AS window
that did it - what a mess... thanks From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sam Brown [4sambr...@gmail.com] Sent: Tuesday, October 05, 2010 9:09 AM To: Flash Coders List Subject: Re: [Flashcoders] OT: Resizing AS window I assume you are using cs4? I've had that problem as well. Click on the arrows to minimize the AS window to an icon. When you click to expand the icon the window will be the size of the screen and you can drag it around to your liking. hth On Tue, Oct 5, 2010 at 5:50 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: My AS window is too tall for my monitor (not sure how that happened) and I can figure out how to resize it? Anyone know? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] correct path
So I have a mc that has another mc inside of it... I have: var holder:Sprite = new Sprite(); holder.name = holderMC; addChild(holder); var childOne:childMC = new childMC(); childOne.name = childOneMC; holder.addChild(childOne); now childOne has a mc inside of it (let's call it grandchild) I am trying to affect that mc from within a listener function... I have tried: holder.childOne.grandchild holderMC.childOneMC.grandchild holder.getChildByName(childOneMC).grandchild but keep getting errors - what am I doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] accessing variable
I am accessing a mc via: for () { parentName.getChildAt(j); } I would like to read a variable in this mc, like: parentName.getChildAt(j).variableName; but it does not work - how would I go about that? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RE: accessing variable
I got it: (parentName.getChildAt(j) as MovieClip).variableName From: Lehr, Theodore Sent: Friday, September 24, 2010 2:02 PM To: Flash Coders List Subject: accessing variable I am accessing a mc via: for () { parentName.getChildAt(j); } I would like to read a variable in this mc, like: parentName.getChildAt(j).variableName; but it does not work - how would I go about that? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Resizing
So I have a sprite that is holding a map and some mc's overlaying the map I am trying to resize the sprite (and thus everthing in it...) Something weird happens with the height The sprite is initially resized to, say, 500x500, and that works fine... Then I have a listener set on when it is clicked and I am, in the listener function, initially doing: trace(e.currentTarget.width); trace(e.currentTarget.height); and I get 500 -107374173 So it is not reading the height correctly... and the if I try: e.currentTarget.width = e.currentTarget.width+10; e.currentTarget.height = e.currentTarget.height+10; and I trace it and get: 510 107374173 What am I doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RE: Resizing
I have tried e.target.width. and it seems to work - but it, obviously, is just affecting the map and not the object overlaying them... I need a affect the Sprite From: Lehr, Theodore Sent: Tuesday, September 21, 2010 8:20 AM To: Flash Coders List Subject: Resizing So I have a sprite that is holding a map and some mc's overlaying the map I am trying to resize the sprite (and thus everthing in it...) Something weird happens with the height The sprite is initially resized to, say, 500x500, and that works fine... Then I have a listener set on when it is clicked and I am, in the listener function, initially doing: trace(e.currentTarget.width); trace(e.currentTarget.height); and I get 500 -107374173 So it is not reading the height correctly... and the if I try: e.currentTarget.width = e.currentTarget.width+10; e.currentTarget.height = e.currentTarget.height+10; and I trace it and get: 510 107374173 What am I doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RE: Resizing
OK - so I have discovered that it has something to do with the images I am overlaying the map... So I have a sprite - that is holding a map I am then overlaying dots on the map via some xml the height of the parent Sprite is getting screwed up in this process From: Lehr, Theodore Sent: Tuesday, September 21, 2010 8:20 AM To: Flash Coders List Subject: Resizing So I have a sprite that is holding a map and some mc's overlaying the map I am trying to resize the sprite (and thus everthing in it...) Something weird happens with the height The sprite is initially resized to, say, 500x500, and that works fine... Then I have a listener set on when it is clicked and I am, in the listener function, initially doing: trace(e.currentTarget.width); trace(e.currentTarget.height); and I get 500 -107374173 So it is not reading the height correctly... and the if I try: e.currentTarget.width = e.currentTarget.width+10; e.currentTarget.height = e.currentTarget.height+10; and I trace it and get: 510 107374173 What am I doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] RE: Resizing
Yikes - I figured it out - one of the xml nodes was passing: 24.06, when it is expecting a number - so the , is throwing it off - and sending this particular mc way north as far as the y is concerned thus making the parent Sprite way bigger than it should be THANKS!!! From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter [davehunte...@hotmail.com] Sent: Tuesday, September 21, 2010 9:07 AM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] RE: Resizing are you reading the height of the sprite before the image has finished loading into it? From: ted_l...@federal.dell.com To: flashcoders@chattyfig.figleaf.com Date: Tue, 21 Sep 2010 08:44:16 -0400 Subject: [Flashcoders] RE: Resizing OK - so I have discovered that it has something to do with the images I am overlaying the map... So I have a sprite - that is holding a map I am then overlaying dots on the map via some xml the height of the parent Sprite is getting screwed up in this process From: Lehr, Theodore Sent: Tuesday, September 21, 2010 8:20 AM To: Flash Coders List Subject: Resizing So I have a sprite that is holding a map and some mc's overlaying the map I am trying to resize the sprite (and thus everthing in it...) Something weird happens with the height The sprite is initially resized to, say, 500x500, and that works fine... Then I have a listener set on when it is clicked and I am, in the listener function, initially doing: trace(e.currentTarget.width); trace(e.currentTarget.height); and I get 500 -107374173 So it is not reading the height correctly... and the if I try: e.currentTarget.width = e.currentTarget.width+10; e.currentTarget.height = e.currentTarget.height+10; and I trace it and get: 510 107374173 What am I doing wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Equirectangular World Map
After searching and searching I am just seeing if someone here might be able to point me to where I might be able to find an equirectangular map of the world in vector format (free of course :-) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] locating point on object
Is there a way to tell where you click on an object - for example if you have a square that is 100x100 and you clicked in the middle you could get x:50, y:50 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] locating point on object
thanks... From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Tuesday, September 14, 2010 11:34 AM To: Flash Coders List Subject: Re: [Flashcoders] locating point on object DisplayObject.mouseX ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Zooming
good stuff - thanks! From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jack Doyle [j...@greensock.com] Sent: Tuesday, September 14, 2010 12:14 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] Zooming If you're a Club GreenSock member, the transformAroundPoint can make this pretty simple to integrate into a tween. For example: var center:Point = new Point(275, 200); TweenLite.to(mc, 1, {transformAroundPoint:{point:center, scaleX:3, scaleY:3}}); That would scale mc's scaleX/scaleY to 3 and use the center point as though it's where your object's registration point is. You can affect rotation too if you want. There's an interactive example of transformAroundPoint in the Plugin Explorer at http://www.TweenLite.com Alternatively, you could wrap your object in a Sprite and offset its position internally so that the Sprite's registration point is where things should scale from on your image, and then tween the scaleX/scaleY of the Sprite. Or do the math to figure out where your image's registration point would end up after scaling it from wherever the focal point is and tween the x/y/scaleX/scaleY together. Or use the camera suggestions others have offered. Sorry, hope that didn't overwhelm you with options :) Jack -Original Message- From: Lehr, Theodore [mailto:ted_l...@federal.dell.com] Sent: Monday, September 13, 2010 11:14 AM To: Flash Coders List Subject: [Flashcoders] Zooming Is there anyway to zoom into a mc and make sure a certain point on an object (just an image converted to a mc in this instance) is always in the center? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Zooming
Is there anyway to zoom into a mc and make sure a certain point on an object (just an image converted to a mc in this instance) is always in the center? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Math help
So if I have to line segments: A: 0-799 B: 66.92 - 124.40 Given a point on B (80.6 for example) how can I find the equivalent point on A? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Math help
Hhmmm I do not think this is working - here is my issue - maybe someone has an idea. I have a mc that is basically a map of the US. I am getting the long and lat of a location I want to be able to put a point on the map based on that long and lat - my thought was that I could find an equivalent x,y coord based on the long and lat but it does not seem to be translating well... any thoughts? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Friday, September 10, 2010 7:58 AM To: Flash Coders List Subject: RE: [Flashcoders] Math help I assume you mean those numbers represent X values, and I assume by equivalent you mean the same percentage along the line (since those lines are of two different lengths). Then all you have to do is some simple proportional math. Get the length of each line by subtracting the start point from the end point (i.e. for line b, 124.4 - 66.92). Divide the point you have on B (80.6) from the length of B to get the percentage that point is along line B. Use that number as a proportion to figure the same point on line A. To do that, multiply that proportion number you got from line B by the length of line A. That will give you equivalent proportion on line A. Add that proportion number to the start point of line A (in this case, the start point of A is 0, so doesn't matter) to get the actual point on line A. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Friday, September 10, 2010 7:24 AM To: Flash Coders List Subject: [Flashcoders] Math help So if I have to line segments: A: 0-799 B: 66.92 - 124.40 Given a point on B (80.6 for example) how can I find the equivalent point on A? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Math help
Hhmmm that makes sense... that explains why it is not translating... unfortunately - I can not have something that needs go hit the internet - working on a closed network... the YahooMap API seems like it would not work on a network like that... unless I am totally misunderstanding it From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Friday, September 10, 2010 12:08 PM To: Flash Coders List Subject: RE: [Flashcoders] Math help Lattitude and longitude are lines projected onto a sphere (the earth), so therefore curve and won't translate to a 2D map, which could have any variety of projection type. So just using those values won't give you X and Y on any map, unless your map is not something as large as the U.S. A smaller map, where the projection lines do not curve, would probably be OK. But for a U.S. map, no. You'll need to figure out your own coordinates for cities or whatever for that, or find something third party that can help with that. Is something like the YahooMap API for Flash a possibility? Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Friday, September 10, 2010 11:37 AM To: Flash Coders List Subject: RE: [Flashcoders] Math help Hhmmm I do not think this is working - here is my issue - maybe someone has an idea. I have a mc that is basically a map of the US. I am getting the long and lat of a location I want to be able to put a point on the map based on that long and lat - my thought was that I could find an equivalent x,y coord based on the long and lat but it does not seem to be translating well... any thoughts? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Friday, September 10, 2010 7:58 AM To: Flash Coders List Subject: RE: [Flashcoders] Math help I assume you mean those numbers represent X values, and I assume by equivalent you mean the same percentage along the line (since those lines are of two different lengths). Then all you have to do is some simple proportional math. Get the length of each line by subtracting the start point from the end point (i.e. for line b, 124.4 - 66.92). Divide the point you have on B (80.6) from the length of B to get the percentage that point is along line B. Use that number as a proportion to figure the same point on line A. To do that, multiply that proportion number you got from line B by the length of line A. That will give you equivalent proportion on line A. Add that proportion number to the start point of line A (in this case, the start point of A is 0, so doesn't matter) to get the actual point on line A. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Friday, September 10, 2010 7:24 AM To: Flash Coders List Subject: [Flashcoders] Math help So if I have to line segments: A: 0-799 B: 66.92 - 124.40 Given a point on B (80.6 for example) how can I find the equivalent point on A? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] map componment
anyone know of a FREE map component? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] parsing multi-dimensional array
so if I have a multi-dimensional array - how could I break them into their own array? So if I have: arr[0] = [red,0,0]; arr[1] = [red,1,0]; arr[2] = [red,2,0]; arr[3] = [blue,0,0]; arr[4] = [blue,1,0]; arr[5] = [blue,2,0]; What I need to do is break red into it's own array and blue into it's own array - and there could be any number of colors ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] sorting xml
Any easy way to sort xml based on an attribute: nodes node aaa=bbb ccc=ddd/ node aaa=eee ccc=fff/ /nodes so if I wanted to sort based on aas or ccc ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RE: sorting xml
Hh - maybe if I made it a multidimensional array - how would you sort that? From: Lehr, Theodore Sent: Tuesday, August 31, 2010 10:28 AM To: Flash Coders List Subject: sorting xml Any easy way to sort xml based on an attribute: nodes node aaa=bbb ccc=ddd/ node aaa=eee ccc=fff/ /nodes so if I wanted to sort based on aas or ccc ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Accessing .fla var
In my .fla I have: var countF:int=0; then in the library I have a mc with linkage to an .as file In that .as file, I want to be able to: countF++; hope that makes sense. From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki [edole...@gmail.com] Sent: Monday, August 30, 2010 1:11 PM To: Flash Coders List Subject: Re: [Flashcoders] Accessing .fla var I think you may need to reword your question with more detail. What exactly is your setup? Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Mon, Aug 30, 2010 at 12:58 PM, Lehr, Theodore ted_l...@federal.dell.comwrote: How would I access a variable in my .fla from a .as? I just want to do something like: var++; from the .as where the var lives in the .fla.. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Accessing .fla var
because it does not always get incremented... I guess I could though - but I am trying to have all the code together in the .as From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki [edole...@gmail.com] Sent: Monday, August 30, 2010 1:34 PM To: Flash Coders List Subject: Re: [Flashcoders] Accessing .fla var Why wouldn't you increment countF when you instantiate your mc? Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Mon, Aug 30, 2010 at 1:14 PM, Lehr, Theodore ted_l...@federal.dell.comwrote: In my .fla I have: var countF:int=0; then in the library I have a mc with linkage to an .as file In that .as file, I want to be able to: countF++; hope that makes sense. From: flashcoders-boun...@chattyfig.figleaf.com [ flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki [ edole...@gmail.com] Sent: Monday, August 30, 2010 1:11 PM To: Flash Coders List Subject: Re: [Flashcoders] Accessing .fla var I think you may need to reword your question with more detail. What exactly is your setup? Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Mon, Aug 30, 2010 at 12:58 PM, Lehr, Theodore ted_l...@federal.dell.comwrote: How would I access a variable in my .fla from a .as? I just want to do something like: var++; from the .as where the var lives in the .fla.. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Accessing .fla var
I am thinking I need a custom event in the .as and then listen for it in the .fla From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki [edole...@gmail.com] Sent: Monday, August 30, 2010 1:11 PM To: Flash Coders List Subject: Re: [Flashcoders] Accessing .fla var I think you may need to reword your question with more detail. What exactly is your setup? Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Mon, Aug 30, 2010 at 12:58 PM, Lehr, Theodore ted_l...@federal.dell.comwrote: How would I access a variable in my .fla from a .as? I just want to do something like: var++; from the .as where the var lives in the .fla.. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Accessing .fla var
So now I am trying this: in .fla: var countF:int=0; function incCountF(e:Event):void { countF++; } for .. { var newF:MDot = new MDot(); newF.addEventListener(increaseF,incCountF); addChild(newF); } then in the .as I have: package { [Event(name=increaseF)]; public function ... { var e:Event = new Event(increaseF); dispatchEvent(e); } } for some reason I think my listener is not catching it From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Monday, August 30, 2010 1:43 PM To: Flash Coders List Subject: Re: [Flashcoders] Accessing .fla var Lehr, Theodore skriver: In my .fla I have: var countF:int=0; then in the library I have a mc with linkage to an .as file In that .as file, I want to be able to: countF++; Main timeline |frame 1 |___variable |___instance of symbol |_Symbol |_assigned class |_code to access the variable DocumentClass(parent).var++ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] image issue
I have an image that is getting blurred a bit - is there anyway to prevent this - I want it to be sharp ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] image issue
smoothing is off I tried to fool around with the jpeg quality in the publish settings - but that did not seem to impact it when I look at the properties - the image looks fine in the preview window... it is when the movie is published... From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Monday, August 16, 2010 8:30 AM To: Flash Coders List Subject: Re: [Flashcoders] image issue Lehr, Theodore wrote: I have an image that is getting blurred a bit - is there anyway to prevent this - I want it to be sharp Turn off smoothing. Display it at no higher resolution than the same resolution that it is stored. Make a non blurred image. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] image issue
I think that was it! thanks From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt Perkins [nudoru.m...@gmail.com] Sent: Monday, August 16, 2010 9:09 AM To: Flash Coders List Subject: Re: [Flashcoders] image issue Make sure its on the stage at even x and y positions, no decimal places. That's gotten me a few times. -- Matt Perkins - http://www.nudoru.com On Aug 16, 2010, at 8:49 AM, Lehr, Theodore ted_l...@federal.dell.com wrote: smoothing is off I tried to fool around with the jpeg quality in the publish settings - but that did not seem to impact it when I look at the properties - the image looks fine in the preview window... it is when the movie is published... From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Monday, August 16, 2010 8:30 AM To: Flash Coders List Subject: Re: [Flashcoders] image issue Lehr, Theodore wrote: I have an image that is getting blurred a bit - is there anyway to prevent this - I want it to be sharp Turn off smoothing. Display it at no higher resolution than the same resolution that it is stored. Make a non blurred image. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Saving MC as image
I am finding some tutorials for saving a mc as an image - using com.adobe.images.JPGEncoder --- What I am finding seems to show that you need some type of server-side code to actually save the image locally (php, ...) Is there a way to do it all just in Flash? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Saving MC as image
Thanks - that is doing the trick... One issue: I am doing: var file:FileReference = new FileReference(); var jpgSrc:BitmapData = new MitmapData(mc.width, mc.height); jpgSrc.draw(mc); var jpgEncoder:JPGEncoder = new JPGEncoder(85); var jpgStream:ByteArray = jpgEncoder.encode(jpgSource); file.save(jpgStream, 'test.jpg'); The issue I am having is that the mc is not lining up with the image... the image seems to be capturing the stage at 0,0 which is only getting like the top right of the mc anyway to line the mc up with the jpg? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Monday, August 16, 2010 1:01 PM To: Flash Coders List Subject: Re: [Flashcoders] Saving MC as image Lehr, Theodore wrote: server-side code ... save the image locally I hope that you see the issue here. Just use a FileRefference instead. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Printing multiple objects
I am using the code at: http://stackoverflow.com/questions/1422259/as3-using-printjob-to-print-a-movieclip I am using it to print a Sprite that is holding some other objects I am wondering is there a way I can use this code to print multiple sprites - and also be able to move the and lay them out differently for the printed page? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Querying XML
I am trying: buildXML = peopleXML.person.(@group == dd_group.value.toString()) peopleXML.person.(@room == dd_room.value.toString()); but it only seem to pick up the last condition - how can I get multiple conditions in? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Taka Kojima [t...@gigafied.com] Sent: Thursday, August 05, 2010 3:08 PM To: Flash Coders List Subject: Re: [Flashcoders] Querying XML E4X is a much better approach than looping through an XML object and adding items to an XMLList. An E4x command automatically returns an XMLList type object. On Thu, Aug 5, 2010 at 11:47 AM, Nathan Mynarcik nat...@mynarcik.comwrote: You would need to make a var that is an XMLList that pulls only the nodes that have the value a. Then you can trace out your XMLList and it will only be the ones you need. Nathan Mynarcik nat...@mynarcik.com 254.749.2525 www.mynarcik.com On Thu, Aug 5, 2010 at 2:18 PM, Lehr, Theodore ted_l...@federal.dell.com wrote: Is there a way to only show certain xml based on a value - for instance - say I have: var aXML:XML = root item title=1 value=a/ item title=2 value=a/ item title=3 value=a/ item title=4 value=b/ item title=5 value=b/ /root So if someone picks a from a drop down - I would then only display the ones that have the value of a in a datagrid... I am used to just doing something like: var myDP:DataProvider = new DataProvider(aXML); How can I remove xml members or keep them from being shown? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Querying XML
it does - based on the last condition How can I query the xml using multiple conditions? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Friday, August 06, 2010 12:40 PM To: Flash Coders List Subject: Re: [Flashcoders] Querying XML Lehr, Theodore wrote: I am trying: buildXML = peopleXML.person.(@group == dd_group.value.toString()) peopleXML.person.(@room == dd_room.value.toString()); I am surprised that it even returns an XMLList, wait, does it? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] drag issues
I have a mc that has other mc in it... this mc is hard coded on the stage... in the as I have: mc.addEventListener(MouseEvent.MOUSE_DOWN, drag); function drag(e:MouseEvent):void { e.target.startDrag(); } The problem arises that instead of dragging the mc as a whole - it drags each mc in the main mc separately... I just want the whole thing to drag as one - instead it get pulled apart and each mc inside drags on its own any ideas? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Querying XML
Is there a way to only show certain xml based on a value - for instance - say I have: var aXML:XML = root item title=1 value=a/ item title=2 value=a/ item title=3 value=a/ item title=4 value=b/ item title=5 value=b/ /root So if someone picks a from a drop down - I would then only display the ones that have the value of a in a datagrid... I am used to just doing something like: var myDP:DataProvider = new DataProvider(aXML); How can I remove xml members or keep them from being shown? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flex not playing in browser
I am working on my first flex file - just a simple thing displaying a few components... nothing interacting with data or anything yet... I can open it directly by double clicking on the .swf file and it opens in the player fine... I try to load the .swf file in the browser and it does not display - no errors or anything - just shows nothing... any reason why? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Flex not playing in browser
yeah - it is the same version as when I load the swf straight into the player From: Deepanjan Das [deepanjan@gmail.com] Sent: Thursday, July 29, 2010 9:15 AM To: Flash Coders List Cc: Lehr, Theodore Subject: Re: [Flashcoders] Flex not playing in browser Do you have the appropriate flash player installed for your browser? Warm Regards Deepanjan Das http://deepanjandas.wordpress.com/ On Thu, Jul 29, 2010 at 6:38 PM, Lehr, Theodore ted_l...@federal.dell.commailto:ted_l...@federal.dell.com wrote: I am working on my first flex file - just a simple thing displaying a few components... nothing interacting with data or anything yet... I can open it directly by double clicking on the .swf file and it opens in the player fine... I try to load the .swf file in the browser and it does not display - no errors or anything - just shows nothing... any reason why? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.commailto:Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Warm Regards Deepanjan Das W: http://deepanjandas.wordpress.com Think of the environment before printing this email ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flex
Any good flex tutorials online for beginners? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Finding text box
I have a mc within another... I need to reach out of that mc and into another on the root to give some text to a text box... With the old as I would do: _root.mcName.textboxName.text = ; How do I do it now? TIA! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Communication Sever
Does Adobe still offer Flash Communication Server? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] setChildIndex
These mc are added in the IDE - not code Anyway I can change their layering... From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Wednesday, June 30, 2010 4:27 PM To: Flash Coders List Subject: RE: [Flashcoders] setChildIndex Doing addChild() in the right order is the easiest way, but to control depths specifically, see this: http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/disp lay/DisplayObjectContainer.html#setChildIndex() Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Wednesday, June 30, 2010 4:05 PM To: Flash Coders List Subject: [Flashcoders] setChildIndex How can I change depths of a movie - I found setChildIndex - but they are not children of anything... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] setChildIndex
It is - I just thought addChild would be for mc created in script - I can add child with stuff already on the stage? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Friday, July 02, 2010 1:52 PM To: Flash Coders List Subject: RE: [Flashcoders] setChildIndex Doesn't matter - you can still modify the layering with Actionscript. Isn't that what you asked about? Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Friday, July 02, 2010 9:02 AM To: Flash Coders List Subject: RE: [Flashcoders] setChildIndex These mc are added in the IDE - not code Anyway I can change their layering... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Adding listener
Is it possible to add a listener to a multitude of mcs through a loop? so instead of mc1.addEventListener mc2.add mc3.add ... ... .. maybe I have an array with each mc name and then loop through it to add the event listeners? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Adding listener
These are mcs that are created on the stage - not in code How would I refer to them in this: var myMovieClips:Array = [mc1, mc2, mc3, mc4]; ?? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Wednesday, June 30, 2010 10:45 AM To: Flash Coders List Subject: RE: [Flashcoders] Adding listener Easy: var myMovieClips:Array = [mc1, mc2, mc3, mc4]; for each (var mc:MovieClip in myMovieClips) { mc.addEventListener(WhateverEvent.WHATEVER, onWhateverEvent); } Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Wednesday, June 30, 2010 10:36 AM To: Flash Coders List Subject: [Flashcoders] Adding listener Is it possible to add a listener to a multitude of mcs through a loop? so instead of mc1.addEventListener mc2.add mc3.add ... ... .. maybe I have an array with each mc name and then loop through it to add the event listeners? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Adding listener
nevermind - user error From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Wednesday, June 30, 2010 10:45 AM To: Flash Coders List Subject: RE: [Flashcoders] Adding listener Easy: var myMovieClips:Array = [mc1, mc2, mc3, mc4]; for each (var mc:MovieClip in myMovieClips) { mc.addEventListener(WhateverEvent.WHATEVER, onWhateverEvent); } Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (Note: these resources are only available for Bank of America associates) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Wednesday, June 30, 2010 10:36 AM To: Flash Coders List Subject: [Flashcoders] Adding listener Is it possible to add a listener to a multitude of mcs through a loop? so instead of mc1.addEventListener mc2.add mc3.add ... ... .. maybe I have an array with each mc name and then loop through it to add the event listeners? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] setChildIndex
How can I change depths of a movie - I found setChildIndex - but they are not children of anything... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] removingChildAt
First - let me say that this code may be totally screwed up... that is a possibility! What I am trying to do is remove child mcs and load a new one. My code is: function onCompleteHandler(e:Event) { var pChildren:int = new int(parent.parent.numChildren); parent.parent.addChild(e.currentTarget.content); var foundMC:int=0; for (var j:int=0; jpChildren; j++) { if (foundNav==0) { if (parent.parent.getChildAt(0).name != navName) { parent.parent.removeChildAt(0); } else { foundNav = 1; } } else { parent.parent.removeChildAt(1); } } if (foundNav==1) { parent.parent.removeChildAt(0); } } } The intent of this to remove all of the mcs on the stage (except for the one that is added at the beginning of the function - making sure that the last one removed (navName) is the one that is firing this code Doing some tracing, I am seeing that it is failing like half way through the removal - say if I have 8 mcs on the stage at the beginning - it goes up to 9 when I add the new one then about half way through - at this line: parent.parent.removeChildAt(0); I am getting Error #2006: The supplied index is out of bounds I would think there would be a child at 0 if there were still children in existence... any thoughts? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Reverse Compiling
It's official - I am the biggest moron on the planet... which leads me to this question: Is it possible to take a .swf and turn it into a .fla? I saved all my stuff locally (with no back-ups of course) and my hard drive crashed. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Reverse Compiling
any ones to recommend? From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Tuesday, June 22, 2010 10:20 AM To: Flash Coders List Subject: Re: [Flashcoders] Reverse Compiling Lehr, Theodore wrote: It's official - I am the biggest moron on the planet... which leads me to this question: Is it possible to take a .swf and turn it into a .fla? There are a variety of decompilers available. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] searching a string
If I had a string: Leadership And I was comparing a word: Leader How could I have the comparison show it as true since the string Leader is in Leadership? Does this even make sense?? So if I was comparing Swim and Leadership it would be false but Leader and Leadership would be true... kind of like if I did a SQL statement such as: .fieldName LIKE %Leader% ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Dynamic Math in Datagrid
So I have a datagrid that I am populating via some xml like: var thisCol: DataGridColumn: new DataGridColumn(fieldFromXML); How can I create a column that's value is the reult of something like thisCol/thatCol? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] date modified
Is it possible to grab the date a file was modified? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Naming a loaded swf
I am loading a swf via something like: var loader:Loader = new Loader(); function startLoad(dfile:String) { var nRequest:URLRequest = new URLRequest(dfile); loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete); loader.load(nRequest); } function onComplete(loadEvent:Event):void { addChild(loadEvent.currentTarget.content); } startLoad(some.swf); I want to be able to name the swf that gets loaded... right now it is just getting a random name like: instance77 How can I name it? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Naming a loaded swf
Actually - both ways are giving me the same error: Error #2078: The name property of a Timeline-placed object cannot be modified From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu [ktu_fl...@cataclysmicrewind.com] Sent: Tuesday, June 15, 2010 9:49 AM To: Flash Coders List Subject: Re: [Flashcoders] Naming a loaded swf There is no need to cast. The Loader.content property is defined as a DisplayObject - http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content but I should have been more strictly typed. function onComplete(loadEvent:Event):void { var loadedContent:DisplayObject = loadEvent.target.content; loadedContent.name = MyName; addChild(loadedContent); } On Tue, Jun 15, 2010 at 9:47 AM, Glen Pike g...@engineeredarts.co.ukwrote: Cast it to a DisplayObject then give that a name? var obj:DisplayObject = loadEvent.currentTarget as DisplayObject; obj.name = my instance; ... On 15/06/2010 14:28, Lehr, Theodore wrote: I am loading a swf via something like: var loader:Loader = new Loader(); function startLoad(dfile:String) { var nRequest:URLRequest = new URLRequest(dfile); loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete); loader.load(nRequest); } function onComplete(loadEvent:Event):void { addChild(loadEvent.currentTarget.content); } startLoad(some.swf); I want to be able to name the swf that gets loaded... right now it is just getting a random name like: instance77 How can I name it? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Naming a loaded swf
awesome - thanks From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu [ktu_fl...@cataclysmicrewind.com] Sent: Tuesday, June 15, 2010 11:03 AM To: Flash Coders List Subject: Re: [Flashcoders] Naming a loaded swf It's possible that because the content property is the root class of the loaded swf that you have to set the name property of your document class. parent.swf Loader.load(child.swf) child.swf this.name = MyName; Maybe that is what you need to do. I'm going to run a test to find out Ktu On Tue, Jun 15, 2010 at 10:49 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: Actually - both ways are giving me the same error: Error #2078: The name property of a Timeline-placed object cannot be modified From: flashcoders-boun...@chattyfig.figleaf.com [ flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu [ ktu_fl...@cataclysmicrewind.com] Sent: Tuesday, June 15, 2010 9:49 AM To: Flash Coders List Subject: Re: [Flashcoders] Naming a loaded swf There is no need to cast. The Loader.content property is defined as a DisplayObject - http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content but I should have been more strictly typed. function onComplete(loadEvent:Event):void { var loadedContent:DisplayObject = loadEvent.target.content; loadedContent.name = MyName; addChild(loadedContent); } On Tue, Jun 15, 2010 at 9:47 AM, Glen Pike g...@engineeredarts.co.uk wrote: Cast it to a DisplayObject then give that a name? var obj:DisplayObject = loadEvent.currentTarget as DisplayObject; obj.name = my instance; ... On 15/06/2010 14:28, Lehr, Theodore wrote: I am loading a swf via something like: var loader:Loader = new Loader(); function startLoad(dfile:String) { var nRequest:URLRequest = new URLRequest(dfile); loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete); loader.load(nRequest); } function onComplete(loadEvent:Event):void { addChild(loadEvent.currentTarget.content); } startLoad(some.swf); I want to be able to name the swf that gets loaded... right now it is just getting a random name like: instance77 How can I name it? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Naming a loaded swf
that did the trick - thanks everyone... From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike [g...@engineeredarts.co.uk] Sent: Tuesday, June 15, 2010 11:10 AM To: Flash Coders List Subject: Re: [Flashcoders] Naming a loaded swf Okay - can you store a reference to the loaded content that you can use to access it later, either as an instance variable or in an array? On 15/06/2010 15:49, Lehr, Theodore wrote: Actually - both ways are giving me the same error: Error #2078: The name property of a Timeline-placed object cannot be modified From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu [ktu_fl...@cataclysmicrewind.com] Sent: Tuesday, June 15, 2010 9:49 AM To: Flash Coders List Subject: Re: [Flashcoders] Naming a loaded swf There is no need to cast. The Loader.content property is defined as a DisplayObject - http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content but I should have been more strictly typed. function onComplete(loadEvent:Event):void { var loadedContent:DisplayObject = loadEvent.target.content; loadedContent.name = MyName; addChild(loadedContent); } On Tue, Jun 15, 2010 at 9:47 AM, Glen Pikeg...@engineeredarts.co.ukwrote: Cast it to a DisplayObject then give that a name? var obj:DisplayObject = loadEvent.currentTarget as DisplayObject; obj.name = my instance; ... On 15/06/2010 14:28, Lehr, Theodore wrote: I am loading a swf via something like: var loader:Loader = new Loader(); function startLoad(dfile:String) { var nRequest:URLRequest = new URLRequest(dfile); loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete); loader.load(nRequest); } function onComplete(loadEvent:Event):void { addChild(loadEvent.currentTarget.content); } startLoad(some.swf); I want to be able to name the swf that gets loaded... right now it is just getting a random name like: instance77 How can I name it? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] html in textfield
I have bold tags causing line returns - the text is coming from xml any idea why that would be? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Dynamically Creating an XML Request
I need to create a dynamic XML request (not sure that is the right terminology). I've put a sample of what I need below. I need to turn XMLdata.test[0].elements(myTest); into var req:String = test[0].elements('myTest'); XMLdata[req]; anyone ever try that? Thanks for any help ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Math in a Datagrid
I am populatibng a datagrid via xml - Numbers... How could I do some match on these numbers and the populate a cell with the results? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] targeting mc
So I am rolling over one mc to impact another and I am trying: function showDetails(e:Event):void { this[details+e.currentTarget.name].visible=true; } why does this not work? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] targeting mc
I thought so - but I am getting: Error #1010: A term is undefined and has no properties. From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Friday, June 11, 2010 10:06 AM To: Flash Coders List Subject: Re: [Flashcoders] targeting mc Cor wrote: Not sure what or how your object which fires the event looks like? But try: [details+e.currentTarget.name].visible=true; Or this.[details+e.currentTarget.name].visible=true; Both of those are syntax errors. The original code was fine. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] targeting mc
I think it is a matter of scope the mc I am trying to affect (this[details+e.currentTarget.name]) is a texfield created in a function - so I am guessing it is not accesible outside of that function... there are multiple instances of these textfields... they are created in a loop like: var barDetails:new TextField(); .. barDetails.name=.; addChild(barDetails); I even tried taking the var barDetails:new TextField(); otside of the function, but I get the same error ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] targeting mc
Basically: function parseSumXML(e:Event):void { //looping through the xml for (var n:int=0; ntotalChildren; n++) { obar.graphics.beginFill. (creating square); obar.name = Assigned+n; obar.addEventListener(MouseEvent.ROLL_OVER,showDetails); var barDetails:TextField.. creating textfield; barDetails.name=detailsAssigned+n; barDetails.visible=false; } } function showDetails(e:Event):void { this[details+e.currentTarget.name].visible=true; } From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S. [mattsp...@gmail.com] Sent: Friday, June 11, 2010 11:01 AM To: Flash Coders List Subject: Re: [Flashcoders] targeting mc Can you post more of your code? Specifically the code that creates the intended target in the first place. .m On Fri, Jun 11, 2010 at 10:43 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: I think it is a matter of scope the mc I am trying to affect (this[details+e.currentTarget.name]) is a texfield created in a function - so I am guessing it is not accesible outside of that function... there are multiple instances of these textfields... they are created in a loop like: var barDetails:new TextField(); .. barDetails.name=.; addChild(barDetails); I even tried taking the var barDetails:new TextField(); otside of the function, but I get the same error ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] targeting mc
I am adding them now to a parent sprite created outside of the function and I seem to be able to hit them there From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S. [mattsp...@gmail.com] Sent: Friday, June 11, 2010 11:01 AM To: Flash Coders List Subject: Re: [Flashcoders] targeting mc Can you post more of your code? Specifically the code that creates the intended target in the first place. .m On Fri, Jun 11, 2010 at 10:43 AM, Lehr, Theodore ted_l...@federal.dell.comwrote: I think it is a matter of scope the mc I am trying to affect (this[details+e.currentTarget.name]) is a texfield created in a function - so I am guessing it is not accesible outside of that function... there are multiple instances of these textfields... they are created in a loop like: var barDetails:new TextField(); .. barDetails.name=.; addChild(barDetails); I even tried taking the var barDetails:new TextField(); otside of the function, but I get the same error ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Passing Var value to loaded swf
I found this code: in the parent swf gameLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit); function onInit(e:Event) { MovieClip(gameLoader.content).userId = 100; } In the loaded swf public class Game extends MovieClip { public var userId:int = 0; function Game() { addEventListener(Event.ADDED_TO_STAGE,Init); } function Init(e:Event) { testText.text = String(userId); } I am not seeing how I can add the swf to the stage ( MovieClip(gameLoader.content).userId = 100;) How can I add it to the stage? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RE: Passing Var value to loaded swf
I am finding this solution everywhere: Calling Parent Variables and Functions from a Loaded SWFhttp://mattmaxwellas3.blogspot.com/2008/10/accessing-variables-and-functions-from.html Let's say I have one SWF (child.swf) that I want to load into another SWF (parent.swf), then I want to call a function that is in parent.swf from the child.swf. In AS2 you could just do _parent._parent as many times as needed to reach up the tree to get to the parent's top level. In AS3 you need to use this code below instead. Put it inside the child.swf. I have no idea what this line of code means, but is magic: MovieClip(parent.parent).ParentFunction(); ...then this sample code goes inside the parent.swf on its main timeline: //this sample code loads the external SWF into the Parent SWF var indexSwfRequest:URLRequest = new URLRequest(index.swf); var indexSwfLoader:Loader = new Loader(); indexSwfLoader.load(indexSwfRequest); addChild(indexSwfLoader); //This is the parent function that can be called from the command that is inside the child.swf function ParentFunction():void{ trace(It worked!); } But for some reason I can not get that to work... I get: Error #1009: Cannot access a property or method of a null object As if my path is not right From: Lehr, Theodore Sent: Monday, June 07, 2010 8:12 AM To: Flash Coders List Subject: Passing Var value to loaded swf I found this code: in the parent swf gameLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit); function onInit(e:Event) { MovieClip(gameLoader.content).userId = 100; } In the loaded swf public class Game extends MovieClip { public var userId:int = 0; function Game() { addEventListener(Event.ADDED_TO_STAGE,Init); } function Init(e:Event) { testText.text = String(userId); } I am not seeing how I can add the swf to the stage ( MovieClip(gameLoader.content).userId = 100;) How can I add it to the stage? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] setting variable
So I am loading a swf - How can I set a value of a variable in that swf from the parent? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] setting variable
What would it's instance name be? my last line is: addChild(loadEvent.currentTarget.content); From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson [he...@henke37.cjb.net] Sent: Friday, June 04, 2010 12:39 PM To: Flash Coders List Subject: Re: [Flashcoders] setting variable Lehr, Theodore wrote: So I am loading a swf - How can I set a value of a variable in that swf from the parent? Same as if it was a mc that you hadn't loaded separately. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] buttonMode and textfield
Is there anyway to make it so the whole area of a textfield will register if the buttonMode is set to true... as it now, the hand cursor only shows if I roll over the text - I would like it to act more like a link where you do not have to be exactly over the text... ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] XML and htmlText
To me, at least, this seems very weird... I have a textfield I am creating in as... I am doing something like this: main_txt.htmlText = Question: +xmlData.children()[i].children()[0]+br/; If I have a line break br/ IN the xml - it shows up... but the line break that is hardcoded in that line does NOT show up... why would that be? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] ticker
I am trying to make a simple ticker... my thinking is to tween it (in as) right to left... how would I make that tween repeat endlessly? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ticker
That's what I love about this list - there is ALWAYS help available but it is often cryptic... ;-) From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike [g...@engineeredarts.co.uk] Sent: Friday, May 28, 2010 10:57 AM To: Flash Coders List Subject: Re: [Flashcoders] ticker On 28/05/2010 15:45, Lehr, Theodore wrote: I am trying to make a simple ticker... my thinking is to tween it (in as) right to left... how would I make that tween repeat endlessly? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders yoyo is your friend ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ticker
Don't worry - I love it! Would rather hunt and find it anyway rater than being handed the answer... From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike [g...@engineeredarts.co.uk] Sent: Friday, May 28, 2010 11:14 AM To: Flash Coders List Subject: Re: [Flashcoders] ticker Hehe - Just giving you a nudge in the right direction - you have to look up some info - try googling for flash tween yoyo and it opens up some interesting stuff. If you then get stuck trying to do stuff, we help a bit more ;) On 28/05/2010 16:04, Lehr, Theodore wrote: That's what I love about this list - there is ALWAYS help available but it is often cryptic... ;-) From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike [g...@engineeredarts.co.uk] Sent: Friday, May 28, 2010 10:57 AM To: Flash Coders List Subject: Re: [Flashcoders] ticker On 28/05/2010 15:45, Lehr, Theodore wrote: I am trying to make a simple ticker... my thinking is to tween it (in as) right to left... how would I make that tween repeat endlessly? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders yoyo is your friend ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Papervision 3d help
Sorry for being such a newbie, but if I want to use papervision 3d (i.e. something like: import org.papervision3d.core.effects.view.ReflectionView) what do I need to do? Is there a component I need to download? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Astra chart issue
I am trynig to use the astra pie chart. It works fine locally - but when I upload it to a server, I get a #2007 error: Parameter must be non-null. Am I suposed to upload something else to the server? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Astra Components
Does anyone know of any good documentation for the Astra components? The stuff that comes with it is not very thorough... I am trying to figure out how to customize the charts ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Buggy Tween
Thanks - for to need such hand holding I tried what you said but get the same results... What should be in the //do your stuff here? as far as I have it now - the tween is still handled in the original tween (tween_handler in your example) From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John R. Sweeney Jr [jr.swee...@comcast.net] Sent: Wednesday, May 12, 2010 6:38 PM To: Flash Coders List Subject: Re: [Flashcoders] Buggy Tween Howdy, You tween objects got garbage collected. I was bit very hard by that one in a kiosk touch screen that needed to have certain things happen after the tween was finished. So when garbage collection stopped the tween, things went very messed up and/or locked up. :) Here is how I fixed that: var tween_handler:Tween; tween_handler = new Tween(mc,alpha,Strong.easeInOut,1,0,.5,true); tween_handler .addEventListener (TweenEvent.MOTION_FINISH, doYourFunction; function doYourFunction (evt:TweenEvent):void { tween_handler .removeEventListener (TweenEvent.MOTION_FINISH, doYourFunction); // do your stuff here } Then you should be fine, John on 5/12/10 2:44 PM, Lehr, Theodore at ted_l...@federal.dell.com wrote: thanks - I'll look into how to do that John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Buggy Tween
Indeed - that seems to be it thanks Thanks John also! From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik (MIN - WSW) [ematth...@webershandwick.com] Sent: Thursday, May 13, 2010 11:04 AM To: Flash Coders List Subject: RE: [Flashcoders] Buggy Tween Could it be you have var tween_handler:Tween inside of a function? If it's a class variable it won't get garbage collected, if it within a function it's eligible for garbage collection when the function is complete. YES: class myClass { var tween_handler:Tween; function myFunction() { tween_handler = new Tween(mc,alpha,Strong.easeInOut,1,0,.5,true); } } NO: class myClass { function myFunction() { var tween_handler:Tween; tween_handler = new Tween(mc,alpha,Strong.easeInOut,1,0,.5,true); } } _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Thursday, May 13, 2010 6:11 AM To: Flash Coders List Subject: RE: [Flashcoders] Buggy Tween Thanks - for to need such hand holding I tried what you said but get the same results... What should be in the //do your stuff here? as far as I have it now - the tween is still handled in the original tween (tween_handler in your example) From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John R. Sweeney Jr [jr.swee...@comcast.net] Sent: Wednesday, May 12, 2010 6:38 PM To: Flash Coders List Subject: Re: [Flashcoders] Buggy Tween Howdy, You tween objects got garbage collected. I was bit very hard by that one in a kiosk touch screen that needed to have certain things happen after the tween was finished. So when garbage collection stopped the tween, things went very messed up and/or locked up. :) Here is how I fixed that: var tween_handler:Tween; tween_handler = new Tween(mc,alpha,Strong.easeInOut,1,0,.5,true); tween_handler .addEventListener (TweenEvent.MOTION_FINISH, doYourFunction; function doYourFunction (evt:TweenEvent):void { tween_handler .removeEventListener (TweenEvent.MOTION_FINISH, doYourFunction); // do your stuff here } Then you should be fine, John on 5/12/10 2:44 PM, Lehr, Theodore at ted_l...@federal.dell.com wrote: thanks - I'll look into how to do that John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Buggy Tween
I have a CLICK event listener - the function it calls does two things: 1. Loads a .swf 2. creates a tween like: var mouseToTween:Tween = new Tween (mc,x,Strong.easeOut,mc.x.-159,3,true); The weird thing is that sometimes the tween just stops (sometimes it doe complete) and it seems to be tied to the swf getting loaded - as soon as the swf loads - the tween will stop where ever it might be... sometimes, though, it does work... just bugg or am i doing something wrong? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders