Re: [Flashcoders] AS3 - Displaying images from a directory

2008-07-08 Thread Rich Shupe
Flash can't retrieve the contents from a directory on its own. You don't have to use XML, but you need something similar. PHP, for example, can provide the contents of a directory in name-value pairs or straight text if you want to avoid XML. On 7/8/08 8:02 AM, SJM - Flash wrote: Is it

Re: [Flashcoders] AS3 - Displaying images from a directory

2008-07-08 Thread Rich Shupe
these should all work: --FlashVar will work if you can edit the template (still no server-side required), --a list in a text or XML file where no server interaction is required but an external file is needed (should work unless your CMS radically alters your directory structure) --a pre-defined

Re: [Flashcoders] How do you do this? (animating gradient fillcolours)

2008-07-08 Thread Rich Shupe
Hey, Jack... You sound like you know TweenMax pretty well. (Heh.) Thanks for the great work! Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] AS3 events framework ...

2008-07-03 Thread Rich Shupe
You can probably create your own class that will automatically add every event and route them accordingly, but it might end up being more work than it's worth, or less efficient than you'd like. There's no all-event approach to stopping propagation because only a single event is stopped. That is,

Re: [Flashcoders] screensaver

2008-07-03 Thread Rich Shupe
Yes, Screentime is cross-platform, and is my preferred tool for the job. On 7/3/08 4:02 PM, quinrou . [EMAIL PROTECTED] wrote: cool thanks for that. do you you know if you do mac's screensaver with it or do you know any other ap that can? Rich http://www.LearningActionScript3.com

Re: [Flashcoders] E4X question

2008-07-02 Thread Rich Shupe
He may be working with a source he can't change, like your parsing HTML without using CDATA tags. On 7/2/08 1:56 PM, Steven Sacks [EMAIL PROTECTED] wrote: You might want to try following XML standards and best practices by not using hyphens in XML node or attribute names. The only time

Re: [Flashcoders] E4X question

2008-07-02 Thread Rich Shupe
I don't understand the subtleties here. Just because XHTML was following it's own rules doesn't mean it was within best practices to use AS E4X to parse it. I'm quite sure it is not considered best practice to work with HTML in XML child nodes, without either CDATA or encoded entities, and your

Re: [Flashcoders] E4X question

2008-07-02 Thread Rich Shupe
I guess I wasn't clear. I said the author's question may have been posted, and the other answers may have been valuable, because the source may NOT have been within the author's power to change. On 7/2/08 6:37 PM, Steven Sacks [EMAIL PROTECTED] wrote: Hyphens in XML node names and attributes

Re: [Flashcoders] switch statement more efficient than if...else?

2008-06-25 Thread Rich Shupe
Actually, tt is my (perhaps wrong) understanding that this is not the case. In the past, both Macromedia and Adobe sources have stated that switch does not offer a performance boost--just readability and functionality (optional break lines) enhancements over if statements. I have been wrong many

Re: [Flashcoders] FP9/AS3 : What could prevent filters from working ?

2008-06-20 Thread Rich Shupe
Its been a while since I have done one, but don't blur filters require some parameters? I didn't think you could do a generic one as you did - new BlurFilter() and not say how much it blurs, what the opacity is, etc. No, the default parameters are used when none are supplied. However, the

Re: [Flashcoders] Is there any way to get a list of the classescompiled into a SWF?

2008-06-18 Thread Rich Shupe
Yes. Other options include FDT and Flex Builder. TextMate is another way to go, but I don't think it can show you the script content of SWCs or SWFs. On 6/18/08 10:41 AM, Jim McIntyre wrote: The OP mentioned in another post he's on a Mac - so am I. I'd love to use Flash Develop too but it

Re: [Flashcoders] Maintain position on rotation

2008-06-18 Thread Rich Shupe
Theoretically, I'm not sure why not. Can you describe how/where they should overlap or post some code? On 6/18/08 1:27 PM, eric e. dolecki wrote: AS3. I have a MC I am rotating, and inside the MC I have a Sprite (affixed to the bottom of the MC). While rotating, I want to place another

