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 possible to display a number of images in flash from a directory without
 the need for XML?

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 list or filename structure, as suggested (although I'd add
error handling for the final failure)


On 7/8/08 9:54 AM, SJM - Flash [EMAIL PROTECTED] wrote:

 My problem is the flash file is going to be embeded into a templete page to be
 added to a CMS unfortunatly there is no option for me to use any additional
 XML, PHP, ASP, Pearl script etc... the way i thought it would work is the path
 to the images would be a flash var!

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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, if you have a mouse down, followed by a mouse up,
stopping propagation after mouse down will not prevent the mouse up from
executing.

Regarding your dispatching question, you can dispatch from any class that
ultimately extends EventDispatcher. So, you can dispatch from a document
class, for example. I'm not sure what you mean by having an instance of the
dispatching object and adding a listener to the same object. You can
dispatch from one instance and listen from another.


On 7/3/08 3:23 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Considering that all events commence with the capture phase (stage to
 target), is there anyway to have just one stage listener for all events (of
 any type) that kills off event propagation, then routes said event to
 perhaps an event manager or function that determines the event type and what
 operation is required?
 
 If possible, would this be ideal when you know your application only has
 10-15 events (either user or system generated) to account for?
 
 I still don't completely understand the AS3 event framework and it doesn't
 seem to make sense to me to have 10 or 15 listeners located throughout an
 application. Not to mention the fact that, as far as I'm aware, within any
 class from which you want to listen for an event, you need to have a
 instance of the dispatching object, then add the listener to the same
 object?

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 I've seen hyphens in XML is when salespeople and other
 laymen end up writing XML schemas.  Why they're ever given authority to
 do such things is beyond me.
 
 If it was me, I would fight tooth and nail to get those hyphens removed
 and replaced with camel case.  Best practices or die!  ;)

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
experience reflected that.

And, although my opinion is insignificant, I would have done exactly what
you did. Best practices are just that, guidelines for which we should
strive. But, since there's no XHTML parser at the ready, you work with what
you have.


All of this is beside the point, however. I did not cite your example as a
criticism. I prefer not to do that. I mentioned it because I was suggesting
that maybe this recent question was posed because the author couldn't change
the source, just as you couldn't. And, therefore (best practices or not) the
author had to work with a hyphenated attribute name.

I think it would be difficult to find a defense for hyphenated attributes,
but there still may be times when you must work with them.




On 7/2/08 4:42 PM, Steven Sacks [EMAIL PROTECTED] wrote:

 Just because I'm parsing XHTML using the XML parser in Flash doesn't
 mean that the XHTML is not following best practices.  CDATA in XML is a
 best practice, but not in HTML.  I'm using the Flash E4X parser to parse
 HTML, which, while technically possible, has its own set of challenges
 due to XML expecting XML not XHTML.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 is just bad all around, and I
 refuse to accept that things that are within your power to change are
 unchangeable.
 
 Some people choose the path of least resistance and figure out a way to
 parse the hyphens.  I choose the path of righteousness and figure out a
 way to get rid of the hyphens that shouldn't be there in the first
 place.  ;)

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 times, however. This may be such a case.


On 6/25/08 10:48 AM, eric e. dolecki wrote:

 Switch/case is a bit quicker.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
poster did say this:

The MC is a section container that has many other children MCs.
They are loading JPGs, streaming video, and many other stuff.

If you apply a filter to an MC and then load content into it, it will wipe
out the filter. This may not apply in your situation, if the loading is
different, children only, etc., but it's likely.

To test this, disable the loading and see if the filter is applied. If the
movie clip ONLY loads, and therefore has no content to show if the filter is
working, this is almost certainly the cause. You can try it on another movie
clip to see.

The solution is to apply/reapply the filter after the loading is complete.
You may see an interruption of the visible effect during load, however.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 seems it is Windows-only. Is that true?

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 MC's x,y (each frame) on that
 rotating MC. However the x,y never updates. I tried localToGlobal, but that
 doesn't seem to change either during the rotation. Can this be easily done?

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 know enough about Flex to offer a suggestion. You might try the
FlexCoders list?

