RE: [Flashcoders] The Amazing infinite call stack

2005-12-13 Thread Chris Wilson
You're looking for infinite recursion.

Generally speaking, your application might be better served with a for()
loop to iterate through the command queue within a single function call.
There are times when recursive functions (i.e., functions that call
themselves) are more elegant, though.

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Mark
Hawley
Sent: Tuesday, December 13, 2005 9:40 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] The Amazing infinite call stack

I'm sure this has a ridiculously easy answer that I just never learned 
from my generally informal programming training, but I can;t figure out 
what the problem is called, so I can't just google an answer.  Here's 
the (simplified) situation:

1. (Game::main()) we call Game::main(); no surprises here.
2. (_engine = new Engine()) Main sets up an 'engine' class and gets it 
started up.
3. (_engine.getNextCommand()) Engine's job is basically to look at a 
queue of Commands, ordered by the time they're supposed to execute, get 
the next one, and execute it.
4. (_engine.onTurnComplete()) Engine waits until it gets notified that 
the current turn is finished.
5. (engine.getNextCommand()) Engine looks for the  next commandetc.

Now, the problem is that _engine.getNextCommand() never returns, so I 
end up with a huge call stack with getNextCommand()s piled high, which 
eventually makes Flash crap out. In the ancient version of this game, 
the three basic stats were on different frames, so that the implied loop 
here was broken up, and worked fine.  My brain can't see that right 
way to do this via main(), though. Any help, insight, or google search 
terms?

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


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


RE: [Flashcoders] The Amazing infinite call stack, part 2

2005-12-13 Thread Chris Wilson
Since Flash is event-driven, how about setting it up in such a way that
whatever part of your script adds the command to the queue dispatches an
event to a listener that then executes that command?  That way you avoid
recursion, and you also avoid a for() loop that's outside the internal Flash
event loop.

Unfortunately, my ActionScript is not proficient enough to know which
classes/methods you need to use to interact with Flash's native event queue,
but I'm sure someone else on the list could chime in with the right info.

HTH,

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Mark
Hawley
Sent: Tuesday, December 13, 2005 1:54 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] The Amazing infinite call stack, part 2

A for loop wouldn't give we any way to pause for input, or to wait and let
the UI animate to reflect the last command's doings, though.

I need a way to avoid recursion, not use it. Ideally:

1. advance to next command.
2. execute command.
3. Wait for command to finish.
4. repeat 1-3

in some way that lets step 1 pop off the call stack while waiting for step
3.  There has to be an example floating around somewhere.

-Mark

--
John Mark Hawley
The Nilbog Group
773.968.4980 (cell)

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


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


RE: [Flashcoders] Flash security advisories from U.S. Navy/Marines?

2005-12-02 Thread Chris Wilson
The vulnerabilities were reported on Bugtraq
(http://search.securityfocus.com/swsearch?query=macromediasbm=%2Fsubmit=Se
arch%21metaname=alldocsort=swishlastmodified) a couple weeks ago.  The
vulnerabilities involve an attacker creating a malicious .swf file and
tricking a user into downloading it, similar to a web site tricking a user
into downloading a virus.  

If you're creating a Flash application/animation for a customer, though,
it's obviously not malicious, and thus the application itself is not
susceptible to the attack.  The problem will be political, though,
convincing your DoD customer your application isn't vulnerable.

Of course, the reason to ban Flash player is less about interfacing with
your benign application, and more about worrying that a user will
inadvertently connect to another site that *does* have a malicious .swf
file.  The bug is in the Flash player, and can lead to compromise of the
client's system.

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Friday, December 02, 2005 1:51 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Flash security advisories from U.S. Navy/Marines?

