Re: [Flashcoders] Casting to Array

2007-07-20 Thread Jim Kremens

As it's AS2, you might think about making it so doMyArrayFunction will
not expect an array, but will take anything:

class ArrayTest {

public function ArrayTest(a) {
trace(a[0]);
}

}



new ArrayTest([1,2,3,4]);

works fine.


Jim Kremens
___
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] RE: obfuscation swf !

2007-07-19 Thread Jim Kremens

"So, maybe half your code in the end will be pretty funked up. That's
still probably more than enough to make use of the decompiled code."

Wouldn't anybody who could get that far be too busy writing their own code?

Jim
___
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] Accessing MovieClips on a timeline from an AS3 class

2007-07-12 Thread Jim Kremens

"I've been declaring classes extending MovieClip as dynamic."

They claim that you'll lose speed by doing this.

Jim
___
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] +Infinite Loop -Dignity

2007-07-11 Thread Jim Kremens

serious... about this.

Jim

On 7/11/07, Steven Sacks <[EMAIL PROTECTED]> wrote:

 > while(i--)a[i].n.t();

You ain't what?
___
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] +Infinite Loop -Dignity

2007-07-11 Thread Jim Kremens

Why are you using INSANELY long variable names like 'element' and
'animation'?  And why the spaces?

Shouldn't that read:

var i:Number = a.length;

while(i--)a[i].n.t();


:-)

Before anyone flames me... I'm kidding.

Jim
___
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] Re: Embed statements in AS3 (not mxml)

2007-06-18 Thread Jim Kremens

"Errr... thanks.  But how come my masks don't work when I use device
fonts ??? :-)
http://www.google.com/search?hl=en&q=flash+mask+device+font";

Dude, that was a *joke*.  I even put the little smiley face after it...

Jim Kremens
___
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] Re: Embed statements in AS3 (not mxml)

2007-06-18 Thread Jim Kremens

"In Flash you embed fonts through the library or by setting a dynamic
textfield to embed a particular font."

Errr... thanks.  But how come my masks don't work when I use device
fonts ??? :-)

"In that case, wrong list:
http://tech.groups.yahoo.com/group/flexcoders/";

Actually, even though I'm using Flexbuilder as a compiler, I'm
definitely asking an Actionscript question.  I'm looking to do
something using Actionscript syntax and all of the available examples
employ Flex syntax.

"But I'm pretty sure google will return something useful when
searching for "AS3 Embed font metadata""

Actually, thank you.  That query returned the one example that
answered my question:
http://www.joangarnet.com/blog/?p=415

The thing I wasn't getting was that you need to directly associate
each embed statement with a variable.  That should have been obvious,
but wasn't.

   [Embed(systemFont="Arial",
  fontName="ari",
  mimeType='application/x-font')]
   public var f2:Class;

   [Embed(source="assets/ORG_V01_.ttf",
  fontName="myUnicodeRangeFont",
  mimeType='application/x-font',
  unicodeRange='U+0041-U+005A,U+0061-U+007A,U+00F1')]
   public var f3:Class;

Thanks,

Jim Kremens
___
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] Re: Embed statements in AS3 (not mxml)

2007-06-18 Thread Jim Kremens

Oh,

I am using Flexbuilder, not CS3.
___
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] Embed statements in AS3 (not mxml)

2007-06-18 Thread Jim Kremens

Hi all,

Boy is it hard to get information on AS3 - not Flex, not Flash - just AS3.

How can I embed multiple assets in one class?  With Flex, you can
apparently do this:

.myPlainStyle {
fontFamily: "Myriad Web Pro";
fontSize: 24;
}
.myItalicStyle {
fontFamily: "Myriad Web Pro";
fontSize: 24;
fontStyle: italic;
}
.myBoldStyle {
fontFamily: "Myriad Web Pro";
fontSize: 24;
fontWeight: bold;
}

That takes 3 aspects of the same font and embeds them so you have
access to them.  Nice.

I'm not using Flex, so my question is how can I achieve a similar
result using the Embed statement that is available in .as files?
Those typically look like this:

[Embed(systemFont='Trebuchet MS', fontName='Trebuchet MS',
mimeType='application/x-font')]

I'd like to be able to include the bold and italic outlines for that one font...

I can't find any documentation on this that isn't mxml!

Thanks,

--
Jim Kremens
___
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 new Class from string

2007-06-18 Thread Jim Kremens

There's also this:

var ClassRef:Object = getDefinitionByName("flash.display::Sprite");
var element:Sprite = new ClassRef();

That allows you to really use a string and not a class reference,
which is what I think you want...

But, as with Flash 8, the class reference must really exist in your
swf somewhere, so
you may as well do what elibol suggested...

Jim Kremens
___
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 new Class from string

2007-06-18 Thread Jim Kremens

Just remove the quotation marks from your array so it looks like this:

var list:Array = new Array(Circle,Square,Triangle);

Assuming your import statements are right, your code will work.

Jim Kremens
___
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 8 slow animation online, but not local??

2007-06-15 Thread Jim Kremens

Check if wmode=true in your object embed code.  This can make your swf
run a lot slower in AVM1, although I've heard reports that the
opposite is true in AVM2.

Jim Kremens
___
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] Job posting

2007-06-05 Thread Jim Kremens

Hi all,

A friend of mine asked me to post this as he felt funny about joining
the list just to post a job.  The gig is based in NYC.  See replyto
address below - please don't reply to me!

///

ActionScript Developer at Heavy.com

Heavy.com is seeking a talented ActionScript developer to build
distributed media applications.  At Heavy, you'll be instrumental to
the development of our next generation video entertainment and social
networking platform.  You should have advanced experience building
web-based applications and networked Flash applications -- i.e.
you've got extensive experience jockeying data back and forth from a
database to your Flash apps using Flash remoting, XML, etc..  An
understanding of how to engineer applications that can withstand a
serious beating of traffic is key to success at Heavy.

We are looking for either a SENIOR or MID-LEVEL ActionScript
developer to join our team.  Compensation will be determined
according to your experience and skills that you bring to the table.
Bring your A-Game and let's make something happen!

Requirements

- Expert knowledge of Flash and ActionScript, with experience using
AS 2.0 / 3.0
- At least 4 years of programming experience
- PHP, MySQL, JavaScript, HTML, XML
- OOP programming
- Development experience in a Linux environment
- Photoshop

Nice to Have (or, you'll get to learn on the job!)

- Flash remoting, AMFPHP, JSON
- ActionScript compilers and SWF processors such as Motion Twin
(MTASC) and SWFMill
- Experience building desktop applications or distributed widgets
using Flash tools
- Source control tools (SVN, CVS)
- Video encoding, video playback in Flash (FLV)
- Additional programming and scripting languages
- Organized development and release-cycle approach

Compensation includes full-benefits (medical, dental, 401(k), etc.)
plus performance-based bonuses.  This is an on-site position at our
New York office.  You must be authorized to work in the United States
on a full-time basis for any employer.

To apply, please send your resume and cover letter to [EMAIL PROTECTED]
___
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] Remove elements from Array

2006-12-21 Thread Jim Kremens

"for (var i:Number = array.length - 1; i >= 0; --i) {
  if (!test(array[i])) {
  array.splice(i, 1);
  }
}"

This is correct and well tested...  Look in any of the AS code
libraries and you'll find many variations on this theme.

Jim Kremens

On 12/21/06, T. Michael Keesey <[EMAIL PROTECTED]> wrote:

Well, easy enough, then:

for (var i:Number = array.length - 1; i >= 0; --i) {
   if (!test(array[i])) {
   array.splice(i, 1);
   }
}

On 12/21/06, Andy Herrman <[EMAIL PROTECTED]> wrote:
> Even if it iterates backwards, I don't think I'd trust it.  I don't
> like the idea of relying on an implementation detail of the for-in
> loop in order to make my stuff work.  In general I see  for-in loops
> (any language) as loops that use an arbitrary ordering, and as such
> you shouldn't rely on any particular ordering for your code to work.
> I tend to think it's safer to approach things this way, as it protects
> you from any changes in the implementation details.  Just the fact
> that you're "Not sure about AS3" is reason enough I think.
>
> But maybe I'm just paranoid. :)
>
>-Andy
___
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




--
Jim Kremens
___
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] How to Embed Fonts for CSS Usage

2006-12-06 Thread Jim Kremens

You can do this.  I don't have time to do even pseudocode, but

Once you've loaded a sylesheet from a file, you can modify it.
Therefore, you can build a function to:

1.  Modify a property of your styleSheet object.
2.  Broadcast notification that it has been modified to all interested
text fields.  If you don't know what I mean, look into
EventDispatcher, AsBroadcaster, or the Observer Pattern in general.

Once each textfield is notified that there's been a change in its
stylesheet, it can trigger a function to reassign its stylesheet
property to that altered stylesheet.  Kind of like refreshing

Jim Kremens

On 12/6/06, Marc Hoffman <[EMAIL PROTECTED]> wrote:

Well, one question leads to another :)

First, thank you Jim -- I had avoided "embedFonts" thinking it would
embed the entire character set, but according to the Size Report it
embeds only those characters I embed in the dummy text fields. So now
it's working fine.

And now my next question: Is there a way to dynamically
increase/decrease type size when using CSS? Once the CSS is loaded
into the swf, can I modify its font-size settings? I can change type
size using textFormat, but since it seems you can't combine
textFormat with CSS, I lose the benefits of CSS (in particular the
ability to define a:link and a:hover).

thanks,
Marc

At 09:47 AM 12/6/2006, you wrote:
>Just checking for gotchas...
>
>Are you loading text into a textfield on the stage, or creating the
>field dynamically?
>
>Either way, set myTextField.embedFonts = true; if you haven't already...
>
>Jim Kremens
>
>On 12/6/06, Marc Hoffman <[EMAIL PROTECTED]> wrote:
>>I am having trouble getting Flash to embed a font that is designated by CSS.
>>
>>In Flash:
>>- I create a textfield, create a loadVars and a StyleSheet, load the
>>CSS into the StyleSheet, and designate the style sheet as the style
>>for the text field. I then load text into the textfield (currently
>>using hard-coded AS, but eventually it will be xml).
>>- I also create dummy text fields to embed the fonts in Flash that
>>the CSS uses.
>>- I then generate the .swf for testing.
>>
>>The CSS file is present and working.
>>
>>When I play the swf, Everything works okay ONLY IF the font is on my
>>system. If I remove the font from my system and double-click the swf
>>again, the font is replaced by a system-resident font.
>>
>>Is there a right way to embed a font in a swf so that when it is
>>called by CSS, it will display even if it's not on the user's system?
>>
>>TIA,
>>
>>Marc Hoffman
>>
>>
>>___
>>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
>
>
>--
>Jim Kremens
>___
>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




--
Jim Kremens
___
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] How to Embed Fonts for CSS Usage

2006-12-06 Thread Jim Kremens

Just checking for gotchas...

Are you loading text into a textfield on the stage, or creating the
field dynamically?

Either way, set myTextField.embedFonts = true; if you haven't already...

Jim Kremens

On 12/6/06, Marc Hoffman <[EMAIL PROTECTED]> wrote:

I am having trouble getting Flash to embed a font that is designated by CSS.

In Flash:
- I create a textfield, create a loadVars and a StyleSheet, load the
CSS into the StyleSheet, and designate the style sheet as the style
for the text field. I then load text into the textfield (currently
using hard-coded AS, but eventually it will be xml).
- I also create dummy text fields to embed the fonts in Flash that
the CSS uses.
- I then generate the .swf for testing.

The CSS file is present and working.

When I play the swf, Everything works okay ONLY IF the font is on my
system. If I remove the font from my system and double-click the swf
again, the font is replaced by a system-resident font.

Is there a right way to embed a font in a swf so that when it is
called by CSS, it will display even if it's not on the user's system?

TIA,

Marc Hoffman


___
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




--
Jim Kremens
___
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] (revised post) textFormat, CSS, embedded fonts, dynamic font size control

2006-12-01 Thread Jim Kremens

"#2: The issue is that if I use CSS rather than TextFormat, the
embedded fonts aren't accessed by Flash, so the font must reside on
the user's system, which is no good."

This is not true.  I've used CSS and embedded fonts lots of times.
You should be able to find plenty of examples by Googling.  A trick
you might employ:  embed the fonts you need in dummy textfields
offstage.  Then, when Flash calls for the font specified in the
stylesheet, it's in the swf.  Alternatively, you could look into
shared libraries for loading the font.  And lastly, several dynamic
font loaders have ben written that can address this problem.  Using
one of these, you'd load the fonts you need into the swf just like you
load images or any other asset.

#4: Can CSS be used at the same time as TextFormat? If so, how?
Specifically, I'd like to specify a:hover and a:link properties via
CSS, but handle most other text properties via TextFormat.

As far as I know, you can't really do this.  But look into
stylesheet.transform() as a way of expanding the things that can be
done with CSS.  Again, Google is your friend.

Good luck!

Jim Kremens


On 12/1/06, Marc Hoffman <[EMAIL PROTECTED]> wrote:

[I'm revising and re-sending this as I'm not sure this reached the
list, and I've answered some of my own questions. -Marc]

I'm working on an all-Flash site that will use a single swf to
display many "pages" of information about manufactured products.
Regarding text functionality, I'm not sure what combination of
textFormat, CSS, and font embedding to use. I want to achieve the following:

1. Dynamic text fields that display text from an xml file.
2. Embedding several fonts, but not the entire character sets.
3. Allowing the user to modify the point size of the text (for accessibility).
4. Controlling a:hover and a:link properties from a central location
so that I can apply color and underline effects to links.

#1: This is no problem for me.

#2: The issue is that if I use CSS rather than TextFormat, the
embedded fonts aren't accessed by Flash, so the font must reside on
the user's system, which is no good.

#3: Is there a way to trap the browser text-size controls so that
they tell Flash to resize the text? Sort of like trapping the Forward
and Back buttons in the browser. But it could be too complicated if
the different browsers use different methods to resize the text.
Anybody have experience with this?

#4: Can CSS be used at the same time as TextFormat? If so, how?
Specifically, I'd like to specify a:hover and a:link properties via
CSS, but handle most other text properties via TextFormat.

Many thanks!

Marc Hoffman


___
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




--
Jim Kremens
___
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] Re: CSS locks input text?

2006-10-30 Thread Jim Kremens

Hey,

This can be done.  But one of the issues is conceptual - how do you
wrap style tags around text as someone's typing it?  You kind of have
to choose one style for the whole input field, unless you're building
a text editor...

This should work, although I can't test it right now...

var myStyleSheet:StyleSheet = myAlreadyLoadedStylesheet;
var styleName:String = "plain";
//get style '.plain' from sheet.  Note '.' in file, but not in 'getStyle' call
var styleObj:Object = myStyleSheet.getStyle(styleName);
var styleFormat:TextFormat = myStyleSheet.transform(styleObj);
field.setTextFormat(styleFormat);
field.setNewTextFormat(styleFormat);

Jim Kremens
___
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] xml parsing problem

2006-10-27 Thread Jim Kremens

Steven,

It would be cool if you made a version of that that was mtasc compatible...

Jim Kremens


On 10/27/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:

Or you could use XML2AS.

// XML2AS - DO NOT AUTO FORMAT!
_global.XML2AS = function(n, r) {
   var a, d, k;
   if (r[k=n.nodeName] == null) r = ((a=r[k]=[{}]))[d=0];
   else r = (a=r[k])[d=r[k].push({})-1];
   if (n.hasChildNodes()) {
   if ((k=n.firstChild.nodeType) == 1) {
   r.attributes = n.attributes;
   for (var i in k=n.childNodes) XML2AS(k[i], r);
   } else if (k == 3) {
   a[d] = new String(n.firstChild.nodeValue);
   a[d].attributes = n.attributes;
   }
   }else r.attributes = n.attributes;
}
___
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




--
Jim Kremens
___
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] There is no method with the name 'super'

2006-10-26 Thread Jim Kremens

Seems weird, as your code looks ok.  If it's any comfort, 'super()' is
called automatically, whether you explicitly call it or not... If you want
to override methods of Rectangle, just override them in your new class.

Jim Kremens


On 10/26/06, Hans Wichman <[EMAIL PROTECTED]> wrote:


Hi,
there is no constructor Rectangle() in Rectangle.as, only function
Rectangle( x : Number, y : Number, w : Number, h : Number );

so you cannot call it. You could call super(0,0,0,0);

greetz
JC