The only thing I can think of as a wild guess is that maybe you want to
trace after the constructor has finished, or after a stage resize event?
However, you can probably see with the naked eye that your stage size is not
100 x 100.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 {
trace(Hi I'm, evt.target.name);
}



Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 5:56 AM, Paul Andrews [EMAIL PROTECTED] wrote:

 I realise that AS3.0 cannot
 directly control an AS2.0 swf that's been loaded, but are there any
 completely reliable solutions to communicating between these to allow the
 AS3.0 application to send one-way messages to the AS2.0 swf?


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 visible.


On 5/25/08 8:56 AM, Fabio Pinatti wrote:

 except for the beginning of application, that
 shows a quick screen with some content, and disappears quickly, to a black
 screen until the full loading..

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 need, but you'll still have to create the displacement map.

Another way to do this is to create and destroy other objects but within the
main object. At least that way you won't have to worry about moving,
rotating, etc., four slices. You could use BitmapData, for example, create
the four slices and add them inside the same do, allowing you to manipulate
only slices 1 and 4, but still treat the entire d.o. as a single entity.


On 5/20/08 9:44 AM, eric e. dolecki wrote:

 I am looking to take a DO (movieclip), and stretch just the side edges,
 leaving the middle unstretched... so take an image, cut in 4 vertical
 pieces, and stretch the outside pieces out horizontally by like 15%.
 
 I could use DisplayObjects above the main one and just stretch those
 horizontally, but I really want to keep this contained to manipulations on
 the main object itself and not worry about creating and destroying others.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 center slice in all
cases, and never the corners.

If you want something *very* roughly like the genie effect (where the top
and bottom scale but not the middle, or vice-versa), you'll need to write
something for that. There are bunch of examples like this if you want to
think a bit about what to search for. I can think of the genie effect, an
old-school waving flag or skew, etc., all of which cut the object into
slices and manipulate them individually.

In fact, this is required when using 9-slice on a bitmap. You have to cut
the BM along the lines of the scale-9 rect so the auto scaling will work
properly. (You can do it manually before importing, too, but that's
obviously not dynamic.)

Another thing that was quite popular was the slice-distortion of a single
image--the first I saw was the Mona Lisa--depending on where you hovered
your mouse. I just did a search for mona lisa actionscript with no luck,
but this might jog some gray cells into action.

You might also look for an ActionScript goo/liquify example which would
demonstrate a displacement map approach. I think Grant did one of Mike
Chambers. 

I'll try to pull this into focus when I have a clearer head and maybe I can
think of a concrete link or two.

R


On 5/20/08 1:35 PM, eric e. dolecki [EMAIL PROTECTED] wrote:

 While I don't seem to be able to do this easily, I am applying scale9grid to
 sorta do what I want. I was hoping for incremental stretching on the
 sides... maybe that is something I'll be able to do using a hydra filter or
 something in FP10.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 to contribute translation efforts, let me know.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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)
using Find and Replace.


On 5/13/08 10:51 AM, Allandt Bik-Elliott (Receptacle) wrote:

 Hi guys - this is probably something really obvious but it's got me a
 bit stumped (sorry it's a little OT but i can't find any answers)
 
 I have several movieclips containing a static textfield with text in
 using a font that I've already embedded for actionscript use (it has
 a * after it's name). I've motion tweened these to move across the
 screen, starting at 0 alpha and becoming 100 alpha at the end of the
 tween (so movement and alpha tween).
 
 The problem is that the alpha doesn't seem to be working. I've
 replaced the type with a random shape and the alpha works again so it
 seems to be something to do with the embedding but I'm not sure what.
 
 hope you can help
 obie

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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;
tmpField.border = true;
tmpField.type = dynamic;
tmpField.multiline = true;
tmpField.wordWrap = true;
tmpField.text = test\rtest;