Anyone know anything about this?  See the report below.  This would
effectively bring our Flash work with the U.S. Navy and Marine Corp to a
screeching halt.  The NMCI gold disk is the standard install of software
for all computers in the Navy and Marines.  Flash 7 was previously
approved - now it looks like they could begin removing it from machines.
It would be a long while before they approve Flash 8.  And we were just
about to propose a Flex option for them too.  :-(

 

Anyone know anything about this security issue?







From: * 
Sent: Friday, December 02, 2005 1:28 PM
To: 
Subject: FW: Flash security advisories

 

FYI...

 

The NMCI just blocked access to ALL swf files from their web servers
(.mil domains) yesterday.

 

We'll have to see how this plays out.

 

**

 



-Original Message-
From: * 
Sent: Thursday, December 01, 2005 4:50 PM



Read below. Security vulnerabilities have been discovered in Flash. I
received notice from Camp Pendleton that NMCI has once again blocked
Flash mobile code from .mil networks. I confirmed with MCNOSC and asked
for the info below. If we haven't already received any calls from anyone
on .mil expressing issue viewing Flash activity on our site, we will
soon. Apparently Macromedia recommends going to Flash Player version 8.
We will meet tomorrow morning at 0930 in the CR to discuss the problem
and alternative solutions. The policy will need to be reinstated by MCEN
DAA to open the door again for Flash. 

 

Thanks,

 



 

-Original Message-
From: *** 
Sent: Thursday, December 01, 2005 1:46 PM
To: *
Subject: Flash security advisories

 

http://www.macromedia.com/devnet/security/security_zone/mpsb05-07.html

 

IAVA extract:

 

Joint Task Force - Global Network Operations (JTF-GNO)
Information Assurance Vulnerability Alert

2005-A-0040

TOPIC:  Multiple Vulnerabilities in Macromedia Flash 

REFERENCE:   Macromedia
 
http://www.macromedia.com/devnet/security/security_zone/mpsb05-07.html

Security Focus 
http://www.securityfocus.com/bid/15332/info
http://www.securityfocus.com/bid/15322/info  
http://www.securityfocus.com/advisories/9646 
   2 http://www.securityfocus.com/advisories/9728

CVE NUMBER(s):  CAN-2005-2628
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-2628
Macromedia Flash ActionDefineFunction Memory Access Vulnerability

STIG FINDING:  1CAT  I 

THREAT ASSESSMENT:  High

TIMELINE SUMMARY

Release Date

Acknowledgement Suspense

Compliance Suspense

 

10 November 05

12 November 05

25 November 05

 

REVISION HISTORY

Number

Date

Details

 

1

15 Nov -05

Posted STIG FINDING
ftp://www.cert.mil/pub/bulletins/dodcert2005/2005-a-0040.htm#1#1
Category.

 

2

21 Nov 05

Added systems to  Vulnerable Systems
ftp://www.cert.mil/pub/bulletins/dodcert2005/2005-a-0040.htm#Vul
Sys#Vul Sys area
Added  link to Reference
ftp://www.cert.mil/pub/bulletins/dodcert2005/2005-a-0040.htm#SUSE
Advisory#SUSE Advisory  area

 

3

29 Nov 05

Added patch link to DoD Patch Repository
ftp://www.cert.mil/pub/bulletins/dodcert2005/2005-a-0040.htm#3dodpatch#
3dodpatch 

EXECUTIVE SUMMARY/IMPACT

There are two vulnerabilities that have been identified affecting
Macromedia Flash plug-ins. Macromedia Flash is a widely distributed
application and is used to create simple motion graphics, video and
animation for interactive websites. A plug-in adds a specific feature or
service to a larger system, such as Macromedia Flash. 

The first vulnerability affects the Macromedia Flash Action Define
Function Memory Access plug-in. This plug-in is vulnerable to an input
validation error, which is 

RE: [Flashcoders] TextArea - Impossible requests?

2005-11-15 Thread Chris Wilson
For the first problem, how about adding a number of blank lines to the end
of the news story so the total number of lines is a multiple of the
TextArea's visible page size to allow a full scroll?

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Miles
Thompson
Sent: Tuesday, November 15, 2005 9:56 AM
To: Flashcoders mailing list
Subject: [Flashcoders] TextArea - Impossible requests?

Dear All,

I'm working on a daily news site - headlines display on left, and when 
one clicks on a given headline the story loads on the right. I'm using the 
UI TextArea component to display the story.

All is well, but as usual, customer has tossed a couple of curves.

1. When there is only a fragment of the story left to display, say 15 
additional lines for example, and the reader scrolls down, the TextArea 
scrolls only 15 lines. What the customer wants is a full scroll so that the 
next line appears at the top of the story, with white space below.

2. At customer's request NextPage and PrevPage buttons were added to the 
movie to scroll the TextArea; they've been programmed to turn on and off, 
etc. in response to .scroll, .maxscroll and .vPosition information provided 
by the TextArea. Now the customer does not want the ScrollBar to show at 
all, but to use these buttons only.

Relating to 1. - Can one force a full scroll, say 28 lines, when there are 
only 15 lines remaining? I've tried resetting .maxscool, forcing .vPosition 
to an unrealistic values, incrementing .scroll in a loop. Nope, Have not 
been able to do it. Has anyone, or do I revert to the MX control?

Relating to 2. Is there a property to set somewhere which will permanently 
hide the scroll bar? I've not been able to find one, but possibly someone 
knows a hidden or undocumented property. (Cripes, this is a ridiculous 
question! Let's roll everything back to Flash 3!)

Sorry to be asking these questions. When we moved to MX 2004 thought I had 
the solution to my text problems by the tail. Now it's turning and biting.

Regards - Miles Thompson


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


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


RE: [Flashcoders] onMouseMove false

2005-11-11 Thread Chris Wilson
I think you'll have to use an interval, but you don't have to constantly
check the mouse.  Pseudo-code below:

this.onMouseMove = function(){
  // When the mouse is moved, clear any pending not moved timeout
  // interval so the callback *isn't* called (Note 
  // clearMouseNotMoveTimeout isn't a real API function)...
  clearMouseNotMoveTimeout();

  // Do processing for mouse movement...
  moving=true;

  // Reset the not moved timeout interval callback (note this would be 
  // a call to something like setInterval(); setMouseNotMoveTimeout 
  // isn't a real API function)...
  setMouseNotMoveTimeout(notMoveTimeoutCallback);
}

function notMoveTimeoutCallback(){
  // Handle code for mouse not moving in specified timeframe...
}

Hope this helps...

-Chris


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mick Gow
Sent: Thursday, November 10, 2005 11:05 PM
To: Flashcoders mailing list
Subject: [Flashcoders] onMouseMove false

Is there an efficient way to trigger an onMouseNOTMove without having to run
an interval or do an onEnterFrame to constantly check the mouse?

I want to set a varialble when mouse is moving and reset it when mouse is
still.

ie. something like if it were possible:

this.onMouseMove = function(){
moving=true;
}
this.onMouseStop = function(){
moving=false;
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


RE: [Flashcoders] Logic Help

2005-11-11 Thread Chris Wilson
var scaling_factor:Number = Math.min(357 / image_mc.width, 394 /
image_mc.height);
loader_mc._xscale = scaling_factor;
loader_mc._yscale = scaling_factor;

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lehr,
Theodore M.
Sent: Thursday, November 10, 2005 7:58 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Logic Help

I have a mc that is 357x394 that I am loading various images into...
these images are of various sizes but all are larger than the mc they
are being loaded into... I need to scale them down proportionally so the
whole image can be seen... how should I go about this so an image that
is 840x680 would be scaled down so it looks right (to scale) and an
image that is 680x840 would too
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


RE: [Flashcoders] Singleton in AS3

2005-11-11 Thread Chris Wilson
Why should a public constructor prevent the creation of a Singleton?  All
you need is a static getInstance() method and a private attribute to hold
the created instance.  Sure, the public constructor means someone else could
instantiate the class on their own without using getInstance(), but if
you're writing the code, you'll do it the proper way anyhow, no?

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Friday, November 11, 2005 1:32 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Singleton in AS3

You can't yet as for the reason you stated.  Bitch on the forums pretty 
please; you, many many others, and I all want this changed.

http://www.macromedia.com/cfusion/webforums/forum/categories.cfm?catid=587e
ntercat=y

- Original Message - 
From: Michael Klishin [EMAIL PROTECTED]
To: Flashcoders ML flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 10, 2005 12:16 PM
Subject: [Flashcoders] Singleton in AS3


Hi guys,

Have anyone got ideas how to implement Singleton pattern in AS3 best?
Constructor in AS3 can only be public or internal, which is not private
anyway. ..

-- 
Michael Antares Klishin,

Email: [EMAIL PROTECTED]
Web: www.novemberain.com

Non progredi est regredi
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

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


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


RE: [Flashcoders] Singleton in AS3

2005-11-11 Thread Chris Wilson
Agreed on all points, but when the deadline is approaching and the code
needs to be done...

Ironically to your points, I'm relatively new to Flash (~2 months), and have
come to this language from C, C++, and Java.  It's been *far* more difficult
to learn than I expected, in many cases due to the hacks you mentioned.
(Whaddya' mean 'this' doesn't refer to the class instance when you're in a
callback function _that's_a_method_of_the_class_!?!)  

That said, I'm a pragmatist when it comes to finishing a project.  :-]

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Friday, November 11, 2005 1:51 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Singleton in AS3

That's fine for use Flashers who are used to using such methods to get what 
we want.

However, other languages are more strict, and from the perception of new 
programmers coming into ActionScript 3, not meeting their expectations is a 
failure of the language... to point.  Bottom line, they see our methods as

hacks, and that's a bad thing.

The correct way is to use getInstance, yes.  But, it should also throw an 
exception if you try to instantiate it:

var a:MyClass = new MyClass();

That should not work, but it does currently because you have no choice.

In an effort to make ActionScript more clean, strict, and helpful, this is 
one of the additions.  The language itself should be self-explanatory to use

it, and should support common programming patterns such as Singleton. 
Supporting design patterns in a language, to me is iffy, but there are a 
enough business use cases in my opinion to support it.

- Original Message - 
From: Chris Wilson [EMAIL PROTECTED]
To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com
Sent: Friday, November 11, 2005 1:40 PM
Subject: RE: [Flashcoders] Singleton in AS3


Why should a public constructor prevent the creation of a Singleton?  All
you need is a static getInstance() method and a private attribute to hold
the created instance.  Sure, the public constructor means someone else could
instantiate the class on their own without using getInstance(), but if
you're writing the code, you'll do it the proper way anyhow, no?

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JesterXL
Sent: Friday, November 11, 2005 1:32 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Singleton in AS3

You can't yet as for the reason you stated.  Bitch on the forums pretty
please; you, many many others, and I all want this changed.

http://www.macromedia.com/cfusion/webforums/forum/categories.cfm?catid=587e
ntercat=y

- Original Message - 
From: Michael Klishin [EMAIL PROTECTED]
To: Flashcoders ML flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 10, 2005 12:16 PM
Subject: [Flashcoders] Singleton in AS3


Hi guys,

Have anyone got ideas how to implement Singleton pattern in AS3 best?
Constructor in AS3 can only be public or internal, which is not private
anyway. ..

-- 
Michael Antares Klishin,

Email: [EMAIL PROTECTED]
Web: www.novemberain.com

Non progredi est regredi
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


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


RE: [Flashcoders] secure png

2005-11-07 Thread Chris Wilson
I don't know of a way to do that, but what's the point?  All the competitor
needs is a screen capture utility (or just ctrl-Print Screen in Windows)
and the image is theirs...

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Maxime
Sent: Monday, November 07, 2005 5:27 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] secure png

I would like to load png into flash 8 without having it in the cache. My 
client don't want it competitors to have access to their png so I have 
to find a way to load a png in flash securely. Is there any solutions ?
Thanks

Maxime

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


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


RE: [Flashcoders] secure png

2005-11-07 Thread Chris Wilson
I see.  Thanks for clarifying.  I'm not sure how to disable the caching,
unfortunately.  

If there were a way to create an image in Flash using a raw binary data
string, you could read the png file and process it that way, thereby
probably bypassing any built-in file-based caching.  I'm still relatively
new to Flash, though, so that might not be possible.

Best of luck on it, though!

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Maxime
Sent: Monday, November 07, 2005 6:05 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] secure png

The goal of the client is to customize an image with a lot of 3d 
rendered png alpha layers. They don't care if the competitors do a 
screen capture, they don't want their competitors to know how they treat 
the image(alpha) for the layering of images.

Chris Wilson a écrit :

I don't know of a way to do that, but what's the point?  All the competitor
needs is a screen capture utility (or just ctrl-Print Screen in Windows)
and the image is theirs...

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Maxime
Sent: Monday, November 07, 2005 5:27 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] secure png

I would like to load png into flash 8 without having it in the cache. My 
client don't want it competitors to have access to their png so I have 
to find a way to load a png in flash securely. Is there any solutions ?
Thanks

Maxime

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


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




  



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


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


RE: [Flashcoders] secure png

2005-11-07 Thread Chris Wilson
Good to know that's possible.  How would you take the binary string and have
flash treat it as a graphic?

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Latcho
Sent: Monday, November 07, 2005 6:59 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] secure png