On 10/26/06, Quinten [ :: MediaMonks :: ] <[EMAIL PROTECTED]> wrote:
>
> I have 2 classes: 'Tester' wich extends a linked movie on the stage. And
> RectangleExtender wich is called in Tester
>
> class Tester extends MovieClip
> {
>public function Tester()
>{
>var objRectangleExtender:RectangleExtender = new
> RectangleExtender();
>}
> }
>
> and:
>
> import flash.geom.Rectangle;
>
> class RectangleExtender extends Rectangle
> {
>public function RectangleExtender()
>{
>super();
>}
> }
>
> Everything works fine until i put actionscript on a frame. (just a
> simple stop(); on the first frame)
>
> then i get this error:
>
> **Error** H:\temp\SuperFoutmelding\RectangleExtender.as: Line 7: There
> is no method with the name 'super'.
> super();
>
> Total ActionScript Errors: 1  Reported Errors: 1
>
>
> I really have no idea why flash suddenly throws this error. does anyone
> has experience with this kind of error?
>
> I put the source files here:
> http://stuff.mediamonks.net/quinten/SuperError.rar
>
> just remove the stop() command in the 'mcLinker' movieclip and you will
> see that it works fine.
>
> --
> regards,
>
> Quinten
>
> ==\\
> Quinten Beek ; Game Monk
> MediaMonks BV ; Interactive Art
> Schapenkamp 2 | 1211 PA, Hilversum
> The Netherlands | Europe
> email : [EMAIL PROTECTED]
> internet address : http://www.mediamonks.com
> ||
> * Member of the Creative Brotherhood.
> ||
> * Please quote all replies in correspondence.
> ||
>
> ___
> 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





--
Jim Kremens
___
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] Some whining about AS2 interfaces

2006-10-23 Thread Jim Kremens

Re: Simgletons... you can have all other public methods in that class
subscribe to interface methods, except 'getInstance()' or 'create()' or
whatever.  So singletons can definitely make use of interfaces.

I agree that static methods would be useful, as would intrinsic getters and
setters.

Jim Kremens
___
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] Webservices with Zinc and a certificate

2006-10-19 Thread Jim Kremens

Interesting thanks for the reply!  I'll look into it.

Still, this thing is largely built (we're taking it over from another
developer).  It would be a drag to have to rebuild it.  So if anyone has any
experience doing this in Zinc, please chime in!

Thanks,

Jim Kremens


On 10/19/06, Robert r. Sanders <[EMAIL PROTECTED]> wrote:


Depending on what you need to do and what expertize you have on hand, I
believe there is also a customizable, kiosk oriented version of Firefox
that might be the answer.


Jim Kremens wrote:
> Hi all,
>
> Basically, I need do webservices call through Flash with a certificate
> in a
> Zinc-powered kiosk app.  I know this works in a browser - with SSL the
> browser does all the hard work.  But I'm not sure if it's possible with
a
> projector.  Zinc would have to provide some means of handling an https
> handshake and I've not been able to find any indication that it can.
>
> Anyone have any experience with this kind of thing?
>
> Thanks,
>
> Jim Kremens
> ___
> 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
--
   Robert r. Sanders
   Chief Technologist
   iPOV
   (334) 821-5412
   www.ipov.net

___
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





--
Jim Kremens
___
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] Webservices with Zinc and a certificate

2006-10-19 Thread Jim Kremens

Hi all,

Basically, I need do webservices call through Flash with a certificate in a
Zinc-powered kiosk app.  I know this works in a browser - with SSL the
browser does all the hard work.  But I'm not sure if it's possible with a
projector.  Zinc would have to provide some means of handling an https
handshake and I've not been able to find any indication that it can.

Anyone have any experience with this kind of thing?

Thanks,

Jim Kremens
___
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] Interfaces: what are the advantages?

2006-10-13 Thread Jim Kremens

"I understand what interfaces are, but I'm not entirely clear on when
they become advantageous to use.  Anyone care to shed some light?"

I find them really useful for implementing the strategy pattern, and I find
the strategy pattern to be extremely useful in Flash.

Let's say, for example, that you're implementing a number of different types
of lists.  You could:

- make an interface, IList, that declares all of the methods you think lists
will need and the arguments they will accept.

- Make a base class, List, that implements those methods.

- Create subinterfaces of IList, like IHashMap, or whatever, which override
methods and add additional methods and subclasses of List that implement
those new interfaces.

Here's why this is good:

-  You have tight coupling between all list classes.  When you know how one
works, you pretty much know how they all work.
-  If you want to make changes to all of the classes in the list package, do
so in IList.  All of the classes that implement IList will be forced to
adopt those changes.
- You get rid of a lot of conditional statements.  All of the things in the
list package you created above have at least 2 valid types: IList and their
own class type.  Let's say you have some other widget or something that
accepts lists as a dataprovider, for example.  Without this sort of
architecture, you might need branching conditionals 'if myList instanceOf
HashMap, then do this.'  But here they all share the type IList.  So you can
call common methods on them that were declared in the interfaces, and be
sure that they will produce predictable results.

All of that said, interfaces create more work.  To make them viable, you
really need an editor that supports this kind of coding.  For example, if I
change method signatures in an interface, FDT lets me know everywhere else I
need to change them.  Without FDT, I probably wouldn't use interfaces.
Also, I think they make sense when working on a framework or large project.
For simpler one-off projects, I don't use them.

For me, they are really just a way to make it easier to implement design
patterns in Flash, and especially the Strategy Pattern.  Here are a few
links:

http://en.wikipedia.org/wiki/Strategy_pattern
http://ootips.org/strategy-vs-case.html
http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/StrategyPattern.htm

Jim Kremens
___
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: Re: [Flashcoders] ObjectCopy wackiness

2006-10-13 Thread Jim Kremens

Hey,

Darron Schall solved this a while back.  If you replace the first line in
ObjectCopy.copy() with this:

var result:Object = new (Function(refObj.__proto__.constructor))();
it should work.

Jim Kremens



On 10/13/06, nelson ramirez <[EMAIL PROTECTED]> wrote:


It's really of odd. look at the weird thing that happens with the trace:
check this out:

var A:Object = new Object({banner:0, templateType:"sub", dated:false,
cHome:true});
//A.test = "TEST A";
var B:Object = new Object();
B.test = mx.utils.ObjectCopy.copy(A);
//B.test = "TESTB";
trace(" A object :"+A);
trace(B.test+" wtf?");
trace(B.test);
for (i in B.test) {
   trace(i+"inside B.test[i]: "+i+" : "+B.test[i]);
}


//output
A object :[object Object]
undefined wtf? <<<< wrote:
> I've never gotten ObjectCopy to work properly. I've tried using it in
> a bunch of different projects and never get anything back but
> undefined. I'm not sure why though -- looking at the class, the code
> seems sound.
>
> -josh
>
> On Oct 10, 2006, at 7:41p, grimmwerks wrote:
>
> > I've done the dstObj[i] = copy( srcObj[i] );
> >
> >
> > Here's the weirdness: the test code:
> >
> > tPage = new Object({banner : 0,templateType : "sub",dated :
> > false,cHome :
> > true})
> > trace("trace 1: " + tPage);
> >
> > tObj = new Object();
> > tObj.page = mx.utils.ObjectCopy.copy(tPage);
> > trace(" trace 2 : page: " + tObj.page);
> > for(i in tObj.page){trace("inside tObj.page[i]: " + i + " : " +
> > tObj.page
> > [i])};
> >
> >
> > 
> > I get this:
> >
> > trace 1: [object Object]
> > trace 2 : page: undefined
> > inside tObj.page[i]: cHome : true
> > inside tObj.page[i]: dated : false
> > inside tObj.page[i]: templateType : sub
> > inside tObj.page[i]: banner : 0
> >
> >
> > --
> >
> > Now I ask you - how can tObj.page be UNDEFINED when it has
> > variables like
> > tObj.page.cHome = true?
> >
> > I've got an app that I've got these 'screen templates' that on the
> > first
> > save, they work; but when someone re-opens and re-saves, it kills
> > everything. What gives?
> > ___
> > 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





--
Jim Kremens
___
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] Moving to AS2, array always undefined

2006-10-12 Thread Jim Kremens

Steven,

There is a better place for your really strong opinions... your blog!

Please limit contributions to this list to code.  There's a reason for
the list etiquette guidelines:


Keep it coding
There are plenty of other places to talk about general Flash topics,
and even more places to talk about non-Flash topics.


People venting and sounding off on all sorts of topics only serves to
pollute the list and make it a far less valuable resource.

Plus, you've sparked more than a few angry responses.  It's getting old...

Jim Kremens
___
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] Alternative IDE for Flash Devel

2006-10-12 Thread Jim Kremens

FDT?  (http://fdt.powerflasher.com/flashsite/flash.htm)

I love it.  People complain that it's too expensive, but it paid for itself
in a few hours...

Jim Kremens


On 10/12/06, Merrill, Jason <[EMAIL PROTECTED]> wrote:


In addition to Eclipse plug in, SEPY and FlashDevelop, there is also
Sci|Te Flash.

Flashdevelop seems like the best one to me - Sepy kept crashing on me,
even after updates and SciTE Flash had some features missing I would
have liked.

>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Robert r. Sanders
>>Sent: Thursday, October 12, 2006 11:04 AM
>>To: Flashcoders mailing list
>>Subject: Re: [Flashcoders] Alternative IDE for Flash Devel
>>
>>I'd try FlashDevelop (at least for actionscript 2); you can still do
the
>>actual compile w/ the Flash IDE.  There are a few, older tools, with
>>actionscript 1 support, but I'm not familiar w/ any of them anymore.
>>
>>There is also a partially working, but discontinued plugin for
Eclipse,
>>which can then be used in conjunction w/ the CVS or SVN "team
provider"
>>for Eclipse - also there is a commercial plugin to, its kind of
>>expensive and I've never used it.
>>
>>Hope that helps.
>>
>>
>>Andy Herrman wrote:
>>> Forgive me if this has already been asked, but I didn't see anything
>>> in the archives.
>>>
>>> I'm new to Flash development and am working on both server and
client
>>> side code (FMS 2.0 and Flash 7+).  As someone who's used to doing
Java
>>> development using Netbeans I find the Flash IDE very lacking for
>>> client side development, and there doesn't seem to be any IDE for
FMS.
>>>
>>> Does anyone on this list know of a good alternative IDE for Flash?
>>> I've found a lot of references to using Eclipse but I haven't been
>>> able to get the plugin to work correctly.
>>>
>>> I'm specifically looking for something that can handle both
>>> Actionscript 1 and 2 and can still use the Flash 8 devel environment
>>> for the actual builds (I can't use MTASC).  Unfortunately it will
also
>>> have to be free, as I don't think I'll be able to get the company to
>>> buy an IDE for me to use. :(
>>>
>>> Is there anything out there I can use, or am I out of luck?  Right
now
>>> I'm just using Vim for editing the files themselves and switching to
>>> Flash 8 for building, but the lack of any kind of project management
>>> is getting annoying.
>>>
>>> Thanks!
>>>
>>>  -Andy
>>> ___
>>> 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
>>
>>
>>--
>>Robert r. Sanders
>>Chief Technologist
>>iPOV
>>(334) 821-5412
>>www.ipov.net
>>
>>___
>>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





--
Jim Kremens
___
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] Center align multiline textfield?

2006-10-10 Thread Jim Kremens

"Autosize doesn't work in multiline textfields"

Not true.  See example below...

 var tf:TextField = _root.createTextField("tf", 0, 200, 200, 200, 200);
 tf.wordWrap = true;
 tf.multiline = true;
 tf.autoSize = true;
 tf.text = "
laatpurus.Insem.Vivamusviverratellussitametlacus.Phasellusnecnibhvelpedeposuerevestibulum.Maurisdictumpellentesquesem.Nunctinciduntdignissimlorem.Curabiturgravidanequenontortor.Maecenasvulputatecursusfelis.Vestibulumpharetra.Sedinterdumloremataugue.Sednullasem
,mattisac,placerateu,laciniafaucibus,sapien.Suspendissetellusquam
,interdumvel,laoreeteu,malesuadaeu,elitLoremipsumdolorsitamet,
consectetueradipiscingelit.Aeneanultriciespurusetmagna.Nuncantelorem
,blanditvel,hendreritid,rhoncusnec,
lorem.Fuscemalesuadaest.Etiamegetnibh.Vivamusfermentumviverratortor.Nullamdiam.Donecauctor.Vestibulumlectusquam
,accumsana,vehiculaac,venenatisquis,metus.Quisquenonummy
,tortorseddignissimdignissim,nequeerosmalesuadavelit,
indictumduiligulaatpurus.Insem.Vivamusviverratellussitametlacus.Phasellusnecnibhvelpedeposuerevestibulum.Maurisdictumpellentesquesem.Nunctincidun
";

Jim Kremens
___
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] Font faces in text fields

2006-10-01 Thread Jim Kremens

even better, use a css stylesheet and style your text with tags.

On 10/1/06, Perdue, Blake <[EMAIL PROTECTED]> wrote:

I figured it out -- yes, you can use different font faces in the same
dynamic text field. Here's how:

- make sure the fonts are embedded
- create the dynamic text field, but DO NOT set the font face or color
using TextFormat
- instead, use HTML tags to set the font face and color, such as:
textField.htmlText='BLAKEPERDUEPHOTOGRAPHY'

That's it.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Perdue,
Blake
Sent: Sunday, October 01, 2006 3:54 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Font faces in text fields

I am dynamically creating a text field and want to use 2 different
embedded font faces in the same text field. Is this possible?



I have created textfields to embed the 2 fonts, so they are accessible
to the textfields. This is the code I am using:





var fmt=new TextFormat();

fmt.font='Univers 67 CondensedBold';

fmt.size=26;

fmt.color=0xFF;

target['siteTitle'].txt.createTextField('titleTxt',target['siteTitle'].t
xt.getNextHighestDepth(),0,0,600,200);

with (target['siteTitle'].txt.titleTxt) {

html=true;

embedFonts=true;

selectable=false;

htmlText='BLAKEPERDUESOFTWARE';

}

target['siteTitle'].txt.titleTxt.setTextFormat(fmt);





As you can see, I want one dynamic text field to hold two font faces
(Univers 67 CondensedBold and Univers 57 Condensed). Is this possible?
Thanks!





Blake Perdue | 212.522.1292 | AIM: blakepCNN



___
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




--
Jim Kremens
___
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] Implicit Setters: Is validation considered a good or bad OOP practice ?

2006-09-25 Thread Jim Kremens

"Not sure if it's the best practice, but if someone passes in a bad input to
your setter, in AS3 you can throw errors, such as:"

You can do the same thing in AS2, of course...

Jim Kremens


On 9/25/06, slangeberg <[EMAIL PROTECTED]> wrote:


>so if it's a bad input, it cannot tell the object
that is modifying the setter property that something went wrong.

Not sure if it's the best practice, but if someone passes in a bad input
to
your setter, in AS3 you can throw errors, such as:

public function set volume( val:Number ) {
  if ( val == bad_news ) {
throw new Error( "Volume Class - set volume(): Bad value passed in ["
+
val+ "]" );
  }
}
Scott

On 9/25/06, Nicolas Cannasse <[EMAIL PROTECTED]> wrote:
>
> > 3) Validate the value and it it's an undesired value,
> > throw an error ? Here, the component prevents the user
> > from assigning and undesired value like NaN or
> > undefined and the user is alerted of the failure at
> > runtime provided that he used a try catch statement.
> >
> > What do you guys think ?
>
> (3) definitly.
>
> It's called "defensive programming". Try to have your API as much
> checked (type-wise and logical-wise) as possible. This will enforce your
> internal logic constraints and prevent faultly programs.
>
> For instance any other component of your application (an UI for example)
> will except your volume to be positive and not NaN so you cannot allow
> such values to be set.
>
> And you shouldn't ignore this error also since silently ignoring errors
> will make you and others lose hours of debugging when something goes
wrong
>
> "damn ! why this f... volume does not get set"
> answer : because it's NaN
>
> Nicolas
> ___
> 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
>



--

: : ) Scott
___
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





--
Jim Kremens
___
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] does actionscript have something like sql's IN orLIKE ?

2006-09-12 Thread Jim Kremens

Good point!  That function has been hanging around in my library for about 2
years and I never really thought much about it...

Thanks,

Jim


On 9/12/06, Mike Keesey <[EMAIL PROTECTED]> wrote:


Why not just:

public static function contains(str:String, val:String):Boolean {
   return str.indexOf(val) >= 0;
}

?