However, putting test\rtest in another text field, and then saying this:

tmpField.text = other.text;

shows the characters. If you have to pull text from another field, try using
HTML and setting the .html of one field to the .html of another field.


Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 caching, large looping tasks... pretty much
anything that requires a heavy load every enter frame. The higher the frame
rate, the more often those tasks have to execute, and the less time you're
giving them to do the execution.

My rule of thumb is, there's no rule of thumb. Try 12, 18, 24, 31, etc.
Don't expect to get consistent real world experience higher than the 18-31
frame range. There are lots of test files out there, that show high FPS but
not on every machine, etc.

On 5/8/08 10:52 AM, Merrill, Jason wrote:

 No, in most cases, yes, but performace on some machines can actually
 cause it to drop frames and look even choppier than a lower framerate.
 It all depends on what kind of animation is occuring, what media
 elements are involved, and what the hardware of the end user's machine
 is like.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 desktop apps. About
the only thing they can do is go fullscreen. I think they can still launch
an app if you provide the exact path to it, but nothing more.

That's also why I didn't include AIR, which might be another option for you.
Adobe was very specific that they were not creating a desktop APP tool, but
rather a desktop extension for RIAs. Hence looking to third-party apps.

[I have no desire to get into a 'my tool is better than yours' discussion
here. AIR is great and those are Adobe's (paraphrased) words.]

It all depends on what your app needs to do. If you were previously
contemplating delivering via the browser, you may not need any of the
functionality that makes mProjector so great.

AS version and cross-platform delivery are also issues. AIR can't do
anything special with AS2 projects (AIR is AS3 but you can load AS2 SWFs if
you don't need to communicate with them), mProjector is in beta for AS3,
other tools can do AS3 but can't do cross-platform as well, etc.

Good luck,

Rich
http://www.LearningActionScript3.com


On 4/29/08 11:03 AM, Bart Goormans wrote:

 Thanks for the tip Rich.
 
 I had a look at the mProjector. This third-party projector will probably
 solve several questions in the project we're doing. Only hope the
 project manager will allow for third-party pluggs. We are developing a
 desktop app. Not a browser based, so it would certainly be a valid option.
 Have to check with people from mProjector in detail (not found in
 docu/examples)
 
 Would this not be something the flashplayer should support by itself, a
 fixed (regardless of having the focus or not) fullscreen mode?



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 other options by extending those environments
(server-based saving--to server or locally, Java applets that add
functionality to the browser, etc., but I don't consider them realities for
the average user.

mProjector is AS3-stable on the Mac, but not yet released on Windows, so
that probably isn't a reality for an AS3 project. I've heard good and
terrible things about Zinc, so I can't offer any opinions there. I'm sure
others have used it and may be able to help. Finally, I've never had the
slightest interest in any product that isn't cross-platform, so I can't
speak to any of the Windows-only, or Mac-only (if there are any) options.

Anyone else have any opinions on proj-enhancers?


On 4/29/08 2:31 PM, Bart Goormans wrote:

 Our app will be a sort of backoffice in which we will be dealing with
 the filesystem extensively. It will be managing mediafiles and dig into
 its xml metatags. From the start on, this project is completely AS3
 based. So I 'd better test the mProjector thoroughly beeing in beta for AS3.
 
 I haven't had too much experience on building full scale apps in flash
 but this will be an adventurous challenge. Hope to get the squares out
 of the wheels soon and start rollin'  ;-)) Thx!

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 somehow detects
that the CD has been inserted and launches something from the CD, etc., but
I hedge out of ignorance.

I personally think autorun is terrible and significantly intrusive and
disable it on all my machines. I do an enormous amount of educational CDs,
and producers favor autorun for Windows about half the time. To each his
own.

In any case, autorun for the Mac is not a reality.

Re: how-to, the app and exe files are distinct. When making a hybrid, you
can hide each from the other platform. Considering the lifetime of hybrid
CDs to date, Win creation of hybrids is relatively recent. Typically, they
are usually created using Toast on a Mac. However, these are gross
generalities. I've been enthused by Win apps that can make hybrids over the
past several years, but have no experience with them.

To answer your other questions, any OS X installation can unzip, and
supporting OS 9 is an extreme degree of support these days. I say that as a
lifetime Mac user that wants Mac support to continue. Even in the
educational markets I work in (higher ed) OS 9 is no longer supported.

In fact, I've moved away from Stuffit formats because zipping/unzipping is
built into the Mac OS and you need to have Stuffit Expander to decompress a
BinHex. (The expander is free, but you have to get it if you don't have it,
and the way it's distributed these days is massive--no longer a tiny
download.)

However, that's not a very useful hybrid and is 180 degrees from autorun.
This is because you can't just double-click the app. You must first
decompress to your hard drive and then double click. The better way to
create the hybrid is to have all shared data on one volume (on the Mac, it's
the HFS volume), have the Windows-specific files on an ISO partition, and
the Mac-specific files on an HFS (HFS+, etc.) partition.

I inferred from your email that you had those instructions, but it further
implies that you should offer the app, not the zip, so the user can
double-click from the CD.

I wish I could direct your more specifically on the Win creation of hybrids,
but it's not my platform.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
great support. I've integrated a few into my classes and will likely be
using them in my own projects, when called for. I recommend trying them out.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[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, etc.

The idea is to compare two files to see how they differ. For this reason,
read-only is fine. I know the ByteArray can be used for similar things, but
I don't know the limits of such an attempt.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 field and format with AS.

Are you using AS3 or AS2?


Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 like-named class is in two different packages, the usage
isn't obvious at instantiation. You'd need to do this:

import com.thirdPartyTweener1.TweenIt;
import com.thirdPartyTweener2.TweenIt;

var tw:TweenIt = new com.thirdPartyTweener1.TweenIt();

But the compiler would probably warn you about this in a relatively clear
way, so that's probably not the problem. Just thought I'd point that out.


On 4/8/08 2:29 PM, mario gonzalez wrote:

 No sir, I'm on good ole' windows xp.
 
 I know one of the ideas about packages is that you can have 2 classes
 that are named the same, as long as they're in different packages.
 However at this point, where i have ruled out everything that it could
 be it's time to start ruling out 'that should never happen's so I might
 try renaming all classes that have the same name as one another even if
 they're in different packages.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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:
 
 fancyButton.addEventListener(MouseEvent.CLICK, myFunction);
 
 private function myFunction(e:MouseEvent):void {
// statements...
 }
 
 If I try to call myFunction using myFunction() , the compiler throws me an
 error, saying that the function expects an argument. At this point how
 should I call this function without dispatching the MouseEvent Event??

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
 question. I would think that Matt's suggestion is the more appropriate.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
arises, as Steven said.

I think the example I used in the link I posted was a pre-existing listener
but the additional need to call it manually. I think I used a timer, set for
every 5 minutes for example, but the need to call it once right away. If you
ran into something similar more than a time or two, you'd end up with lots
of headless wrappers just to call the function two ways.

I prefer either sending null or setting up null as the default value. The
only minor problem with the latter is that it assumes you foresee a need to
do this. So, if you wanted to do it later in the game, you'd need to go back
and add in the null default.

I wouldn't recommend habitually adding null as a default for every listener
because then you lose a bit of error reporting convenience. That is, you
will still get TypeErrors if you send in the wrong type, but if you just
forget to send an event argument, without the need for the situation
originally described, you won't get the 'wrong number of parameters,
expected 1' error.


On 4/5/08 11:06 PM, Steven Sacks wrote:

 I disagree with this approach.  It's unnecessary and makes code less
 manageable.  It's cleaner to set the argument as optional (event = null)
 than write another subroutine.
 
 
 Matt S. wrote:
 You might want to separate the functions, so you  would have
 myFunction(), which you could call from anywhere, and myClickHandler,
 which would handle the mouse event specifically. So:
 
 fancyButton.addEventListener(MouseEvent.CLICK, myClickHandler);
 
 private function myClickHandler(e:MouseEvent):void {
 myFunction();
 }
 
 private function myFunction():void{
   //blah blah...
 }

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 IsAClass();

These are off the top of my head, and might result in different TypeError or
ReferneceError, but it wouldn't hurt to try to look for these examples.

Rich
http://www.LearningActionScript3.com

On 4/1/08 2:40 PM, Patrick Jakub Jankun wrote:

 I have a issue with an error I cant get rid off:
 TypeError: Error #1007: Instantiation attempted on a non-constructor.
 
 Strange thing is, it occurs only when I try to compile with Flash IDE as
 Document class,
 It¹s not there when I compile it through Linux free command line compiler :(
 can someone
 Explain me for what should I look? Because the Error messages in Flash ide
 are quite hmm..
 Mystic to me (at this time, im like 3 months into AS3)





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 class or not, the Main Timeline is
essentially a class. Therefore, the instances must be declared. That means
that every user, beginner or not, accustomed to best practices or not, would
suddenly have to adjust to yet another change in fundamental coding, even
with timeline-only code.

I agree and very strongly recommend declaring all your instances in
classes--and it wouldn't do any harm to adopt that practice in timeline
coding--but that's the reasoning behind the option. So that at least that
element of timeline coding would not be broken/radically altered for every
user.

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 and give it an
instance name of mc. Then, in the timeline, you say:

var sp:Sprite = new Sprite();
mc.addChild(sp);

Then later, relative to the sprite, you say:

sp.parent.gotoAndStop(2);

The compiler doesn't know that mc is a movie clip, so it gives you an error
saying it only understands it to be a DisplayObject.

You then have to say something like:

MovieClip(sp.parent).gotoAndStop(2);

to manually cast the display object because upcasting isn't automatic in
Strict Mode. Imagine that in a class, and the confusion could increase. So,
the recommended practice is to declare everything yourself. Something like
this (pseudocode):

var mc:MovieClip = new MyMovieClip();
addChild(mc);
var sp:Sprite = new Sprite();
mc.addChild(sp);
sp.parent.gotoAndStop(2);

Again, this is untested pseudocode just to explain the general idea. I chose
a custom linkage class to make this more analogous to using a custom mc
created in the IDE. The process is the same but, after creating it, delete
it and place it with code--just one of multiple ways of handling a task.


On 3/23/08 8:12 PM, Omar Fouad wrote:

 Yeah, But WHY I have to Always Declare them By Myself?

Rich
http://www.LearningActionScript3.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 if applied to a lone, childless movie
clip on the stage. Instead, it works on a movie clip within which the
children are overlapping.

For example, if your character is in the root timeline, it's not possible to
apply Layer to all the body parts and correct the problem. If the character
is in a movie clip (as it likely is/should probably be), you apply Layer to
the parent clip, not the body parts within.

The default tool behavior for applying the alpha is to go into the parent
and apply it to all the children. This yields the result you're seeing.
Layer was introduced with Flash 8 to prevent that. It precomposes everything
in the clip so the alpha is applied to one thing as a whole.

Rich


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 beginners, though.

Here's a tinyurl link to Amazon:
http://tinyurl.com/329c36

Rich

On 3/4/07 12:32 AM, Micky Hulse wrote:

 What happened to coding in Flash? Am I waiting for the next version of
 Flash until I can successfully and/or easily write AS3 via the Flash
 application? Will the future of Flash AS always require the Flex
 Builder? Or, is Flex Builder just one out of many/few code editors for
 compiling the new AS3 code?


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 request you mentioned. Note that, when adding an
instance name programmatically, you can't refer that instance by name the
same way you can when creating the instance name in the IDE. You must use
getChildByName() instead.

var dataLength:int = 5;

for(var i = 0; idataLength; i++) {
 var DC:DataCard = new DataCard();
 DC.x = Math.random()*550;
 DC.y = Math.random()*400;
 DC.name = dataCard + i;
 addChild(DC);
 trace(getChildByName(dataCard+i).name);
}

Rich

 In AS3 I tried the follwoing
 
 for(var i = 0; idataLength; i++) {
  var DC:DataCard = new DataCard();
  DC.y += 30;
 }
 
 What comes up is an only one instance of the movieClip as in one replaces
 the one before.
 
 Is there another way to achieve this? How can I add instance name to the
 MovieClip using the i from the loop?


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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
Georgenes' great book, How to Cheat in Flash CS3. I'll try to convert my
exercise to AS3 so you can compare them side by side. I'll try to do that
over the holidays.

Rich


On 12/18/07 3:01 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I look forward to that. Did you manage to get real-time lip syncing working
 with AS3 then?
 Using perhaps  SoundMixer.computeSpectrum()?


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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));


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] 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 it doesn't exist, or to use the existing instance. If this is working
correctly in the lone SWF, it sounds like, when loaded, there are two
scopes: the original SWF and the loaded environment. When the Singleton is
referenced after loading it is somehow relevant to the loading shell (_root,
_parent, etc.), where an instance didn't previously exist.

This sounds probable because after the second instance is created, a third
instance is not created. That is, once the Singleton exists in each scope,
it continues to work as it was designed.


On 9/9/07 12:22 AM, Helmut Granda [EMAIL PROTECTED] wrote:

 I have 5 applications and one of them was created with the Singleton
 pattern, those 5 apps are being loaded at different times into a container,
 when any of the movies is loaded and unloaded everything works fine but
 everytime the movie with the Singleton pattern is loaded into the container
 it creates a new copy of itself. one way to see that is creating a static
 counter variable that increases everytime the movie is loaded into the
 container.
 
 Could some one point me to a site where I could understand why this is
 happening. I understand what is going on but I can't grasp the reasoning
 behind it so that I can avoid those duplicates.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] AS3 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 may not
understand. I can't tell if this means that no mouse down is fired with
MOUSE_OVER/_OUT or if a mouse down is fired automatically with
ROLL_OVER/_OUT, or something else.

What I guessed this means is that ROLL_OVER/_OUT occurs when the mouse is
down when the rollovers occur, and MOUSE_OVER/_OUT occurs when the mouse is
up when the rollovers occur.

In any case, I can't find an instance where mouse down has any impact.

The short story is, ROLL_OVER/_OUT was introduced to prevent out/over
sequences between touching/overlapping children of a display object
container. For example, if you created a menu by grouping three touching
buttons inside a display object container, and rolled into the first,
through the middle and out the last, you would get this with
ROLL_OVER/_OUT...

over
out

...but this with MOUSE_OVER/_OUT...

over
out
over
out
over
out

You can see this by setting up a file this way: button or clip 1, touching
button or clip 2, inside a parent clip in the main timeline, then make
another copy of the parent clip, instancing the first doc1 and the second
doc2, using this code:

doc1.addEventListener(MouseEvent.ROLL_OVER, report)
doc1.addEventListener(MouseEvent.ROLL_OUT, report)

doc2.addEventListener(MouseEvent.MOUSE_OVER, report)
doc2.addEventListener(MouseEvent.MOUSE_OUT, report)

function report(evt:MouseEvent):void {
trace(evt)
}

Rich

From the documentation:
The purpose of the rollOver event is to simplify the coding of rollout
behaviors for display object containers with children. When the mouse leaves
the area of a display object or the area of any of its children to go to an
object that is not one of its children, the display object dispatches the
rollOver event. This is different behavior than that of the mouseOver event,
which is dispatched each time the mouse enters the area of any child object
of the display object container, even if the mouse was already over another
child object of the display object container.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] AS3: 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
MAMMALdog/MAMMAL
/MAMMALS
BIRDS
BIRDblackbird/BIRD
BIRDdove/BIRD
BIRD
BIRDIEtest/BIRDIE
/BIRD
/BIRDS
FISHES
FISHfishAndChips/FISH
FISHgoldfish/FISH
FISHherring/FISH
FISHshark/FISH
MAMMALwhale/MAMMAL
/FISHES
/ANIMALS;

