Re: [Flashcoders] AS3 - why no properties in interfaces?

2006-07-05 Thread Hans Wichman

Hi Marijan,
it might depend on what your constants are. For example imagine you had an
interface Shape, with a method setLineType. You could have setLineType
(type:String) (eg dashed), or setLineType (type:Number) (eg 0, 2 ,5). With
public constants you could have the Shape interface declare vars as public
static var DASHED:Number = 0; and you could call setLineType (Shape.DASHED
);.
Out of the 3 alternatives i would prefer the last, and I do not think this
exposes inner details a lot.

As said I can imagine that when you declare an interface like:
interface MyGeneralInterface {
public static var mySpecificVar:MyVerySpecificClass;
}
that it is plain wrong, but otherwise in the linetype example? I don't know,
I'd like to hear your thoughts on it.

greetz
Hans


On 7/3/06, Marijan Milicevic [EMAIL PROTECTED] wrote:


Hi Hans,
while I cannot say it's bad, it's difficult t say there's nothin nad about
it.
to quote an javaworld article:

It turns out that using an interface to declare constants may not be the
best practice after all. In fact, using interfaces in this way may be
downright nasty. Why? Interfaces should only be used to define types; any
other use is an abuse. Using an interface causes internal details -- such as
constants -- to leak into the class' public API. Once something becomes part
of the public API, you can never get rid of it.
so, in above case it could be wrong..

-m






-Original Message-
From: [EMAIL PROTECTED] on behalf of Hans Wichman
Sent: Mon 7/3/2006 7:04 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] AS3 - why no properties in interfaces?

Although there is -nothing- bad about using interfaces as a container of
constants.



On 7/3/06, Marijan Milicevic [EMAIL PROTECTED] wrote:

 Hi Sascha,

 But it's still beyond me why property support wasn't added. It
 can be such a complex thing but would make OO life a good
 amount easier.

 You are refering to Java but defined fields in java are implicitly
 static finals and need to be initilized within interface,
 so, you are not missing that much in AS3 anyway.

 Also, bad habit of java programmers is to use interfaces as container of
 constants,
 which, saves them some typing (although with static imports in 1.5version
 it doesn't make any difference).

 -m


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

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




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

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



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

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


[Flashcoders] weirdness passing string to text field

2006-07-05 Thread Rick Lecoat
Hi,

I'm trying to pass a sting variable (var teamName:String) to a dynamic
text field nested inside a couple of layers of MCs. The path is correct
because the text field is being changed by the variable, but the string
itself is corrupted or something because the variable's contents seems
to be being altered.

Trying to send the string Mr Jones results in the text field showing
M Joe. Trying to send the string Executive results in the text field
displaying Eee.

As you can see, it is not even a simple truncation of the string (such
as perhaps might have been the case if the text field were not big
enough to hold the string); it is as if Flash is just choosing a few
letters and ignoring the rest.

Can anybody shed any light on this? I'm new to Actionscript and every
(probably simple) stumbling block like this throws me completely out of
the ring.

Many thanks.
-- 
Rick Lecoat


___
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] weirdness passing string to text field

2006-07-05 Thread Chris Velevitch

Sounds like restrict is not null.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
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] weirdness passing string to text field

2006-07-05 Thread Rick Lecoat
Chris, thanks for your speedy reply (I guess that if I was going to get
a reply at 8.30 in the morning UK time it would have been from Australia!)

Like I said in my initial post, I'm completely new to Actionscript (and
all of Flash, really)
and so your response, whilst I am sure it is the correct answer, is a
bit cryptic to me. Could you maybe flesh out your reply with a bit of
'idiot guide' stuff so that I can take it and run with it?

Many many thanks.

-- 
Rick Lecoat

--
Original message:
Received from Chris Velevitch on 5/7/06 at 08:45

Sounds like restrict is not null.


Chris


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

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


Re: [Flashcoders] weirdness passing string to text field

2006-07-05 Thread Ian Thomas

One possibility might be that you're using an embedded font, but
haven't embedded all the characters in that font.

HTH,
 Ian

On 7/5/06, Rick Lecoat [EMAIL PROTECTED] wrote:

Hi,

I'm trying to pass a sting variable (var teamName:String) to a dynamic
text field nested inside a couple of layers of MCs. The path is correct
because the text field is being changed by the variable, but the string
itself is corrupted or something because the variable's contents seems
to be being altered.

Trying to send the string Mr Jones results in the text field showing
M Joe. Trying to send the string Executive results in the text field
displaying Eee.

As you can see, it is not even a simple truncation of the string (such
as perhaps might have been the case if the text field were not big
enough to hold the string); it is as if Flash is just choosing a few
letters and ignoring the rest.

Can anybody shed any light on this? I'm new to Actionscript and every
(probably simple) stumbling block like this throws me completely out of
the ring.

Many thanks.
--
Rick Lecoat

___
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] weirdness passing string to text field

2006-07-05 Thread Adrian Park

This sounds to me like what happens if you embed a certain set of characters
in the field but then pass it a String including characters you haven't
explicitly embedded. I'm guessing you may have pasted a string into the
Include these characters: field in the Character Embedding window? If
so, only those characters will be embedded with the field and you'd probably
be better off just selecting Basic Latin in the predefined character sets.

HTH
A.



On 7/5/06, Chris Velevitch [EMAIL PROTECTED] wrote:


Sounds like restrict is not null.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
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] weirdness passing string to text field

2006-07-05 Thread Chris Velevitch

There's an attibute on TextField called restrict. It takes a regular
expression of all the characters that are allowed to be entered into
the field. Try setting it to null.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
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] weirdness passing string to text field

2006-07-05 Thread NEILHIGHLEY . COM

textfield has a retrict value that acts as a filter. Chris is saying
that it may have a value in there already, probably something with the
following letters: M J O E as the Executive is being filtered down
to only e's as the other letters are not in the filter.

btw, what is output when you trace the value? It may also be a font
character thing.

textfield.restrict
http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary762.html

Embedded fonts
http://www.flash-mx.com/news/archives/000136.cfm

On 05/07/06, Rick Lecoat [EMAIL PROTECTED] wrote:

Chris, thanks for your speedy reply (I guess that if I was going to get
a reply at 8.30 in the morning UK time it would have been from Australia!)

Like I said in my initial post, I'm completely new to Actionscript (and
all of Flash, really)
and so your response, whilst I am sure it is the correct answer, is a
bit cryptic to me. Could you maybe flesh out your reply with a bit of
'idiot guide' stuff so that I can take it and run with it?

Many many thanks.

--
Rick Lecoat

--
Original message:
Received from Chris Velevitch on 5/7/06 at 08:45

Sounds like restrict is not null.


Chris


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

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




--
===
neilhighley.com
===
0784  324 7878
___
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] BitmapData and security.allowDomain

2006-07-05 Thread INK .
Hi, List!

There is an issue with loading an extermal JPEGs form a remote server.
It seems to be a bug. I am loading a JPG image to a movie clip and
cloning it using Bitmap.draw(input_mc). (SWF is hosted on domain A, JPG
hosted on domain B.) In this case loaded JPEG behaves exactly as an SWF
loaded from a remore server %\ (cross-domain data loading) This means
that it wount permit scripting it %| So I am getting only white screen
instead of a bitmap representation of a symbol beeing cloned using
BitmapData. Since I can't add System.security.allowDomain(*); to a
JPEG file The question is:
- any ideas how to access BitmapData of a remotely downloaded domain
(NOT the same as where SWF hosted )


Thanks.


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

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


[Flashcoders] Bypassing File Download Dialog

2006-07-05 Thread Aasim Momin
Hi,
 
I want to develop a CD-Based course which requires that I open some word
docs kept in a folder on the CD.
Every time I click the button to open the file a security dialog pops up
asking if I want to Open/Save/Cancel the file.
I don't want this to pop-up on my user's machine and default it to
opening the document using its associated application.
 
Code on the button is 
fscommand(exec,Content_1/Abandon Ficticious Name.doc);
 
Is there something which I could use or I am missing something?
 
Thanks!
 
Regards,
Aasim Momin
 
 
___
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] weirdness passing string to text field

2006-07-05 Thread Rick Lecoat
Ian and Adrian;

You hit the nail on the head; it was indeed a lack of embedded
characters and my own stupid fault because whilst I *had* embedded the
characters for the intended usage (uppercase only) I neglected to stick
to those when I was running my trouble shooting tests, and included
lowercase as well. 
There also turned out to be a secondary (or maybe primary) problem --
targets not yet being instantiated at point-of-code -- that needed
fixing before the font embedding issue made itself known. And of course
when more than one thing is giving trouble simultaneously it's hard to
figure out just what is going wrong. Now that that both are fixed it's
working fine.

However, I'm still slightly confused, because I thought that if the font
was installed on the machine that is testing the movie then it would
still show up okay whether embedded or not. The fact that it doesn't is,
of course, a benefit because it gives early warning of non-embedded
fonts but it does run contrary to what I thought I understood. Live and learn.

Chris: Thanks for elaborating on the restrict issue. Looks like I won't
need to explore it just yet, but it's good to know about. (Since I'm
very new to the Flash/Actionscript thing and am learning 'on the job'
with a project deadline looming I'm being pragmatic and just learning
the bits of AS that I need to make the project work. I'll flesh out my
knowledge afterward).

Thanks to everyone for all your help.
I'm sure I'll be back again with more questions *very* soon...

-- 
Rick Lecoat

--
Original message:
Received from Adrian Park on 5/7/06 at 09:24

This sounds to me like what happens if you embed a certain set of characters
in the field but then pass it a String including characters you haven't
explicitly embedded. I'm guessing you may have pasted a string into the
Include these characters: field in the Character Embedding window? If
so, only those characters will be embedded with the field and you'd probably
be better off just selecting Basic Latin in the predefined character sets.

HTH
A.


___
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] weirdness passing string to text field

2006-07-05 Thread Danny Kodicek
 Chris: Thanks for elaborating on the restrict issue. Looks like I won't
 need to explore it just yet, but it's good to know about. (Since I'm
 very new to the Flash/Actionscript thing and am learning 'on the job'
 with a project deadline looming I'm being pragmatic and just learning
 the bits of AS that I need to make the project work. I'll flesh out my
 knowledge afterward).

Just to clarify: I'm pretty sure the restrict property only affects
user-typed input, not text that you add dynamically with 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


Re: [Flashcoders] weirdness passing string to text field

2006-07-05 Thread janosch

Danny Kodicek schrieb:


Chris: Thanks for elaborating on the restrict issue. Looks like I won't
need to explore it just yet, but it's good to know about. (Since I'm
very new to the Flash/Actionscript thing and am learning 'on the job'
with a project deadline looming I'm being pragmatic and just learning
the bits of AS that I need to make the project work. I'll flesh out my
knowledge afterward).
   



Just to clarify: I'm pretty sure the restrict property only affects
user-typed input, not text that you add dynamically with code.

Danny


Thats correct:

_root.createTextField(txt, 1, 0, 0, 100, 100);
_root.txt.type = input;
_root.txt.restrict = abc;
_root.txt.text = hallo; // complete hallo is written into the TextField

Janosch
___
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] weirdness passing string to text field

2006-07-05 Thread Adrian Park

Glad to be of help Rick.

On the font embedding thing v. the font being installed on your machine, I'm
pretty sure that if you specify a font but don't embed any characters then
Flash will use the installed font but if you embed then Flash will only look
to the embedded characters for display and will ignore the installed version
of the font. Hope that makes sense!

Good luck with your deadline!

A.

On 7/5/06, Danny Kodicek [EMAIL PROTECTED] wrote:


 Chris: Thanks for elaborating on the restrict issue. Looks like I won't
 need to explore it just yet, but it's good to know about. (Since I'm
 very new to the Flash/Actionscript thing and am learning 'on the job'
 with a project deadline looming I'm being pragmatic and just learning
 the bits of AS that I need to make the project work. I'll flesh out my
 knowledge afterward).

Just to clarify: I'm pretty sure the restrict property only affects
user-typed input, not text that you add dynamically with 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


___
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 - Missing

2006-07-05 Thread Meinte van't Kruis

I'm not sure if it's entirely impossible to assign one class to multiple
movieclips, but if that's true than the easiest way to overcome that problem
is make a baseclass 'Country' and have Brazil extends Country.

You still have the silly task of assigning all your countries to a
different class, but at least your code will be easy to manage.

good luck
-Meinte

On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:


Is this the place to talk about AS3? If not, where would be?

The concept of any movieClip be a class is very powerfull, given the
ability to do new ClassName to create a copy of any clip. But the Auto
Generated class and the fact that you can´t have two movieclips with
the same class is something that is limiting flash capabilities.

Example:
I have a A world map where each country is a movieclip. And every one
will have the same behavior. Before flash 9, what I did is assign a
class called Country to each movie clip. This way, I can easy update
the behavior of all at the same time.

With Flash 9, I can´t assign a class with the same name and can´t
specify a base class to the Auto Generated extends.
My suggestion is to do something like this:
http://neves.bs2.com.br/flex/preview.jpg

When ask for AutoGenerate, a check box would enable an different base
class, and I would write on the textbox. So a movieClip called Brazil,
would have a autoGenerated class called Brazil that extends the class
Country, witch would be my base class.

I´m shure no one can deny that this feature is essential.
___
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] AS3 - why no properties in interfaces?

2006-07-05 Thread Marijan Miličević
Hi Hans,
as I see it, I am not interested into dashed stuff of a shape,
only thing I am interested in is what can I do with it...
so, I could paint my shape with a brush or draw a line, 
up to me to decide and shouldn't be exposed by my interface..
for example:


interface Shape
{
void hide();
void show();
void draw();
void delete();
}

public class Square implements Shape, Jumpable
{
//implementation..
public void draw()
{
final Pen pen = new Pen(LineType.DASHED);
pen.drawLine(100,150);
//etc
}   
//..more implementation...

// Jumpable implementation
public void jump()
{
// jumping code in here..
}
}

public class MyCoolShape implements Shape
{
//implementation..
public void draw()
{
final Brush brush = new Brush(new Color(0x003300));
brush.paint(10,10,30,-30);
//etc
}   
//..more implementation...
}


public final class LineType
{
public static final int DASHED = 0;
public static final int MYTYPE = 1;
private LineType(){}// do not instantiate
}


but again, as I said, nobody forbids you to use it the way you do,
and it's pointless to have huge discussion about it...
see it as personal preference...
kind regards,
-m


-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Hans Wichman
Sent: Wednesday, July 05, 2006 8:14 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] AS3 - why no properties in interfaces?

Hi Marijan,
it might depend on what your constants are. For example imagine you had an
interface Shape, with a method setLineType. You could have setLineType
(type:String) (eg dashed), or setLineType (type:Number) (eg 0, 2 ,5).
With
public constants you could have the Shape interface declare vars as public
static var DASHED:Number = 0; and you could call setLineType (Shape.DASHED
);.
Out of the 3 alternatives i would prefer the last, and I do not think this
exposes inner details a lot.

As said I can imagine that when you declare an interface like:
interface MyGeneralInterface {
 public static var mySpecificVar:MyVerySpecificClass;
}
that it is plain wrong, but otherwise in the linetype example? I don't
know,
I'd like to hear your thoughts on it.

greetz
Hans


On 7/3/06, Marijan Milicevic [EMAIL PROTECTED] wrote:

 Hi Hans,
 while I cannot say it's bad, it's difficult t say there's nothin nad