A tad more concise (you don't need the "? true : false" part), and
avoids the problem your function has that if str is null or undefined,
it returns true.
―
Mike Keesey

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Jim Kremens
> Sent: Tuesday, September 12, 2006 11:25 AM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] does actionscript have something like sql's
IN
> orLIKE ?
>
> Hi,
>
> Try this for checking if one string contains another:
>
>  public static function contains(str:String, val:String):Boolean {
>   return str.indexOf(val) != -1 ? true : false;
>  }
>
> Also, try to avoid attaching your functions directly to buttons, as it
> makes
> scoping tricky:
>
>  this.opened_btn.onRelease=function(){
>
> Check out the Proxy class here for a better way to handle that:
> http://www.person13.com/articles/proxy/Proxy.htm
>
> Hope that helps,
>
> Jim Kremens
> ___
> 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





--
Jim Kremens
___
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] does actionscript have something like sql's IN or LIKE ?

2006-09-12 Thread Jim Kremens

Hi,

Try this for checking if one string contains another:

public static function contains(str:String, val:String):Boolean {
 return str.indexOf(val) != -1 ? true : false;
}

Also, try to avoid attaching your functions directly to buttons, as it makes
scoping tricky:

this.opened_btn.onRelease=function(){

Check out the Proxy class here for a better way to handle that:
http://www.person13.com/articles/proxy/Proxy.htm

Hope that helps,

Jim Kremens
___
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] Re: parsing full instance pathname? or am I completely wrong strategy?

2006-09-11 Thread Jim Kremens

use the _name property.

On 9/11/06, James <[EMAIL PROTECTED]> wrote:

Hi

I have an application in which I create various buttons in various
panes of an accordion component.

I am having trouble handling events...

I use:

buttonName.addEvent.Listener("click",this);

and then

function click(eventObject:Object) {
// decide what to do
}

but the only way I have of knowing which button the event came from
is looking at eventObject.target - or is there a better way?

In my example I get an instance names of e.g.

_level0.myAccordian.w1.buttonName1
_level0.myAccordian.w2.buttonName2

so is it possible to parse out of this name the .w1. and the button
name?

using Flash 8.

Thanks if you can help

James

___
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




--
Jim Kremens
___
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] mvc dillema

2006-08-29 Thread Jim Kremens

Lots of mvc implementations include accessor methods at the top level
(convenience methods).  There are no rules, really, so there's nothing wrong
with this.  The mvc is just there to help you organize the application, and
to maintain it later.  It's meant to keep code where it belongs.  That said,
it can often do more to obfuscate than help... but that's another story...

So there's nothing wrong with MusicPlayer.addPlaylist...

Jim Kremens


On 8/29/06, Martin Wood <[EMAIL PROTECTED]> wrote:


> So I was wondering what the best method may be to access the model to
add a
> playlist.
> Some say the best way is to create a wrapper function to the MusicPlayer
> class, that simply runs the method of the model. But then I need to
create
> extra kinda useless functions in the MusicPlayer class.
> So what would you guys do?

I would add the 'useless' functions :)

dont worry about their content, focus on the API that you are presenting.

If im using your music player and i see

MusicPlayer.addPlaylist

its obvious what its for and i'll happily use it. I dont care if it just
delegates to the model without doing anything else. Im quite happy not
even
knowing there is a model. :)

Of course you could choose to allow the client code to access the model
through
a MusicPlayer.getModel but you probably dont need to expose that much of
the
internals.
___
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





--
Jim Kremens
___
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] clone object

2006-08-25 Thread Jim Kremens

"I'm using this to clone data objects.  If you put circular references in
your data models that's not my problem.  :)
"
Then you might consider renaming the method 'cloneDataObject' or
'cloneDataObjectThatDoesntContainCircularReference'

:-)

Jim Kremens


On 8/25/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:


I'm using this to clone data objects.  If you put circular references in
your data models that's not my problem.  :)



> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of John Grden
> Sent: Friday, August 25, 2006 6:37 AM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] clone object
>
> Guess there's a first time for everything, eh?
>
> var obj = new Object();
> obj.prop1 = new Object();
> obj.prop1.prop2 = new Object();
> obj.prop1.prop2.ref = obj.prop1;
>
> function clone(obj:Object):Object
> {
> var o = (null != obj.length) ? [] : {};
> for (var i in obj)
> {
> o [i] = (typeof obj[i] == "object") ? clone(obj[i]) :
> obj[i];
> }
> return o;
> }
>
> 256 levels of recursion were exceeded in one action list.
> This is probably an infinite loop.
> Further execution of actions has been disabled in this movie.
>
> ;)
>
> On 8/24/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
> >
> > If you're not willing to code a solution, then why are you bothering
to
> > write out an explanation?  I have yet to encounter a recursion limit
and
> > I've parsed some deep object models.
> > ___
> > 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
> >
>
>
>
> --
> [  JPG  ]
> ___
> 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





--
Jim Kremens
___
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] clone object

2006-08-23 Thread Jim Kremens

You know about mx.utils.ObjectCopy, right?

Be sure to change the following lines to read accordingly:

//  var result:Object = new Function( refObj.__proto__.constructor)();
//change to:
 var result:Object = new (Function( refObj.__proto__.constructor))();

and

//   p[j]= q[j];   //change to:
  p[j]= copy(q[j]);

Jim Kremens


On 8/23/06, Wade Arnold <[EMAIL PROTECTED]> wrote:


I have a style that I need to duplicate for several buttons. The style is
declared once and then I want to duplicate the object and add a specific
style element and then apply it to the button. However when I duplicate
the
object I get a reference to the original object,  as expected. I tried to
fake out a clone method in order to get this to work but it does not seem
to
properly duplicate the object. I am sure that this question has been asked
a
million times on this list but I can't seem to googlize the correct
answer.
Can someone point me in the right direction to properly clone an object
and
keep all the right castings. Ahh to just have all the Flex classes in
flash.




private function cloneObject(object){

   var iterate;

   var clone = {};



   for(iterate in object){

   clone [iterate] = object[iterate];

   }

   return clone;

   }







Thanks!

Wade





___
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





--
Jim Kremens
___
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] Problems with setInterval

2006-08-12 Thread Jim Kremens

http://www.kennybunch.com/index.php?p=16

Jim Kremens


On 8/12/06, Paul Steven <[EMAIL PROTECTED]> wrote:


I am trying to scope my setInterval timeout handler however it is not
calling the associated handler when I add the scoping in to it.

Here is the code I have so far:

_global.gIdle_Timeout = 1 // 10 seconds



_global.Idle_Function = function(passed_Destination) {

   trace ("Idle function called");

   Clear_Timeout_Interval();

   gotoAndPlay(Idle_Timeout_Destination);

}



_global.Clear_Timeout_Interval = function() {

   trace ("Clear timeout interval");

   clearInterval(_global.gIdle_Interval);

}



_global.Start_Idle_Timeout = function(passed_Destination) {

   trace ("start idle");

   Idle_Timeout_Destination = passed_Destination;

   // _global.gIdle_Interval = setInterval(this,
_global.Idle_Function, _global.gIdle_Timeout);

   _global.gIdle_Interval = setInterval(_global.Idle_Function,
_global.gIdle_Timeout);

}

I have commented out the line of code with the scoping in it.

i.e


_global.gIdle_Interval = setInterval(this, _global.Idle_Function,
_global.gIdle_Timeout);

Without the scoping, it does not always appear to clear the interval.

Here is a screenshot of my timeline with the actions window illustrating
my
call to this function

http://www.mediakitchen.co.uk/interval.jpg

Any assistance much appreciated.

Thanks

Paul


___
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





--
Jim Kremens
___
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] |:::| can you write dynamic meathods in a class?

2006-08-11 Thread Jim Kremens

Also, look into __resolve.

The Flash docs have excellent examples.

Jim Kremens

On 8/11/06, Jeroen Beckers <[EMAIL PROTECTED]> wrote:

Just to be complete: Yes, it is possible!

Example:

var myFoo = new Foo();
myFoo["test"+5] = function()
{
trace("hello world!");
}
myFoo.test5();


//Foo.as
dynamic class Foo
{


}

And to your second question:

Delegate returns a function. Setting the onRelease to
'Delegate.create()' is nothing more than setting the onRelease to an
ordinary function like this:
btn.onRelease = function()
{
trace("Hello World");
}

the only thing Delegate do, is modifie the scope of the function.
So, yes, you CAN overwrite 'delegate instances'.

Ps: "Delegate instances" isn't even the right term since you don't
create an instance of the Delegate class. The 'create' method is a
static method that just takes some arguments and returns a function.

Got it ? :)



Bbt Lists wrote:
> Hi there
>
> Can you write dynamic methods in a class?
>
>
> for example
>
> for (var i:Number = 0; i < 11; i++)
> {
>function onBtnPress + i()
>{
>   trace("Button number: " + i + "was pressed");
>}
> }
>
> So then that would essentially create 10 methods (onBtnPress0 to
> onBtnPress9) to be used by various onPress events.
>
> Is this possible? Then at the same time you could write the delegate
> and create the buttons and so one as well.
>
> Then continuing on my thought - could you then over-write the
> onBtnPress functions with new values (say for example the trace would be:
>
> trace("Button number: " + i + "was pressed with the currValue of " +
> externalVariable);
>
> instead of the original:
>
> trace("Button number: " + i + "was pressed");
>
>
> I am a hobby AS coder, and I am probably way off here. All I am trying
> to do is build a thumbnail nav for a gallery.
>
> Thanks in advance!
>
___
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




--
Jim Kremens
___
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] need help in drawing arrow

2006-08-11 Thread Jim Kremens

Here's an AS1 way to do it, from the deep archives...

MovieClip.prototype.drawArrow = function(sp, ep, th, headL, headW, c) {
// sp, ep = startPoint, endPoint; (point objects, objects with xand y)
// th = line thickness
// headL = headLength, headW = headWidth
// c = color
this.lineStyle(th, c, 100);
this.moveTo(sp.x, sp.y);
this.lineTo(ep.x, ep.y);
this.arrowAngle = Math.atan2(ep.y-sp.y, ep.x-sp.x);
// value in Radians
if (headL>0 && headW>0) {
 this.drawArrowHead(ep.x, ep.y, this.arrowAngle, headL, headW, c);
}
};
MovieClip.prototype.drawArrowHead = function(x, y, a, l, w, c) {
// x, y = reg.point of arrowhead
// a = angle
// l = length, w = width
// c = color
var halveWay = (w/180*Math.PI);
// value in Radians
var AX = l*Math.cos(a+halveWay);
var AY = l*Math.sin(a+halveWay);
var BX = l*Math.cos(a-halveWay);
var BY = l*Math.sin(a-halveWay);
this.moveTo(x, y);
this.beginFill(c, 100);
this.lineTo(x-AX, y-AY);
this.lineTo(x-BX, y-BY);
this.lineTo(x, y);
this.endFill();
};
// usage:
this.createEmptyMovieClip("arrow", 10);
this.arrow.drawArrow({x:100, y:100}, {x:400, y:100}, 1, 50, 10, 0x33);


Jim Kremens
___
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] New Flash based website

2006-08-09 Thread Jim Kremens

Hi,

Not to be a buzzkill, and I think it's a cool site, but sitechecks are
frowned upon in a list this large.

See:

http://www.osflash.org/flashcoders/etiquette

Jim Kremens
___
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] butterfly animation

2006-07-23 Thread Jim Kremens

I had to create a butterfly animation for a client a while ago.  After
messing around for a bit, I decided that it was the kind of thing that could
be done better using traditional timeline animation.  The reason being that
the butterfly's wings stretch and bend in all sorts of complicated ways
while it's flying.   To get all those curves right with actionscript might
be doable, but it would be hairy.  If you don't need that level of realism,
actionscript is a more tenable solution - I'd google actionscript inverse
kinematics...

Anyway, it's not code, but here you go...

http://www.jimkremens.com/dev/demo/butterfly/index.html

Jim Kremens


On 7/21/06, Doug Tangren < [EMAIL PROTECTED]> wrote:


does anybody here have a link for a good actionscript butterfly
animation?
Doug Tangren
[EMAIL PROTECTED]


___
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] Programmatically instantiating a class that extends MovieClip.

2006-06-29 Thread Jim Kremens

"Why not subclass object instead? Both ActionStep and ASwing work this
way, then create movieclips on the fly. It's very nice to work with."

So you never really subclass movieclip, you use composition instead.  In
other words, your class has a movieclip, but it isn't a movieclip.,,

Is that what you mean, or am I missing the point?  Can you give a small code
example?

Thanks,

Jim Kremens
___
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: RE: [SPAM?] RE: [Flashcoders] XPcomponents set

2006-06-29 Thread Jim Kremens

" > I think that's false.  There are lots of people who are interested in

using frameworks and using them completely.


We have to agree to disagree on this one."

Thinking about it again, I think you're right on one point.  There's
certainly no reason that using their framework should break native Flash
code.  That's just sloppy.  But, as it is a framework, I think it's totally
legit that it makes you do certain things certain ways.

"It's not like Rails makes other parts of Ruby break."

Case in point - to use Rails, you must do things inn VERY specific ways.
Rails is all about convention, and if you don't adhere to its conventions,
you will be boned.

To sum up, my point is that frameworks shouldn't break anything.  But also
that people should expect when using a framework that they might have to do
things in certain ways.  Seems obvious, but wasn't clear in my last post...

That's all,

Jim Kremens


On 6/29/06, John Mark Hawley <[EMAIL PROTECTED]> wrote:


DepthManager and FocusManager cause a few headaches for people used to
working without the MM components. Granted, nowhere near as bad as XP is
sounding in this thread, but still...

-mark hawley

>
> From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]>
> Date: 2006/06/29 Thu PM 02:39:22 CDT
> To: "Flashcoders mailing list" 
> Subject: RE: [SPAM?] RE: [Flashcoders] XPcomponents set
>
> > MM did that as well, did you say scam then too ?
>
> With the exception of the DRK series of components, MM's components came
> free with Flash.
>
> And I don't recall any MM components that caused other things to break
> in your application.  The components themselves were buggy and certain
> components didn't play nicely with others, but they didn't require you
> to build your application in a very specific way.
>
> The scam is not that the XP Components break native Flash code.  The
> scam is that they're not components, it's an entire architecture you
> must adhere to but they call them components on their website, IMPLYING
> that they are COMPONENTS not a FRAMEWORK.
>
> XPFramework would be honest.
> ___
> 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
>

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

___
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





--
Jim Kremens
___
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: [SPAM?] RE: [Flashcoders] XPcomponents set

2006-06-29 Thread Jim Kremens

"that pretty much no one would buy
their components if they knew ahead of time about this restriction"

I think that's false.  There are lots of people who are interested in using
frameworks and using them completely.  Making a viable frmaework that will
integrate nicely with everyone in the world's swf is pretty much
impossible.  There are always tradeoffs:  adopt the framework, you give some
things up, but you get others.  Depending on their needs, some people will
make that trade, others won't.

So I disagree with the point above.  But I agree that they should make their
strategy clear on their site.

Jim Kremens


On 6/29/06, Scott Hyndman <[EMAIL PROTECTED]> wrote:


I don't see why that matters exactly?

Scott

On 29/06/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
> > I don't think it's a scam. I gave them a call when I was working with
> > them and they were amazingly helpful and polite. I think it's 3 guys
> > coding a component framework, and one that's not too shabby. Sure, it
> > doesn't work with MM's framework, but who cares? V2 is garbage
> > anyways.
>
> It's not just MM's components it doesn't work with, it's Flash in
> general.
>
> When you put ANY of their components in your movie, the following Flash
> native code no longer works.
>
> Selection.setFocus
> TextField.tabIndex
>
> Like I mentioned before, they are amazingly helpful and polite.  It
> doesn't change the fact that their components don't work standalone,
> that you must code how they tell you to code and use their framework to
> code all your Flash applications, that it's not made clear that this is
> a requirement for using their components prior to purchase, and they and
> everyone else here know full well that pretty much no one would buy
> their components if they knew ahead of time about this restriction, yes,
> it's a scam.
>
> Just because you put a lot of hard work into something doesn't
> automatically make it valuable.
> ___
> 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





--
Jim Kremens
___
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] Programmatically instantiating a class that extends MovieClip.

2006-06-29 Thread Jim Kremens

Google 'Ted Patrick' and 'MCE'.

You can't use 'new' but it's a lot better and you don't need a library
symbol.  I've been using a variant of it for about 18 months now with no
trouble.

Jim Kremens


On 6/29/06, Ian Thomas <[EMAIL PROTECTED]> wrote:


To the best of my knowledge, no, unfortunately.

That's one of the reasons that I'm looking forward to AS3. :-)

Ian