function traceNode (xmlObj:XML, nodeName:String):void {
for each (var element:XML in xmlObj..*) {
if (element.name() == nodeName) {
trace(element);
}
}
trace(--);
trace(xmlObj..*.(name() == nodeName));
}

traceNode(myXML, FISH);


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] 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




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] [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 was the first thing that popped into my head.

Determine the value for motor acceleration directly. The problem is, the
easing equations return the final value of the prop in question, so you
can't send motor speed to easeInOutCubic the way you can send distance. That
is, you can't get 60 to 255 to 60. You might be able to switch to Back
instead of Cubic, if you want to simplify things, but I didn't try that.
Instead, I used easeIn and then used the same values in reverse, to simulate
your desired easeInOutCubic.

The only flaw I see in this idea--which may not apply in your situation--is
that it will take a lot longer to finish the sequence over longer distances.
If you use the trapezoidal velocity profile you cited, the motor will run at
max velocity for the longest of any velocity. Using this simulated
easeInOutCubic, it's only at max velocity for one iteration. For short
distances that might be fine, but if you had to travel a long distance, it
would take a lot longer to get there.

This example just traces the actual motor speed. I understood your post to
say that it should be between 60 and 255. However, I used variables so you
could change that if I'm wrong.

//arbitrary distance
var distanceStart:Number = 0;
var distanceFin:Number = 50;
var distanceHalf:Number = (distanceFin - distanceStart) / 2;
var timeIncr:Number = 0;

var minMotorSpeed:Number = 60;
var maxMotorSpeed:Number = 255;
//one simple way to avoid exeeding the max value by the min value is to
//  run the equations starting with zero. Can compensate another way.
var easeStart:Number = 0;
var easeFin:Number = maxMotorSpeed - minMotorSpeed;

var accArray:Array = new Array();

this.onEnterFrame = function() {
var motorSpeed:Number;
var motorAcc:Number;
if (timeIncr = distanceHalf) {
motorAcc = easeInCubic(timeIncr, easeStart, easeFin, distanceHalf);
//store in array, avoiding duplication of last value
if (timeIncr  distanceHalf) { accArray.push(motorAcc); }
motorSpeed = minMotorSpeed + motorAcc;
} else {
motorSpeed = minMotorSpeed + accArray.pop();
}
//the value needed:
trace(timeIncr +   + motorSpeed);

if (timeIncr = distanceFin) {delete this.onEnterFrame;}
timeIncr++;
};

function easeInCubic(t:Number, b:Number, c:Number, d:Number):Number {
return c * (t /= d) * t * t + b;
}


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] 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 will also increase file size.

Rich



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] 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 frame 17X, rather than 300, because the
_xmouse value is relative to the movie not a movie clip? Or the equation
you're using to offset the value isn't correct? Try tracing the _xmouse and
the frame number and see if they match up.

Rich




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] 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, PHP
or CF to deliver streaming video at little to no cost.

http://www.devx.com/webdev/Article/31960

Rich


On 5/15/07 12:37 PM, Randy Tinfow [EMAIL PROTECTED] wrote:
 This cannot be avoided. The only way you can improve this is to
 increase the number of keyframes used during encoding.
 
 Wrong.  Post compression, you can insert cue points (and metadata)
 between keyframes with Captionate.  Uses a separate script track.  Works
 a charm.



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] 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
altogether. If needed, you can increase the contrast in pre-processing and
then run it through FlixPro to output to vector.

Rich



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com