Re: [Flashcoders] How can I set stage dimensions ? (AS3)

2008-06-05 Thread Rich Shupe
You didn't specify if this was for Flash or Flex. If it's Flash, metadata isn't supported. If it's for Flex, it looks correct to me: I don't know enough about Flex to offer a suggestion. You might try the FlexCoders list? Rich http://www.LearningActionScript3.com

Re: [Flashcoders] How can I set stage dimensions ? (AS3)

2008-06-05 Thread Rich Shupe
Sorry, that previous post was sent prematurely: You didn't specify if this was for Flash or Flex. If it's Flash, metadata isn't supported. If it's for Flex, it looks correct to me: http://www.morearty.com/blog/2006/06/27/setting-the-width-and-height-of-a-pu re-actionscript-application/ I don't

Re: [Flashcoders] AS3 - A simple questions

2008-06-03 Thread Rich Shupe
for (var i:int = 0; i 3; i++) { var txtFld:TextField = new TextField(); txtFld.name = TextField + i; txtFld.border = true; txtFld.x = i*120; addChild(txtFld); txtFld.addEventListener(MouseEvent.CLICK, onClick, false, 0, true); } function onClick(evt:Event):void {

Re: [Flashcoders] AS 2.0 (AS 3.0) question - knowing when a MovieClip is on it's last frame.

2008-05-30 Thread Rich Shupe
Paul, This post includes sending data between AVM2 and AVM1 but it also shows manipulation of a movie clip. You could apply the same technique to the SWF PPT. http://www.learningactionscript3.com/2007/12/14/sending-data-from-avm2-to-av m1/ Rich http://www.LearningActionScript3.com On 5/30/08

Re: [Flashcoders] Blank flash problem...

2008-05-25 Thread Rich Shupe
I forgot to mention this. This always happens on every browser, and there's a very easy fix. The CSS is set to visible, and JavaScript (SWFObject) makes it invisible. just reverse these conditions. Make flashcontent hidden to start and, upon SWFObject failing to detect Flash, et the div to

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread Rich Shupe
Eric, if you're saying you want to manipulate the first and last 15% of a display object without creating anything else, I don't think that's possible. The closest I can think of that will accomplish that is using a displacement map filter in conjunction with resizing. That might get you what you

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread Rich Shupe
You can almost certainly write a Hydra filter for this. You can do it AS-native with BitmapData. 9-slice scaling can't do what you're hoping for, as I understand it. It will only scale the top and bottom centers when scaling left and right, the left and right centers when scaling up and down, the

Re: [Flashcoders] AS3: Stretch only edges of a displayObject?I

2008-05-20 Thread Rich Shupe
Eric, I know this isn't the root of what you were asking, but here's a class by Thibault Imbert that brings 9-slice scaling to bitmaps. Not on point, but related: http://www.bytearray.org/?p=118 And if anyone is interested, donate to his book. And if there are any fluent French speakers willing

Re: [Flashcoders] alpha not working on mc with textfield

2008-05-13 Thread Rich Shupe
Obie, have you made sure the fields are using the embedded version of the font? Just embedding the font doesn't do anything. After embedding, you need to switch the font from the system version to the embedded version. Because you mentioned several clips, you can do this globally (if desired)

Re: [Flashcoders] Linked sounds in library have to be in root SWF? AS2

2008-05-12 Thread Rich Shupe
Alistair, From what I can gather from your email, try this. When you are creating your sound instances, add this to the constructor. = new Sound(this); That will specify that the sound comes from the loaded file. Rich http://www.LearningActionScript3.com

Re: [Flashcoders] Why isn't my TextField multiline? AS2

2008-05-08 Thread Rich Shupe
I think the problem is that you're pulling your string from another text field. In that case, the characters are just characters, rather than control codes. This subset of your code works fine: var tmpField:TextField = this.createTextField(my_txt, 1, 0,0,100,100); tmpField.selectable = false;

Re: [Flashcoders] Why isn't my TextField multiline? AS2

2008-05-08 Thread Rich Shupe
In that case, use HTML and br and/or try wrapping the content in a CDATA tag. On 5/8/08 8:52 AM, Alistair Colling wrote: hmm, the string that is being targeted is held in a variable that is set from an xml file so should just be a regular string, i'll look into this tho. Rich

Re: [Flashcoders] FPS limit of flash player inside browser?

2008-05-08 Thread Rich Shupe
I've only had a chance to glance at this thread, but it seems that most of the replies are leaning this way. I agree with what appears to be the majority sentiment, expressed most recently by Jason. Many things will cause performance to suffer with a higher frame rate. Injudicious use of bitmap

Re: [Flashcoders] Best AS3 MenuBar component for Flash CS3

2008-05-08 Thread Rich Shupe
I've been pretty impressed with the Jumpeye components (www.jumpeyecomponents.com), but I'm not sure if the menu components come with a skin that looks like the other CS3 components. They're really easy to skin, though. Rich http://www.LearningActionScript3.com

Re: [Flashcoders] PrintJob

2008-04-30 Thread Rich Shupe
Glen, just a wild guess, but maybe switching to printAsBitmap will help. This may be unavoidable if the cached bitmap is used for the filter but not for the printing. If so, you'll just need to create a BitmapData object of everything you want to print. Rich http://www.LearningActionScript3.com

Re: [Flashcoders] Loosing full-screen when loosing focus

2008-04-29 Thread Rich Shupe
Yes, the Flash projector will stay in fullscreen mode when changing focus--at least when Command-Tabbing on the Mac. I assume it will behave similarly on Windows. I didn't mean to preclude that out of the box. I just never use the built-in projectors because they're a hair shy of worthless for

Re: [Flashcoders] Loosing full-screen when loosing focus

2008-04-29 Thread Rich Shupe
If you are only READING files, you have a bit more options. If you are writing files, or dealing with the OS extensively in traditional application ways, you pretty much have to go with a projector enhancer. You can't really use the browser, and you can't use AIR. Some may say that their are

Re: [Flashcoders] Loosing full-screen when loosing focus

2008-04-28 Thread Rich Shupe
I don't think it's possible to prevent this in the browser. It's probably possible when using a third-party projector enhancer like mProjector, but you'd have to test. Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list

Re: [Flashcoders] Mac CD Autorunning - slightly OT

2008-04-25 Thread Rich Shupe
Glen, Autorun on the Mac virtually does not exist. Even when it was a QuickTime feature (a long time ago) it was never embraced by the Mac community. As far as I know, it's not possible on contemporary systems. That doesn't mean that there's not a workaround, such as a third-party app that

Re: [Flashcoders] RE: Flash Math Conceptualizing

2008-04-24 Thread Rich Shupe
(* indicates emphasis) I'm swamped at the moment, but can help if you are still stuck in a day or two. I have an *unfinished* class exercise that does the *opposite* and I can't help out until at least tomorrow, but it might get you started on the math if no one else has a solution. Rich

Re: [Flashcoders] RE: Flash Math Conceptualizing

2008-04-24 Thread Rich Shupe
Oops. Please ignore. This thread. I think this was sent to the wrong list. I used the Reply button, so I'm not sure how this happened. Probably a copy/paste error. Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list

Re: [Flashcoders] tree component

2008-04-21 Thread Rich Shupe
I don't have any experience with the Accordion Tree Menu yet, so I don't know if it will fit your needs. However, I have to say, I've been very impressed with the quality and execution of the Jumpeye components so far. The design is great, the ActionScript features are fantastic, and they have

[Flashcoders] Reading and parsng binary file formats

2008-04-16 Thread Rich Shupe
Can anyone definitely tell me that this isn't possible, or point me to additional information? I want to compare two files, but they are binary. The nearest example I can think of is an encoded text file. That is, no audio, video, sound, etc. but something like Word vs. ASCII or Quicken vs. QIF,

Re: [Flashcoders] Reading properties of a textbox [AS3]

2008-04-15 Thread Rich Shupe
Stuart, I'm not sure I've followed this thread thoroughly, but have you embedded a font and specified it in a text format you're using? That is, you can't just say embedFonts = true. To do that, you must embed a font in the Library, and use that font in the field's text format, controlling the

Re: [Flashcoders] A question about localConnection

2008-04-11 Thread Rich Shupe
Eric, could the problem be that you're not preceding the connection names with underscores? Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] A question about localConnection

2008-04-11 Thread Rich Shupe
Heh. No need, sir. I looked it up too, just because I was equally unsure! On 4/11/08 3:23 PM, eric e. dolecki wrote: That was it. I totally missed that in the online docs. Hanging my head in shame here, thanks for pointing that out though! Rich http://www.LearningActionScript3.com

Re: [Flashcoders] possible reasons for crash on compile in flashcs3?

2008-04-08 Thread Rich Shupe
It sounds like you know this, but the case you describe can still be a problem if you don't use the fully classpath in the instantiation. Hypothetical example: import com.thirdPartyTweener1.TweenIt; import com.thirdPartyTweener2.TweenIt; var tw:TweenIt = new TweenIt(); Even though the

Re: [Flashcoders] Calling Listener Functions

2008-04-05 Thread Rich Shupe
Oops. I forgot to include a link to post about this. Here it is: http://www.learningactionscript3.com/2007/11/21/mandatory-argument-types/ On 4/5/08 8:58 PM, Omar Fouad wrote: Hi, I've got a function that is called when a listener listens an event like:

Re: [Flashcoders] Calling Listener Functions

2008-04-05 Thread Rich Shupe
You can also just send null. myFunction(null); On 4/5/08 9:38 PM, jonathan howe wrote: Technically speaking, you can instantiate a bogus MouseEvent to call the function: myFunction(new MouseEvent(MouseEvent.CLICK)); However, I only mention this to be complete in directly answering the

Re: [Flashcoders] Calling Listener Functions

2008-04-05 Thread Rich Shupe
I agree. I can see both sides of the point--more granular encapsulation, etc. However, in addition to creating more breadcrumbs to follow, it may not be all that practical in every case. You may not always know you need this and may have to deal with less manageable code more and more as the need

Re: [Flashcoders] An error I cant iron out...

2008-04-02 Thread Rich Shupe
It's hard to guess at this without seeing the code. Typically, this happens when you're trying to instantiate something that isn't a class or is a circular or conflicting reference. Something like var myJunk:NotAClass = new NotAClass(); or var mc:MovieClip = new MovieClip(); mc = new

Re: [Flashcoders] Custom MovieClip Classes

2008-03-23 Thread Rich Shupe
The other thing is that not everyone is an advanced coder. Steven did say something to the effect of when writing classes, but automatic declaration is a backward-compatible feature that allows beginners to code in the timeline the same way they used to. In AS3, whether you use your own document

Re: [Flashcoders] Custom MovieClip Classes

2008-03-23 Thread Rich Shupe
It's a good idea to declare them yourself because both you--and more importantly the compiler--know what every instance is. This may not be 100% on point, but there is a common problem with upcasting, for example, when Strict Mode is on. Here's a scenario. On the stage, you create a movie clip

Re: [Flashcoders] strange effects when tweening alpha

2008-03-21 Thread Rich Shupe
It's also important to clarify something Zeh mentioned when he used the phrases container children and precomposition. (Zeh said it well, but I've seen lots of folks not quite get this idea the first time they hear about it, so this is just a bit of overkill.) The Layer blend mode will not work

