[Flashcoders] ContextMenu Shows or Not Based on Player Version

2007-05-11 Thread ChrisRM
I have external SWFs that are being loaded down a few layers of
dynamically created MCs. My menus show fine in Player 9.0.28.0 but in
9.0.16.0 I get the long, default MM/Adobe menu. Don't know why it is
failing. I'm also trying to get this working in Player 7.

Basically, my context menus have many submenus. So I am dynamically
drawing them. CMenu is my drawing class and holds each menu option. Is
does this have anything to do with possibly disabling the context menu on
the root?

/**
 *  setRightClick() - Sets up a right click menu to show the CMenu
 *
 *  @param  pMC MovieClip to attach Flash context menu.
 *  @param  pMenu   CMenu to show when option is selected.
 */
private function setRightClick(pMC:MovieClip, pMenu:CMenu):Void {
var cm:ContextMenu = new ContextMenu();
cm.hideBuiltInItems();
var rightClick:ContextMenuItem = new ContextMenuItem("Show
\"Right-Click\" Menu", function() {
pMenu.setName(pMC._name);
pMenu.showMenu();
});
cm.customItems.push(rightClick);
pMC.menu = cm;
}

Muzak posted this link about 2 1/2 years ago but the link is broken.
http://chattyfig.figleaf.com/ezmlm/ezmlm-cgi?1:sss:121542#b

Current archive:
http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2004-November/124997.html

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

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


Re: [Flashcoders] JSFL - Saving FLAs

2007-04-02 Thread ChrisRM
Well, Derek. That's an awesome idea. Forgot about JSFL and that
functionality. Personally, with the situation here, when the user runs the
JSFL batch compiler it would notify them if any of their FLAs aren't of a
specified version and nothing would compile till they save the file to the
correct format. I see passing the location to the file and the
function/program returning whether the saved version is within spec, and
the JSFL script would handle all the error reporting, etc...

Chris


> Yep, that's why I mentioned: "Afaik, there is no way to get this
> information from JSFL."
>
> I pointed out FLAVer as an option. If the user with Flash 8 also has Flash
> MX 2004 FLAVer will open the FLA in the correct version of Flash, instead
> of the default, which is to open the FLA with the version of Flash that
> was last opened, which would probably be the latest version.
>
> Also, if the thread starter (ChrisRM) knows a programmer, he/she might be
> able to help with something like a C DLL that could be used by JSFL to
> actually detect the FLA version. I've asked the FLAVer creator if he'd be
> interested in creating this for the community, so we'll see.
>
>
> Derek Vadneau
>
> - Original Message -
> From: Hershell Bryant
> To: flashcoders@chattyfig.figleaf.com
> Sent: Tuesday, April 03, 2007 3:19 PM
> Subject: RE: [Flashcoders] JSFL - Saving FLAs
>
>
> I believe that the whole point is that the person wants to ensure that his
> FLAs are saved for version MX, so that the coder using only MX can pick up
> the baton from the coder with a v8 install.
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>

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

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


RE: [Flashcoders] JSFL - Saving FLAs

2007-04-02 Thread ChrisRM
You're correct, Hershell. I have users who some have Studio 8 installed
and a couple with just MX 2004, and we don't have enough licenses to go
around at the moment.

I did see FLAver and I can guess it reads the header of the file to get
the version info. Other than that I think we're stuck and I'll have to
keep yelling at the ones who keep going to File>Save in Studio 8.

That's another bugger that gets me too. You open a MX 2004 file in Studio
8 and when you go to save, it saves it as version 8. You'd think it would
save it to it's original version; or pop up a message saying it's in a
older format and to stick with the older or use the newer format.

Anyways :)

I appreciate everyone's thoughts.

Chris