On 6/29/06, Jason Lutes <[EMAIL PROTECTED]> wrote:
> Since this relates to some things that were brought up recently...
>
> Is it possible to have a class that extends MovieClip, but doesn't
> relate/link to a Library symbol, FULLY instantiate itself without
> additional Timeline code?
>
> I'd like to simplify object creation for some classes I created, so that
I
> can just use the "new" operator to instantiate them.
>
> I'm currently using the instatiating procedure that involves this
general
> code:
>
> FooClass(this.attachMovie(FooClass.pseudoSymbolName, 'fooInstance',
> this.getNextHighestDepth()));
>
> I've looked around and haven't found a tidier way to accomplish this
kind
> of instantiating, so I presume it's not possible. Does anyone know
> differently?
___
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





--
Jim Kremens
___
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] XPcomponents set

2006-06-28 Thread Jim Kremens

The Bit-101 components are also excellent for the same reasons.

Jim Kremens


On 6/28/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:


What is not entirely clear on the website is that the XPComponents are
NOT designed to be used as standalone components in YOUR application,
but are meant to be used when you build applications using the
DEVELOPERS' EXACT framework.

We paid for the components but found out very quickly that they wouldn't
work for us because they caused all kinds of issues with Selection,
tabIndex, and other non-XP components.

I don't want this to sound disparaging, as the author of the components
was very helpful when I asked him about the issues I was having,
however, I disagree with his approach.  The website doesn't explain
clearly that you cannot just throw one of his components in your movie
and expect it to work, or that using his components in your movie can
break your existing code and won't get along with other components (MMs
or other 3rd party ones) or even with Flash's native code (like
Selection and tabIndex).  You MUST use the exact framework he has
developed from the get go.  To me, it's kind of misleading to simply
call them components, since you're actually purchasing a framework which
contains custom components to work within that framework.

If you're looking for great, lightweight, skinnable components you can
just throw into your existing code, I recommend the Ghostwire components
set.  I have had a lot of success with them.  They're written in AS1 but
AS2 compiles as AS1 anyway and their ease of use, skinnability, and
ability to get along with your existing code make them a winner in my
book.

http://www.ghostwire.com/

HTH,
Steven

___
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





--
Jim Kremens
___
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] Re: loadvars vs xml onData

2006-06-27 Thread Jim Kremens

"But if you run the XML test first, and the LoadVars test just "loads"
the cached file"

That's a good point!

Jim Kremens


On 6/27/06, Mike <[EMAIL PROTECTED]> wrote:


But if you run the XML test first, and the LoadVars test just "loads"
the cached file
--
T. Michael Keesey

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jim
Kremens
Sent: Tuesday, June 27, 2006 5:39 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Re: loadvars vs xml onData

Why would that matter?  I would assume that the loadvars and XML
objects would handle cached or non cached files the same way, no?

Jim Kremens

On 6/26/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
> You're loading in a non-cached version each time right?
>
> var myXml = new XML();
> for (var a = 0; a < 30; a++) {
> myXml.load(path + "?x=" + a);
> }
>
>
> BLITZ | Steven Sacks - 310-551-0200 x209


___
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





--
Jim Kremens
___
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] Re: loadvars vs xml onData

2006-06-27 Thread Jim Kremens

Why would that matter?  I would assume that the loadvars and XML
objects would handle cached or non cached files the same way, no?

Jim Kremens

On 6/26/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:

You're loading in a non-cached version each time right?

var myXml = new XML();
for (var a = 0; a < 30; a++) {
myXml.load(path + "?x=" + a);
}


BLITZ | Steven Sacks - 310-551-0200 x209

___
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




--
Jim Kremens
___
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] Re: loadvars vs xml onData

2006-06-26 Thread Jim Kremens

Hi Stacey,

Check out the question:

"Anyone know why loadvars.onData gets results quicker than xml.onData"

He's comparing loadvars.onData with xml.onData - apples and apples, not
loadvars.onData with xml.onLoad.

It's a good question!  I'd like to know

Jim Kremens
___
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] Re: Text link on hover

2006-06-09 Thread Jim Kremens

not really... we were  discussing hovers, not clicks...

On 6/9/06, David Bellerive <[EMAIL PROTECTED]> wrote:

You wish as been granted :)

You can call another actionscript function from within
a dynamic textfield by setting it's html property to
true and using asfunction within the anchor tag like
this :

tfMyTextField.html = true;
tfMyTextField.htmlText = "";

where fMyFunction is the name of the function you want
to call when the user clicks the link and sMyParameter
is a parameter to pass to that function. Only one
parameter can be passed to the function.

> I wish you were wrong too =[
>
> Thanks though Mick
>
> M.
>
> On 6/8/06, Jim Kremens <[EMAIL PROTECTED]> wrote:
>
> Wait, I know you can get hovers, but can you catch
the hover 'event'
and
> use
> it to, for example, call another function? I think
that was his
question,
> and as far as I know, there is no 'onHover' event.
I'd like to be
> wrong...
>
> Jim Kremens
>
>
> On 6/8/06, Mick G <[EMAIL PROTECTED]> wrote:
> >
> > Yes, you'll need to set up style in Flash...
> > A:hover is supported in Flash.
> >
> >
http://www.actionscript.org/tutorials/beginner/css_in_flash/index.shtml
> >
> >
> >
> > On 6/9/06, elibol <[EMAIL PROTECTED]>
wrote:
> > >
> > > Does anyone know if it's possible to trigger an
event with a text
link
> > > hover
> > > state?
> > > ___
> > > 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
> >
>
>
>
> --
> Jim Kremens
> ___
> 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
>

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.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




--
Jim Kremens
___
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] Text link on hover

2006-06-08 Thread Jim Kremens

Wait, I know you can get hovers, but can you catch the hover 'event' and use
it to, for example, call another function? I think that was his question,
and as far as I know, there is no 'onHover' event.  I'd like to be wrong...

Jim Kremens


On 6/8/06, Mick G <[EMAIL PROTECTED]> wrote:


Yes, you'll need to set up style in Flash...
A:hover is supported in Flash.

http://www.actionscript.org/tutorials/beginner/css_in_flash/index.shtml



On 6/9/06, elibol <[EMAIL PROTECTED]> wrote:
>
> Does anyone know if it's possible to trigger an event with a text link
> hover
> state?
> ___
> 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





--
Jim Kremens
___
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] Re: Q:Create UML from EXISTING classes

2006-06-08 Thread Jim Kremens

"Yes, but it's read only ain't it ? PNG or other bitmap but no xmi AFAIK.
You can't modify the diagram and get the sources back."

That's true.  You want everything?!!!

:-)

Jim Kremens

On 6/8/06, erixtekila <[EMAIL PROTECTED]> wrote:


> Doxygen will do it.  There's a plugin for eclipse as well...

Yes, but it's read only ain't it ? PNG or other bitmap but no xmi AFAIK.
You can't modify the diagram and get the sources back.

---
erixtekila
http://blog.v-i-a.net/

___
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





--
Jim Kremens
___
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] Re: Q:Create UML from EXISTING classes

2006-06-08 Thread Jim Kremens

Doxygen will do it.  There's a plugin for eclipse as well...

On 6/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi
I'm aware of several tools and plugins that allow creation of stub code from
UML diagrams.

But is anyone aware of any tool that allows creation of UML from existing AS
classes?

Thanks in advance
Jim Bachalo

[e] jbach at bitstream.ca
[c] 416.668.0034
[w] www.bitstream.ca

"...all improvisation is life in search of a style."
 - Bruce Mau,'LifeStyle'
___
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




--
Jim Kremens
___
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] Using Korean or Chinese text in textfields

2006-05-18 Thread Jim Kremens

Hi all,

Does anyone have any examples they can share of using Korean or Chinese text
in textfields?

Thanks,

Jim Kremens
___
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] Re: Create an Empty MC and assign it to a class?

2006-04-19 Thread Jim Kremens
google 'Ted Patrick' and 'MCE.'



On 4/19/06, Ian Thomas <[EMAIL PROTECTED]> wrote:
> Take a look at the following FAQ entry:
> http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library
>
> HTH,
>   Ian
>
> On 4/19/06, Rifled Cloaca <[EMAIL PROTECTED]> wrote:
> > Thanks for your response..
> >
> > Actually, I want to assign a class to an empty MovieClip created with the
> > createEmptyMovieClip method, not a MovieClip in the Library.
> >
> > Thoughts?
> > -g
> ___
> 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
>


--
Jim Kremens
___
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] Q: Flash Object vs UFO for flash detection and as eolas workaround

2006-04-17 Thread Jim Kremens
Hi Geoff,

I'll reply to your comments inline below...

"First, I guess I'm not sure why you would need to 'maintain' it. The
script is basically just an API for writing the HTML to embed a swf
file into an html document. This probably won't change significantly
any time soon, so the need to 'maintain' a script like this is non-
existent."

I said 'maintain' - a more accurate word would have been 'modify.'
John Grden ran into an 'edge case.'  In a case like that, he might
have chosen to dive into the script to refactor the code in a way that
involved more
than just extending it.

"Second, maybe you were looking at the compressed version? I
include a version of the 'source' code that is much easier to read if
you are into that."

I was reading the compressed version.  What a dumbass...  For some reason
I just didn't see the 'source' directory there.  Certainly helps... :-)

"As far as the misc. accusations about FlashObject not being Object
Oriented, (Jim said: 'IMHO, the code is very procedural, not object
oriented.  The  cues for this are the endless conditional
statements.  A good, encapsulated architecture can greatly minimize
these...')"

The code is object oriented - that comment was inaccurate.  I think it could be
*more* object oriented, if that makes sense... In other words, I would
prefer it if it were
refactored in a way that further encapsulated the various tasks it performs.

As far as the conditional statements are concerned, the red flag for
me is seeing conditionals that include seemingly unlike things:

  if(this.skipDetect || this.getAttribute('doExpressInstall') ||
this.installedVer.versionIsValid(this.getAttribute('version'))){

I'm sure all of that makes sense when you're the guy who wrote the
code.  And of course, I can take the time to figure it out
so it makes sense to me as well.  I just think that, for my taste,
this file is trying to do too much.  I'd rather the functionality were
broken out into separate classes.  I alluded to the Strategy pattern
only because I use it all the time.  It forces me to make small
classes that
really only do one thing.  That style of coding used to annoy me, but
I've learned to love it because once you understand how things fit
together, everything's incredibly easy to modify.  And it can
eliminate the need for lots of conditional checks that are otherwise
unavoidable.

I still think Elibol said it extremely well:

The FlashObject class would just embed swf files. Any additional concerns
would be seperated from this class, where each class would interface to
operate with one anotherAs it stands, all of the features are
crammed into one class file, the
FlashObject.js, making it very hard to add/remove functionality without
fundamentally reprogramming the entire tool."

It all comes down to a matter of taste.  For better or worse, my code
looks more like Java than it used to.  (I think too much Java is a
disease,
but there's a lot that can be learned from Java or C#).  I know
Javascript isn't Java, and it isn't even Actionscript.  So it's unfair
of me to
complain about it.  The javascript that I do like typically resides in
larger JS frameworks, like DOJO.  Frameworks allow for
more encapsulation, more OOP, listeners, and all the stuff that I've
come to rely on in Actionscript.  But FlashObject isn't a framework,
and it shouldn't be measured by those standards.  FlashObject is a
tool that fills a very important niche and does so extremely well.

I hope we can now end this thread...  If you disagree with me (and it
seems most people do!), it's just one guy's opinion :-)

Jim Kremens
___
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 targeting Quicktime to open in QT Player

2006-04-17 Thread Jim Kremens
"Could you do something with javascript and css and ExternalInterface?

Something where a div of the QT player is hidden, and a javascript call
would supply the embed src param and turn the visibility of the div on or
something?"

You can definitely do that (I've done it) but I don't think that's
what he wants.  He wants the file to open in the standalone Quicktime
Player (right?).

I can't think of how to do that... sorry.

Jim Kremens

On 4/17/06, eric dolecki <[EMAIL PROTECTED]> wrote:
> Could you do something with javascript and css and ExternalInterface?
>
> Something where a div of the QT player is hidden, and a javascript call
> would supply the embed src param and turn the visibility of the div on or
> something?
>
> On 4/17/06, Jon Bradley <[EMAIL PROTECTED]> wrote:
> >
> > This one is tough.
> >
> > I'm trying to have Flash (version 8) call a javascript function that
> > will write a quicktime object to the page and open this quicktime in
> > the QT player, not in the page.
> >
> > I've got the usage of QT write object javascript functions (from Apple)
> > that will write out an embed or object tag to put a quicktime in a
> > page. Problem is that we're running a Flash 8 site that needs to target
> > this qt object to open up in the Quicktime Player, not into an embedded
> > movie on the page.
> >
> > Popup windows are a no go, so I need to figure out a way for Flash to
> > communicate with the page to tell it to write an embed to the page and
> > load up the QT player, without changing the current window.
> >
> > Unfortunately, any getURL call I make always changes the location of
> > the page - and I can't even figure out how to keep it from changing the
> > page location. Is this possible with an FSCommand?
> >
> > Has anyone ever done anything like this?
> >
> > Many many many thanks if anyone can help out. I've got a site I need to
> > make live today and I have everything working fine except this (major)
> > part.
> >
> > thanks,
> >
> > Jon Bradley
> > Animation / Interactive / Visual FX
> > Post Central, Inc.
> > [EMAIL PROTECTED]
> > www.cherrycrushthemovie.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
>


--
Jim Kremens
___
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] Re: Q: Flash Object vs UFO for flash detection and as eolas workaround

2006-04-15 Thread Jim Kremens
Hey guys,

I have no problem discussing this and I am not offended.  I am an OOP
purist, and that annoys some people.  I didn't used to be this way, I
just ended up here... :-)

That said, it's 75 degrees Fahrenheit outside in NYC today, which
means its the nicest day of the year so far, and my kid wants to play
soccer with me.  So I'd like to table this until I have more time, at
which point I'll post as thoughtful a response as I can manage!

Enjoy the day!

Jim Kremens

On 4/15/06, bryan.rice <[EMAIL PROTECTED]> wrote:
>
> On Apr 15, 2006, at 8:19 AM, Jim Kremens wrote:
>
> > IMHO, the code is very procedural, not object oriented.  The  cues for
> > this are the endless conditional statements.  A good, encapsulated
> > architecture can greatly minimize these...
>
>
> I can see part of your point, but to me Javascript (and Actionscript)
> is a prototype language, not a class-based language and I don't
> really find his code very difficult (it looks like the AS 1 that I
> have been writing for years).  I would have a hard time understanding
> how to write a detection script that was any less "procedural", and I
> would love to see an example.
>
> More specifically, what is that you want to do that you are not
> able?  I am just wondering on a practical level, because sometimes
> people stress over "OOP" in a dogmatic way, but lose the forest
> through the trees.  OOP just for the sake of OOP creates a lot of
> overhead sometimes that is not necessary - especially when scripting.
>
> What did you want to do with it that you couldn't?  Do you think the
> runtime performance/speed of the script is adversely affected?  Are
> you talking theoretically, or are there really methods that you
> wanted to add to FlashObject but couldn't do it?
>
>   Did you want to build a class that inherits from FlashObject, but
> was prevented?
>
> I am really just curious - I have no vested interest one way or
> another, just trying to understand other people's point of view.
>
> blue skies,
> bryan
> ___
> 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
>


--
Jim Kremens
___
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] Re: Q: Flash Object vs UFO for flash detection and aseolas workaround

2006-04-15 Thread Jim Kremens
"Sounds wonderful, why don't you take it a step beyond words and show us js
dummies how that would be done? We'd all worship at your shrine."

I don't get the need for hostility, but ok...

I have seen javascript that adheres more to OOP standards.  If you
like OOP, and I do, then that sort of thing might interest you  (see
DOJO for example).  If you don't care for OOP. then no biggie.

The truth is, I'm sure I never could have come up with FlashObject. 
It is a great thing that performs a very useful service.  But it isn't
OOP, and before it gets adopted as a universal standard, which seems
to be a direction people are going in, I thought it might make sense
to simply and dispassionately comment on that.  So I did.

Anyway,  if I came off as pompous, I'm sorry about that.  I seriously
have nothing but admiration for javascript and the people who write
it.  It's hard to write object-oriented javascript, but it can be
done, and I think it's worth the effort.

Jim Kremens
___
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] Re: Q: Flash Object vs UFO for flash detection and as eolas workaround

2006-04-15 Thread Jim Kremens
He said it well:

'As it stands, all of the features are crammed into one class file, the
FlashObject.js, making it very hard to add/remove functionality without
fundamentally reprogramming the entire tool.'

IMHO, the code is very procedural, not object oriented.  The  cues for
this are the endless conditional statements.  A good, encapsulated
architecture can greatly minimize these...

Jim Kremens