about
 it.
 to quote an javaworld article:

 It turns out that using an interface to declare constants may not be the
 best practice after all. In fact, using interfaces in this way may be
 downright nasty. Why? Interfaces should only be used to define types; any
 other use is an abuse. Using an interface causes internal details -- such
as
 constants -- to leak into the class' public API. Once something becomes
part
 of the public API, you can never get rid of it.
 so, in above case it could be wrong..

 -m






 -Original Message-
 From: [EMAIL PROTECTED] on behalf of Hans Wichman
 Sent: Mon 7/3/2006 7:04 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] AS3 - why no properties in interfaces?

 Although there is -nothing- bad about using interfaces as a container of
 constants.



 On 7/3/06, Marijan Milicevic [EMAIL PROTECTED] wrote:
 
  Hi Sascha,
 
  But it's still beyond me why property support wasn't added. It
  can be such a complex thing but would make OO life a good
  amount easier.
 
  You are refering to Java but defined fields in java are implicitly
  static finals and need to be initilized within interface,
  so, you are not missing that much in AS3 anyway.
 
  Also, bad habit of java programmers is to use interfaces as container
of
  constants,
  which, saves them some typing (although with static imports in
1.5version
  it doesn't make any difference).
 
  -m
 
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 



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

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


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

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and 

[Flashcoders] Shared Fonts puzzle (hell)

2006-07-05 Thread Marcelo de Moraes Serpa

I´ve been trying to find the holy grail of Shared Fonts but with no success.
I then decided I just wanted it to work.

I´ve have done this way:

- Packing all the fonts I´m using in my application in a separate SWF,
setting them to Export For Runtime Sharing and also to Export for AS.
- Loading this SWF in the app´s main prealoader in a hidden movieclip
offstage;
- In the subsequent loaded SWF´s that would use the fonts, I´ve added a
SharePoint on movieclip imported from the shared library in the first
frame.
- Created a TextFormat object for each of the font´s and applied it to the
TextFields.

However, I´ve found too many inconsistencies while I was implementing it.
I´ve found that I would have to set both a TextFormat object and also
setStyle('fontFamily','fontName'); setStyle('embedFonts',true) to the
TextField or otherwise it wouldn´t work. If I only set the TextFormat
object, it doesn´t work and if I only set the style, it doesn´t work
either... why!?

I´ve noted that sometimes the initial text is shown, but when I try to
modify it through code, it either doesn´t changes or goes blank.

In sum, I´ve been through a hard time trying to get this shared font thing
to work with TextFields. With v2 components I got it to work by setting it´s
style ( setStyle('fontFamily','fontName'); setStyle('embedFonts',true)) I
assume the v2 framework deals with the TextFormat issue, but with regular
TextFields... it´s a hell confusing...

I´m confused and I need some enlightment! Any help would be much
appreciated!

Marcelo.
___
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 - Missing

2006-07-05 Thread Marcos Neves

You got the point. But this silly task wasn´t needed on flash 8.
That´s the point.
Should it be on flash 9? I don´t think so.
Isn´t this the time to ask Adobe to include this feature? But I need
help from others developers to show that this feature is essential.

On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:

I'm not sure if it's entirely impossible to assign one class to multiple
movieclips, but if that's true than the easiest way to overcome that problem
is make a baseclass 'Country' and have Brazil extends Country.

You still have the silly task of assigning all your countries to a
different class, but at least your code will be easy to manage.

good luck
-Meinte

On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:

 Is this the place to talk about AS3? If not, where would be?

 The concept of any movieClip be a class is very powerfull, given the
 ability to do new ClassName to create a copy of any clip. But the Auto
 Generated class and the fact that you can´t have two movieclips with
 the same class is something that is limiting flash capabilities.

 Example:
 I have a A world map where each country is a movieclip. And every one
 will have the same behavior. Before flash 9, what I did is assign a
 class called Country to each movie clip. This way, I can easy update
 the behavior of all at the same time.

 With Flash 9, I can´t assign a class with the same name and can´t
 specify a base class to the Auto Generated extends.
 My suggestion is to do something like this:
 http://neves.bs2.com.br/flex/preview.jpg

 When ask for AutoGenerate, a check box would enable an different base
 class, and I would write on the textbox. So a movieClip called Brazil,
 would have a autoGenerated class called Brazil that extends the class
 Country, witch would be my base class.

 I´m shure no one can deny that this feature is essential.
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

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


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

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


Re: [Flashcoders] AS3 - Missing

2006-07-05 Thread jcarlos

But wouldn´t be easier to have composition over extension ?

if you have one generic class that has the country movieclip like an 
property of this class


class  Country
{
 var mcCountry: MovieClip;
 var nameCountry:String;

function Country( mc: MovieClip, name:String)
   {
..
 ..
}

}
- Original Message - 
From: Meinte van't Kruis [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, July 05, 2006 8:17 AM
Subject: Re: [Flashcoders] AS3 - Missing


I'm not sure if it's entirely impossible to assign one class to multiple
movieclips, but if that's true than the easiest way to overcome that problem
is make a baseclass 'Country' and have Brazil extends Country.

You still have the silly task of assigning all your countries to a
different class, but at least your code will be easy to manage.

good luck
-Meinte

On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:


Is this the place to talk about AS3? If not, where would be?

The concept of any movieClip be a class is very powerfull, given the
ability to do new ClassName to create a copy of any clip. But the Auto
Generated class and the fact that you can´t have two movieclips with
the same class is something that is limiting flash capabilities.

Example:
I have a A world map where each country is a movieclip. And every one
will have the same behavior. Before flash 9, what I did is assign a
class called Country to each movie clip. This way, I can easy update
the behavior of all at the same time.

With Flash 9, I can´t assign a class with the same name and can´t
specify a base class to the Auto Generated extends.
My suggestion is to do something like this:
http://neves.bs2.com.br/flex/preview.jpg

When ask for AutoGenerate, a check box would enable an different base
class, and I would write on the textbox. So a movieClip called Brazil,
would have a autoGenerated class called Brazil that extends the class
Country, witch would be my base class.

I´m shure no one can deny that this feature is essential.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


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

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


Re: [Flashcoders] Bypassing File Download Dialog

2006-07-05 Thread Muzak

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14280


- Original Message - 
From: Aasim Momin [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, July 05, 2006 11:20 AM
Subject: [Flashcoders] Bypassing File Download Dialog


Hi,

I want to develop a CD-Based course which requires that I open some word
docs kept in a folder on the CD.
Every time I click the button to open the file a security dialog pops up
asking if I want to Open/Save/Cancel the file.
I don't want this to pop-up on my user's machine and default it to
opening the document using its associated application.

Code on the button is
fscommand(exec,Content_1/Abandon Ficticious Name.doc);

Is there something which I could use or I am missing something?

Thanks!

Regards,
Aasim Momin



___
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 - Missing

2006-07-05 Thread Adrian Park

I'm not sure this is really a 'feature' that is missing since the problem
really boils down to OOP theory. For example, it could be argued that it is
incorrect for the country class to extend MovieClip since a country *is not*
a MovieClip but, rather,  *uses* a MovieClip for display. By this rational,
it makes more sense to extend via composition - i.e. the country class
simply gets a reference to a MovieClip that represents it's visual
manifestation. This way, the same class is used for many MovieClips.

If it was possible in AS2 and is no longer possible in AS3, I'd hope there
is a very good reason why and I'd hope that the reason has something to do
with AS becoming a more mature language and doing things in a better way.

Am I wrong?

A.

On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:


You got the point. But this silly task wasn´t needed on flash 8.
That´s the point.
Should it be on flash 9? I don´t think so.
Isn´t this the time to ask Adobe to include this feature? But I need
help from others developers to show that this feature is essential.

On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
 I'm not sure if it's entirely impossible to assign one class to multiple
 movieclips, but if that's true than the easiest way to overcome that
problem
 is make a baseclass 'Country' and have Brazil extends Country.

 You still have the silly task of assigning all your countries to a
 different class, but at least your code will be easy to manage.

 good luck
 -Meinte

 On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:
 
  Is this the place to talk about AS3? If not, where would be?
 
  The concept of any movieClip be a class is very powerfull, given the
  ability to do new ClassName to create a copy of any clip. But the Auto
  Generated class and the fact that you can´t have two movieclips with
  the same class is something that is limiting flash capabilities.
 
  Example:
  I have a A world map where each country is a movieclip. And every one
  will have the same behavior. Before flash 9, what I did is assign a
  class called Country to each movie clip. This way, I can easy update
  the behavior of all at the same time.
 
  With Flash 9, I can´t assign a class with the same name and can´t
  specify a base class to the Auto Generated extends.
  My suggestion is to do something like this:
  http://neves.bs2.com.br/flex/preview.jpg
 
  When ask for AutoGenerate, a check box would enable an different base
  class, and I would write on the textbox. So a movieClip called Brazil,
  would have a autoGenerated class called Brazil that extends the class
  Country, witch would be my base class.
 
  I´m shure no one can deny that this feature is essential.
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

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


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

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


Re: [Flashcoders] Shared Fonts puzzle (hell)

2006-07-05 Thread Iv
Hello Marcelo,

http://www.sharedfonts.com/eng/faq.html#include

-- 
Ivan Dembicki

[EMAIL PROTECTED] || 
http://www.design.ru

___
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 - Missing

2006-07-05 Thread Marcos Neves

Look at this flash
http://adi.idr.org.br/tpl/adi/mapa.tpl.php
Did you see that every movieClips have different shapes, but the same behavior.

Your suggestion is to drag a Country MovieClip inside each Country and
use it to take control of the parent clip?

On 7/5/06, jcarlos [EMAIL PROTECTED] wrote:

But wouldn´t be easier to have composition over extension ?

if you have one generic class that has the country movieclip like an
property of this class

class  Country
{
 var mcCountry: MovieClip;
 var nameCountry:String;

function Country( mc: MovieClip, name:String)
   {
..
 ..
}

}
- Original Message -
From: Meinte van't Kruis [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, July 05, 2006 8:17 AM
Subject: Re: [Flashcoders] AS3 - Missing


I'm not sure if it's entirely impossible to assign one class to multiple
movieclips, but if that's true than the easiest way to overcome that problem
is make a baseclass 'Country' and have Brazil extends Country.

You still have the silly task of assigning all your countries to a
different class, but at least your code will be easy to manage.

good luck
-Meinte

On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:

 Is this the place to talk about AS3? If not, where would be?

 The concept of any movieClip be a class is very powerfull, given the
 ability to do new ClassName to create a copy of any clip. But the Auto
 Generated class and the fact that you can´t have two movieclips with
 the same class is something that is limiting flash capabilities.

 Example:
 I have a A world map where each country is a movieclip. And every one
 will have the same behavior. Before flash 9, what I did is assign a
 class called Country to each movie clip. This way, I can easy update
 the behavior of all at the same time.

 With Flash 9, I can´t assign a class with the same name and can´t
 specify a base class to the Auto Generated extends.
 My suggestion is to do something like this:
 http://neves.bs2.com.br/flex/preview.jpg

 When ask for AutoGenerate, a check box would enable an different base
 class, and I would write on the textbox. So a movieClip called Brazil,
 would have a autoGenerated class called Brazil that extends the class
 Country, witch would be my base class.

 I´m shure no one can deny that this feature is essential.
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

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

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

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


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

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


Re: [Flashcoders] Shared Fonts puzzle (hell)

2006-07-05 Thread Iv
Hello Marcelo,

- you need to separate problems.
  in first step don't use sharing.
  when your app will work fine you can
  start sharing your fonts.

MdMS In sum, I╢ve been through a hard time trying to get this shared font thing
MdMS to work with TextFields. With v2 components I got it to work by setting 
it╢s
MdMS style ( setStyle('fontFamily','fontName'); setStyle('embedFonts',true)) 
I
MdMS assume the v2 framework deals with the TextFormat issue, but with regular
MdMS TextFields... it╢s a hell confusing...


-- 
Ivan Dembicki

[EMAIL PROTECTED] || 
http://www.design.ru

___
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] weirdness passing string to text field

2006-07-05 Thread Rick Lecoat
Back again.

Well, I *thought* it was working...
What do you guys make of a situation where a movie works in Test Movie
but not from the web server? Here's the deal:

variable1:String populates textField1  (initial value =  )
variable2:String populates textField2  (initial value =  )
variable3:String populates textField3  (initial value = Click on a
photo to learn more about the person)

Variables get changed according to button clicks.

When I run Test Movie, the first two fields are blank as expected and
the third one shows the instructional text as set by the variable.

Publish... upload to server... clear browser cache to be sure...
But now:

first two fields say ee
third one says undefined

Clicking buttons, which should rewrite the text fields, also gives the
same results.

For the record, text fields one and two just have uppercase glyphs
embedded, whilst the third one has upper and lower case, numerals, and
punctuation. These choices are appropriate to the text that the button
clicks will enter.

So, why will it work in test but not online?
Hlp!

-- 
Rick Lecoat

--
Original message:
Received from Adrian Park on 5/7/06 at 10:54

Glad to be of help Rick.

On the font embedding thing v. the font being installed on your machine, I'm
pretty sure that if you specify a font but don't embed any characters then
Flash will use the installed font but if you embed then Flash will only look
to the embedded characters for display and will ignore the installed version
of the font. Hope that makes sense!

Good luck with your deadline!

A.



___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Mendelsohn, Michael
Hi list...

The embedFonts line seems to prevent the setTextFormat line from
working.  What am I missing?  The font univ is in the library, and its
linkage is univ.

Thanks,
- Michael M.

private function createSlideWatcher():Void {
var tf:TextFormat = new TextFormat();
tf.font = univ;
tf.color = 0xFF;
tf.size = 30;
_root.createTextField(slideWatcher,
_root.getNextHighestDepth(), 10, 10, 150, 150);
_root.slideWatcher.background = true;
_root.slideWatcher.backgroundColor = 0x66;
_root.slideWatcher.embedFonts = true;
_root.slideWatcher.setTextFormat(tf);
_root.slideWatcher.text = hi;
}

___
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] Shared Fonts puzzle (hell)

2006-07-05 Thread Weyert de Boer

Fonts and Flash on the Mac I am going nuts. Troublesome.
___
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] Weird include problem.

2006-07-05 Thread kariminal
Flash 8 Proffesional... 

This is strange, I have an #include init.as, and I get an 

**Error** Scene=loading, layer=script, frame=2:Error opening include file
init.as: File not found.


init.as IS in the same folder as the FLA, and I am all confused.?... Any
ideas?...


Thanks... Karim...

___
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] Please help shed lights on this font issue

2006-07-05 Thread Weyert de Boer

Hello!

I have a movieclip which I attach in a container movieclip when I change 
the htmlText-property of this movieclip. I would like to know why I 
would need to change the textfield in the movieclip to the fontstyle 
bold, and italic to be able to use the i-tag. I have embedded the font 
in the text field as Basic Latin. I would think you can now use the font 
in the textfield without problems, but it isn't.


I would love to know why this is, so I can learn from it.

Yours,
Weyert de Boer
___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Julien Vignali

Try using setNewTextFormat() instead..

Mendelsohn, Michael a écrit :

Hi list...

The embedFonts line seems to prevent the setTextFormat line from
working.  What am I missing?  The font univ is in the library, and its
linkage is univ.

Thanks,
- Michael M.