> I believe that the whole point is that the person wants to ensure that his
> FLAs are saved for version MX, so that the coder using only MX can pick up
> the baton from the coder with a v8 install.
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Derek
> Vadneau
> Sent: Monday, April 02, 2007 11:33 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: RE: [Flashcoders] JSFL - Saving FLAs
>
> The version of the FLA is in the XML Publish Settings file?
>
> I don't think that's the case.
>
> Afaik, there is no way to get this information from JSFL.
>
> JSFL implementation in Flash 7/8 is mediocre, imho. While there are some
> very useful things you can do with JSFL, it all feels like a hack. The
> document support is terrible (not documentation, although that's not
> fabulous either). I really hope JSFL in Flash CS3 got a revamp. Although,
> since it didn't make the top 10 things new about Flash CS3, I'm guessing
> not much was changed. I really hope I'm wrong.
>
> The only thing I've ever seen in regards to determining the version of the
> FLA is a tool called FLAVer by Tim Goss that launches the version of Flash
> on your system that most closely matches the FLA version. I don't know the
> specifics, but he figured out how to get the version by reading parts of
> the FLA file. I realize it doesn't answer the question directly, but it
> does demonstrate that there is a way to get this information. But, afaik,
> not from JSFL.
> FLAVer: http://www.northcode.com/free/flaver/flaver.php
>
>
> Derek Vadneau
>
>
> - Original Message -
> From: Steven Sacks | BLITZ
> To: flashcoders@chattyfig.figleaf.com
> Sent: Monday, April 02, 2007 1:37 PM
> Subject: SPAM-LOW: RE: [Flashcoders] JSFL - Saving FLAs
>
>
> The version is located in the XML Publish Settings file.  It's been
> reported that changing this value using JSFL does not work (a bug).
> However, you CAN read it.
>
> Refer to my blog entry regarding the XML Publish settings file to see
> how to get the version number out of it.
>
> http://www.stevensacks.net/2006/08/06/using/
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>

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

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


RE: [Flashcoders] JSFL - Saving FLAs

2007-04-02 Thread ChrisRM
Unfortunately, that's not it. That warning will only show if you choose
Save As > MX 2004. I'm trying to find a method so when one of my Studio 8
users forgets to save down to 2004 that they'll get a message or when they
run the JSFL batch compiler it'll detect it's saved version and auto-save
it down for them.

Like I said, I notice there is a fl.saveDocumentAs() command but see no
where to (or if I can) specify the file version.

Chris


> If you check the Preferences in Flash 8, there is a 'Warnings' section
> and you can turn on "Warn on save for Macromedia Flash MX 2004
> compatibility"
>
> Is that what your looking for?
>
> -DC
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of ChrisRM
> Sent: Monday, April 02, 2007 9:01 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] JSFL - Saving FLAs
>
> Hey Everyone,
>
> I'm in the unfortunate position of developing in an environment where
> not
> everyone has the same version of Flash and remembering to "Save As" gets
> overlooked. Some have Studio 8, others have MX 2004. Is there a way to
> check the version of the FLA? I know there is fl.version, but that's
> only
> for the IDE.
>
> If I can determine the version the least I'd like to do it pop up an
> alert
> saying that the file needs to be saved as MX 2004 for compatibility with
> others. FL Object has the function saveDocumentAs() but I don't see a
> way
> to specify the version (in the Document object).
>
> Ideas?
>
> Thanks.
> ___
> 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
>
> This e-mail and its attachments are intended only for the use of the
> addressee(s) and may contain privileged, confidential or proprietary
> information. If you are not the intended recipient, or the employee or
> agent responsible for delivering the message to the intended recipient,
> you are hereby notified that any dissemination, distribution, displaying,
> copying, or use of this information is strictly prohibited. If you have
> received this communication in error, please inform the sender immediately
> and delete and destroy any record of this message. Thank you.
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>

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

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


[Flashcoders] JSFL - Saving FLAs

2007-04-02 Thread ChrisRM
Hey Everyone,