On 4/15/06, elibol <[EMAIL PROTECTED]> wrote:
> Bryan if you thought that he could give you a valid answer to the questions
> you're asking I don't think you would of asked them in the first place since
> to think otherwise you would have come to a valid answer yourself. I think
> you've taken someone elses opinion far too personally, otherwise I believe
> your question would be generally presented rather than personally scolding
> someone.
>
> I will assume that you really are just curious, and if this is the case,
> then hearing the answer from me should make no difference.
>
> The Express Install feature for FlashObject originally had its own page with
> comments, I would of liked to link you to that so you could see my own
> reasoning for why it wasn't well implemented.
>
> To give you a basic outline of how I would of done things differently:
>
> The FlashObject class would just embed swf files. Any additional concerns
> would be seperated from this class, where each class would interface to
> operate with one another. Additional composite classes would serve to
> package feature combinations to maintain an easy implementation by the user.
>
> As it stands, all of the features are crammed into one class file, the
> FlashObject.js, making it very hard to add/remove functionality without
> fundamentally reprogramming the entire tool.
>
> I hope this satisfies your curiosity,
>
> M.
>
> On 4/15/06, bryan.rice <[EMAIL PROTECTED]> wrote:
> >
> >
> > On Apr 14, 2006, at 5:05 PM, Jim Kremens wrote:
> >
> > > Did you ever look at the code?
> >
> >   I have taken a look at the javascript and I find it pretty straight
> > forward (though not commented)...what is that you don't like about
> > it?  Just curious.  How would you write it differently?
> >
> > blue skies,
> > bryan
> > ___
> > 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
>


--
Jim Kremens
___
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] Q: Flash Object vs UFO for flash detection and as eolas workaround

2006-04-14 Thread Jim Kremens
Did you ever look at the code?

Jim Kremens

On 4/14/06, bryan.rice <[EMAIL PROTECTED]> wrote:
>
> On Apr 14, 2006, at 12:44 PM, elibol wrote:
>
> > I don't much like FlashObject
>
>
> What don't you like about it?  I have deployed many sites with it
> (using express install) and have never had an issue.  I quite like
> it, (I used to use Colin's Moock FPI), so I am curious as to why you
> don't.
>
> blue skies,
> bryan
> ___
> 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
>


--
Jim Kremens
___
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] Q: Flash Object vs UFO for flash detection and as eolas workaround

2006-04-13 Thread Jim Kremens
My only reservation with FlashObject is that it's written in a style
that makes it pretty un maintainable.  Take a look inside
FlashObject.js... should you ever want to change or modify anything in
there, it might get weird...

Jim Kremens

On 4/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi
> Was wondering what everyone is using for flash detection currently.
> Is there and consensus as to which is better,
>
> UFO
> http://www.bobbyvandersluis.com/ufo/
> or
>
> Flash Object methods
> http://blog.deconcept.com/flashobject/
>
> Thanks in advance!
> Jim Bachalo
>
>
> [e] jbach at bitstream.ca
> [c] 416.668.0034
> [w] www.bitstream.ca
> 
> "...all improvisation is life in search of a style."
>  - Bruce Mau,'LifeStyle'
> ___
> 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
>


--
Jim Kremens
___
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] yet another screwing from micrsoft

2006-04-01 Thread Jim Kremens
Well, anyone who's disabled Javascript is going to miss out on half of
the web at this point...

Jim Kremens


On 4/1/06, Byron Canfield <[EMAIL PROTECTED]> wrote:
> Additionally, the proposed solutions, whether embedded JavaScript or
> external JavaScript files are entirely ineffectual for those who have
> changed the browser settings to disallow JavaScript execution -- not all
> that uncommon in this, the age of the pop-ups.
>
> --
> Byron "Barn" Canfield
>
>
> > I couldnt give a stuff about the lost lawsuit, 0.001% revenue loss
> > for MS compared to all legacy flash sites that I will have to dig up log
> > in details for and fix, much bigger impact for me personally than bill
> > will fell personally
>
>
> ___
> 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
>


--
Jim Kremens
___
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] "+" simbol issue help

2006-03-29 Thread Jim Kremens
If you're using embedded text and you haven't embedded that character,
it won't show up...

Jim Kremens

On 3/29/06, Danny Kodicek <[EMAIL PROTECTED]> wrote:
> > what can i do to show "+" symbol in a dynamic textfield??
>
> There should be no issues with that - can we see your code?
>
> Danny
>
>
> ___
> 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
>


--
Jim Kremens
___
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] Flex demos

2006-03-21 Thread Jim Kremens
thanks!

On 3/21/06, Arul Prasad <[EMAIL PROTECTED]> wrote:
>
> http://weblogs.macromedia.com/flex_samples/
>
>
> On 3/21/06, Jim Kremens <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> > I'm trying to sell a client on Flex.  I want to be able to show him some
> > examples.
> >
> > I've seen this page:
> >
> > http://www.macromedia.com/cfusion/showcase/index.cfm
> > ?event=finderresults&contenttype=casestudy&productID=26724&loc=en_us
> >
> > but even using the links provided there, it's pretty hard to find the
> Flex
> > app.  These are all RIAs of course, but they require login, and so don't
> > make the best demos.
> >
> >
> > Is there a page with links to some demo-type, completely public apps?
> >
> > --
> > Jim Kremens
> > ___
> > 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
>



--
Jim Kremens
___
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] Flex demos

2006-03-20 Thread Jim Kremens
Hi all,

I'm trying to sell a client on Flex.  I want to be able to show him some
examples.

I've seen this page:

http://www.macromedia.com/cfusion/showcase/index.cfm
?event=finderresults&contenttype=casestudy&productID=26724&loc=en_us

but even using the links provided there, it's pretty hard to find the Flex
app.  These are all RIAs of course, but they require login, and so don't
make the best demos.


Is there a page with links to some demo-type, completely public apps?

--
Jim Kremens
___
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] CSS with input text

2006-03-20 Thread Jim Kremens
It seems like this thread has morphed into something else.  But if you're
looking to style an input text field with CSS, here's a working example...

Note that this is only en example... some things that are hardcoded should
not be... but it gets the point across.  The getStyleSheet and
getDefaultStyleSheet methods are only there so you don't have to load a
stylesheet for the example to work.


class SomeUsefulTextMethods

{

public static function getStyleSheet(css:Object):TextField.StyleSheet {
var style:String = "";
var styleSheet:TextField.StyleSheet = new TextField.StyleSheet();
style += ".bold {font-family:" + css.font + ";font-size: " +
css.size + ";font-weight: bold;color: " +  css.color + ";}";
style += ".plain {font-family: " + css.font + ";font-size: " +
css.size + ";font-weight: normal;color: " + css.color + ";}";
style += ".italic {font-family: " + css.font + ";font-size: " +
css.size + ";font-style: italic;font-weight: normal;}";
style += "a:link {color: " + css.hoverColor + ";text-decoration:
none;}";
style += "a:hover {color: " + css.hoverColor + ";text-decoration:
underline;}";
styleSheet.parseCSS(style);
return styleSheet;
}
public static function getDefaultStyleSheet():TextField.StyleSheet {
return getStyleSheet({font:"Verdana", size:11, color:"#00",
hoverColor:"#FF"});
}
public static function getInputField(scope:MovieClip, name:String,
x:Number, y:Number, w:Number, h:Number):TextField {
var field:TextField = scope.createTextField(name,
scope.getNextHighestDepth(), x, y, w, h);
field.type = "input";
field.border = true;
var myStyleSheet:TextField.StyleSheet = getDefaultStyleSheet();
var styleObj:Object = myStyleSheet.getStyle(".bold");
var styleFormat:TextFormat = myStyleSheet.transform(styleObj);
field.setTextFormat(styleFormat);
    field.setNewTextFormat(styleFormat);
return field;
}
}


/**
 * in fla...
 * var field:TextField = SomeUsefulTextMethods.getInputField(this,
"myField", 100, 100, 100, 100);
 */


Jim Kremens
___
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] Question for XML Style Junkies

2006-03-16 Thread Jim Kremens
CDATA is a type of node -  can't put CDATA in an attribute.

Jim Kremens

On 3/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> You shouldn't use the CDATA tag in an XML attribute.
>
> But if you are really desparate to put HTML formatting in XML attributes
> You can use "URL Encode" the attribute values with an escape()
> function... then have Flash "unescape()" the attributes when you load it
> back into flash
>
> However this is only useful if you are dynamically building your XML
> with script or dynamically building it from outside of flash then
> reading back into flash.
>
>
> --Keith H--
>
>
> > I am assuming the way I am using CDATA tags are throwing it off
> > somehow.For example, I have a CDATA tag inside an attribute value
> > under the
> > Home/Panel/Panel[0]/Title attribute value and this is where it
> > seems to
> > break.  Is this bad form and/or causing Flash to choke?  If not, what
> > could be causing this?  If this is bad XML form, how would you
> > reorganize it to work in Flash?
> >
> > ---
> > FYI - FWIW:
> > I am loading the XML in a standard way:
> >
> > var xmlObject = new XML();
> > xmlObject.ignoreWhite = true;
> > xmlObject.onLoad = Delegate.create(this, loadSuccess);
> > xmlObject.load("home.xml")
> >
> > and the delegate function just moves the playhead once the file is
> > loaded - when I get to the frame after it's loaded, I do a trace on
> > theXML and see the truncation as described.
> > --
> > Ideas?
> >
> > Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com
> >
> >
> >
> >
> >
> > NOTICE:
> > This message is for the designated recipient only and may contain
> > privileged or confidential information. If you have received it in
> > error, please notify the sender immediately and delete the
> > original. Any other use of this e-mail by you is prohibited.
> > ___
> > 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
>
>


--
Jim Kremens
___
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] [OT] Flashcoder position available in Baltimore, MD

2006-02-22 Thread Jim Kremens
Hi all,

Some friends of mine in Baltimore are looking for a Flash programmer to work
fulltime onsite.  Great client - unfortunately I can't say more on this
list, as they're not really posting the job publicly.

So, if you live in Baltimore and might be interested, email me offlist.

Thanks,

Jim Kremens
___
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] Dynamic drop shadow

2006-02-17 Thread Jim Kremens
The samples on the following page all work in Flash 7 using a framework I
*was* developing.  A lot of the shadow and light stuff I was doing became
pointless when Flash 8 came out.  If you're interested in the code, let me
know.

http://jimkremens.com/toolkit/

Jim Kremens


On 2/17/06, Andreas Rønning <[EMAIL PROTECTED]> wrote:
>
> > As noted, I am working within another developer's framework, and
> cannot make fundamental design changes at this time.
> I didn't say it can't be done. I said it wasnt the smart thing to do. If
> you work with someone elses framework but can't subclass or supply your
> own prototypes along the road, you got a pretty shit deal in my opinion.
> Funny this comes up now, so soon after we discussed the value of
> properly organizing your depths, spacing them out to make room for
> adjustments and extra content. In my window class, the base clip is
> empty, with the first layer of graphics being drawn on level 10 of that
> clip. This gives me 10 depths to stick whatever frivolous junk i want
> underneath the window.
>
> >The new DropShadowFilter works on the principle I described
>
> Not at all really. Any filtered movieclip in Flash 8 is bitmap cached,
> and is thus rendered by the bitmap renderer, which filters a given
> movieClip based on the contents of its filters array. You don't assign a
> clip to a filter, you assign a filter to a clip. Which goes along the
> same lines of what i described. Since you're not actually filtering
> anything in flash 7, the smart thing to do is draw the dropshadow in the
> same process that draws/rescales your windows.
>
> >You could do it in Flash 7, but it would take a lot more code than
> even you could write in one minute.
>
> It would take a lot more code than i WOULD write in one minute. Don't
> get all fussy with me. First i assumed you were using flash 8 (in which
> the solution is laughably easy) and merely urged you to find your own
> solution. Then, as i realise you're stuck with flash 7, i urge you to
> pursue a solution that's not a hack, but stable, reliable and smart. If
> my boss asks me to add a dropshadow to a framework that is prohibitive
> against a smart solution, i'll tell him it's a frivolous thing to spend
> so much time on, given the limitations of the project. Choose your
> battles. Complex doesn't mean it's smart.
>
> Your real problem stems from the fact that you can't attach the drop
> shadow clip to the clip you want drop shadowed, mostly because you also
> want the clip to be resizable and drawing the drop shadow would be
> dependant on the clip's width and height. Drawing in a clip alters its
> width and height with every lineTo, which means you need to do something
> like store the clip's "real" width and height to some temporary variable
> before updating, based on whatever width it originally had. So say you
> do a different thing, and draw all the drop shadows on a completely
> separate clip on a lower depth, so all your dropshadowed clips are being
> drawn together. The problem then is managing their depths in relation
> not only to the clip they're shadowing, but also of other clips,
> shadowed or unshadowed.
>
> The actionscript solution to the problem as you describe it sounds, in
> my book, a lot like skiing on tarmac. And i tend to be mr can-do.
>
> - Andreas
>
> Philip Smith wrote:
> > As noted, I am working within another developer's framework, and
> > cannot make fundamental design changes at this time. The new
> > DropShadowFilter works on the principle I described, you register a
> > view and bang, full functionality in a couple of lines of code. You
> > could do it in Flash 7, but it would take a lot more code than even
> > you could write in one minute.
> >
> > Philip
> >
> > - Original Message - From: "Andreas Rønning"
> > <[EMAIL PROTECTED]>
> > To: "Flashcoders mailing list" 
> > Sent: Friday, February 17, 2006 1:02 PM
> > Subject: Re: [Flashcoders] Dynamic drop shadow
> >
> >
> >> Nah man. For flash 7 it's not a smart thing to write a dropshadow
> >> class like the one you describe at all.
> >> You'd put the drop shadow functionality in your window class draw
> >> method. The big problem with your
> >> approach is you'd have hell to juggle the depths (because without
> >> overlapping, what's even the point of a dropshadow).
> >> That, guessing you'd want windows to take the highest depth when
> >> given user focus.
> >>
> >> - Andreas
> >>
> >> Philip S

Re: [Flashcoders] UML tool for AS2

2006-02-17 Thread Jim Kremens
"actionscript support straight of the box"

Can it do reverse engineering with Actionscript?

Jim Kremens
___
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] regex needed

2006-02-14 Thread Jim Kremens
"You are working on flex, right?
no other way, as far as I know, to use RegExp but to use it with flex.
so... you must be familiar with addcChild (). if not - check it out on the
Help panel."

Not true.  Joey Lott's and Pavils Jurjans' RegExp class is just AS2 and will
of course work with Flash.

Jim Kremens

On 2/14/06, matti bar zeev <[EMAIL PROTECTED]> wrote:
>
> You are working on flex, right?
> no other way, as far as I know, to use RegExp but to use it with flex.
> so... you must be familiar with addcChild (). if not - check it out on the
> Help panel.
> Weird, I don't get any errors. are you sure the error come from this lines
> of code?
>   -Original Message-
>   From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Flashcoders
> mailing list
>   Sent: Tuesday, February 14, 2006 10:17
>   To: flashcoders@chattyfig.figleaf.com
>   Subject: Re: [Flashcoders] regex needed
>   Importance: Low
>
>
>   matti bar zeev schrieb:
>   > How about this?
>   >
>   > import RegExp;
>   >
>   >var a:String = "äur*?ß123.png";
>   >var goodname:RegExp = new RegExp ("[^a-z0-9\\.]", "gi");
>   >var return_str:String  = a.replace(goodname, "_");
>   >
>   >var output_txt:TextField = new TextField ();
>   >output_txt.text = return_str;
>   >addChild (output_txt)
>   >
>   >
>
>   nope ... same problem: type mismatch!
>
>   btw: what is addChild () ???
>
>   micha
>
>   ___
>   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
>



--
Jim Kremens
___
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] mx.utils.ClassFinder.findClass problem

2006-02-05 Thread Jim Kremens
ClassFinder is basically that, but not using eval.  You're right, it's
the same.  You can just use your own, as I do.  I only mentioned
ClassFinder because it was referenced in the thread.

Jim Kremens