raw data:  that IS possible ! Only compression get's lost, but you could 
write your own serverside and clientside
compression and decompression algorithm. Good luck.

Chris Wilson wrote:
 I see.  Thanks for clarifying.  I'm not sure how to disable the caching,
 unfortunately.  

 If there were a way to create an image in Flash using a raw binary data
 string, you could read the png file and process it that way, thereby
 probably bypassing any built-in file-based caching.  I'm still relatively
 new to Flash, though, so that might not be possible.

 Best of luck on it, though!

 -Chris

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Maxime
 Sent: Monday, November 07, 2005 6:05 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] secure png

 The goal of the client is to customize an image with a lot of 3d 
 rendered png alpha layers. They don't care if the competitors do a 
 screen capture, they don't want their competitors to know how they treat 
 the image(alpha) for the layering of images.

 Chris Wilson a écrit :

   
 I don't know of a way to do that, but what's the point?  All the
competitor
 needs is a screen capture utility (or just ctrl-Print Screen in
Windows)
 and the image is theirs...

 -Chris

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Maxime
 Sent: Monday, November 07, 2005 5:27 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] secure png

 I would like to load png into flash 8 without having it in the cache. My 
 client don't want it competitors to have access to their png so I have 
 to find a way to load a png in flash securely. Is there any solutions ?
 Thanks

 Maxime

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


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




  

 


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


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

   

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


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