Re: [Flashcoders] AS3... when to start?

2008-03-16 Thread Rich Shupe
Micky, This thread became a Flash IDE versus FlexBuilder/other tool discussion but, back to your original question, you can still code, and find resources to help, AS3 in Flash. I recently co-wrote a book with this in mind, for Flash users wanting to learn AS3. It's definitely aimed at

Re: [Flashcoders] AttachMovieClip VS addChild

2008-03-15 Thread Rich Shupe
Your code does what you're asking but I suspect you're having trouble with the positioning, or something similar. Since DC has no initial y, all instances will end up at 30, using the code below. Here's an adaptation that shows two visual results: position and trace, using the instance name

Re: [Flashcoders] Real-time Lip Sync with AS3

2007-12-25 Thread Rich Shupe
Elia, It's easy to do the same thing I did with FlashAmp--using amplitude only to manipulate mouth shapes randomly. There's no way way to match the shapes to the phonetic sounds on the fly. You need to do that manually. If that's important, the resource I recommend to all of my students is Chris

Re: [Flashcoders] Formatting number to 2 decimal places

2007-09-14 Thread Rich Shupe
function roundToDecimal(val:Number, places:int):Number { var factor:int = Math.pow(10, places) return Math.round(val * factor) / factor; } trace(roundToDecimal(Math.random(), 1)); trace(roundToDecimal(Math.random(), 2)); trace(roundToDecimal(Math.random(), 3));