On 2/5/06, Tyler Wright <[EMAIL PROTECTED]> wrote:
> > Then you can use classfinder to instantiate them dynamically.
>
>
> I've never seen an mx.utils.ClassFinder ... is it part of the vs. 2
> component set they shipped with MX'04 ?
>
> All packages and classes are defined on the _global scope.  Vs. 2 componets'
> EventDispatcher, if included in your swf, can be accessed via
> _global.mx.events.EventDispatcher.  Seems funny to have a whole ClassFinder
> when all you need is
>
> var newClass:Function = eval("_global." + classPath);
>
> which is probably what ClassFinder is anyway.  It's like the MM remoting
> componets, a dozen classes to replace the handful of lines of conveniently
> undocumented code.  This has nothing to do with this thread, but here's a
> freebe for anyone wanting to know how to roll their own remoting.
>
> var nc:NetConnection = new NetConnection();
> nc.onStatus = function() { ... };// catch the errors
> nc.onResult = function() { ... };// receive the results
> nc.connect("http://uri.com/gateway.script";);
> if (username != undefined && password != undefined) {
> nc.addHeader("Credentials", false, {userid:username,
> password:password});
> }
> // send command to server
> nc.call("ClassName.methodName", nc, param1, param2);
>
> it's pretty simple by itself without the complexities of all the proxies
> making it simple.
>
> uh, that was a bit of a digression.
>
> Tyler
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>


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


Re: [Flashcoders] mx.utils.ClassFinder.findClass problem

2006-02-03 Thread Jim Kremens
For your classes to be present in the swf, you don't need to import or
instantiate them.  Just type their fully qualified name somewhere:

public function defineDependencies() {

  com.myClassPath.foo;
  com.otherClassPath.bar;

}

Then you can use classfinder to instantiate them dynamically.

Jim Kremens

On 4 Feb 2006 04:35:30 -, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> If the classes are present in the main movie that is "injected" with the 
> classes compiled by flash, any symbols in loaded movies that have a symbol 
> name that matches a class that uses object.register gets the behavior 
> attached when its loaded, I actually found this by accident and its worked 
> out very well.
>
> I don't use shared libraries, I have an lib folder that all my project can 
> access, even in a team of several flash developers we have found having the 
> code available in a src folder works better for us than a swf.
>
> Grant.
>
> - Original Message -
> From: Cedric Muller [EMAIL PROTECTED]
> To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
> Sent: 2/3/06 3:26 AM
> Subject: Re: [Flashcoders] mx.utils.ClassFinder.findClass problem
>
> > grant, how do you make your classes as shared libraries (for example
> > making fx.swf provide the rest of the app with all the available
> > classes for transitions, tweens, ...) ?
> > I always wondered how mtasc would handle such (I don't have time to
> > dig that part...)
> >
> > cedric
> >
> >
> > > Yes, that's true, but then someone without MTASC cannot compile (it
> > > will not work), so if my customer will want sources and want to
> > > compile it, it will be problem :)
> > >
> > > On 3 Feb 2006 06:40:47 -, [EMAIL PROTECTED]
> > >  wrote:
> > >> I do something similar in my arp extensions to force "command"
> > >> classes defined in an xml document to be loaded at runtime.  I use
> > >> the -pack feature of mtasc that forces classes from a package into
> > >> your swf.
> > >>
> > >> so if you wanted force all the classes in com.bluetube.command
> > >> into your swf you would pass
> > >> -pack com\bluetube\command to mtasc.
> > >>
> > >> I hate having to put a dummy constructor or fluff in the code to
> > >> make it work, I prefer the mtasc approach.
> > >>
> > >> Grant.
> > >>
> > >> - Original Message -
> > >> From: Cdric_Muller [EMAIL PROTECTED]
> > >> To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
> > >> Sent: 2/2/06 7:18 AM
> > >> Subject: Re: [Flashcoders] mx.utils.ClassFinder.findClass problem
> > >>
> > >>> but please, remember that this is a Flash Hack with a lot of whack
> > >>> and crack :)
> > >>> you're welcome!
> > >>> cedric
> > >>>
> > >>>> This works Cedric, thank you very much :)
> > >>>> All of you
> > >>>>
> > >>>> On 2/2/06, Cédric Muller  wrote:
> > >>>>> in your .as file (main class, or classesManger,...) you can simply
> > >>>>> put references to the classes you will/should use ...
> > >>>>>
> > >>>>> I did it once the following way:
> > >>>>>
> > >>>>> /**
> > >>>>> *   setPackagesToImport
> > >>>>> *   fake method, never gets called. just here for 'import' +
> > >>>>> reference
> > >>>>> purposes
> > >>>>> *
> > >>>>> */
> > >>>>>
> > >>>>> private function setPackagesToImport ():Void {
> > >>>>> sk.sowhat.linuxPlayer. ScreenEffects;
> > >>>>> sk.sowhat.linuxPlayer.ScreenVideo;
> > >>>>> sk.sowhat.linuxPlayer.Screen;
> > >>>>> sk.sowhat.linuxPlayer.HelperFunctions;
> > >>>>> // and so on ...
> > >>>>> }
> > >>>>>
> > >>>>> with such, you assure yourself that Flash will include the
> > >>>>> classes . not very official, nor clean, but really worked
> > >>>>> for me
> > >>>>> (as I had to reference the classes paths through xml)
> > >>>>> cedric
> > >>>>>
>

Re: [Flashcoders] Problems with Javascript Integration Kit

2006-02-02 Thread Jim Kremens
Thanks!

Jim Kremens

On 2/2/06, david kraftsow <[EMAIL PROTECTED]> wrote:
>
> I was yeah able to get it working with the latest SVN source [in both ie
> and ff]. But it didnt work as well as I wanted it to. I needed a way to
> have flash constantly retrieve a javascript variable. Unfortunately I
> could only seem to call a js function from flash maybe two or three
> times a second so I gave up.
>
> I'll post an example for you later today.
>
> DK
>
> Jim Kremens wrote:
>
> >Hi David,
> >
> >Were you able to get it working with the latest source from SVN?
> >
> >I can't see what I might be doing wrong in the setup, so I'm assuming
> there
> >are some bugs.  But if you've got it working, that would be great to
> know.
> >And maybe you could post (or send) an example?
> >
> >Thanks,
> >
> >Jim Kremens
> >
> >On 2/2/06, david kraftsow <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Rajat -
> >>Are you testing with both firefox and ie open at the same time, by
> >>chance? Because it will only work in one but not the other depending on
> >>which one opened the local connection first. This happened to me as well
> >>and I couldn't figure out what was going on until I tested it with ie
> >>open by itself. -DK
> >>
> >>Rajat Paharia wrote:
> >>
> >>
> >>
> >>>Hi Jim - I'm encountering similar problems in IE (not in Firefox) with
> >>>an older version of the kit, but haven't been able to figure out how
> >>>to fix it.
> >>>
> >>>But you're not alone :( - rajat
> >>>
> >>>On 2/1/06, Jim Kremens <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Hi all!
> >>>>
> >>>>I'm having trouble with the latest version of the Flash Javascript
> >>>>Integration Kit (from SVN source).  I've got 2 examples that show the
> >>>>problems I'm having:
> >>>>http://www.jimkremens.com/js_kit_issues/example_01.html
> >>>>http://www.jimkremens.com/js_kit_issues/example_02.html
> >>>>
> >>>>View source to compare the two...
> >>>>
> >>>>Both use the same swf.
> >>>>
> >>>>1. Example 01 embeds the swf using an ordinary object tag.
> >>>>
> >>>>   a. fscommand works.
> >>>>
> >>>>2. Example 02 embeds the swf using FlashTag.
> >>>>
> >>>>   a. fscommand doesn't work.  (the _DoFSCommand function is commented
> >>>>out.  So of course it doesn't work.  But if I don't comment it out,
> the
> >>>>js-flash communication won't work.  Catch 22...)
> >>>>   b. you can call a method in the swf, but only once.  Subsequent
> >>>>
> >>>>
> >>calls
> >>
> >>
> >>>>will fail.
> >>>>   c. It also throws an error that I can't figure out (if you enable
> >>>>
> >>>>
> >>your
> >>
> >>
> >>>>debugger in IE, you'll see)
> >>>>
> >>>>Does anyone know of a version that does the basic stuff the kit does,
> >>>>
> >>>>
> >>but
> >>
> >>
> >>>>doesn't break fscommand?
> >>>>
> >>>>Alternatively, if anyone can point out a stupid mistake I'm making,
> that
> >>>>would be great.
> >>>>
> >>>>Thanks,
> >>>>
> >>>>Jim Kremens
> >>>>___
> >>>>Flashcoders mailing list
> >>>>Flashcoders@chattyfig.figleaf.com
> >>>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>--
> >>>Rajat Paharia
> >>>[EMAIL PROTECTED]
> >>>http://www.bunchball.com
> >>>http://www.rootburn.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
> >>
> >>
> >>
> >
> >
> >
> >--
> >Jim Kremens
> >___
> >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
>



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


Re: [Flashcoders] Problems with Javascript Integration Kit

2006-02-02 Thread Jim Kremens
Hi David,

Were you able to get it working with the latest source from SVN?

I can't see what I might be doing wrong in the setup, so I'm assuming there
are some bugs.  But if you've got it working, that would be great to know.
And maybe you could post (or send) an example?

Thanks,

Jim Kremens

On 2/2/06, david kraftsow <[EMAIL PROTECTED]> wrote:
>
> Rajat -
> Are you testing with both firefox and ie open at the same time, by
> chance? Because it will only work in one but not the other depending on
> which one opened the local connection first. This happened to me as well
> and I couldn't figure out what was going on until I tested it with ie
> open by itself. -DK
>
> Rajat Paharia wrote:
>
> >Hi Jim - I'm encountering similar problems in IE (not in Firefox) with
> >an older version of the kit, but haven't been able to figure out how
> >to fix it.
> >
> >But you're not alone :( - rajat
> >
> >On 2/1/06, Jim Kremens <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Hi all!
> >>
> >>I'm having trouble with the latest version of the Flash Javascript
> >>Integration Kit (from SVN source).  I've got 2 examples that show the
> >>problems I'm having:
> >>http://www.jimkremens.com/js_kit_issues/example_01.html
> >>http://www.jimkremens.com/js_kit_issues/example_02.html
> >>
> >>View source to compare the two...
> >>
> >>Both use the same swf.
> >>
> >>1. Example 01 embeds the swf using an ordinary object tag.
> >>
> >>a. fscommand works.
> >>
> >>2. Example 02 embeds the swf using FlashTag.
> >>
> >>a. fscommand doesn't work.  (the _DoFSCommand function is commented
> >>out.  So of course it doesn't work.  But if I don't comment it out, the
> >>js-flash communication won't work.  Catch 22...)
> >>b. you can call a method in the swf, but only once.  Subsequent
> calls
> >>will fail.
> >>c. It also throws an error that I can't figure out (if you enable
> your
> >>debugger in IE, you'll see)
> >>
> >>Does anyone know of a version that does the basic stuff the kit does,
> but
> >>doesn't break fscommand?
> >>
> >>Alternatively, if anyone can point out a stupid mistake I'm making, that
> >>would be great.
> >>
> >>Thanks,
> >>
> >>Jim Kremens
> >>___
> >>Flashcoders mailing list
> >>Flashcoders@chattyfig.figleaf.com
> >>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> >>
> >>
> >
> >
> >--
> >Rajat Paharia
> >[EMAIL PROTECTED]
> >http://www.bunchball.com
> >http://www.rootburn.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
>



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


Re: [Flashcoders] Problems with Javascript Integration Kit

2006-02-02 Thread Jim Kremens
Thanks for the reply!

I actually reached out to Mike Chambers directly... waiting to hear back.

Is the kit actually supported by Macromedia?  Just wondering if I'm on my
own here or if I can expect some advice.

Jim Kremens



On 2/2/06, Rajat Paharia <[EMAIL PROTECTED]> wrote:
>
> Hi Jim - I'm encountering similar problems in IE (not in Firefox) with
> an older version of the kit, but haven't been able to figure out how
> to fix it.
>
> But you're not alone :( - rajat
>
> On 2/1/06, Jim Kremens <[EMAIL PROTECTED]> wrote:
> > Hi all!
> >
> > I'm having trouble with the latest version of the Flash Javascript
> > Integration Kit (from SVN source).  I've got 2 examples that show the
> > problems I'm having:
> > http://www.jimkremens.com/js_kit_issues/example_01.html
> > http://www.jimkremens.com/js_kit_issues/example_02.html
> >
> > View source to compare the two...
> >
> > Both use the same swf.
> >
> > 1. Example 01 embeds the swf using an ordinary object tag.
> >
> > a. fscommand works.
> >
> > 2. Example 02 embeds the swf using FlashTag.
> >
> > a. fscommand doesn't work.  (the _DoFSCommand function is commented
> > out.  So of course it doesn't work.  But if I don't comment it out, the
> > js-flash communication won't work.  Catch 22...)
> > b. you can call a method in the swf, but only once.  Subsequent
> calls
> > will fail.
> > c. It also throws an error that I can't figure out (if you enable
> your
> > debugger in IE, you'll see)
> >
> > Does anyone know of a version that does the basic stuff the kit does,
> but
> > doesn't break fscommand?
> >
> > Alternatively, if anyone can point out a stupid mistake I'm making, that
> > would be great.
> >
> > Thanks,
> >
> > Jim Kremens
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
> --
> Rajat Paharia
> [EMAIL PROTECTED]
> http://www.bunchball.com
> http://www.rootburn.com
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



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


[Flashcoders] Problems with Javascript Integration Kit

2006-02-01 Thread Jim Kremens
Hi all!

I'm having trouble with the latest version of the Flash Javascript
Integration Kit (from SVN source).  I've got 2 examples that show the
problems I'm having:
http://www.jimkremens.com/js_kit_issues/example_01.html
http://www.jimkremens.com/js_kit_issues/example_02.html

View source to compare the two...

Both use the same swf.

1. Example 01 embeds the swf using an ordinary object tag.

a. fscommand works.

2. Example 02 embeds the swf using FlashTag.

a. fscommand doesn't work.  (the _DoFSCommand function is commented
out.  So of course it doesn't work.  But if I don't comment it out, the
js-flash communication won't work.  Catch 22...)
b. you can call a method in the swf, but only once.  Subsequent calls
will fail.
c. It also throws an error that I can't figure out (if you enable your
debugger in IE, you'll see)

Does anyone know of a version that does the basic stuff the kit does, but
doesn't break fscommand?

Alternatively, if anyone can point out a stupid mistake I'm making, that
would be great.

Thanks,

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


[Flashcoders] MM Javascript integration kit

2006-01-30 Thread Jim Kremens
Hi again,

Well, I managed to get the latest source from SVN, but I can't make it work
at all.  Frustrating, as the version I downloaded from Macromedia was pretty
painless to implement.  However, I need the new version, as it works with
fscommand.

Can anyone provide a working example or a link to a tutorial that uses the
new source?

Thanks!

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


[Flashcoders] re: Javascript Integration kit - attention Mike Chambers

2006-01-30 Thread Jim Kremens
In a thread a few days ago, Mike Chambers said, regarding the MM
JsIntegration kit:

"Did you pull the latest source from subversion?"

Is the source on the Macromedia site not the latest?

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


[Flashcoders] fscommand troubles

2006-01-30 Thread Jim Kremens
Hi all,

I'm having trouble with something simple fscommands in an html page.

If I publish my swf with the setting 'Flash with FSCommand' and I include
the following code in the first (and only) frame of my swf:

fscommand("yo");

and the js function that catches the fscommands looks like this:

function testFsCommand_DoFSCommand(command, args) {
alert(command);
}

and my movie id=testFsCommand

I should see an alert that says "yo", right?

Nothing happens...  Are there any gotchas that I don't know about?

Very weird...  If anyone can shed some light on this, that would be great

Thanks,


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


[Flashcoders] Javascript Integration kit causes page flicker

2006-01-21 Thread Jim Kremens
Hi all,

I'm using the JS integration kit in a project that requires Flash 7.

It's working, but in certain cases, it causes the page to flicker.  The page
doesn't refresh, which is weird, it just flickers...

Here's what I'm doing:

//call a js function from Flash
proxy.call('play');

//here's the js function I'm calling.  When it's called, I want to notify
Flash that it has been called so I can take the next step.
function play() {
callFlash("onPlay", true);
}

//and here's the JS function I use to call back to Flash:
function callFlash() {
   flashProxy.call.apply(flashProxy, arguments);
}

I'm concerned that, because the integration kit uses local connection,
processes like this aren't really possible.  Meaning, maybe I can't call a
function and *immediately* call back into Flash.  That would be a bummer.

If anyone has any ideas on this, I'd love to hear them.  I'm about to go
back to watched variables on the root timeline.  Which would  be sad, as
it's nice to be able to pass typed objects back and forth in Flash 7...

Thanks,

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


Re: [Flashcoders] /**** Fuse Question - WTF? ****/

2006-01-12 Thread Jim Kremens
"I would email Moses about that"

and maybe skip the WTF part... :-)

Jim Kremens