private function createSlideWatcher():Void {
var tf:TextFormat = new TextFormat();
tf.font = univ;
tf.color = 0xFF;
tf.size = 30;
_root.createTextField(slideWatcher,
_root.getNextHighestDepth(), 10, 10, 150, 150);
_root.slideWatcher.background = true;
_root.slideWatcher.backgroundColor = 0x66;
_root.slideWatcher.embedFonts = true;
_root.slideWatcher.setTextFormat(tf);
_root.slideWatcher.text = hi;
}

___
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] weirdness passing string to text field

2006-07-05 Thread Rick Lecoat
Call off the hounds, I've solved it. 

it turns out that when the a nested movie clip called the variables it
called them from one nesting level up, and I'd coded that as
_root.variable. Flash was fine with that in testing, but the browser
plugin didn't like it. Once I'd changed the path to _parent.variable it
was all working as planned again.

Odd that the Test Movie behaved differently though.

-- 
Rick Lecoat

--
Original message:
Received from Rick Lecoat on 5/7/06 at 13:23

Back again.

Well, I *thought* it was working...
What do you guys make of a situation where a movie works in Test Movie
but not from the web server? Here's the deal:

variable1:String populates textField1  (initial value =  )
variable2:String populates textField2  (initial value =  )
variable3:String populates textField3  (initial value = Click on a
photo to learn more about the person)

Variables get changed according to button clicks.

When I run Test Movie, the first two fields are blank as expected and
the third one shows the instructional text as set by the variable.

Publish... upload to server... clear browser cache to be sure...
But now:

first two fields say ee
third one says undefined

Clicking buttons, which should rewrite the text fields, also gives the
same results.

For the record, text fields one and two just have uppercase glyphs
embedded, whilst the third one has upper and lower case, numerals, and
punctuation. These choices are appropriate to the text that the button
clicks will enter.

So, why will it work in test but not online?
Hlp!

-- 
Rick Lecoat


___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Stacey Mulcahy
Try setting your textFormat after you apply the text. 
Also, I try to make sure the linkage name of the font is the same as the
actual font for the purpose that its easier to read and self descriptive. 

Order of operation does matter for this kinda thing, you have to embed fonts
before setting the text and set the textFormat after, I believe. For
example,  I know this works:

var myTF=new TextFormat();
myTF.color=0x66;
myTF.font=DINNeuzeitGroteskLight;
myTF.size=10;

this.createTextField(tf, 2, 0, 0, 100, 0);
tf.autoSize = left;
tf.embedFonts=true;
tf.multiline = true;
tf.selectable=false;
tf.wordWrap = true;
tf.text = Testing this out;
tf.setTextFormat(myTF);


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mendelsohn,
Michael
Sent: Wednesday, July 05, 2006 8:23 AM
To: Flashcoders mailing list
Subject: [Flashcoders] embedFonts vs. setTextFormat

Hi list...

The embedFonts line seems to prevent the setTextFormat line from
working.  What am I missing?  The font univ is in the library, and its
linkage is univ.

Thanks,
- Michael M.

private function createSlideWatcher():Void {
var tf:TextFormat = new TextFormat();
tf.font = univ;
tf.color = 0xFF;
tf.size = 30;
_root.createTextField(slideWatcher,
_root.getNextHighestDepth(), 10, 10, 150, 150);
_root.slideWatcher.background = true;
_root.slideWatcher.backgroundColor = 0x66;
_root.slideWatcher.embedFonts = true;
_root.slideWatcher.setTextFormat(tf);
_root.slideWatcher.text = hi;
}

___
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] weirdness passing string to text field

2006-07-05 Thread Stacey Mulcahy
How are the variables being generated and set? 
Are you getting those values from external source such as xml or text file?

I haven't followed the thread... sorry.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rick Lecoat
Sent: Wednesday, July 05, 2006 8:23 AM
To: FlashCoders list
Subject: Re: [Flashcoders] weirdness passing string to text field

Back again.

Well, I *thought* it was working...
What do you guys make of a situation where a movie works in Test Movie
but not from the web server? Here's the deal:

variable1:String populates textField1  (initial value =  )
variable2:String populates textField2  (initial value =  )
variable3:String populates textField3  (initial value = Click on a
photo to learn more about the person)

Variables get changed according to button clicks.

When I run Test Movie, the first two fields are blank as expected and
the third one shows the instructional text as set by the variable.

Publish... upload to server... clear browser cache to be sure...
But now:

first two fields say ee
third one says undefined

Clicking buttons, which should rewrite the text fields, also gives the
same results.

For the record, text fields one and two just have uppercase glyphs
embedded, whilst the third one has upper and lower case, numerals, and
punctuation. These choices are appropriate to the text that the button
clicks will enter.

So, why will it work in test but not online?
Hlp!

-- 
Rick Lecoat

--
Original message:
Received from Adrian Park on 5/7/06 at 10:54

Glad to be of help Rick.

On the font embedding thing v. the font being installed on your machine,
I'm
pretty sure that if you specify a font but don't embed any characters then
Flash will use the installed font but if you embed then Flash will only
look
to the embedded characters for display and will ignore the installed
version
of the font. Hope that makes sense!

Good luck with your deadline!

A.



___
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] Please help shed lights on this font issue

2006-07-05 Thread Weyert de Boer
I also would love to know why textfield work nicely when you test the 
movie inside the Flash IDE via Ctrl-Enter/Apple-Enter
but when you check the movie inside a browser such as Firefox the 
textfield is blank or only show parts of the defined text.


I am using the htmlText mode of the textfield and I assign this to it:

HTMLTEXT=TEXTFORMAT LEADING=2P ALIGN=LEFTFONT FACE=Arial 
SIZE=11 COLOR=#006C55 LETTERSPACING=0 KERNING=0titel van het 
nieuwsbericht 5,  FONT 
COLOR=#A5D81E6-4-2006/FONT/FONT/P/TEXTFORMAT


Well, the above html code that's what Flash makes of it I only do this  
by code:


newsClip.title.htmlText = newsTitle + commaStr +  ;
newsClip.title.htmlText += font color=\#A5D81E\i + 
cDate.getDate() + - + cDate.getMonth() + - + cDate.getFullYear() + 
/i/font;


Yours,
Weyert de Boer
___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Marcelo de Moraes Serpa

Order of operation does matter for this kinda thing, you have to embed

fonts

before setting the text and set the textFormat after, I believe. For
example,  I know this works:


Hmmm... Maybe that´s the reason why I´m having inconsistencies... oh Flash
programming and it´s little hidden tricks... sometimes I feel like I´m going
crazy.

On 7/5/06, Stacey Mulcahy [EMAIL PROTECTED] wrote:


Try setting your textFormat after you apply the text.
Also, I try to make sure the linkage name of the font is the same as the
actual font for the purpose that its easier to read and self descriptive.

Order of operation does matter for this kinda thing, you have to embed
fonts
before setting the text and set the textFormat after, I believe. For
example,  I know this works:

var myTF=new TextFormat();
myTF.color=0x66;
myTF.font=DINNeuzeitGroteskLight;
myTF.size=10;

this.createTextField(tf, 2, 0, 0, 100, 0);
tf.autoSize = left;
tf.embedFonts=true;
tf.multiline = true;
tf.selectable=false;
tf.wordWrap = true;
tf.text = Testing this out;
tf.setTextFormat(myTF);


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Mendelsohn,
Michael
Sent: Wednesday, July 05, 2006 8:23 AM
To: Flashcoders mailing list
Subject: [Flashcoders] embedFonts vs. setTextFormat

Hi list...

The embedFonts line seems to prevent the setTextFormat line from
working.  What am I missing?  The font univ is in the library, and its
linkage is univ.

Thanks,
- Michael M.

private function createSlideWatcher():Void {
var tf:TextFormat = new TextFormat();
tf.font = univ;
tf.color = 0xFF;
tf.size = 30;
_root.createTextField(slideWatcher,
_root.getNextHighestDepth(), 10, 10, 150, 150);
_root.slideWatcher.background = true;
_root.slideWatcher.backgroundColor = 0x66;
_root.slideWatcher.embedFonts = true;
_root.slideWatcher.setTextFormat(tf);
_root.slideWatcher.text = hi;
}

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

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


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

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


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

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


[Flashcoders] JPEG compression for PNG details

2006-07-05 Thread Nikolaj Selvik
Hi all,

Wondering if someone here could provide or point me in the direction of
details on the inner workings of jpeg compression for png images in the
swf format? I am particularly interested in how the alpha channel in the
PNG is translated and stored. 

Thanks!

Nick
___
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] Weird include problem.

2006-07-05 Thread Danny Kodicek
 Flash 8 Proffesional... 
 
 This is strange, I have an #include init.as, and I get an 
 
 **Error** Scene=loading, layer=script, frame=2:Error opening include file
 init.as: File not found.
 
 
 init.as IS in the same folder as the FLA, and I am all confused.?... Any
 ideas?...

Is your movie set to use AS1?

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


Re: [Flashcoders] Shared Fonts puzzle (hell)

2006-07-05 Thread Marcelo de Moraes Serpa

Thanks for the article Iv. I guess the way I´m doing is right as I don´t
need this kind of control over what characters I would need to embbed. I´ll
test when I get home, but I guess this issue is happening becouse I´m not
setting the embedFonts property in the right place.

On 7/5/06, Weyert de Boer [EMAIL PROTECTED] wrote:


Fonts and Flash on the Mac I am going nuts. Troublesome.
___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Mendelsohn, Michael
Hi all...

Thanks for the responses.  It was indeed a case of setNewTextFormat.  I
just don't get why that AS term exists.

Thanks!

- MM

___
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] Weird include problem.

2006-07-05 Thread kariminal
AS2, but I just figgured it out. 

As expected I was the problem, the file was named init.as.as and hide
estensions for known file types was checked in Explorer.  

Hmmm... Thanks anyway...


karim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Danny
Kodicek
Sent: 05 July 2006 14:03
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Weird include problem.

 Flash 8 Proffesional... 
 
 This is strange, I have an #include init.as, and I get an
 
 **Error** Scene=loading, layer=script, frame=2:Error opening include 
 file
 init.as: File not found.
 
 
 init.as IS in the same folder as the FLA, and I am all confused.?... 
 Any ideas?...

Is your movie set to use AS1?

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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.9/382 - Release Date: 04/07/2006


___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Marcelo de Moraes Serpa

just don't get why that AS term exists.


Neither do I

On 7/5/06, Mendelsohn, Michael [EMAIL PROTECTED] wrote:


Hi all...

Thanks for the responses.  It was indeed a case of setNewTextFormat.  I
just don't get why that AS term exists.

Thanks!

- MM

___
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] JPEG compression for PNG details

2006-07-05 Thread Zeh Fernando

Wondering if someone here could provide or point me in the direction of
details on the inner workings of jpeg compression for png images in the
swf format? I am particularly interested in how the alpha channel in the
PNG is translated and stored.


When you import a PNG image with an alpha channel and select it to use JPEG 
compression when exporting, the RGB data is saved as a JPEG, but the alpha 
channel is still stored as a lossless, lzw data. That means that if your 
image's transparency is too complex, it will still be too big, no matter 
what the JPEG quality you select.


The only workaround possible is simplifying the transparency - basically, 
it's the same kind of workaround you'd apply to a grayscale GIF image... 
using less levels of colors, avoiding dithering, etc.



- Zeh 


___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Andreas Rønning
Because it allows you to use several different text formats along one 
text string. Especially useful for a chat program, where you'd like the 
user's name to be in a different text style than his chat output.


- A

Marcelo de Moraes Serpa wrote:

just don't get why that AS term exists.



Neither do I

On 7/5/06, Mendelsohn, Michael [EMAIL PROTECTED] wrote:



Hi all...

Thanks for the responses.  It was indeed a case of setNewTextFormat.  I
just don't get why that AS term exists.

Thanks!

- MM

___
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


--

- Andreas Rønning

---
Flash guy
Rayon Visual Concepts, Oslo, Norway
---
___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Marcelo de Moraes Serpa

But couldn´t I just set a new TextFormat using the setTextFormat() method?

On 7/5/06, Andreas Rønning [EMAIL PROTECTED] wrote:


Because it allows you to use several different text formats along one
text string. Especially useful for a chat program, where you'd like the
user's name to be in a different text style than his chat output.

- A

Marcelo de Moraes Serpa wrote:
 just don't get why that AS term exists.


 Neither do I

 On 7/5/06, Mendelsohn, Michael [EMAIL PROTECTED] wrote:


 Hi all...

 Thanks for the responses.  It was indeed a case of setNewTextFormat.  I
 just don't get why that AS term exists.

 Thanks!

 - MM

 ___
 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

--

- Andreas Rønning

---
Flash guy
Rayon Visual Concepts, Oslo, Norway
---
___
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] JPEG compression for PNG details

2006-07-05 Thread Nikolaj Selvik
Thank you!

Exactly the verification I needed. Perhaps I could ask for a
recommendation when it comes to a PNG to SWF batch converter as well?
Seems to be quite a few out there.

Thanks again.

Nick


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Zeh
Fernando
Sent: den 5 juli 2006 15:14
To: Flashcoders mailing list
Subject: Re: [Flashcoders] JPEG compression for PNG details

 Wondering if someone here could provide or point me in the direction
of
 details on the inner workings of jpeg compression for png images in
the
 swf format? I am particularly interested in how the alpha channel in
the
 PNG is translated and stored.

When you import a PNG image with an alpha channel and select it to use
JPEG 
compression when exporting, the RGB data is saved as a JPEG, but the
alpha 
channel is still stored as a lossless, lzw data. That means that if your

image's transparency is too complex, it will still be too big, no matter

what the JPEG quality you select.

The only workaround possible is simplifying the transparency -
basically, 
it's the same kind of workaround you'd apply to a grayscale GIF image...

using less levels of colors, avoiding dithering, etc.


- Zeh 

___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Ian Thomas

That would affect all the text currently in the field.

Ian

On 7/5/06, Marcelo de Moraes Serpa [EMAIL PROTECTED] wrote:

But couldn´t I just set a new TextFormat using the setTextFormat() method?

On 7/5/06, Andreas Rønning [EMAIL PROTECTED] wrote:

 Because it allows you to use several different text formats along one
 text string. Especially useful for a chat program, where you'd like the
 user's name to be in a different text style than his chat output.

 - A

___
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] XML Menu

2006-07-05 Thread Jose Maria Barros

Hi..anyone can give me a nice tutorial to make a menu like this in XML?

http://www.coolfocus.com/relocate.asp?page=flash/examples/xpanel/index.asp

thx 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


Re: [Flashcoders] AS3 - Missing

2006-07-05 Thread Marcos Neves

AS3 is really mature now, what is excellent! But there´s no reason to
didn´t support it.
Let´s think from other point of view.
Each sprite on the flash screen, is an instance of some class. Flash
ide is locking together View+Behavior, so I can´t have two differents
Views with the same behavior.

With Jcarlos tip, I found two ways to workaround this. But it´s didn´t
seens right to me.

I draw my Countrys as movieclips without classes. Then create a
MovieClip with a Country class and put inside each movieClip
(Composition). Inside Country class, I have access to the parent
display object using the parent property and do something like an
Adapter pattern.

The other solution would be put all my countrys inside a MovieClip
called World, and use a World class to access each country and assign
the behavior.

I´ll will upload my .fla files so you can understand.

On 7/5/06, Adrian Park [EMAIL PROTECTED] wrote:

I'm not sure this is really a 'feature' that is missing since the problem
really boils down to OOP theory. For example, it could be argued that it is
incorrect for the country class to extend MovieClip since a country *is not*
a MovieClip but, rather,  *uses* a MovieClip for display. By this rational,
it makes more sense to extend via composition - i.e. the country class
simply gets a reference to a MovieClip that represents it's visual
manifestation. This way, the same class is used for many MovieClips.

If it was possible in AS2 and is no longer possible in AS3, I'd hope there
is a very good reason why and I'd hope that the reason has something to do
with AS becoming a more mature language and doing things in a better way.

Am I wrong?

A.

On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:

 You got the point. But this silly task wasn´t needed on flash 8.
 That´s the point.
 Should it be on flash 9? I don´t think so.
 Isn´t this the time to ask Adobe to include this feature? But I need
 help from others developers to show that this feature is essential.

 On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
  I'm not sure if it's entirely impossible to assign one class to multiple
  movieclips, but if that's true than the easiest way to overcome that
 problem
  is make a baseclass 'Country' and have Brazil extends Country.
 
  You still have the silly task of assigning all your countries to a
  different class, but at least your code will be easy to manage.
 
  good luck
  -Meinte
 
  On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:
  
   Is this the place to talk about AS3? If not, where would be?
  
   The concept of any movieClip be a class is very powerfull, given the
   ability to do new ClassName to create a copy of any clip. But the Auto
   Generated class and the fact that you can´t have two movieclips with
   the same class is something that is limiting flash capabilities.
  
   Example:
   I have a A world map where each country is a movieclip. And every one
   will have the same behavior. Before flash 9, what I did is assign a
   class called Country to each movie clip. This way, I can easy update
   the behavior of all at the same time.
  
   With Flash 9, I can´t assign a class with the same name and can´t
   specify a base class to the Auto Generated extends.
   My suggestion is to do something like this:
   http://neves.bs2.com.br/flex/preview.jpg
  
   When ask for AutoGenerate, a check box would enable an different base
   class, and I would write on the textbox. So a movieClip called Brazil,
   would have a autoGenerated class called Brazil that extends the class
   Country, witch would be my base class.
  
   I´m shure no one can deny that this feature is essential.
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
   Brought to you by Fig Leaf Software
   Premier Authorized Adobe Consulting and Training
   http://www.figleaf.com
   http://training.figleaf.com
  
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and 

Re: [Flashcoders] AS3 - Missing

2006-07-05 Thread Meinte van't Kruis

I draw my Countrys as movieclips without classes. Then create a
MovieClip with a Country class and put inside each movieClip
(Composition). Inside Country class, I have access to the parent
display object using the parent property and do something like an
Adapter pattern.

Ever heard of KISS ?


On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:


AS3 is really mature now, what is excellent! But there´s no reason to
didn´t support it.
Let´s think from other point of view.
Each sprite on the flash screen, is an instance of some class. Flash
ide is locking together View+Behavior, so I can´t have two differents
Views with the same behavior.

With Jcarlos tip, I found two ways to workaround this. But it´s didn´t
seens right to me.

I draw my Countrys as movieclips without classes. Then create a
MovieClip with a Country class and put inside each movieClip
(Composition). Inside Country class, I have access to the parent
display object using the parent property and do something like an
Adapter pattern.

The other solution would be put all my countrys inside a MovieClip
called World, and use a World class to access each country and assign
the behavior.

I´ll will upload my .fla files so you can understand.

On 7/5/06, Adrian Park [EMAIL PROTECTED] wrote:
 I'm not sure this is really a 'feature' that is missing since the
problem
 really boils down to OOP theory. For example, it could be argued that it
is
 incorrect for the country class to extend MovieClip since a country *is
not*
 a MovieClip but, rather,  *uses* a MovieClip for display. By this
rational,
 it makes more sense to extend via composition - i.e. the country class
 simply gets a reference to a MovieClip that represents it's visual
 manifestation. This way, the same class is used for many MovieClips.

 If it was possible in AS2 and is no longer possible in AS3, I'd hope
there
 is a very good reason why and I'd hope that the reason has something to
do
 with AS becoming a more mature language and doing things in a better
way.

 Am I wrong?

 A.

 On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:
 
  You got the point. But this silly task wasn´t needed on flash 8.
  That´s the point.
  Should it be on flash 9? I don´t think so.
  Isn´t this the time to ask Adobe to include this feature? But I need
  help from others developers to show that this feature is essential.
 
  On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
   I'm not sure if it's entirely impossible to assign one class to
multiple
   movieclips, but if that's true than the easiest way to overcome that
  problem
   is make a baseclass 'Country' and have Brazil extends Country.
  
   You still have the silly task of assigning all your countries to a
   different class, but at least your code will be easy to manage.
  
   good luck
   -Meinte
  
   On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:
   
Is this the place to talk about AS3? If not, where would be?
   
The concept of any movieClip be a class is very powerfull, given
the
ability to do new ClassName to create a copy of any clip. But the
Auto
Generated class and the fact that you can´t have two movieclips
with
the same class is something that is limiting flash capabilities.
   
Example:
I have a A world map where each country is a movieclip. And every
one
will have the same behavior. Before flash 9, what I did is assign
a
class called Country to each movie clip. This way, I can easy
update
the behavior of all at the same time.
   
With Flash 9, I can´t assign a class with the same name and can´t
specify a base class to the Auto Generated extends.
My suggestion is to do something like this:
http://neves.bs2.com.br/flex/preview.jpg
   
When ask for AutoGenerate, a check box would enable an different
base
class, and I would write on the textbox. So a movieClip called
Brazil,
would have a autoGenerated class called Brazil that extends the
class
Country, witch would be my base class.
   
I´m shure no one can deny that this feature is essential.
___
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:
  

Re: [Flashcoders] Delegate and [self] Argument

2006-07-05 Thread Jeff Jonez

Thanks for your reply Steve. I modified the original class to do exactly
what you suggested with such a third parameter. You also mention,

This was added mainly for the purpose of making it easy to remove event
listeners without having to keep an external reference to the delegate
functions that were created.

Do you have an example of how this might be used? How does the reference to
the delegate class itself help allow removal of such event listeners? Or
wait--- it's a reference to the function passed in as the second
parameter... I'll verify that right now.

Jeff.


On 7/4/06, Steve Webster [EMAIL PROTECTED] wrote:


Hi Jeff,

 In the delegate class from Steve Webster, there is this line:

 var fullArgs:Array = arguments.concat(self.extraArgs, [self]);

 I was wondering if anyone knows why there is a reference to self passed
to
 the handler function. Or how might this be useful? This extra argument
could
 cause a problem depending upon what your hander function does with
 parameters, for example if you have a function with a dynamic number of
 variables.

Yeah, my Delegate class doesn't work very well for event handlers that
expect a variable number of arguments. This has caused us problems in
the past, and we have an internal version of this class that allows
you to pass a third argument to Delegate.create that prevents the
reference to self being added to the arguments list. Let me know if
this might be useful for you and I'll dig it out.

The reference to self is passed so that you have a clean and easy way
to reference the delegate function in the event handler method. This
was added mainly for the purpose of making it easy to remove event
listeners without having to keep an external reference to the delegate
functions that were created. Of course, you could just use
arguments.caller, but that's less obvious.

Cheers,

Steve

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

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


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

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


Re: [Flashcoders] AS3 - Missing

2006-07-05 Thread Johannes Nel

KISS is not inheritance over composition. KISS is the reverse. rule of thumb
always compose rather than extend so that it will be simple later on to
change things.

On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:


I draw my Countrys as movieclips without classes. Then create a
MovieClip with a Country class and put inside each movieClip
(Composition). Inside Country class, I have access to the parent
display object using the parent property and do something like an
Adapter pattern.

Ever heard of KISS ?


On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:

 AS3 is really mature now, what is excellent! But there´s no reason to
 didn´t support it.
 Let´s think from other point of view.
 Each sprite on the flash screen, is an instance of some class. Flash
 ide is locking together View+Behavior, so I can´t have two differents
 Views with the same behavior.

 With Jcarlos tip, I found two ways to workaround this. But it´s didn´t
 seens right to me.

 I draw my Countrys as movieclips without classes. Then create a
 MovieClip with a Country class and put inside each movieClip
 (Composition). Inside Country class, I have access to the parent
 display object using the parent property and do something like an
 Adapter pattern.

 The other solution would be put all my countrys inside a MovieClip
 called World, and use a World class to access each country and assign
 the behavior.

 I´ll will upload my .fla files so you can understand.

 On 7/5/06, Adrian Park [EMAIL PROTECTED] wrote:
  I'm not sure this is really a 'feature' that is missing since the
 problem
  really boils down to OOP theory. For example, it could be argued that
it
 is
  incorrect for the country class to extend MovieClip since a country
*is
 not*
  a MovieClip but, rather,  *uses* a MovieClip for display. By this
 rational,
  it makes more sense to extend via composition - i.e. the country class
  simply gets a reference to a MovieClip that represents it's visual
  manifestation. This way, the same class is used for many MovieClips.
 
  If it was possible in AS2 and is no longer possible in AS3, I'd hope
 there
  is a very good reason why and I'd hope that the reason has something
to
 do
  with AS becoming a more mature language and doing things in a better
 way.
 
  Am I wrong?
 
  A.
 
  On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:
  
   You got the point. But this silly task wasn´t needed on flash 8.
   That´s the point.
   Should it be on flash 9? I don´t think so.
   Isn´t this the time to ask Adobe to include this feature? But I need
   help from others developers to show that this feature is essential.
  
   On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
I'm not sure if it's entirely impossible to assign one class to
 multiple
movieclips, but if that's true than the easiest way to overcome
that
   problem
is make a baseclass 'Country' and have Brazil extends Country.
   
You still have the silly task of assigning all your countries to a
different class, but at least your code will be easy to manage.
   
good luck
-Meinte
   
On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:

 Is this the place to talk about AS3? If not, where would be?

 The concept of any movieClip be a class is very powerfull, given
 the
 ability to do new ClassName to create a copy of any clip. But
the
 Auto
 Generated class and the fact that you can´t have two movieclips
 with
 the same class is something that is limiting flash capabilities.

 Example:
 I have a A world map where each country is a movieclip. And
every
 one
 will have the same behavior. Before flash 9, what I did is
assign
 a
 class called Country to each movie clip. This way, I can easy
 update
 the behavior of all at the same time.

 With Flash 9, I can´t assign a class with the same name and
can´t
 specify a base class to the Auto Generated extends.
 My suggestion is to do something like this:
 http://neves.bs2.com.br/flex/preview.jpg

 When ask for AutoGenerate, a check box would enable an different
 base
 class, and I would write on the textbox. So a movieClip called
 Brazil,
 would have a autoGenerated class called Brazil that extends the
 class
 Country, witch would be my base class.

 I´m shure no one can deny that this feature is essential.
 ___
 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 

Re: [Flashcoders] AS3 - Missing

2006-07-05 Thread Meinte van't Kruis

no I meant kiss=keep it simple stupid

On 7/5/06, Johannes Nel [EMAIL PROTECTED] wrote:


KISS is not inheritance over composition. KISS is the reverse. rule of
thumb
always compose rather than extend so that it will be simple later on to
change things.

On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:

 I draw my Countrys as movieclips without classes. Then create a
 MovieClip with a Country class and put inside each movieClip
 (Composition). Inside Country class, I have access to the parent
 display object using the parent property and do something like an
 Adapter pattern.

 Ever heard of KISS ?


 On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:
 
  AS3 is really mature now, what is excellent! But there´s no reason to
  didn´t support it.
  Let´s think from other point of view.
  Each sprite on the flash screen, is an instance of some class. Flash
  ide is locking together View+Behavior, so I can´t have two differents
  Views with the same behavior.
 
  With Jcarlos tip, I found two ways to workaround this. But it´s didn´t
  seens right to me.
 
  I draw my Countrys as movieclips without classes. Then create a
  MovieClip with a Country class and put inside each movieClip
  (Composition). Inside Country class, I have access to the parent
  display object using the parent property and do something like an
  Adapter pattern.
 
  The other solution would be put all my countrys inside a MovieClip
  called World, and use a World class to access each country and assign
  the behavior.
 
  I´ll will upload my .fla files so you can understand.
 
  On 7/5/06, Adrian Park [EMAIL PROTECTED] wrote:
   I'm not sure this is really a 'feature' that is missing since the
  problem
   really boils down to OOP theory. For example, it could be argued
that
 it
  is
   incorrect for the country class to extend MovieClip since a country
 *is
  not*
   a MovieClip but, rather,  *uses* a MovieClip for display. By this
  rational,
   it makes more sense to extend via composition - i.e. the country
class
   simply gets a reference to a MovieClip that represents it's visual
   manifestation. This way, the same class is used for many MovieClips.
  
   If it was possible in AS2 and is no longer possible in AS3, I'd hope
  there
   is a very good reason why and I'd hope that the reason has something
 to
  do
   with AS becoming a more mature language and doing things in a better
  way.
  
   Am I wrong?
  
   A.
  
   On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:
   
You got the point. But this silly task wasn´t needed on flash 8.
That´s the point.
Should it be on flash 9? I don´t think so.
Isn´t this the time to ask Adobe to include this feature? But I
need
help from others developers to show that this feature is
essential.
   
On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
 I'm not sure if it's entirely impossible to assign one class to
  multiple
 movieclips, but if that's true than the easiest way to overcome
 that
problem
 is make a baseclass 'Country' and have Brazil extends Country.

 You still have the silly task of assigning all your countries to
a
 different class, but at least your code will be easy to manage.

 good luck
 -Meinte

 On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:
 
  Is this the place to talk about AS3? If not, where would be?
 
  The concept of any movieClip be a class is very powerfull,
given
  the
  ability to do new ClassName to create a copy of any clip. But
 the
  Auto
  Generated class and the fact that you can´t have two
movieclips
  with
  the same class is something that is limiting flash
capabilities.
 
  Example:
  I have a A world map where each country is a movieclip. And
 every
  one
  will have the same behavior. Before flash 9, what I did is
 assign
  a
  class called Country to each movie clip. This way, I can easy
  update
  the behavior of all at the same time.
 
  With Flash 9, I can´t assign a class with the same name and
 can´t
  specify a base class to the Auto Generated extends.
  My suggestion is to do something like this:
  http://neves.bs2.com.br/flex/preview.jpg
 
  When ask for AutoGenerate, a check box would enable an
different
  base
  class, and I would write on the textbox. So a movieClip called
  Brazil,
  would have a autoGenerated class called Brazil that extends
the
  class
  Country, witch would be my base class.
 
  I´m shure no one can deny that this feature is essential.
  ___
  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 - Missing

2006-07-05 Thread Johannes Nel

i know exactly what the  acronym means, i disagree with your idea of what is
simple.

On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:


no I meant kiss=keep it simple stupid

On 7/5/06, Johannes Nel [EMAIL PROTECTED] wrote:

 KISS is not inheritance over composition. KISS is the reverse. rule of
 thumb
 always compose rather than extend so that it will be simple later on to
 change things.

 On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
 
  I draw my Countrys as movieclips without classes. Then create a
  MovieClip with a Country class and put inside each movieClip
  (Composition). Inside Country class, I have access to the parent
  display object using the parent property and do something like an
  Adapter pattern.
 
  Ever heard of KISS ?
 
 
  On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:
  
   AS3 is really mature now, what is excellent! But there´s no reason