I'm in the unfortunate position of developing in an environment where not
everyone has the same version of Flash and remembering to "Save As" gets
overlooked. Some have Studio 8, others have MX 2004. Is there a way to
check the version of the FLA? I know there is fl.version, but that's only
for the IDE.

If I can determine the version the least I'd like to do it pop up an alert
saying that the file needs to be saved as MX 2004 for compatibility with
others. FL Object has the function saveDocumentAs() but I don't see a way
to specify the version (in the Document object).

Ideas?

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

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


[Flashcoders] Question About MovieClips in Moock's AS Definitive Guide

2007-03-13 Thread ChrisRM
Hi all,

In his book he states:

"References to objects are pointers; reference-tracking and
garbage-collection protect the user from dangling pointers and memory
leakage. References to movie clips, however, are soft references -- the
reference actually contains an absolute target path. If you have a movie
clip named foo, and the set x = foo (which makes x a reference to clip
foo), and then delete foo using removeMovieClip(), and then create another
clip named foo, the reference x will again be valid (it will point to the
new foo clip)."

My example is slightly different and the reference is not being
reestablished.

I have a class that takes a movie clip as a parameter. (var myClassObject
= new myClass(this);) In this movie clip from frames 1 to 5 I have the
movie clip instance clip1. And on frames 6 to 10 I have other assets.
(clip1 does not reside on frames 6 to 10) The main movie clip can toggle
back and forth between these sets of frames.

Inside the myClass constructor it assigns clip1 to other classes.

function myClass(mc:MovieClip) {
   mc_clip1 = new subClass(mc.clip1);
}

Now, if the playhead moves to frames 6 to 10 and then back to frames 1 to
5, why is the reference to clip1 in mc_clip1 undefined if they are as
identified in the writing as "soft" references? Shouldn't this reference
be restored?

Possible memory-leak issue:

At the moment, each time frame 1 is reached I call mc_clip1 = new
subClass(mc.clip1) elsewhere within myClass.

Should I perform cleanup before re-instantiating these classes, say if
there is an array, to delete the array - or if there's a reference to an
outside class, to delete that as well?

I know I could do something like this below but was wondering about any
possible memory issues by calling new subClass() over and over on the same
variable.

if (mc_clip1 == undefined) {
   mc_clip1 = new subClass(mc.clip1);
} else {
   mc_clip1.setMovieClip(mc.clip1);
}


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

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


[Flashcoders] Do You Need to Clear Intervals in this Case?

2007-02-23 Thread ChrisRM
I have an AS class that accepts a movieclip in the constructor and tells
that mc to blink via setInterval(). Now, this movieclip is in an external
SWF and loaded into another using MovieClipLoader. So the movieclip is
loaded on stage and blinking. If I perform a removeMovieClip on that
blinking mc do I need to call a clearInterval before removing?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Flash ANT: Batch Compiling

2007-02-05 Thread ChrisRM
Hi all,

I'm working on a project that requires nightly builds and automating that
process would be fantastic. I've come across Flash ANT and it seems like
it is the solution. Could anyone who has used this tool share some advice
on it? Particularly with setting it up as looking at the documentation it
seems be pretty skimpy and assuming you already know what you're doing.

Questions like, do you need to install Apache ANT?

How are HTML files that are updated handled for copying to an output
directory?

What needs to be edited in the build.xml file to get things working?

${root.dir}, ${basedir}, and ${output.dir} where are these set?

Is there a way to have Flash ANT compile a build at a specified time every
night?

I'll be using this with the Flash MX 2004 compiler (not MTASC or others).

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

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


Re: [Flashcoders] Cannot Access Superclass Static Var from Subclass in FLA

2007-01-30 Thread ChrisRM
Thanks for the input James. I understand what you're saying but the fact
that accessing inherited static variables works in another class but not
on the timeline still gets me.

This solution was proposed to me and seems to work.

In Orange.as add:

private static var __proto__:Function = mypackage.Fruit;

Now, Orange.COLOR outputs the proper value.

Chris