On 1/12/06, Gerry Creighton <[EMAIL PROTECTED]> wrote:
>
> I would email Moses about that.
>
> On Jan 12, 2006, at 7:29 PM, Ryan Potter wrote:
>
> > Is there a way to step back and forth through animations in Fuse?
> >
> >
> >
> > I created a simple animation (code below) to test this. I am new to
> > Fuse.
> >
> >
> >
> >
> >
> > Problem:
> >
> >
> >
> > I am trying to make it so that I can click a button (the two lower
> > clips) and launch an animation action in fuse.
> >
> >
> >
> > So far I can't get it to work properly.  When the clip moves to the
> > right, it automatically moves back.  It shouldn't do that.
> >
> >
> >
> > It should move to the right by clicking the green square, and move
> > back
> > by clicking the blue one.  It doesn't work.
> >
> >
> >
> >
> >
> > First, if you look at the trace statements, both of the x
> > parameters are
> > showing up as 110.  The second x prop should be 10.  Weird.
> >
> >
> >
> > The second problem is that I can't get the fuse action to stop after
> > running 1 action.
> >
> >
> >
> > I am using version 1.0 of Fuse.
> >
> >
> >
> > Please help I'm stumped.
> >
> >
> >
> > /*
> >
> > Trow the code below into a movie and run it.
> >
> > */
> >
> >
> >
> > stop();
> >
> >
> >
> > import com.mosesSupposes.fuse.Fuse;
> >
> >
> >
> > init();
> >
> >
> >
> > function init(){
> >
> > drawFuse();
> >
> > buildClips();
> >
> > }
> >
> >
> >
> > /*
> >
> > draw three clips
> >
> > */
> >
> >
> >
> > function buildClips(){
> >
> > var clip1 = drawClip(this, "clip",
> > this.getNextHighestDepth(), 50, 50, 0xff);
> >
> > clip1._x = 10;
> >
> > clip1._y = 10;
> >
> >
> >
> >
> >
> > var clip2 = drawClip(this, "clip",
> > this.getNextHighestDepth(), 50, 50, 0x00ff00);
> >
> > clip2._x = 10;
> >
> > clip2._y = 70;
> >
> > clip2.onPress = function(){ this._parent.amimateItem(0);};
> >
> >
> >
> >
> >
> > var clip3 = drawClip(this, "clip",
> > this.getNextHighestDepth(), 50, 50, 0xff);
> >
> > clip3._x = 10;
> >
> > clip3._y = 130;
> >
> > clip3.onPress = function(){ this._parent.amimateItem(1);};
> >
> >
> >
> > var moveRight = {target:clip1, x:clip1._x+100,
> > ease:"easeInOutExpo", seconds:1, trigger:false};
> >
> > var moveLeft = {target:clip1, x:clip1._x,
> > ease:"easeInOutExpo", seconds:1, trigger:false};
> >
> >
> >
> > /*
> >
> > do a little tracing to see what props are getting set
> >
> > */
> >
> > for(prop in moveRight){
> >
> > trace(prop+" <::> "+moveRight[prop]);
> >
> > }
> >
> > trace("***");
> >
> > for(prop in moveLeft){
> >
> > trace(prop+" <::> "+moveRight[prop]);
> >
> > }
> >
> >
> >
> > /*
> >
> > add the actions to fuse
> >
> > */
> >
> > addAnimation(moveRight);
> >
> > addAnimation(moveLeft);
> >
> >
> >
> > }
> >
> >
> >
> > function drawFuse(){
> >
> > f = new Fuse();
> >
> > }
> >
> >
> >
> > function addAnimation(obj){
> >
> > f.push(obj);
> >
> > }
> >
> >
> >
> > function amimateItem(id){
> >
> > trace("animate item called");
> >
> > f.skipTo(id);
> >
> > //  f.start();
> >
> > }
> >
> >
> >
> >
> >
> >
> >
> > function drawClip(target, clip, depth, w, h, color){
> >
> > var c = target.createEmptyMovieClip(clip+depth, depth);
> >
> > c.beginFill(color, 100);
> >
> > c.moveTo(0,0);
> >
> > c.lineTo(w,0);
> >
> > c.lineTo(w,h);
> >
> > c.lineTo(0,h);
> >
> > c.lineTo(0,0);
> >
> > c.endFill();
> >
> >
> >
> > return c;
> >
> > }
> >
> >
> >
> >
> >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



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


Re: [Flashcoders] update to Flash - JavaScript API since FP5?

2006-01-10 Thread Jim Kremens
I know you know about ExternalInterface, but the addCallback method
makes this method of communication obsolete.

//name of method, scope where method exists, actual method to be called
ExternalInterface.addCallback("sayHiToFlash", this, callBackMethod);

Once you've added the callback, javascript has access to it.  So, from
javascript, you can set variables, call methods - whatever - in any
class or timeline you choose.

I don't know if TCallLabel still exists (I hope not), but even if it
does, this is much better...

Jim Kremens

On 1/9/06, Mike Lyda <[EMAIL PROTECTED]> wrote:
>
> I'm trying to confirm that the API used to communicate with the Flash Player
> (via JavaScript for example) hasn't changed since this document was created:
> http://www.macromedia.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html
>
> I know about the Flash Integration kit and the External Interface... I'm 
> tasked
> with finding out specifically if things such as TCallLabel have changed at all
> from Flash Player 5 through 8.  According to that doc nothing has changed, and
> I can't seem to find another doc that replaces it.
>
>
>
> __
> Yahoo! DSL – Something to write home about.
> Just $16.99/mo. or less.
> dsl.yahoo.com
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>


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


Re: [Flashcoders] adding whitespace back into xml

2006-01-09 Thread Jim Kremens
I came across this on the web a while back:

 //original author http://www.wolfenhex.com
 public static function format(node, tab):String {
  if (tab == undefined) tab = "";
  if(node.nodeName == null) return format(node.firstChild, tab);
  var s:String = "<" + node.nodeName;
  for(var a:String in node.attributes) s += " " + a + "=\"" +
node.attributes[a]+ "\"";
  if(!node.hasChildNodes()) {
   s += " />";
   return tab + s + newline;
  }
  s += ">";
  if(node.firstChild.nodeType == 3) s += node.firstChild.nodeValue;
  else {
   s += newline;
   for(var i:Number = 0; i < node.childNodes.length; i++) s += format(
node.childNodes[i], tab + "\t");
   s += tab;
  }
  s += "";
  return tab + s + newline;
 }

Just throw an xml node at it and see what happens.

Jim Kremens


On 1/9/06, Jobe Makar <[EMAIL PROTECTED]> wrote:
>
> Hi Sander,
>
> Thanks, but modifying the source XML is not an option in this case. I am
> just looking for something that will take the XML and convert it to a
> string
> with whitespace. I'll probably just need to write something to do it.
>
> Jobe Makar
> http://www.electrotank.com
> http://www.electro-server.com
> phone: 919-609-0408
> mobile: 919-610-5754
> fax: 919-341-8104
> - Original Message -
> From: "Sander" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" 
> Sent: Monday, January 09, 2006 2:14 PM
> Subject: Re: [Flashcoders] adding whitespace back into xml
>
>
> > Why don't you just include html tags in your XML, so it becomes  XHTML?
> > You just take a couple of nodes and use them to set the  htmlText
> property
> > of a textfield?
> >
> > 
> > 
> > 
> > 
> > Bullet 1
> > Bullet 2
> > 
> > 
> > 
> > Some other paragraph
> > 
> > 
> >
> > var myText.htmlText = xmlObject.firstChild.childNodes.toString();
> > _______
> > 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
>



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


Re: [Flashcoders] Flash equivalent of a Java class loader

2006-01-05 Thread Jim Kremens
This is a modified version of a class made by Ted Patrick (MCE).  Use make()
to create an empty movieclip and bind it with a class.  Use attach to attach
one from the library and do the same.

Mind the linebreaks...

class MCUtils {

 private static var COUNT:Number = 0;
 private static var ext:String = "";

 public static function make(scope:MovieClip, name:String, depth:Object,
className:Object, args:Array, initObj:Object) {
  var clip:MovieClip = MovieClip.prototype.createEmptyMovieClip.apply(scope,
[name != null ? name + ext : COUNT++ + ext, depth != null ? Number(depth) :
scope.getNextHighestDepth()]);
  if(initObj) for (var p:String in initObj) clip[p] = initObj[p];
  if(className) {
   clip.__proto__ = className["prototype"];
   className.apply(clip, args ? args : []);
  }
  return clip;
 }
 public static function attach(scope:Object, link:String, name:String,
depth:Object, className:Object, args:Array, initObj:Object) {
  var clip:MovieClip = MovieClip.prototype.attachMovie.apply(scope, [link,
name != null ? name + ext : COUNT++ + ext, depth != null ? Number(depth) :
scope.getNextHighestDepth(), initObj]);
  if(className) {
   clip.__proto__ = className["prototype"];
   className.apply(clip, args ? args : []);
  }
  return clip;
 }
}

Jim Kremens


On 1/5/06, August Gresens <[EMAIL PROTECTED]> wrote:
>
> Another related question -  now that we can instance a class specified in
> an
> XML document, how can
> we dynamically associate this class with a MovieClip instance? It is my
> understaning that Object.Register
> class associates a class with a movieclip symbol (not an instance).
>
> Thanks,
>
> August
>
> On 1/4/06, August Gresens <[EMAIL PROTECTED]> wrote:
> >
> > ClassFactory - just what we were looking for. Thanks, August
> >
> > On 1/4/06, Jim Kremens <[EMAIL PROTECTED]> wrote:
> > >
> > > Or this:
> > >
> > > class ClassFactory {
> > >
> > > public static function getClass(name:String, args:Object):Object {
> > >return new Function(eval(name))(args ? args : []);
> > > }
> > > }
> > >
> > > /* USAGE
> > > * //can be any referenced class
> > > * var myClass = ClassFactory.getClass("
> > > org.flashcodersny.style.GradientFill",
> > > args);
> > > */
> > >
> > > As long as the class you're trying to instantiate exists in the
> _global
> > > namespace, the above will work.  To make sure it exists, just say its
> > > name:
> > >
> > > class DeclareClassNames {
> > >
> > >   function DeclareClassNames() {
> > >  org.myClass1;
> > >  org.myClass2;
> > >  //and so on...
> > >   }
> > > }
> > >
> > > There have been a few threads on this subject recently...
> > >
> > > Jim Kremens
> > >
> > >
> > >
> > > On 1/4/06, Johannes Nel < [EMAIL PROTECTED]> wrote:
> > > >
> > > > no it needs to be a ref to the constructer function.
> > > > this can be solved however with this:
> > > > Object.RegisterClass("myClipSymbolName",
> > > > _global["com"]["blackhammer"]["test"]["TestClass"]);
> > > >
> > > >
> > > > On 1/4/06, August Gresens <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Hello
> > > > >
> > > > > We're new to flash, migrating over from Director. We're trying to
> > > > > implement
> > > > > a Java style class loader in Flash, but we are having some
> > > difficulty
> > > > > doing
> > > > > this.
> > > > >
> > > > > This is what we  are trying to do:
> > > > >
> > > > > 1. Create an XML document with elements specifying the name of the
> > > > class,
> > > > > a
> > > > > movieclip instance and and some initialization parameters.
> > > > >
> > > > > for example:
> > > > >
> > > > >  > > name="testClassInstance1"
> > > > > clipName="myTestClip">
> > > > > 
> > > > > 
> > > > >
> > > > > 2. On startup, the Flash movie parses the XML file, instancing a
> > > class
> > > > > corresponding to the string name specifiied in the XML
> (assoc

Re: [Flashcoders] Flash equivalent of a Java class loader

2006-01-04 Thread Jim Kremens
Or this:

class ClassFactory {

 public static function getClass(name:String, args:Object):Object {
   return new Function(eval(name))(args ? args : []);
 }
}

/* USAGE
 * //can be any referenced class
 * var myClass = ClassFactory.getClass("org.flashcodersny.style.GradientFill",
args);
*/

As long as the class you're trying to instantiate exists in the _global
namespace, the above will work.  To make sure it exists, just say its name:

class DeclareClassNames {

  function DeclareClassNames() {
 org.myClass1;
 org.myClass2;
 //and so on...
  }
}

There have been a few threads on this subject recently...

Jim Kremens



On 1/4/06, Johannes Nel <[EMAIL PROTECTED]> wrote:
>
> no it needs to be a ref to the constructer function.
> this can be solved however with this:
> Object.RegisterClass("myClipSymbolName",
> _global["com"]["blackhammer"]["test"]["TestClass"]);
>
>
> On 1/4/06, August Gresens <[EMAIL PROTECTED]> wrote:
> >
> > Hello
> >
> > We're new to flash, migrating over from Director. We're trying to
> > implement
> > a Java style class loader in Flash, but we are having some difficulty
> > doing
> > this.
> >
> > This is what we  are trying to do:
> >
> > 1. Create an XML document with elements specifying the name of the
> class,
> > a
> > movieclip instance and and some initialization parameters.
> >
> > for example:
> >
> >  > clipName="myTestClip">
> > 
> > 
> >
> > 2. On startup, the Flash movie parses the XML file, instancing a class
> > corresponding to the string name specifiied in the XML (associating it
> > with
> > the specified MovieClip), and populates the newly created object with
> the
> > parameter values specified in the XML.
> >
> > When we attempt to do this using RegisterClass, however, it appears as
> > though the class name cannot be passed in as a string.
> >
> > This works:
> >
> > Object.RegisterClass("myClipSymbolName", com.blackhammer.test.TestClass
> );
> >
> > This doesn't:
> >
> > Object.RegisterClass("myClipSymbolName", "com.blackhammer.test.TestClass
> > ");
> >
> > Any clues?
> >
> > Perhaps there is a more elegant way of doing this anyway, since
> > RegisterClass seems to associate all instances of myTestClip (the
> symbol)
> > with the specified class. What we'd like to do is associate an instance
> of
> > a
> > class with an instance of a movieclip.
> >
> > Thanks,
> >
> > August
> >
> > --
> > -
> > 
> >
> > August Gresens
> > Technical Director
> > Black Hammer Productions, NYC
> > [EMAIL PROTECTED]
> >
> > -
> > 
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> j:pn
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



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


Re: [Flashcoders] > Object repository and instancing a object

2006-01-02 Thread Jim Kremens
You guys know that you can instantiate classes dynamically (sort of) in
Flash, right?

class ClassFactory {

 public static function getClass(name:String, args:Object):Object {
   return new Function(eval(name))(args ? args : []);
 }
}

/* USAGE
 * //can be any referenced class
 * var myClass = ClassFactory.getClass("org.flashcodersny.style.GradientFill",
args);
*/

As long as the class you're trying to instantiate exists in the _global
namespace, the above will work.  To make sure it exists, just say its name:

class DeclareClassNames {

  function DeclareClassNames() {
 org.myClass1;
 org.myClass2;
 //and so on...
  }
}

There have been a few threads on this subject recently...

Jim Kremens



On 1/2/06, Weyert de Boer <[EMAIL PROTECTED]> wrote:
>
> Hello Alan,
> >
> > You initialize a TileFactory; the TileFactory loads this XML; then if
> > I call TileFactory.getTile("uniqueName"), it scans the XML for the
> > matching  entry and draws the tile properties from that. Build
> > and assist values for the tile, and return it, and you're all set --
> > without having to worry about instantiating classes from a string.
> Yes, this sounds like a better idea. Thanks. I have to admit that the
> current code is one big hack.
> >
> > Coming from Java, I was used to having a lot more freedom to
> > instantiate classes dynamically, with Class.forName, but Flash is more
> > friendly to other approches.
> Same here ;=)
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



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


Re: [Flashcoders] Re: calling a static method on dynamically namedclass?

2005-12-30 Thread Jim Kremens
"//set the name of the class to call the create() method on
var classToCall = "MyClass";
_global[classToCall].create();

//change the name of the class to call create() on
classToCall = "MyOtherClass";
_global[classToCall].create();

again
classToCall = "AnotherClass";
_global[classToCall].create();"

I'm not currently on a machine where I can test, but that should work
as long as you
declare the classes somewhere first.  I sometimes have a class that I
use to do just that:

class Dependencies {

  public function Dependencies() {
  //list fully declared class names here
  com.class1;
  com.class2;
  com.class3;
  }
}

var d: Dependencies = new Dependencies();
//even better to make it a singleton

As long as you've listed the fully declared class names somewhere in
your compiled swf, Flash will be able to provide dynamic access to
them.  If you don't list them, it will not allow you to instantiate
them out of thin air.

So, once you've done the above,

classToCall = class1;
_global[classToCall].create();

should work just fine.

Jim Kremens

On 12/30/05, Rich Rodecker <[EMAIL PROTECTED]> wrote:
> yeah, that works, but you are calling the static create() method through the
> name of the class itself.  Say I have a number of classes (MyClass1,
> MyOtherClass, AnotherClass) and I be able to alter which class to call the
> create method on.  I'm thinking there's got to be a way to do something
> like:
>
> //set the name of the class to call the create() method on
> var classToCall = "MyClass";
> _global[classToCall].create();
>
> //change the name of the class to call create() on
> classToCall = "MyOtherClass";
> _global[classToCall].create();
>
> again
> classToCall = "AnotherClass";
> _global[classToCall].create();
>
>
>
>
> On 12/29/05, JesterXL <[EMAIL PROTECTED]> wrote:
> >
> > Hrm... how about:
> >
> > class com.packageName.MyClass
> > {
> > public static function create():MyClass
> > {
> > var inst:MyClass = new MyClass();
> > return inst;
> > }
> >
> > public function toString():String
> > {
> > return "[MyClass]";
> > }
> > }
> >
> > import com.packageName.MyClass;
> > trace(MyClass.create());
> >
> >
> > - Original Message -
> > From: "Rich Rodecker" <[EMAIL PROTECTED]>
> > To: "Flashcoders mailing list" 
> > Sent: Thursday, December 29, 2005 11:35 PM
> > Subject: [Flashcoders] Re: calling a static method on dynamically
> > namedclass?
> >
> >
> > hmm i tried storing a reference to the class in a variable, like
> >
> > var myClass = com.packageName.MyClass
> > >
> > > myClass.create()
> >
> >
> >
> > and i got this message:
> >
> > Static members can only be accessed directly through classes
> >
> >
> > there's gotta be a way to pull this off.
> >
> >
> >
> >
> >
> >
> > On 12/29/05, Rich Rodecker <[EMAIL PROTECTED]> wrote:
> > >
> > > I know you can instantiate objects by doing:
> > >
> > > var myObj = new _global[className]();
> > > var className = "TestClass";
> > >
> > > but is it possible to call a static method of a class in a similar way?
> > > Im trying these two ways, and its not working for me:
> > >
> > > _global[iconName].create()
> > > _global[iconName]().create()
> > >
> > >
> > > if I try and do a trace on the class like trace( _global[iconName]) i
> > get
> > > undefined.  The icon classes are subclasses of movieclip so that might
> > > make
> > > a difference.
> > >
> > ___
> > 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
>


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


Re: [Flashcoders] Faster code?

2005-12-23 Thread Jim Kremens
Also, As2API works great on Windows.

Jim Kremens

On 12/23/05, Mark Ribau <[EMAIL PROTECTED]> wrote:
> I've been very pleased using Eclipse, Doxygen, Eclox, and graphviz all
> together to both code and generate my documentation (using javadoc
> styled comments).  The documentation generated even shows hierarchical
> UML. :-D  I believe these MAY be cross platform, as I'm pretty sure
> they're all written in java?
>
> eclipse:
> http://www.eclipse.org/
>
> eclipse actionscript plugin:
> http://www.eclipse-plugins.info/eclipse/plugin_details.jsp?id=867
>
> eclox, doxygen, graphvix setup for eclipse:
> http://www.statik1.com/mt-weblog/archives/92.html
>
> It's possible, I'm sure, to use doxygen and such without eclipse, but I
> don't know how.
>
> JesterXL wrote:
>
> >ASDoc was not a Mac product, but windows.  However, asdocs.com is down, and
> >I no longer have a copy on my comp, so not sure bro.
> >
> >- Original Message -
> >From: "Merrill, Jason" <[EMAIL PROTECTED]>
> >To: "Flashcoders mailing list" 
> >Sent: Friday, December 23, 2005 12:15 PM
> >Subject: RE: [Flashcoders] Faster code?
> >
> >
> >Ah - I guess it is.  Says that WAY down the web page - not in the top
> >where it says, "download".  What's the best one for Windows?
> >
> >
>
>
> --
> Mark Ribau
> Lead Windows Developer | My Tech Blog
> <http://www.redbugtech.com/blogs/mark.php>
> Redbug Technologies, Inc. <http://www.redbugtech.com> - www.redbugtech.com
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] generating documentation