RE: [Flashcoders] V2 Components - Themes/Styles/Skins -Window/ComboBox/Button

2005-11-04 Thread Chris Wilson
Without having to change the skin entirely, you can change the halo color to
a light grey with the following:

_global.style.setStyle(themeColor, 0xee);

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Warren
Sent: Friday, November 04, 2005 2:36 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] V2 Components - Themes/Styles/Skins
-Window/ComboBox/Button

*[A WHILE AGO ON FLASHCODERS...]*

On 8/3/05, Iestyn Lloyd [EMAIL PROTECTED] wrote:Hi all,

i've skinned the FMX2004 scrollpane component by altering the
ScrollBarAssets MC, and now i've been told that i need to have 2
completely different skins for the scrollpane - and that they need to be
shown at the same time.
Is this possible? If so... err.. how? :)

* [SOUND OF CRICKETS CHIRPING] ie: nobody replied.
*
---

I need to do the same thing with a Window component, and have perhaps an
easier question about the ComboBox.

I've been studying and working with Themes, Styles and Skinning for the V2
Components on a project with a deadline that has come and gone - we're
behind! The project was developed using the V2 components early on, with the
skinning of the components and final design implementation saved for last. I
was recently brought into the project to do this work, and have found
working with the v2 components to be, well... difficult to accomodate.