> Static variables are not inherited by subclasses in ECMAScript therefore
> can not be referenced through derived class objects.  This differs from
> Java and C#.
>
>
> James O'Reilly  —  Consultant
> Adobe Certified Flash Expert
> http://www.jamesor.com
> Design • Code • Train
>
>
>
> [EMAIL PROTECTED] wrote:
>> Hi all. It's been a LONG time since I've posted and now I need your help
>> again.
>>
>> I have come across something that to me doesn't seem correct and I don't
>> know why things are behaving this way. I have 2 classes, one a subclass
>> of
>> the other. Both have public static variables (AS2.0 Flash 7).
>>
>> class mypackage.Fruit {
>> public static var COLOR:Number = 0;
>> }
>>
>> class mypackage.Orange extends mypackage.Fruit {
>>public static var SEEDS:Number = 0;
>> }
>>
>> Now in the Orange class or any other class that needs to use Orange. The
>> following code: Orange.COLOR returns 0.
>>
>> import mypackage.Orange;
>> class Table {
>>public function Table() {
>>   trace("Orange.COLOR: " + Orange.COLOR); // outputs 0
>>}
>> }
>>
>> Things change when this code is applied to the timeline:
>>
>> Table.fla
>> import mypackage.Orange;
>> trace("Orange.COLOR: " + Orange.COLOR); // outputs undefined
>> trace("Orange.SEEDS: " + Orange.SEEDS); // outputs 0
>>
>> Tracing Orange.COLOR gives me undefined. But if I import
>> mypackage.Fruit.
>> Fruit.COLOR traces out 0.
>>
>> Table.fla
>> import mypackage.Fruit;
>> trace("Fruit.COLOR: " + Fruit.COLOR); // outputs 0
>>
>> Can someone shed some light on why in an FLA that the subclass (in this
>> case Orange) cannot access its super class static variables
>> (Orange.COLOR)?
>>
>> Thanks.
>> \m/
>> ___
>> Flashcoders@chattyfig.figleaf.com
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>

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

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


Re: [Flashcoders] Cannot Access Superclass Static Var from Subclass in FLA

2007-01-30 Thread ChrisRM
I was able to have someone test the sample code below and it worked fine
for them. I had their files sent to me but couldn't open the FLA. I'm
using MX2004 and I assume they have 8 or higher. I tested using the sample
that was sent and still had the same errors.

Has anyone heard of this before? Assuming this affects Flash 7 MX2004?

Thanks.
Chris


> Hi all. It's been a LONG time since I've posted and now I need your help
> again.
>
> I have come across something that to me doesn't seem correct and I don't
> know why things are behaving this way. I have 2 classes, one a subclass of
> the other. Both have public static variables (AS2.0 Flash 7).
>
> class mypackage.Fruit {
> public static var COLOR:Number = 0;
> }
>
> class mypackage.Orange extends mypackage.Fruit {
>public static var SEEDS:Number = 0;
> }
>
> Now in the Orange class or any other class that needs to use Orange. The
> following code: Orange.COLOR returns 0.
>
> import mypackage.Orange;
> class Table {
>public function Table() {
>   trace("Orange.COLOR: " + Orange.COLOR); // outputs 0
>}
> }
>
> Things change when this code is applied to the timeline:
>
> Table.fla
> import mypackage.Orange;
> trace("Orange.COLOR: " + Orange.COLOR); // outputs undefined
> trace("Orange.SEEDS: " + Orange.SEEDS); // outputs 0
>
> Tracing Orange.COLOR gives me undefined. But if I import mypackage.Fruit.
> Fruit.COLOR traces out 0.
>
> Table.fla
> import mypackage.Fruit;
> trace("Fruit.COLOR: " + Fruit.COLOR); // outputs 0
>
> Can someone shed some light on why in an FLA that the subclass (in this
> case Orange) cannot access its super class static variables
> (Orange.COLOR)?
>
> Thanks.
> \m/
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>

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

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