to
   didn´t support it.
   Let´s think from other point of view.
   Each sprite on the flash screen, is an instance of some class. Flash
   ide is locking together View+Behavior, so I can´t have two
differents
   Views with the same behavior.
  
   With Jcarlos tip, I found two ways to workaround this. But it´s
didn´t
   seens right to me.
  
   I draw my Countrys as movieclips without classes. Then create a
   MovieClip with a Country class and put inside each movieClip
   (Composition). Inside Country class, I have access to the parent
   display object using the parent property and do something like an
   Adapter pattern.
  
   The other solution would be put all my countrys inside a MovieClip
   called World, and use a World class to access each country and
assign
   the behavior.
  
   I´ll will upload my .fla files so you can understand.
  
   On 7/5/06, Adrian Park [EMAIL PROTECTED] wrote:
I'm not sure this is really a 'feature' that is missing since the
   problem
really boils down to OOP theory. For example, it could be argued
 that
  it
   is
incorrect for the country class to extend MovieClip since a
country
  *is
   not*
a MovieClip but, rather,  *uses* a MovieClip for display. By this
   rational,
it makes more sense to extend via composition - i.e. the country
 class
simply gets a reference to a MovieClip that represents it's visual
manifestation. This way, the same class is used for many
MovieClips.
   
If it was possible in AS2 and is no longer possible in AS3, I'd
hope
   there
is a very good reason why and I'd hope that the reason has
something
  to
   do
with AS becoming a more mature language and doing things in a
better
   way.
   
Am I wrong?
   
A.
   
On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:

 You got the point. But this silly task wasn´t needed on flash 8.
 That´s the point.
 Should it be on flash 9? I don´t think so.
 Isn´t this the time to ask Adobe to include this feature? But I
 need
 help from others developers to show that this feature is
 essential.

 On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
  I'm not sure if it's entirely impossible to assign one class
to
   multiple
  movieclips, but if that's true than the easiest way to
overcome
  that
 problem
  is make a baseclass 'Country' and have Brazil extends Country.
 
  You still have the silly task of assigning all your countries
to
 a
  different class, but at least your code will be easy to
manage.
 
  good luck
  -Meinte
 
  On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:
  
   Is this the place to talk about AS3? If not, where would be?
  
   The concept of any movieClip be a class is very powerfull,
 given
   the
   ability to do new ClassName to create a copy of any clip.
But
  the
   Auto
   Generated class and the fact that you can´t have two
 movieclips
   with
   the same class is something that is limiting flash
 capabilities.
  
   Example:
   I have a A world map where each country is a movieclip. And
  every
   one
   will have the same behavior. Before flash 9, what I did is
  assign
   a
   class called Country to each movie clip. This way, I can
easy
   update
   the behavior of all at the same time.
  
   With Flash 9, I can´t assign a class with the same name and
  can´t
   specify a base class to the Auto Generated extends.
   My suggestion is to do something like this:
   http://neves.bs2.com.br/flex/preview.jpg
  
   When ask for AutoGenerate, a check box would enable an
 different
   base
   class, and I would write on the textbox. So a movieClip
called
   Brazil,
   would have a autoGenerated class called Brazil that extends
 the
   class
   Country, witch would be my base class.
  
   I´m shure no one can deny that this feature is essential.
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription 

Re: [Flashcoders] Shared Fonts puzzle (hell)

2006-07-05 Thread Marcelo de Moraes Serpa

The swf I´m loading is a v7 swf and the host is v8. Could that be causing
some this issue?

On 7/5/06, Marcelo de Moraes Serpa [EMAIL PROTECTED] wrote:


Thanks for the article Iv. I guess the way I´m doing is right as I don´t
need this kind of control over what characters I would need to embbed. I´ll
test when I get home, but I guess this issue is happening becouse I´m not
setting the embedFonts property in the right place.


On 7/5/06, Weyert de Boer [EMAIL PROTECTED] wrote:

 Fonts and Flash on the Mac I am going nuts. Troublesome.
 ___
 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] Re: Programmatically instantiating a class thatextends MovieClip

2006-07-05 Thread Tyler Wright

There's a really light class called Prototype which is free to download at
http://codext.com/code/9. It does the same thing except with full
constructor support. It also has a really simple/clean API:

mc = createEmptyMovieClip(mc, 1);
Prototype.makeInstanceof(mc, MyMovieClipClass);

thats it! I've loved it ... works on extending other elements too, like
TextFields or _root (I use that one constantly).

Tyler


On 7/3/06, Bernard Visscher [EMAIL PROTECTED] wrote:


I've tested the following a while ago and it works perfectly.
It uses the acme ClassUtilities class.

MovieFactory:

import com.acme.ClassUtilities;

class nl.debit.util.MovieFactory {

private static var instance : MovieFactory;

public static function getInstance() : MovieFactory
{
if (instance == null)
instance = new MovieFactory();
return instance;
}

private function MovieFactory()
{
ClassUtilities.registerPackage();
}

public static function
createMC(target:MovieClip,id:String,className:Function):MovieClip
{
if (instance == null)
instance = new MovieFactory();

if(!className.symbolLinked)
{
var classPath:String = ClassUtilities.getPath(className);
className.symbolName = __Packages. + classPath;
className.symbolLinked =
Object.registerClass(className.symbolName,className);
}

return
target.attachMovie(className.symbolName,id,target.getNextHighestDepth());
}
}


MyClass:

class MyClass extends MovieClip{

public function MyClass() {
beginFill(0x00);
moveTo(0,0);
lineTo(100,0);
lineTo(100,100);
lineTo(0,100);
lineTo(0,0);
endFill();
}
}

Then use in your code:

var mClip:MovieClip = MovieFactory.createMC(_root,test,MyClass);


Greetz,

Bernard

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Namens
 Costello, Rob R
 Verzonden: maandag 3 juli 2006 17:05
 Aan: flashcoders@chattyfig.figleaf.com
 Onderwerp: [Flashcoders] Re: Programmatically instantiating a
 class thatextends MovieClip

 As a variant on the __proto__ method (which I gather is what
 the compiler actually uses behind the scenes anyway) I also
 bundle the code into a static method





  Class A {

 ...



 // dynamicMc (no library symbol) will be added and subclassed
 to mcSubClass

 dynamicMc:MovieClip  = McSubClass.addInstance(baseMC);

 }





 class McSubClass extends MovieClip{



 function McSubClass {

   //empty constructor

 }



 function init(){



   //initialize mc - add dynamic graphics etc



 }



 static function addInstance (base_mc) {



 var newMc;

 var nd = base_mc.getNextHighestDepth();

 newMc= base_mc.createEmptyMovieClip(mcSubClass+nd,nd);

 newMc.__proto__ = new McSubClass ();

 newMc.init();

 return newMc;

 }





 }



 maybe mc.__proto__ == MyClass.prototype (below) is better
 than my  newMc.__proto__ = new McSubClass ()

 my method (i picked up on this list) does have the side
 effect that the constructor can't initialize the mc, hence
 the separate init call after the __proto__ / constructor; all
 wrapped in one method so I don't forget

  Rob





  Subject: Re: [Flashcoders] Programmatically instantiating a
 class that

  extends MovieClip.

  To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com

  Message-ID:

  [EMAIL PROTECTED]

  Content-Type: text/plain; charset=UTF-8; format=flowed

 

  Hello :)

 

  it's easy, you must use __proto__

 

  AS2 - MyClass extend MovieClip !!!

 

  MyClass extends MovieClip {

 

   // o Constructor

 

   public function MyClass() {

 

   }

 

  }

 

  

 

  var mc = createEmptyMovieClip(myInstance, 1) ;

  mc.__proto__ == MyClass.prototype ;

  MyClass.call(mc) ;

 

  EKA + :)

 

 

 

 

  2006/6/29, Scott Hyndman [EMAIL PROTECTED]:

  

   That's exactly what I mean. As a result you can do cool
 things like

   reparenting -- like moving a button from one window to another. It

   handles the MovieClip creation itself.

  

   A code example really isn't too easy, because the framework that

   allows this to be possible is quite large. If you were really

   interested, you could look at the code. Here's a link:

  

   http://tinyurl.com/jqtwv

  

   It's a gigantic class...so it might be difficult to work through.
   The

   important method is createMovieClips(), which is called
 when a view

   (the type of object that encapsulates movieclips) moves to a new

   superview.

  

   Scott

  

   On 29/06/06, Jim Kremens [EMAIL PROTECTED] wrote:

Why not subclass object instead? Both ActionStep and
 ASwing work

Re: [Flashcoders] Tabbed Browsing support? htmlText, contextMenu, Javascript?

2006-07-05 Thread Tyler Wright


Note: For those from Adobe that read this list ... With IE7's release and
it's support for tabbed browsing, if Flash Player provides no support for
opening links in tabs it will be increasing apparent that Flash Player is
essentially unaware of tabbed browers.)



I believe JavaScript is also fully unaware of tabs in any browser, and
JavaScript is the browsers own language. I am sorry but tabs are still very
browser specific and not exposed yet to any programatic API's available to
Flash. The only solution currently is to implement browser-specific plugins
that can communicate with the webpage through JavaScript. Good luck
convincing internet users that they'll need such a plugin.

If I find anything more that might look like a possibility I'll post it to
the list, but I think you're out of luck.

Tyler
___
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: Programmatically instantiating a classthatextends MovieClip

2006-07-05 Thread Bernard Visscher
Nice!
Didn't know that one :) 

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Namens Tyler Wright
 Verzonden: woensdag 5 juli 2006 17:47
 Aan: Flashcoders mailing list
 Onderwerp: Re: [Flashcoders] Re: Programmatically 
 instantiating a classthatextends MovieClip
 
 There's a really light class called Prototype which is free 
 to download at http://codext.com/code/9. It does the same 
 thing except with full constructor support. It also has a 
 really simple/clean API:
 
 mc = createEmptyMovieClip(mc, 1);
 Prototype.makeInstanceof(mc, MyMovieClipClass);
 
 thats it! I've loved it ... works on extending other elements 
 too, like TextFields or _root (I use that one constantly).
 
 Tyler
 
 
 On 7/3/06, Bernard Visscher [EMAIL PROTECTED] wrote:
 
  I've tested the following a while ago and it works perfectly.
  It uses the acme ClassUtilities class.
 
  MovieFactory:
 
  import com.acme.ClassUtilities;
 
  class nl.debit.util.MovieFactory {
 
  private static var instance : MovieFactory;
 
  public static function getInstance() : MovieFactory
  {
  if (instance == null)
  instance = new MovieFactory();
  return instance;
  }
 
  private function MovieFactory()
  {
  ClassUtilities.registerPackage();
  }
 
  public static function
  createMC(target:MovieClip,id:String,className:Function):MovieClip
  {
  if (instance == null)
  instance = new MovieFactory();
 
  if(!className.symbolLinked)
  {
  var classPath:String = 
 ClassUtilities.getPath(className);
  className.symbolName = __Packages. + classPath;
  className.symbolLinked = 
  Object.registerClass(className.symbolName,className);
  }
 
  return
  
 target.attachMovie(className.symbolName,id,target.getNextHighe
 stDepth());
  }
  }
 
 
  MyClass:
 
  class MyClass extends MovieClip{
 
  public function MyClass() {
  beginFill(0x00);
  moveTo(0,0);
  lineTo(100,0);
  lineTo(100,100);
  lineTo(0,100);
  lineTo(0,0);
  endFill();
  }
  }
 
  Then use in your code:
 
  var mClip:MovieClip = MovieFactory.createMC(_root,test,MyClass);
 
 
  Greetz,
 
  Bernard
 
   -Oorspronkelijk bericht-
   Van: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] Namens 
 Costello, 
   Rob R
   Verzonden: maandag 3 juli 2006 17:05
   Aan: flashcoders@chattyfig.figleaf.com
   Onderwerp: [Flashcoders] Re: Programmatically 
 instantiating a class 
   thatextends MovieClip
  
   As a variant on the __proto__ method (which I gather is what the 
   compiler actually uses behind the scenes anyway) I also 
 bundle the 
   code into a static method
  
  
  
  
  
Class A {
  
   ...
  
  
  
   // dynamicMc (no library symbol) will be added and subclassed to 
   mcSubClass
  
   dynamicMc:MovieClip  = McSubClass.addInstance(baseMC);
  
   }
  
  
  
  
  
   class McSubClass extends MovieClip{
  
  
  
   function McSubClass {
  
 //empty constructor
  
   }
  
  
  
   function init(){
  
  
  
 //initialize mc - add dynamic graphics etc
  
  
  
   }
  
  
  
   static function addInstance (base_mc) {
  
  
  
   var newMc;
  
   var nd = base_mc.getNextHighestDepth();
  
   newMc= 
 base_mc.createEmptyMovieClip(mcSubClass+nd,nd);
  
   newMc.__proto__ = new McSubClass ();
  
   newMc.init();
  
   return newMc;
  
   }
  
  
  
  
  
   }
  
  
  
   maybe mc.__proto__ == MyClass.prototype (below) is better 
 than my  
   newMc.__proto__ = new McSubClass ()
  
   my method (i picked up on this list) does have the side 
 effect that 
   the constructor can't initialize the mc, hence the separate init 
   call after the __proto__ / constructor; all wrapped in 
 one method so 
   I don't forget
  
Rob
  
  
  
  
  
Subject: Re: [Flashcoders] Programmatically instantiating a
   class that
  
extends MovieClip.
  
To: Flashcoders mailing list 
 flashcoders@chattyfig.figleaf.com
  
Message-ID:
  
[EMAIL PROTECTED]
  
Content-Type: text/plain; charset=UTF-8; format=flowed
  
   
  
Hello :)
  
   
  
it's easy, you must use __proto__
  
   
  
AS2 - MyClass extend MovieClip !!!
  
   
  
MyClass extends MovieClip {
  
   
  
 // o Constructor
  
   
  
 public function MyClass() {
  
   
  
 }
  
   
  
}
  
   
  

  
   
  
var mc = createEmptyMovieClip(myInstance, 1) ;
  
mc.__proto__ == MyClass.prototype ;
  
MyClass.call(mc) ;
  
   
  
EKA + :)
  
   
  
   
  
   
  
   
  
2006/6/29, Scott Hyndman [EMAIL PROTECTED]:
 

Re: [Flashcoders] euro symbol fight

2006-07-05 Thread David Rorex

How about 'escaping' the text before you send to amfphp, and
'unescaping' the text after you recieve it back?

escaping = turning all non-standard characters into things like %12%34%56
unescaping = reverse of above process

-David R

On 7/4/06, Gabriel [EMAIL PROTECTED] wrote:

thanks Serge
yes, it has the symbol. And is not the embed problem...

thanks
GaB

Serge Jespers wrote:
 Does that font have the euro symbol?
 I think what you're describing could mean it doesn't have the font
 symbol...

 Serge



 thanks Bernard, but this is not the problem.

 I have a table in a database, where I write this text this will cost
 you 50€.

 when I retrieve this info from AMFPHP I receive the whole text except
 for € which cames as a square.

 thanks,
 GaB

 ___
 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


--
Gabriel Belvedere

www.antares.es http://www.antares.es
___
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] euro symbol fight

2006-07-05 Thread Gabriel
Is a good idea, but I cannot do that because, most of the data I get, I 
retrieve it from the database directly trough the ORM (pear), so I can't 
touch the data.