Re: [Flashcoders] Singleton AS2

2007-09-09 Thread Rich Shupe
My assumption is that you have a scope problem. It seems like you're Singleton is working properly inside its own SWF, because you remarked that the duplication when loading was unusual. It sounds like you know that the Singleton pattern is designed to instantiate only one copy of itself, only if

Re: [Flashcoders] AS3 ROLL_OVER or MOUSE_OVER ? Which one, and why ?

2007-09-08 Thread Rich Shupe
In the AS3 class MouseEvent, what is the use for ROLL_OVER and ROLL_OUT? They seem to be the same as MOUSE_OVER and MOUSE_OUT... ROLL_OVER and ROLL_OUT = mouse button down MOUSE_OVER and MOUSE_OUT = no mouse button down I don't think this is true, but someone correct me if I'm wrong. I

Re: [Flashcoders] AS3: dynamically accessing parts of XML

2007-09-05 Thread Rich Shupe
Here are two quick ways of doing it, depending on whether you want child nodes or the element itself. Both are shown in the trace so you can experiment and modify this to suit your needs. var myXML:XML = ANIMALS MAMMALS MAMMALhuman/MAMMAL MAMMALcow/MAMMAL

Re: [Flashcoders] Why would this happen?

2007-08-26 Thread Rich Shupe
Probably your tile engine have extended Sprite or MovieClip and you added it to the display list. Therefore, the tile engine as a whole is the parent sprite/mc and the tile is a child of the tile engine. Could that be it? Rich ___