2005-12-20 Thread Jim Kremens
AS2API (via Ant) and Doxygen.

Jim Kremens


On 12/20/05, Johan Lopes <[EMAIL PROTECTED]> wrote:
>
> I've used Natural Docs too but I highly recommend Doxygen.
>
> I've used it on 3 commercial projects with great success.
>
> Although it doesn't officially support AS2, it works!
>
> Unlike other packages, it also generates UML collaboration diagrams
> with all the trimmings, straight from your classes.
>
> I've put together a tutorial on how to use it with AS2 and Eclipse here:
>
> http://www.statik1.com/mt-weblog/archives/92.html.
>
> If you decide to use it too and need any help to get the best out of
> it, just give me a shout. I've got a "doxyfile" that can easily output
> everything you'd ever wanted from your classes/packages to the UML
> diagrams.
>
> HTH,
>
> /Johan
>
> On 12/20/05, Brooks Andrus <[EMAIL PROTECTED]> wrote:
> > I've used Natural Docs for ActionScript documentation in the past
> >
> > http://naturaldocs.org/
> >
> > Brooks
> > ___
> > 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] Flash 8 IDE crashes

2005-12-13 Thread Jim Kremens
I've observed the same with the 8 IDE.  I hesitated to say anything, as it
varies from one machine to another.  It rarely crashes on my laptop, but
hangs ALL the time on my machine at work.

It's annoying that you can't kill the process...

Jim Kremens


On 12/13/05, John Giotta <[EMAIL PROTECTED]> wrote:
>
> I can't say that I have, but I get what you describe from allot of
> applications not just Flash 8. :-p
> ___
> 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] Success Stories with Flash Friendly CVS Systems?

2005-12-12 Thread Jim Kremens
If you develop Flash in Eclipse, Subclipse (SVN plugin) is excellent.

Jim Kremens

On 12/12/05, Karthik <[EMAIL PROTECTED]> wrote:
> While I personally just use CVS, according to the docs VSS is pretty
> much the only one that integrates with the project panel in Flash..
>
> -K
>
> On 13/12/05, Mike Boutin <[EMAIL PROTECTED]> wrote:
> > Yes i agree, Subversion seems to do the trick for me.
> ___
> 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] External text from XML file including superscriptanditalic

2005-11-15 Thread Jim Kremens
This has worked for me in the past as well. Basically, the rule is that if
you can actually *see* the character in your xml file, and you've set things
up correctly, Flash will render the character.
 However, I have a project coming up where we'll need to render special
characters from the actual Unicode sequences. (So the files will not have
human-readable characters, just Unicode for special chars). Has anyone had
any luck making that work?
 Jim Kremens

 On 11/15/05, Keith Reinfeld <[EMAIL PROTECTED]> wrote:
>
> Paul,
>
> Looks like the "TM" immediately following "ProductName" didn't survive the
> e-mail process.
>
> I also wanted to mention that, of course, your textfield needs to be set
> to
> html = true and you must assign the nodeValue from the XML document to its
> htmlText property.
>
> -Keith
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Keith
> Reinfeld
> Sent: Tuesday, November 15, 2005 1:12 PM
> To: 'Flashcoders mailing list'
> Subject: RE: [Flashcoders] External text from XML file including
> superscriptanditalic
>
> Paul,
>
> In your XML document:
>
> (Watch the wrap.)
>
> 
>
> You can enter the "TM" directly into the XML document by holding down Alt
> and typing 0153 on the numberpad.
>
> HTH
>
> -Keith
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Paul
> Steven
> Sent: Tuesday, November 15, 2005 11:01 AM
> To: Flashcoders mailing list
> Subject: [Flashcoders] External text from XML file including superscript
> anditalic
>
> I have a flash page that includes several sections of text that are read
> in
> from an XML file.
>
> I have worked out how to do this assuming all the text formatting is one
> style. However I would like some of the text to be in italic and it to
> include the "TM" as superscript.
>
> Ideally I could just write the text in the xml file as I want it to appear
> on screen in the flash movie. Can anyone advise me if this is possible and
> how. Or if it isnt possible then what is my best option.
>
> Basically the client will be updating the content of the site by replacing
> the xml files and the text needs to have italics and superscript. I do
> hope
> this is possible:)
>
> Many thanks
>
> Paul
>
> ___
> 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] Eclipse/FDT/Subclipse weirdness

2005-11-15 Thread Jim Kremens
Thanks all for the advice.
 Of course I tried launching with -clean and team --> cleanup, to no avail.
 But I think I figured out the problem. The project points to several linked
libraries which are each their own proejct under version control. To
optimize performance, I occasionally close these projects while working on
the main (also huge) project.
 I think the refresh problem is simply caused by the fact that one of the
linked libraries is in a 'closed' project.
 Of course, this prompts a gigantic DOH! and slap of the forehead.
 At an rate, I'm back up and running. Wish I'd tried the obvious thing
first! (It would have been nice to have some information in the error
message...)
 Jim Kremens

 On 11/15/05, Martin Wood <[EMAIL PROTECTED]> wrote:
>
> for more information you might want to check the eclipse log file, its
> found at workspace/.metadata/.log
>
> that might give you more information about what is causing the problem.
>
> as has been said, theres some cleaning you can do thats a lot less
> drastic, first is doing an SVN clean, right click project -> team ->
> cleanup
>
> also you can start eclipse with -clean from the command line which may
> clear out some bad state that has occurred.
>
> hope that helps,
>
> martin
>
>
> >> I have all the latest versions...
> >> Here's a question - are there files that I should not put in version
> >> control? Like Eclipse's .project file and FDT's .as2_classpath?
> >> I've done it both ways and still had the same problems, so I don't
> think
> >> that's the solution. Just curious...
> >> Jim Kremens
>
> --
> want to know what i think? probably not
>
> http://relivethefuture.com/choronzon
> ___
> 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] Eclipse/FDT/Subclipse weirdness

2005-11-14 Thread Jim Kremens
I have all the latest versions...
 Here's a question - are there files that I should not put in version
control? Like Eclipse's .project file and FDT's .as2_classpath?
 I've done it both ways and still had the same problems, so I don't think
that's the solution. Just curious...
 Jim Kremens

 On 11/14/05, Tomas Lehuta <[EMAIL PROTECTED]> wrote:
>
> Jim,
>
> I'm using Subclipse in both Eclipse/FDT and Flex Builder 2 and everything
> goes ok.
> Which version of Eclipse/FDT/Subclipse do you have?
> I'm running the latest versions:
> Eclipse SDK 3.1.0
> FDT 1.0.4
> Subclipse 0.9.37
>
> Tomas Lehuta
> [http://lharp.net]
>
>
> -----Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Jim
> Kremens
> Sent: Monday, November 14, 2005 4:54 PM
> To: [EMAIL PROTECTED] Figleaf. Com
> Subject: [Flashcoders] Eclipse/FDT/Subclipse weirdness
>
> This might be slightly OT, as it doesn't directly deal with code. But it
> does concern tools of the trade, so here goes...
> I'm using Eclipse, FDT and Subclipse. Occasionally, a project just 'goes
> bad.' It seems like something is getting corrupted, and I don't know what
> it
> is.
> Here are the symptoms:
> Use project for a while - all is fine.
> Click refresh.
> Get 'An error occurred during Refresh' message with *no additional
> information*. (yay error handling!) From this point on, the project is
> completely shot - you can't do much if you can't refresh... Checking it
> out
> again from the repository doesn't work.
> The only way I can fix the project is to:
> 1. Detach it and all of its linked libraries from SVN control (and delete
> SVN information from the system).
> 2. Delete the project and the libraries it links to from the Eclipse
> workspace (without deleting all of the files from the system).
> 3. Re-import the project and various linked libraries, thereby rebuilding
> the project.
> Of course, I then lose all of my SVN history.
> Needless to say, this is really a bummer
> Anyone experienced anything like this? The key would be the meaningless
> 'An
> error occurred during refresh' message.
> Thanks,
> Jim Kremens
> ___
> 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] Eclipse/FDT/Subclipse weirdness

2005-11-14 Thread Jim Kremens
This might be slightly OT, as it doesn't directly deal with code. But it
does concern tools of the trade, so here goes...
 I'm using Eclipse, FDT and Subclipse. Occasionally, a project just 'goes
bad.' It seems like something is getting corrupted, and I don't know what it
is.
 Here are the symptoms:
 Use project for a while - all is fine.
Click refresh.
Get 'An error occurred during Refresh' message with *no additional
information*. (yay error handling!)
 From this point on, the project is completely shot - you can't do much if
you can't refresh... Checking it out again from the repository doesn't work.
The only way I can fix the project is to:
 1. Detach it and all of its linked libraries from SVN control (and delete
SVN information from the system).
2. Delete the project and the libraries it links to from the Eclipse
workspace (without deleting all of the files from the system).
3. Re-import the project and various linked libraries, thereby rebuilding
the project.
 Of course, I then lose all of my SVN history.
 Needless to say, this is really a bummer
 Anyone experienced anything like this? The key would be the meaningless 'An
error occurred during refresh' message.
 Thanks,
 Jim Kremens
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Class Loading

2005-11-13 Thread Jim Kremens
"Runtime loading of SWF's, however, confuses me, and I haven't seen a
defintive source that describes in what version, what happens in a loaded
SWF has the same class, who overrwrites what, etc."
 The loading swf uses the first version of any class that it comes across.
This can be a problem if two compiled swfs use slightly different versions
of a class.
 Jim Kremens

 On 11/13/05, JesterXL <[EMAIL PROTECTED]> wrote:
>
> Depends on when. There are 3 main time intervals that matter:
> - class export frame
> - class runtime initialization
> - SWF runtime class meshing
> * runtime shared libraries
>
> By default, in Flash MX 2004, classes are exported on frame 1; meaning
> they
> are initialized on frame 0 (which you can't do anything on), and I think
> static initializers are run on frame 1.
>
> So, if you leave the default on, you can access your classes from frame 1,
> and on.
>
> However, if your classes are exported on frame 2 or beyond, you'll have to
> wait for that particular frame to be fully downloaded.
>
> Additionally, some classes utilize runtime changes, such as
> EventDispatcher,
> DataSelector, and DataProvider. So, assuming your class does not depend on
> occuring before those events (which most never do), then you are usually
> fine as well.
>
> Runtime loading of SWF's, however, confuses me, and I haven't seen a
> defintive source that describes in what version, what happens in a loaded
> SWF has the same class, who overrwrites what, etc.
>
> Additionally, although Remote Shared Libraries act like #1, I don't know
> when they are actually insantiated, but I believe if you export them on
> frame 1, you can treat them as #1; I always have as compoents and they
> work
> fine.
>
> - Original Message -
> From: "Bruno Mosconi" <[EMAIL PROTECTED]>
> To: "'Flashcoders mailing list'" 
> Sent: Sunday, November 13, 2005 4:55 PM
> Subject: [Flashcoders] Class Loading
>
>
> How do I make sure that all Classes are fully loaded?
>
> Thanks,
> Bruno
>
> ___
> 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] Questions Using MVC Pattern with Flash

2005-11-11 Thread Jim Kremens
Hi Mike,
 Can you elaborate on how the Command pattern can be used instead of MVC?
 thanks,
 Jim Kremens

 On 11/9/05, Mike Britton <[EMAIL PROTECTED]> wrote:
>
> You'll quickly get into framework-building, something that can delay your
> project. Why not use an existing open source framework like ARP?
>
> http://www.osflash.org/ARP
>
> I've gone the route of employing MVC in every aspect of my architectures,
> then I discovered the command pattern, which ARP uses.
>
>
> Mike
> ___
> 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] removing a entry from an associative array?

2005-11-09 Thread Jim Kremens
"Is thery any inbuilt function for getting the index of a associative entry"
 Associative arrays in Flash don't have indexes. They just have keys.
 The following are equivalent:
 var a:Array = [];
a["foo"] = "bar";
 var a:Object = {};
a.foo = "bar";
 var a:Object = {foo:"bar"};
 In any of these cases, you can just say:
 delete a["foo"];
 Jim Kremens


 On 11/9/05, David Skoglund <[EMAIL PROTECTED]> wrote:
>
> The only solution I see is to create a new array by looping through the
> array like this:
>
> function removeAssociativeEntry (startArray, entryName) {
> newarray=[];
> for (var i in StartArray) {
> if (entryName<>i) {
> newarray [i]=startArray[i];
> }
> }
> return (newarray);
> }
>
> This seems a bit silly, especially since I don't know how long these
> arrays are gonna be. Is thery any inbuilt function for getting the index of
> a associative entry?
>
> /David
> ___
> 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


  1   2   >