the way it comes is:

DB-ORM-my_flash_service.php-AMFPHP gateway-myApp.swf

any idea?

thanks!
GaB

David Rorex wrote:

How about 'escaping' the text before you send to amfphp, and
'unescaping' the text after you recieve it back?

escaping = turning all non-standard characters into things like %12%34%56
unescaping = reverse of above process

-David R

On 7/4/06, Gabriel [EMAIL PROTECTED] wrote:

thanks Serge
yes, it has the symbol. And is not the embed problem...

thanks
GaB

Serge Jespers wrote:
 Does that font have the euro symbol?
 I think what you're describing could mean it doesn't have the font
 symbol...

 Serge



 thanks Bernard, but this is not the problem.

 I have a table in a database, where I write this text this will cost
 you 50€.

 when I retrieve this info from AMFPHP I receive the whole text except
 for € which cames as a square.

 thanks,
 GaB

 ___
 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


--
Gabriel Belvedere

www.antares.es http://www.antares.es
___
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



--
Gabriel Belvedere

www.antares.es http://www.antares.es
___
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[2]: [Flashcoders] Shared Fonts puzzle (hell)

2006-07-05 Thread Iv
Hello Marcelo,

MdMS The swf I╢m loading is a v7 swf and the host is v8. Could that be causing
MdMS some this issue?

http://www.sharedfonts.com/eng/faq.html
- a bit info about it in the first question.


-- 
Ivan Dembicki

[EMAIL PROTECTED] || 
http://www.design.ru

___
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 - Missing

2006-07-05 Thread Adrian Park

This article explains in some detail what we're trying to say.

http://www.javaworld.com/javaworld/jw-11-1998/jw-11-techniques-p2.html

In the spirit of KISS, you could skim through most of it (but ensure you get
the difference between Inheritance and Composition) then read the stuff at
the end of page 2 under  Choosing between composition and inheritance.

HTH

On 7/5/06, Johannes Nel [EMAIL PROTECTED] wrote:


i know exactly what the  acronym means, i disagree with your idea of what
is
simple.

On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:

 no I meant kiss=keep it simple stupid

 On 7/5/06, Johannes Nel [EMAIL PROTECTED] wrote:
 
  KISS is not inheritance over composition. KISS is the reverse. rule of
  thumb
  always compose rather than extend so that it will be simple later on
to
  change things.
 
  On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
  
   I draw my Countrys as movieclips without classes. Then create a
   MovieClip with a Country class and put inside each movieClip
   (Composition). Inside Country class, I have access to the parent
   display object using the parent property and do something like an
   Adapter pattern.
  
   Ever heard of KISS ?
  
  
   On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:
   
AS3 is really mature now, what is excellent! But there´s no reason
 to
didn´t support it.
Let´s think from other point of view.
Each sprite on the flash screen, is an instance of some class.
Flash
ide is locking together View+Behavior, so I can´t have two
 differents
Views with the same behavior.
   
With Jcarlos tip, I found two ways to workaround this. But it´s
 didn´t
seens right to me.
   
I draw my Countrys as movieclips without classes. Then create a
MovieClip with a Country class and put inside each movieClip
(Composition). Inside Country class, I have access to the parent
display object using the parent property and do something like an
Adapter pattern.
   
The other solution would be put all my countrys inside a MovieClip
called World, and use a World class to access each country and
 assign
the behavior.
   
I´ll will upload my .fla files so you can understand.
   
On 7/5/06, Adrian Park [EMAIL PROTECTED] wrote:
 I'm not sure this is really a 'feature' that is missing since
the
problem
 really boils down to OOP theory. For example, it could be argued
  that
   it
is
 incorrect for the country class to extend MovieClip since a
 country
   *is
not*
 a MovieClip but, rather,  *uses* a MovieClip for display. By
this
rational,
 it makes more sense to extend via composition - i.e. the country
  class
 simply gets a reference to a MovieClip that represents it's
visual
 manifestation. This way, the same class is used for many
 MovieClips.

 If it was possible in AS2 and is no longer possible in AS3, I'd
 hope
there
 is a very good reason why and I'd hope that the reason has
 something
   to
do
 with AS becoming a more mature language and doing things in a
 better
way.

 Am I wrong?

 A.

 On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:
 
  You got the point. But this silly task wasn´t needed on flash
8.
  That´s the point.
  Should it be on flash 9? I don´t think so.
  Isn´t this the time to ask Adobe to include this feature? But
I
  need
  help from others developers to show that this feature is
  essential.
 
  On 7/5/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
   I'm not sure if it's entirely impossible to assign one class
 to
multiple
   movieclips, but if that's true than the easiest way to
 overcome
   that
  problem
   is make a baseclass 'Country' and have Brazil extends
Country.
  
   You still have the silly task of assigning all your
countries
 to
  a
   different class, but at least your code will be easy to
 manage.
  
   good luck
   -Meinte
  
   On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:
   
Is this the place to talk about AS3? If not, where would
be?
   
The concept of any movieClip be a class is very powerfull,
  given
the
ability to do new ClassName to create a copy of any clip.
 But
   the
Auto
Generated class and the fact that you can´t have two
  movieclips
with
the same class is something that is limiting flash
  capabilities.
   
Example:
I have a A world map where each country is a movieclip.
And
   every
one
will have the same behavior. Before flash 9, what I did is
   assign
a
class called Country to each movie clip. This way, I can
 easy
update
the behavior of all at the same time.
   
With Flash 9, I can´t assign a class with the same name
and
   can´t
specify a base class to the Auto Generated extends.
My suggestion is to do something 

Re: Re[2]: [Flashcoders] Shared Fonts puzzle (hell)

2006-07-05 Thread Marcelo de Moraes Serpa

Hello Iv, thanks again for the reply.

This article talks about version 7 loading v. 6.
The host SWF is v8, the loaded one is v7, the library SWF is v8. But I think
it´s the same situation after all. I will make some more tests later.

Thanks,

Marcelo.


On 7/5/06, Iv [EMAIL PROTECTED] wrote:


Hello Marcelo,

MdMS The swf I╢m loading is a v7 swf and the host is v8. Could that be
causing
MdMS some this issue?

http://www.sharedfonts.com/eng/faq.html
- a bit info about it in the first question.


--
Ivan Dembicki


[EMAIL PROTECTED] ||
http://www.design.ru

___
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: Re[2]: [Flashcoders] Shared Fonts puzzle (hell)

2006-07-05 Thread Marcelo de Moraes Serpa

Hmmm.. further reading this faq, I´ve saw the question about the static text
fields. I´m actually using some static textfields that use the same shared
font, configured via the flash ide. The only difference is that I don´t use
SFM, and the faq relates to SFM...

Could that be causing these strange behvaiours when I try apply the
TextFormat objetcts to the textifields and they just don´t work?

I don´t have access to my source files here, I will test when I get home..

Cheers,

Marcelo.

On 7/5/06, Marcelo de Moraes Serpa [EMAIL PROTECTED] wrote:


Hello Iv, thanks again for the reply.

This article talks about version 7 loading v. 6.
The host SWF is v8, the loaded one is v7, the library SWF is v8. But I
think it´s the same situation after all. I will make some more tests later.

Thanks,

Marcelo.



On 7/5/06, Iv [EMAIL PROTECTED] wrote:

 Hello Marcelo,

 MdMS The swf I╢m loading is a v7 swf and the host is v8. Could that be
 causing
 MdMS some this issue?

 http://www.sharedfonts.com/eng/faq.html
 - a bit info about it in the first question.


 --
 Ivan Dembicki

 
 [EMAIL PROTECTED] ||
 http://www.design.ru

 ___
 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] LocalConnection to multiple swfs

2006-07-05 Thread Steven Sacks | BLITZ
Hey Danny,

LocalConnection is one-way communication.  So if you need to send and
receive, you need two LocalConnections.  In addition, a movie can only
have one receiver LocalConnection open at a time, but can transmit on
as many LocalConnection channels as you like.

So, you can have multiple swfs listening to a single swf, but you cannot
have a single swf listen to multiple swfs.

An example of LocalConnection done very well is the xRay debugger tool:

http://osflash.org/xray

HTH,
Steven

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


RE: [Flashcoders] LocalConnection to multiple swfs

2006-07-05 Thread Steven Sacks | BLITZ
 So, you can have multiple swfs listening to a single swf, but you
cannot
 have a single swf listen to multiple swfs.

The best analogy I can think of is a radio station.

A radio station can transmit its signal to all its listeners.  But, the
radio station can only receive calls from one listener at a time.
___
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] LocalConnection to multiple swfs

2006-07-05 Thread Steven Sacks | BLITZ
The dispatcher doesn't need to know it's a unique ID.  It just sends a
unique ID which is then picked up by the listener.

So, let's say you have 5 swfs listening to channel Rock.  They all
want to hear Rock, but they also need to hear advertising to their local
area.  So, you would pass a unique ID as an argument and the listeners
would then parse it out so you might send Area1 as the unique ID and
Area2 as another ID and in your receiver script the swfs would
determine if the message was for them or not by checking for the
argument.

A long time ago, I wrote a LocalConnection class.  It might be of use
for researching purposes.  It's written in AS1 but I think it's a decent
starting point for learning more about LC.  It supports sending methods
and arguments across LC, including the target, as well as a test method
ping to make sure the connection is alive, and if it isn't it will
reconnect.

http://chattyfig.figleaf.com/pipermail/flashcoders/2003-May/076262.html


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


RE: [Flashcoders] Tabbed Browsing support? htmlText, contextMenu, Javascript?

2006-07-05 Thread Steven Sacks | BLITZ
This thread might be of use to you:

http://my.opera.com/userjs/forums/topic.dml?id=125641

Did a google search:
http://www.google.com/search?q=open+link+in+new+tab+javascript


BLITZ | Steven Sacks - 310-551-0200 x209


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Greg Hamer
 Sent: Sunday, July 02, 2006 1:36 PM
 To: Flashcoders mailing list
 Subject: [Flashcoders] Tabbed Browsing support? htmlText,
 contextMenu,Javascript?
 
 Has anyone here implemented tabbed browser support in Flash? i.e.
links in
 Flash content that can be opened in a new tab?
 
 I see three possible options: 1) getURL; 2) TextField with html=true
and
 htmlText= containing html anchors; and 3) Javascript.
 
 The problems are ...
 
 1) With getURL(), how would you specify new tab?
 
 2) With anchors in htmlText, Flash Player provides the context menu.
The
 Flash Player browser plug-ins include in the context menu the option
Open
 in new window. The freestanding Flash Player omits this option. (fyi
...
 a
 swf with an anchor in htmlText can be found here:
 www.oman3d.com/tutorials/flash/loadvars_bc/ )
 
 3) With Javascript, as a Flash/ActionScript developer I don't know how
to
 code this solution. (fyi ... I did some google searchs on this with no
 luck.) If anyone can point me to a Javascript code solution, it would
be
 much appreciated.
 
 Note: For those from Adobe that read this list ... With IE7's release
and
 it's support for tabbed browsing, if Flash Player provides no support
for
 opening links in tabs it will be increasing apparent that Flash Player
is
 essentially unaware of tabbed browers.)
 ___
 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] AS3 - why no properties in interfaces?

2006-07-05 Thread Hans Wichman

Hi Marijan,
thanks for sharing your views on this.
greetz
Hans


On 7/5/06, Marijan Miličević [EMAIL PROTECTED] wrote:


Hi Hans,
as I see it, I am not interested into dashed stuff of a shape,
only thing I am interested in is what can I do with it...
so, I could paint my shape with a brush or draw a line,
up to me to decide and shouldn't be exposed by my interface..
for example:


interface Shape
{
   void hide();
   void show();
   void draw();
   void delete();
}

public class Square implements Shape, Jumpable
{
   //implementation..
   public void draw()
   {
   final Pen pen = new Pen(LineType.DASHED);
   pen.drawLine(100,150);
   //etc
   }
   //..more implementation...

   // Jumpable implementation
   public void jump()
   {
   // jumping code in here..
   }
}

public class MyCoolShape implements Shape
{
   //implementation..
   public void draw()
   {
   final Brush brush = new Brush(new Color(0x003300));
   brush.paint(10,10,30,-30);
   //etc
   }
   //..more implementation...
}


public final class LineType
{
   public static final int DASHED = 0;
   public static final int MYTYPE = 1;
   private LineType(){}// do not instantiate
}


but again, as I said, nobody forbids you to use it the way you do,
and it's pointless to have huge discussion about it...
see it as personal preference...
kind regards,
-m


-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Hans Wichman
Sent: Wednesday, July 05, 2006 8:14 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] AS3 - why no properties in interfaces?

Hi Marijan,
it might depend on what your constants are. For example imagine you had
an
interface Shape, with a method setLineType. You could have setLineType
(type:String) (eg dashed), or setLineType (type:Number) (eg 0, 2 ,5).
With
public constants you could have the Shape interface declare vars as
public
static var DASHED:Number = 0; and you could call setLineType (
Shape.DASHED
);.
Out of the 3 alternatives i would prefer the last, and I do not think
this
exposes inner details a lot.

As said I can imagine that when you declare an interface like:
interface MyGeneralInterface {
 public static var mySpecificVar:MyVerySpecificClass;
}
that it is plain wrong, but otherwise in the linetype example? I don't
know,
I'd like to hear your thoughts on it.

greetz
Hans


On 7/3/06, Marijan Milicevic [EMAIL PROTECTED] wrote:

 Hi Hans,
 while I cannot say it's bad, it's difficult t say there's nothin nad
about
 it.
 to quote an javaworld article:

 It turns out that using an interface to declare constants may not be
the
 best practice after all. In fact, using interfaces in this way may be
 downright nasty. Why? Interfaces should only be used to define types;
any
 other use is an abuse. Using an interface causes internal details --
such
as
 constants -- to leak into the class' public API. Once something becomes
part
 of the public API, you can never get rid of it.
 so, in above case it could be wrong..

 -m






 -Original Message-
 From: [EMAIL PROTECTED] on behalf of Hans
Wichman
 Sent: Mon 7/3/2006 7:04 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] AS3 - why no properties in interfaces?

 Although there is -nothing- bad about using interfaces as a container
of
 constants.



 On 7/3/06, Marijan Milicevic [EMAIL PROTECTED] wrote:
 
  Hi Sascha,
 
  But it's still beyond me why property support wasn't added. It
  can be such a complex thing but would make OO life a good
  amount easier.
 
  You are refering to Java but defined fields in java are implicitly
  static finals and need to be initilized within interface,
  so, you are not missing that much in AS3 anyway.
 
  Also, bad habit of java programmers is to use interfaces as container
of
  constants,
  which, saves them some typing (although with static imports in
1.5version
  it doesn't make any difference).
 
  -m
 
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 



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

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


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


Re: [Flashcoders] Tabbed Browsing support? htmlText, contextMenu, Javascript?

2006-07-05 Thread Kevin Newman
IE7 will open any link with target=_blank in a new tab instead of a 
new window depending on the user's prefs (the defaults are new tabs though).


I personally think IE 7 and Opera 8 get it done right, and that it 
should be a browser setting that determines how best to handle popups 
(links with target=_blank), and that they should treat all such links 
consistently (meaning either open them in tabs or make new windows). 
Either way, it's a browser problem, not a Flash problem, IMHO.


More info (for all browsers, not just Firefox):
http://wiki.mozilla.org/Link_Targeting


Kevin N.


Greg Hamer wrote:
Has anyone here implemented tabbed browser support in Flash? i.e. 
links in

Flash content that can be opened in a new tab?

I see three possible options: 1) getURL; 2) TextField with html=true and
htmlText= containing html anchors; and 3) Javascript.