I have since dug my heels in, and am doing the best I can under the
circumstances. We've been successful at skinning the RadioButton and
CheckBox, and have had limited success with the ComboBox. Button and Window
have been the most difficult.

If you look at the built-in Macromedia Help, there's lots of detailed
information on the subjects. Here are my questions, and thanks in advance
for any help provided!

1) Window

I need to create several instances of the Window component - some with
TitleBackgrounds (standard MenuBars with a Title and a Close Button), and
some without. If you read the Help section [Components Language
Reference/Window Component/Customizing The Window Component] you'll see what
you can do with Styles and Skins. The TitleBackground is a skin element
only, so if you customize the skin to delete the TitleBackground... it
affects ALL instances of the Window component. I would have liked to see a
Window Style setting TitleBackgroundVisible:Boolean which could be set to
TRUE or FALSE. Or better yet, a Style setting that would accomodate
[Default, Disabled, CustomLinkageID].

I started creating a custom MyWindow component that simply opens a container
with a close button (the simplest form of window), but I ran into other
problems. To create the window I'm struggling with, a custom built DialogBox
class is called first, which creates an instance of a Window that depends on
(Macromedia's built-in) PopUpManager class to manage overlapping Windows and
their Modality. Without using the actual Window component, these features
are unavailable without doing lots of extra research, development and
testing.

MY QUESTION IS: Is there any way to create more than one standard Window
component that PopUpManager will recognize? It seems we are locked in when
we use the Window component to ONE SKIN per document. I would love to use a
standard Window component for application wide usage, but have additional
custom Window implementations with custom graphics that reference elements
in more than a single Window assets folder inside a single THEME.

2) ComboBox