Re: [Flashcoders] [OT} simple math problem (cubic easing)

2007-08-25 Thread Rich Shupe
Hi Roy. It seems like it's been decades since I said hello. I'm not sure I understand exactly what you're doing, but I gave it a shot. If you're trying to get a value for motor speed that is between 60 and 255, here's a way to do it without relying on a fixed distance. This seems goofy, but it

Re: [Flashcoders] actionscript cuepoint question

2007-05-15 Thread Rich Shupe
Josh, I¹m pretty sure this has nothing to do with cue points. Although you can seek to cue points, this is an issue regarding seeking to the next available group of frames. This cannot be avoided. The only way you can improve this is to increase the number of keyframes used during encoding. This

Re: [Flashcoders] simple movie scroller Bug.

2007-05-15 Thread Rich Shupe
I can¹t tell just from your code what is going on, but I have two comments. 1) If you end up hiding your buttons, use _visible = false/true, not _alpha = 0/100. Alpha vals of zero mean your elements still trap/trigger mouse events, are still composited, etc. 2) Your behavior may be stopping at

Re: [Flashcoders] actionscript cuepoint question

2007-05-15 Thread Rich Shupe
Sorry to offend. I don't know how that got cut out of the email I sent. Perhaps I hit send prematurely. Josh, for more info on injecting, this little article may help: http://www.devx.com/webdev/Article/31420/0/page/2 followed by a way to use that, and a server-side solution like LightTPD,

Re: [Flashcoders] Flash animation like http://u10.iriver.com/

2007-05-15 Thread Rich Shupe
Yes, FlixPro can output to vector. The trick starting with a source that is as clear and high-contrast as possible. To keep processing to a minimum, try to film the sequence with an actor dressed as darkly and uniformly as possible on a white background. Lights can wash out the background