The problems are ...

1) With getURL(), how would you specify new tab?

2) With anchors in htmlText, Flash Player provides the context menu. The
Flash Player browser plug-ins include in the context menu the option 
Open
in new window. The freestanding Flash Player omits this option. (fyi 
... a

swf with an anchor in htmlText can be found here:
www.oman3d.com/tutorials/flash/loadvars_bc/ )

3) With Javascript, as a Flash/ActionScript developer I don't know how to
code this solution. (fyi ... I did some google searchs on this with no
luck.) If anyone can point me to a Javascript code solution, it would be
much appreciated.

Note: For those from Adobe that read this list ... With IE7's release and
it's support for tabbed browsing, if Flash Player provides no support for
opening links in tabs it will be increasing apparent that Flash Player is
essentially unaware of tabbed browers.)


___
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] [AS3] Compiling just from AS3 code, no mxml files

2006-07-05 Thread Zárate

Hi all,

I want to start playing with AS3 so I´ve downloaded the Flex 2 SDK
from Adobe Labs. I don't want to use Flex Builder, I'm interested in
the free compiler.

I want to keep living without the Flex Framework but seems that the
mxmlc compiler *needs* an mxml file (which, by the way, make sense):

The basic syntax of the mxmlc utility is as follows:

mxmlc [options] -file-specs target_file|dir [...]

The file-specs options is the default option, and it is required to
have a value. It refers to the target MXML file that mxmlc compiles
into a SWF file.

How do I create a SWF just from AS3 code without MXML files, aka Flex
framework? Is this possible? Am I missing something important here?

Cheers,

Juan

--
Juan Delgado - Zárate
http://www.zarate.tv
___
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] Compiling just from AS3 code, no mxml files

2006-07-05 Thread Beverly Guillermo

Hello,

I think it's infinitely more complicated but you could look at the generated
actionscript files that get generated after compiling the mxml code.  Use
the -keep as an argument to mxmlc.

For simpler examples, in the Actionscript 3.0 Language Reference document
(or the LiveDocs) there are examples that use extends the Sprite class.  I
find those more helpful then seeing the generated code. :)

I hope that helps!
Beverly


On 7/5/06, Zárate [EMAIL PROTECTED] wrote:


Hi all,

I want to start playing with AS3 so I´ve downloaded the Flex 2 SDK
from Adobe Labs. I don't want to use Flex Builder, I'm interested in
the free compiler.

I want to keep living without the Flex Framework but seems that the
mxmlc compiler *needs* an mxml file (which, by the way, make sense):

The basic syntax of the mxmlc utility is as follows:

mxmlc [options] -file-specs target_file|dir [...]

The file-specs options is the default option, and it is required to
have a value. It refers to the target MXML file that mxmlc compiles
into a SWF file.

How do I create a SWF just from AS3 code without MXML files, aka Flex
framework? Is this possible? Am I missing something important here?

Cheers,

Juan

--
Juan Delgado - Zárate
http://www.zarate.tv
___
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] [AS3] Compiling just from AS3 code, no mxml files

2006-07-05 Thread Mark Lapasa
http://knowledge.lapasa.net/?p=22


(my review of Senocular's take on the mxmlc compiler)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Beverly
Guillermo
Sent: Wednesday, July 05, 2006 3:22 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] [AS3] Compiling just from AS3 code, no mxml
files


Hello,

I think it's infinitely more complicated but you could look at the generated
actionscript files that get generated after compiling the mxml code.  Use
the -keep as an argument to mxmlc.

For simpler examples, in the Actionscript 3.0 Language Reference document
(or the LiveDocs) there are examples that use extends the Sprite class.  I
find those more helpful then seeing the generated code. :)

I hope that helps!
Beverly


On 7/5/06, Zárate [EMAIL PROTECTED] wrote:

 Hi all,

 I want to start playing with AS3 so I´ve downloaded the Flex 2 SDK
 from Adobe Labs. I don't want to use Flex Builder, I'm interested in
 the free compiler.

 I want to keep living without the Flex Framework but seems that the
 mxmlc compiler *needs* an mxml file (which, by the way, make sense):

 The basic syntax of the mxmlc utility is as follows:

 mxmlc [options] -file-specs target_file|dir [...]

 The file-specs options is the default option, and it is required to
 have a value. It refers to the target MXML file that mxmlc compiles
 into a SWF file.

 How do I create a SWF just from AS3 code without MXML files, aka Flex
 framework? Is this possible? Am I missing something important here?

 Cheers,

 Juan

 --
 Juan Delgado - Zárate
 http://www.zarate.tv
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

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



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

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


Re: [Flashcoders] [AS3] Compiling just from AS3 code, no mxml files

2006-07-05 Thread Zárate

Thanks Mark,

I had just found senocular´s page. I´ll take a look to both now and
comeback with boring questions in a while :D

Thanks!

On 7/5/06, Mark Lapasa [EMAIL PROTECTED] wrote:

http://knowledge.lapasa.net/?p=22


(my review of Senocular's take on the mxmlc compiler)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Beverly
Guillermo
Sent: Wednesday, July 05, 2006 3:22 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] [AS3] Compiling just from AS3 code, no mxml
files


Hello,

I think it's infinitely more complicated but you could look at the generated
actionscript files that get generated after compiling the mxml code.  Use
the -keep as an argument to mxmlc.

For simpler examples, in the Actionscript 3.0 Language Reference document
(or the LiveDocs) there are examples that use extends the Sprite class.  I
find those more helpful then seeing the generated code. :)

I hope that helps!
Beverly


On 7/5/06, Zárate [EMAIL PROTECTED] wrote:

 Hi all,

 I want to start playing with AS3 so I´ve downloaded the Flex 2 SDK
 from Adobe Labs. I don't want to use Flex Builder, I'm interested in
 the free compiler.

 I want to keep living without the Flex Framework but seems that the
 mxmlc compiler *needs* an mxml file (which, by the way, make sense):

 The basic syntax of the mxmlc utility is as follows:

 mxmlc [options] -file-specs target_file|dir [...]

 The file-specs options is the default option, and it is required to
 have a value. It refers to the target MXML file that mxmlc compiles
 into a SWF file.

 How do I create a SWF just from AS3 code without MXML files, aka Flex
 framework? Is this possible? Am I missing something important here?

 Cheers,

 Juan

 --
 Juan Delgado - Zárate
 http://www.zarate.tv
 ___
 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




--
Juan Delgado - Zárate
http://www.zarate.tv
___
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] Compiling just from AS3 code, no mxml files

2006-07-05 Thread Mike Chambers
There is not support for using the Flex Framework in an AS only  
project. While it is theoretically possible, you would have to  
manually bootstrap a lot of the application initialization code that  
Flex handles (something which would be rather complex).


If you want to play with the framework, but don't want to layout your  
app with mxml, then the easier way is to create a simple mxml file  
that contains an application tag, and a script tag that then points  
to your code.


This way, the application tag will take care of all of the  
initialization, and you can then leverage the framework via  
ActionScript.


If you just want to use ActionScript and no framework, then mxmlc  
will also compile an .as file.


Hope that helps...

mike chambers

[EMAIL PROTECTED]

On Jul 5, 2006, at 11:58 AM, Zárate wrote:


Hi all,

I want to start playing with AS3 so I´ve downloaded the Flex 2 SDK
from Adobe Labs. I don't want to use Flex Builder, I'm interested in
the free compiler.

I want to keep living without the Flex Framework but seems that the
mxmlc compiler *needs* an mxml file (which, by the way, make sense):

The basic syntax of the mxmlc utility is as follows:

mxmlc [options] -file-specs target_file|dir [...]

The file-specs options is the default option, and it is required to
have a value. It refers to the target MXML file that mxmlc compiles
into a SWF file.

How do I create a SWF just from AS3 code without MXML files, aka Flex
framework? Is this possible? Am I missing something important here?

Cheers,

Juan

--
Juan Delgado - Zárate
http://www.zarate.tv
___
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] Tabbed Browsing support? htmlText, contextMenu, Javascript?

2006-07-05 Thread Greg Hamer

Thank you gentlemen.  I now understand and concur that given current
browsers there may be nothing that Adobe can currently do to enable Open in
new tab support for links in Flash.

After posting on Sunday I continued researching this (including a google
search nearly identical to what Steven suggested :-).

The best that I have found is that a solution may come upon future browser
adoption of the CSS3 target-new:
tabhttp://www.w3.org/TR/2004/WD-css3-hyperlinks-20040224/#the-target-newproperty.
(Seeing target-new: tab in a standards doc lets me know I am
not the first to ask for this.)

fyi ... as of Flash Player 9 and AS3 getURL() is
deprecatedhttp://livedocs.macromedia.com/flex/2/langref/migration.htmlin
favor of
navigateToURL()http://livedocs.macromedia.com/flex/2/langref/flash/net/package.html#navigateToURL%28%29in
the
flash.net package.  When I saw that navigateToURL() has no provision to open
in new tab, I realized that as of FP9 there still is not target-new: tab
support.

I originally posted my question to the list following a designer asking
whether we might use Flash for a site nav bar.  I am a heavy tabbed browser
user (right-click Open link in new tab), and so I had disliked the old
Macromedia.com Flash nav ... and I am now happy that the new Adobe.com uses
a CSS nav that is right-click tabbed browser friendly.  Regarding Flash
for nav bars, other than my concern about tabbed browser support, can anyone
suggest why Flash is so little used for nav bars?  (One exception that I
know of using a Flash nav is Jeremy Allaire's new company
BrightCove.comhttp://www.brightcove.com/
.)

Again, thank you all for you replies.

Best regards,

g

On 7/5/06, Tyler Wright [EMAIL PROTECTED] wrote:



 Note: For those from Adobe that read this list ... With IE7's release
and
 it's support for tabbed browsing, if Flash Player provides no support
for
 opening links in tabs it will be increasing apparent that Flash Player
is
 essentially unaware of tabbed browers.)


I believe JavaScript is also fully unaware of tabs in any browser, and
JavaScript is the browsers own language. I am sorry but tabs are still very
browser specific and not exposed yet to any programatic API's available to
Flash. The only solution currently is to implement browser-specific plugins
that can communicate with the webpage through JavaScript. Good luck
convincing internet users that they'll need such a plugin.

If I find anything more that might look like a possibility I'll post it to
the list, but I think you're out of luck.

Tyler


___
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] embedFonts vs. setTextFormat

2006-07-05 Thread Stacey Mulcahy
N0 actually it doesn't affect the entire string, if you use the optional
params. setTextFormat takes optional index parameters for the index to start
the format and end the format.

 
You can go mytf.setTextFormat(startIndex,endIndex,textFormat)
I use that all the time to format something bold, smaller, etc and haven't
found a need to use setNewTextFormat.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas
Sent: Wednesday, July 05, 2006 9:34 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] embedFonts vs. setTextFormat

That would affect all the text currently in the field.

Ian

On 7/5/06, Marcelo de Moraes Serpa [EMAIL PROTECTED] wrote:
 But couldn´t I just set a new TextFormat using the setTextFormat() method?

 On 7/5/06, Andreas Rønning [EMAIL PROTECTED] wrote:
 
  Because it allows you to use several different text formats along one
  text string. Especially useful for a chat program, where you'd like the
  user's name to be in a different text style than his chat output.
 
  - A
___
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] [AS3] Compiling just from AS3 code, no mxml files

2006-07-05 Thread Zárate

Hi again,

Thanks Mike for the info but could you explain it a little bit more or
point us to some place describing the process? I´m fairly sure I won´t
be the only one trying to create swfs without the Flex Framework.

I haven´t done the test yet (I will, sure) but, which is the less size
possible of a Flex application? I still have to take care about weight
size in some projects.

I know the Flex Framework is a boost for some applications (and free!)
but maybe it´s still too heavy for ultra-light projects.

Thanks,

On 7/5/06, Mike Chambers [EMAIL PROTECTED] wrote:

There is not support for using the Flex Framework in an AS only
project. While it is theoretically possible, you would have to
manually bootstrap a lot of the application initialization code that
Flex handles (something which would be rather complex).

If you want to play with the framework, but don't want to layout your
app with mxml, then the easier way is to create a simple mxml file
that contains an application tag, and a script tag that then points
to your code.

This way, the application tag will take care of all of the
initialization, and you can then leverage the framework via
ActionScript.

If you just want to use ActionScript and no framework, then mxmlc
will also compile an .as file.

Hope that helps...

mike chambers

[EMAIL PROTECTED]

On Jul 5, 2006, at 11:58 AM, Zárate wrote:

 Hi all,

 I want to start playing with AS3 so I´ve downloaded the Flex 2 SDK
 from Adobe Labs. I don't want to use Flex Builder, I'm interested in
 the free compiler.

 I want to keep living without the Flex Framework but seems that the
 mxmlc compiler *needs* an mxml file (which, by the way, make sense):

 The basic syntax of the mxmlc utility is as follows:

 mxmlc [options] -file-specs target_file|dir [...]

 The file-specs options is the default option, and it is required to
 have a value. It refers to the target MXML file that mxmlc compiles
 into a SWF file.

 How do I create a SWF just from AS3 code without MXML files, aka Flex
 framework? Is this possible? Am I missing something important here?

 Cheers,

 Juan

 --
 Juan Delgado - Zárate
 http://www.zarate.tv
 ___
 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




--
Juan Delgado - Zárate
http://www.zarate.tv
___
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] LocalConnection to multiple swfs

2006-07-05 Thread John Grden

So, you can have multiple swfs listening to a single swf, but you cannot
have a single swf listen to multiple swfs.

I'm not sure if I understood your thought here Steven, but with Xray, can do
this right now with logging.  Xray is listening for several SWF's to send
logging data.  You just can't have multiple SWF's using a local connection
name, that's all.  But you certainly can have on SWF using a particular
connection name that receives messages from multiple SWF's.

hth,

JG
___
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] LocalConnection to multiple swfs

2006-07-05 Thread Steven Sacks | BLITZ
Sorry, I meant on a single LocalConnection.


BLITZ | Steven Sacks - 310-551-0200 x209


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of John Grden
 Sent: Wednesday, July 05, 2006 2:34 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] LocalConnection to multiple swfs
 
 So, you can have multiple swfs listening to a single swf, but you
cannot
 have a single swf listen to multiple swfs.
 
 I'm not sure if I understood your thought here Steven, but with Xray,
can
 do
 this right now with logging.  Xray is listening for several SWF's to
send
 logging data.  You just can't have multiple SWF's using a local
connection
 name, that's all.  But you certainly can have on SWF using a
particular
 connection name that receives messages from multiple SWF's.
 
 hth,
 
 JG
 ___
 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] LocalConnection to multiple swfs

2006-07-05 Thread Steven Sacks | BLITZ
Wait, you and I are saying the same thing. 

I can broadcast on as many channels as I want but I can't have a
LocalConnection listen to more than the channel you pass it in the
connect method.

LC = new LocalConnection():
LC.connect(channelA);

If you call 
LC.connect(channelB);
It disconnects from channelA.


___
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] Compiling just from AS3 code, no mxml files