I edited the skin graphics for ComboBox inside the ComboBox assets folder.
We're currently basing our THEME on the standard HALO THEME. Currently the
highlight of the ComboBox when you pull it down is green. I looked into the
ThemeColor Style setting for Halo's ComboBox and was surprised to see three
possible values - [HaloGreen, HaloBlue, HaloOrange]. I dug into the
components FLA file to try to figure out why there might be a limited three
settings in a Style, and couldn't figure it out.

Maybe you'll laugh when I say I would have appreciated a HaloGrey
option... but I'm not laughing. Can someone please tell me how to achieve
GREY???

-
CONCLUSION
-

I would have preferred to write my own classes or custom components for this
type of job, but I came into the project after those critical decisions were
made. I like some of what I see from the whole Theme/Style/Skin
implementation, but overall it seems kludgy and weird to me. I didn't even
talk about the most basic Button component yet, which I overrided
immediately and created a custom component for. There is nothing more
difficult than skinning a Button that you need to use everywhere, but looks
different than the default Buttons that come with the program.

Can anyone shed some light on my predicament?

-steve warren
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com

RE: [Flashcoders] V2 Components - Themes/Styles/Skins-Window/ComboBox/Button

2005-11-04 Thread Chris Wilson
I don't know, unfortunately.  I've struggled with skinning components too,
and have yet to do so successfully.  I stumbled into the code I sent before
completely by accident.  :-]

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Warren
Sent: Friday, November 04, 2005 8:36 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] V2 Components -
Themes/Styles/Skins-Window/ComboBox/Button

Nice one - that works!

Why does the Macromedia documentation suggest there are only three options
for this haloGreen, haloBlue, and haloOrange?

Thanks Chris.

-steve

On 11/4/05, Chris Wilson [EMAIL PROTECTED] wrote:

 Without having to change the skin entirely, you can change the halo color
 to
 a light grey with the following:

 _global.style.setStyle(themeColor, 0xee);

 -Chris



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


RE: [Flashcoders] Addressing dynamically named movie clip

2005-10-26 Thread Chris Wilson
If I understand the locations of your dynamic clips correctly, then 

_root[sSelected]._mc.hresizer.setSize...

should work.  Basically, access the dynamic clip by treating _root as an
associative array.  If the clips aren't created in _root, then substitute
the parent movie clip's name for _root above.

-Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bo Parker
Sent: Wednesday, October 26, 2005 11:13 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Addressing dynamically named movie clip

I am working on an application where I want to apply transformations
to dynamically named movie clips. I have a function which adds a
shape to the stage based on a linkage name in the library:

function addShape(sLinkage:String):Void {
 var nIndex:Number = _root.getNextHighestDepth();
 var mcShape:MovieClip = this.attachMovie (sLinkage, mcShape +
nTopDepth, nTopDepth);
 nTopDepth = nIndex;
 mcShape._x = 450;
 mcShape._y = 300;
 }

from a button on the root level of the stage I call the function:

squareButton.onRelease = function() {
 addShape(rectangle);
};

I then want to be able to apply transformations to the new movie clip
using the bitstream component slider that is within a movie clip at
_root.squareBar:
///squarebar
squareBar.hs.changeHandler = function(){
 _root.rectangle_mc.hresizer.setSize(squareBar.hs.value,
squareBar.vs.value);
}
squareBar.vs.changeHandler = function(){
 _root.rectangle_mc.hresizer.setSize(squareBar.hs.value,
squareBar.vs.value);
}

I originally had a static movie clip called rectangle that was on
the root level but have since replaced with the dynamically named
movie clips.

I have a variable defined on frame 1 of the root level called:
var sSelected:String;

Within the rectangle movie clip that gets added to the stage, upon
pressing the movie the sSelected variable is set to the instance name
of the rectangle selected:
on (press) {
 sSelected = this._name;
 trace(sSelected);
}

The sSelected variable is showing up fine by my problem is how do I
address sSelected or the dynamic instance name of the movie placed on
stage to apply the transformations from the squareBar.hs.changeHander
function?

i.e. squareBar.hs.changeHandler = function () {
 [dynamically named movie clip here]._mc.hresizer.setSize...
}

Thanks in advance for the help.
Sincerely,
Bo Parker
-- 

Bo Parker, AIGA
RMC
215 S Jennings Avenue
Fort Worth, TX  76104
817.332.4700 p
817.332.4710 f

www.rmcfw.com

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


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