2006-07-05 Thread Mike Chambers

If you want to create a SWF that doesnt use the Flex Framework:

--HelloWorld.as--
package
{
import flash.display.Sprite;

public class HelloWorld extends Sprite;
{
public funciton HelloWorld()
{
trace(Hello World);
}
}
}

Then compile like so:

mxmlc HelloWorld.as

That will compile a SWF.

If you want to use the Flex Framework, then you :

a. have to use the technique I describe below
b. have to take the size hit that using the framework entails


Hope that helps...

mike chambers

[EMAIL PROTECTED]

On Jul 5, 2006, at 2:30 PM, Zárate wrote:


Hi again,

Thanks Mike for the info but could you explain it a little bit more or
point us to some place describing the process? I´m fairly sure I won´t
be the only one trying to create swfs without the Flex Framework.

I haven´t done the test yet (I will, sure) but, which is the less size
possible of a Flex application? I still have to take care about weight
size in some projects.

I know the Flex Framework is a boost for some applications (and free!)
but maybe it´s still too heavy for ultra-light projects.

Thanks,

On 7/5/06, Mike Chambers [EMAIL PROTECTED] wrote:
 There is not support for using the Flex Framework in an AS only
 project. While it is theoretically possible, you would have to
 manually bootstrap a lot of the application initialization code that
 Flex handles (something which would be rather complex).

 If you want to play with the framework, but don't want to layout  
your

 app with mxml, then the easier way is to create a simple mxml file
 that contains an application tag, and a script tag that then points
 to your code.

 This way, the application tag will take care of all of the
 initialization, and you can then leverage the framework via
 ActionScript.

 If you just want to use ActionScript and no framework, then mxmlc
 will also compile an .as file.

 Hope that helps...

 mike chambers

 [EMAIL PROTECTED]

 On Jul 5, 2006, at 11:58 AM, Zárate wrote:

  Hi all,
 
  I want to start playing with AS3 so I´ve downloaded the Flex 2 SDK
  from Adobe Labs. I don't want to use Flex Builder, I'm  
interested in

  the free compiler.
 
  I want to keep living without the Flex Framework but seems that  
the
  mxmlc compiler *needs* an mxml file (which, by the way, make  
sense):

 
  The basic syntax of the mxmlc utility is as follows:
 
  mxmlc [options] -file-specs target_file|dir [...]
 
  The file-specs options is the default option, and it is  
required to
  have a value. It refers to the target MXML file that mxmlc  
compiles

  into a SWF file.
 
  How do I create a SWF just from AS3 code without MXML files,  
aka Flex
  framework? Is this possible? Am I missing something important  
here?

 
  Cheers,
 
  Juan
 
  --
  Juan Delgado - Zárate
  http://www.zarate.tv
  ___
  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



--
Juan Delgado - Zárate
http://www.zarate.tv
___
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] Loading Flash 6 .swf files into a Flash 7 .swf

2006-07-05 Thread Todd Hivnor

I have a Flash application which loads in external .swf files for drawing 
charts. My main .swf is compiled for the Flash 7 player, while the loaded .swf 
files are compiled for the Flash 6 player. The Flash 6 .swf is not able to 
access variables or functions which are defined in the _global context of the 
Flash 7 .swf file. But if I have two Flash 7 movies, or two  Flash 6 movies, 
things work fine.

Is there some known interaction I should know about? Specifically, shouldn't 
two .swf files compiled for different versions player still share the same 
_global scope?


As an example, I've created flash6.fla and flash7.fla. They have the following 
action script:


---flash7.fla---

_global.callbackFunction = function() { trace(Got Callback); }

loader_mc = _root.createEmptyMovieClip(loader_mc, 3);
loader_mc.loadMovie(flash6.swf);

---flash6.fla---

trace(Loaded Flash6.swf);
trace(_global.callbackFunction:  + _global.callbackFunction);

---

The trace function shows me that _global.callbackFunction is defined if 
flash6.fla is published for Flash 7 players. But if I republish, targeting the 
Flash 6 player, the function is longer defined. It is like they have totally 
separate _global scopes. If I switch from _global to _root, however, things 
work fine. So, I can work around the issue. But it strikes me as real odd that 
the two .swf files don't share the same _global variable space. 

Clues?


-
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.
___
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] Loading Flash 6 .swf files into a Flash 7 .swf

2006-07-05 Thread Marcelo de Moraes Serpa

Flash Player creates two different _global objects for swfs of different
versions.

On 7/5/06, Todd Hivnor [EMAIL PROTECTED] wrote:



I have a Flash application which loads in external .swf files for drawing
charts. My main .swf is compiled for the Flash 7 player, while the loaded
.swf files are compiled for the Flash 6 player. The Flash 6 .swf is not able
to access variables or functions which are defined in the _global context of
the Flash 7 .swf file. But if I have two Flash 7 movies, or two  Flash 6
movies, things work fine.

Is there some known interaction I should know about? Specifically,
shouldn't two .swf files compiled for different versions player still share
the same _global scope?


As an example, I've created flash6.fla and flash7.fla. They have the
following action script:


---flash7.fla---

_global.callbackFunction = function() { trace(Got Callback); }

loader_mc = _root.createEmptyMovieClip(loader_mc, 3);
loader_mc.loadMovie(flash6.swf);

---flash6.fla---

trace(Loaded Flash6.swf);
trace(_global.callbackFunction:  + _global.callbackFunction);

---

The trace function shows me that _global.callbackFunction is defined if
flash6.fla is published for Flash 7 players. But if I republish, targeting
the Flash 6 player, the function is longer defined. It is like they have
totally separate _global scopes. If I switch from _global to _root, however,
things work fine. So, I can work around the issue. But it strikes me as real
odd that the two .swf files don't share the same _global variable space.

Clues?


-
Do you Yahoo!?
Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.
___
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] jigsaw puzzle piece algorithm

2006-07-05 Thread Guntur N. Sarwohadi

I'm working on a puzzle game in flash, much similar to jigsaw puzzles you
see in gameHouse or such casual game publisher. I'm having a hard time
trying to cut an image to make it as puzzle pieces in AS2. Currently I'm
doing it the hard way, cloning bitmapData image, and masking portions of the
image. Can you cut parts on an image using bitmapData methods? And does
anyone know how to create the infamous jigsaw pattern to it as well?

Many thanks,
Guntur N. Sarwohadi
___
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] AS2 and watch ...

2006-07-05 Thread Stephen Ford
How often do you use 'watch' in your applications?.
 
It seems pretty powerful to me, and I've only just discovered it.
 
Any thoughts on this.
 
Cheers,
Stephen.___
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] AS2 and watch ...

2006-07-05 Thread Rich Rodecker

never...if i need to handle something when a property is updated then
i usually broadcast an event.



-- Forwarded message --
From: Stephen Ford [EMAIL PROTECTED]
Date: Jul 5, 2006 6:27 PM
Subject: [Flashcoders] AS2 and watch ...
To: flashcoders flashcoders@chattyfig.figleaf.com


How often do you use 'watch' in your applications?.

It seems pretty powerful to me, and I've only just discovered it.

Any thoughts on this.

Cheers,
Stephen.___
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] AS3 - Missing

2006-07-05 Thread Chris Velevitch

On 7/5/06, Marcos Neves [EMAIL PROTECTED] wrote:

I have a A world map where each country is a movieclip. And every one
will have the same behavior. Before flash 9, what I did is assign a
class called Country to each movie clip. This way, I can easy update
the behavior of all at the same time.


Did you do this in AS2 or via the library linkage properties?


With Flash 9, I can´t assign a class with the same name and can´t
specify a base class to the Auto Generated extends.


I haven't used Flash 9 alpha so I don't know Auto Generated is. If you
specified the class name via library linkage properties and Flash 9
doesn't allow it, it sounds like a bug.


When ask for AutoGenerate, a check box would enable an different base
class, and I would write on the textbox. So a movieClip called Brazil,
would have a autoGenerated class called Brazil that extends the class
Country, witch would be my base class.


Does the Brazil class redefine any methods of Country?


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
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] jigsaw puzzle piece algorithm

2006-07-05 Thread Peter Hall

The optimal way is probably to use copyPixels() for each puzzle piece,
setting the alphaBitmapData argument to an image that contains just
the puzzle piece shape. That will effectively mask out the shape of
the piece, but will perform a lot better than using a vector mask, as
it will have modified the image, rather than apply the mask each time
the screen area gets redrawn.

Jigsaw puzzle pieces are likely quite small as vector graphics, so you
might want to keep them as vector assets and then create the
alphaBitmapData objects at runtime, as you need them.

If you really want to generate the shape pieces dynamically, you could
divide the image into rectangles (or randomly varying quadrilaterals,
to keep it interesting), then have a selection of nobbly bits you
could randomly choose to add or remove from each side of the pieces.
Having someone draw these by hand seems like less hassle though -
unless you need to create a lot of puzzles...

Peter


On 7/6/06, Guntur N. Sarwohadi [EMAIL PROTECTED] wrote:

I'm working on a puzzle game in flash, much similar to jigsaw puzzles you
see in gameHouse or such casual game publisher. I'm having a hard time
trying to cut an image to make it as puzzle pieces in AS2. Currently I'm
doing it the hard way, cloning bitmapData image, and masking portions of the
image. Can you cut parts on an image using bitmapData methods? And does
anyone know how to create the infamous jigsaw pattern to it as well?

Many thanks,
Guntur N. Sarwohadi

___
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] Loading Flash 6 .swf files into a Flash 7 .swf

2006-07-05 Thread Derek Vadneau
_global scope is different, as well as any prototypes you've created.

However, it's not a security issue, simply a difference in how things were 
implemented. So, you can get around it by simply making a reference in the 
main SWF and re-referencing _global in the child SWF.

For example (in the main SWF):

_level0.global = _global;

Then in the child SWF:

_global = _level0.global;

Now the child _global references the main _global.

If you want a reference to the old child _global, you can specify (from 
within the child SWF):

_level0._global;

Even though _level0 really is the main SWF, _level0._global when 
referenced from the child SWF references the child SWFs original _global.

Strange but true.


Derek Vadneau


-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Todd 
Hivnor
Sent: Wednesday, July 05, 2006 6:41 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Loading Flash 6 .swf files into a Flash 7 .swf



I have a Flash application which loads in external .swf files for drawing 
charts. My main .swf is compiled for the Flash 7 player, while the loaded 
swf files are compiled for the Flash 6 player. The Flash 6 .swf is not 
able to access variables or functions which are defined in the _global 
context of the Flash 7 .swf file. But if I have two Flash 7 movies, or two 
Flash 6 movies, things work fine.

Is there some known interaction I should know about? Specifically, 
shouldn't two .swf files compiled for different versions player still 
share the same _global scope?


As an example, I've created flash6.fla and flash7.fla. They have the 
following action script:


---flash7.fla---

_global.callbackFunction = function() { trace(Got Callback); }

loader_mc = _root.createEmptyMovieClip(loader_mc, 3);
loader_mc.loadMovie(flash6.swf);

---flash6.fla---

trace(Loaded Flash6.swf);
trace(_global.callbackFunction:  + _global.callbackFunction);

---

The trace function shows me that _global.callbackFunction is defined if 
flash6.fla is published for Flash 7 players. But if I republish, targeting 
the Flash 6 player, the function is longer defined. It is like they have 
totally separate _global scopes. If I switch from _global to _root, 
however, things work fine. So, I can work around the issue. But it strikes 
me as real odd that the two .swf files don't share the same _global 
variable space.

Clues?


-
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.
___
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] Custom Component --- Maintaining Proper Scale

2006-07-05 Thread azsl1326-email
Hello Alll  

I am making a custom listbox component and have run into a slight problem. When 
I attempt to resize the listbox on the stage, it does not scale properly 
becoming distorted (as opposed to the standard MM V2 ListBox which maintains 
its scale when resized). I know I saw how to resolve this problem, but can't 
remember where. Can anyone help me out.

Thanks for any and all replies.

___
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] Which remoting server?

2006-07-05 Thread ryanm
   I have a very simple need, and I'm trying to find the simplest way to 
satisfy it. I have essentially a single remote shared object on a comm 
server that is getting entirely too much traffic and I want to offload it to 
some other kind of server (that doesn't have connection limits). It is 
basically a client state object that keeps a very small amount of data 
about each client that is connected to the app (mainly their connection 
object and an id) so that data can be pushed to them. But it's expensive 
doing this on Comm Server.


   I basically just want to offload that one piece to some remoting server 
that is fast and has no connection limits. It needs to run on Windows, it 
would be nice if it could connect to my database servers, and it needs to be 
lightweight and fast. I don't mind paying for it (the FDS2 price tag isn't a 
problem), as long as it has good support. The servers I'm looking at now are 
FDS2 and Oregano. I get resistance to the OSS direction, but can work around 
it if the product is solid. My main concern about FDS is that it's way 
overkill for what I need to do.


   What server should I be looking at for this?

ryanm 


___
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] (no subject)

2006-07-05 Thread grimmwerks

Curious - can't figure out where there's a second example of the classes
floating around -- any suggestions?

**Error** C:\Documents and Settings\grimmwerks\Local Settings\Application
Data\Macromedia\Flash
8\en\Configuration\Classes\com\grimmwerks\bakery\NumericStepperCell.as: Line
13: The name of this class, 'com.grimmwerks.bakery.NumericStepperCell',
conflicts with the name of another class that was loaded, '
com.grimmwerks.bakery.NumericStepperCell'.
class com.grimmwerks.bakery.NumericStepperCell extends UIComponent {
___
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] jigsaw puzzle piece algorithm

2006-07-05 Thread Adrian Lynch
This was done a while back, but having it uniform doesn't work too well:

http://www.halestorm.co.uk/jigsaw/

The innie-outie bit's are done randomly and it looks ok, but I was hoping to
find something that would  cut it more like a regular jigsaw.

Let us know if you find anything.

Adrian

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Peter
Hall
Sent: 06 July 2006 04:09
To: Flashcoders mailing list
Subject: Re: [Flashcoders] jigsaw puzzle piece algorithm


The optimal way is probably to use copyPixels() for each puzzle piece,
setting the alphaBitmapData argument to an image that contains just
the puzzle piece shape. That will effectively mask out the shape of
the piece, but will perform a lot better than using a vector mask, as
it will have modified the image, rather than apply the mask each time
the screen area gets redrawn.

Jigsaw puzzle pieces are likely quite small as vector graphics, so you
might want to keep them as vector assets and then create the
alphaBitmapData objects at runtime, as you need them.

If you really want to generate the shape pieces dynamically, you could
divide the image into rectangles (or randomly varying quadrilaterals,
to keep it interesting), then have a selection of nobbly bits you
could randomly choose to add or remove from each side of the pieces.
Having someone draw these by hand seems like less hassle though -
unless you need to create a lot of puzzles...

Peter


On 7/6/06, Guntur N. Sarwohadi [EMAIL PROTECTED] wrote:
 I'm working on a puzzle game in flash, much similar to jigsaw puzzles you
 see in gameHouse or such casual game publisher. I'm having a hard time
 trying to cut an image to make it as puzzle pieces in AS2. Currently I'm
 doing it the hard way, cloning bitmapData image, and masking portions of
the
 image. Can you cut parts on an image using bitmapData methods? And does
 anyone know how to create the infamous jigsaw pattern to it as well?

 Many thanks,
 Guntur N. Sarwohadi

___
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