Re: [Flashcoders] singleton returns null

2008-11-21 Thread Hans Wichman
Hi Fabio,

could you maybe post 2 examples, one that works, and one that doesn't?
A picture says more than a thousand words:)

greetz
JC

On Fri, Nov 21, 2008 at 2:19 PM, Fabio Pinatti <[EMAIL PROTECTED]> wrote:
> Hello,
>
> About the syntax, I meant the second one, actually, declare the _instance
> just in constructor, but I just noticed a very weird thing...When I get null
> as I was referencing, if I just declare in my main class, a var casting the
> type of class that was returning null, it'll work. Seems compiler "see" that
> the class exists, and so it returns what I expect. It's really weird, since
> the singleton pattern is still the same. If i don't declare this dummy var
> with the type I want, even I'm sure the instance exists, it returns null. I
> really don't know why this is happening, but it was the workaround I've
> found.
>
> About the singleton implementation, I agree with you isn't the best thing to
> do, but in my case, I'm using that for 3 document classes, that for sure
> I'll use just one single time, so, it's the quickest solution I guess.
>
> And very nice your approach about minimize Singleton use. I'll take a try,
> it can save a lot of time.
>
> If you got my problem (i know it's a quite mess to explain), would be great
> know why this happens. Maybe it's a Gaia thing that I don't know how to use,
> but I was wondering if it was being a stupidity of mine with singleton
> concept, since I'm a bit new with oop.
>
> Thanks a lot,
> Pinatti
>
> On Fri, Nov 21, 2008 at 10:53 AM, Hans Wichman <
> [EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> im not sure about your syntax.
>>
>> This:
>>
>> class MyClass {
>>
>>  public static var _instance:MyClass = this;
>>
>>
>> }
>>
>> will not work.
>>
>> You are looking for something like:
>>
>> class MyClass {
>>
>>  public static var _instance:MyClass = null;
>>
>>  public function MyClass () {
>>_instance = this;
>>  }
>> }
>>
>> Although I have to add this is the most rudimentary and worst
>> implementation I can come up with, but it will work.
>> It will allow public access to your instance variables and overwrite
>> any instance already there when you create a page of the same class as
>> well :).
>>
>> As an another example how cool my application registry that I posted
>> about yesterday is :)) (shameless self promotion), imagine doing this
>> in each page:
>>
>> _application.register (this);
>>
>> and when you need a page you do:
>>
>> HomePage(_application.getRegistree(HomePage))
>>
>> if you need to get all pages you do:
>>
>> pageArray = _application.getRegistrees (AbstractPage) (or page can't
>> recall the gaia page superclass at the moment).
>>
>> You can make the _application a singleton if you wish Application.etc
>> or you can call it PageRegistry or whatever, the idea remains the
>> same. This will reduce the amount of singletons by far. It also shows
>> how easy it is to integrate this powerfull approach into whatever
>> workflow/framework you work with.
>>
>> regards,
>> JC
>>
>> On Fri, Nov 21, 2008 at 1:06 PM, Fabio Pinatti <[EMAIL PROTECTED]> wrote:
>> > Hello list,
>> >
>> > I've been having a question since a time ago... I'm using a flash
>> framework
>> > within my websites (Gaia), and between the classes, I use some singleton
>> > pattern to communicate between them. This way, theorically, I can get any
>> > class instance from another, and I don't need to know the path for each
>> > instantiated class on stage. To clarify, imagine I have a home and a form
>> > page. I could get the reference for home page from form page, just
>> setting
>> > up a static var:
>> >
>> > var _home:HomePage = this;
>> >
>> > and through a singleton, I could get a HomePage._home, from any point of
>> my
>> > application, right?
>> >
>> > The point is, for some classes, that works and returns the class
>> instance.
>> > For other, that doesn't works and returns null, even I'm sure the class
>> is
>> > with the _home var setted up. I posted this question here, because I'm
>> > wondering if this can be some problem (of mine) with Singleton pattern,
>> and
>> > not with framework. Why does Singleton sometimes works, and o

Re: [Flashcoders] singleton returns null

2008-11-21 Thread Hans Wichman
Hi,

im not sure about your syntax.

This:

class MyClass {

  public static var _instance:MyClass = this;


}

will not work.

You are looking for something like:

class MyClass {

  public static var _instance:MyClass = null;

  public function MyClass () {
_instance = this;
  }
}

Although I have to add this is the most rudimentary and worst
implementation I can come up with, but it will work.
It will allow public access to your instance variables and overwrite
any instance already there when you create a page of the same class as
well :).

As an another example how cool my application registry that I posted
about yesterday is :)) (shameless self promotion), imagine doing this
in each page:

_application.register (this);

and when you need a page you do:

HomePage(_application.getRegistree(HomePage))

if you need to get all pages you do:

pageArray = _application.getRegistrees (AbstractPage) (or page can't
recall the gaia page superclass at the moment).

You can make the _application a singleton if you wish Application.etc
or you can call it PageRegistry or whatever, the idea remains the
same. This will reduce the amount of singletons by far. It also shows
how easy it is to integrate this powerfull approach into whatever
workflow/framework you work with.

regards,
JC

On Fri, Nov 21, 2008 at 1:06 PM, Fabio Pinatti <[EMAIL PROTECTED]> wrote:
> Hello list,
>
> I've been having a question since a time ago... I'm using a flash framework
> within my websites (Gaia), and between the classes, I use some singleton
> pattern to communicate between them. This way, theorically, I can get any
> class instance from another, and I don't need to know the path for each
> instantiated class on stage. To clarify, imagine I have a home and a form
> page. I could get the reference for home page from form page, just setting
> up a static var:
>
> var _home:HomePage = this;
>
> and through a singleton, I could get a HomePage._home, from any point of my
> application, right?
>
> The point is, for some classes, that works and returns the class instance.
> For other, that doesn't works and returns null, even I'm sure the class is
> with the _home var setted up. I posted this question here, because I'm
> wondering if this can be some problem (of mine) with Singleton pattern, and
> not with framework. Why does Singleton sometimes works, and other times,
> doesn't? Did you have some similiar problem getting classes instances, like
> me?
>
> Thanks, and sorry if it's a really stupid question.
>
> Kind Regards,
>
> --
> Fábio Pinatti
> :: web.developer
>  www.pinatti.com.br
> :: 19. 9184.3745 / 3342.1130
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Text Stroke?

2008-11-21 Thread Hans Wichman
I think that's only possible using mxml...

just kidding, sorry could't resist :)

On Fri, Nov 21, 2008 at 8:45 AM, Elia Morling <[EMAIL PROTECTED]> wrote:
> Has the ugly Glow-Filter trick been replaced with anything better in CS4?
>
> Thanks,
> Elia
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] frameworks and flash

2008-11-20 Thread Hans Wichman
Hi,

it's similar but not the same.
Yes in PureMVC you register your objects as well, but you register
them by a name defined in the class being registered (and you have to
define this name). This causes references to a concrete class
everytime you retrieve your registry item and you cannot easily switch
implementations at runtime without doing something 'extra'.
Besides that you register your object with a different registry based
on whether its a view, model, proxy etc. All I'm really interested in
is an objects interface, so I rolled those registries into one and
access them by interface only, not by public constants.

Whether you hijack events and create commands that can be triggered
from anywhere is a separate issue I think.

greetz
JC









On Thu, Nov 20, 2008 at 4:16 PM, Joel Stransky <[EMAIL PROTECTED]> wrote:
> While I have no authority to defend why, I'm leaning toward PureMVC. From
> what I remember it's very similar to whats being described here. Events are
> hijacked and all commands are registered in one place which can be triggered
> from anywhere. Of course I'll have to put my money where my mouth is before
> I can truly judge it.
>
> You guys don't have to post links but could you describe some of the
> projects you've worked on where Flex was an easy choice over Flash?
>
> On Thu, Nov 20, 2008 at 6:18 AM, Hans Wichman <
> [EMAIL PROTECTED]> wrote:
>
>> Hi Jason,
>>
>> i only saw this post now, not sure if it was directed at me or at the
>> list in general or both, but anyway:
>>
>> i agree the naming conventions could be better, but I don't mind using
>> some kind of locator object. I posted previously about my approach I
>> think. I use an ApplicationRegistry where I register my objects:
>>
>> _appReg.register (new ...Model());
>> _appReg.register (new ...View());
>>
>> etc and I do that for all key application objects such as services, models
>> etc
>>
>> when I need them I do:
>> _appReg.getRegistree (IFooBarModel);
>>
>> in other words, I locate my objects by interface (or concrete classes
>> depending on how abstract we need to get).
>>
>> Usually I even wrap that using an objectbroker so the previous line
>> becomes:
>>
>> _ob.getFooBarModel():IFooBarModel
>>
>> It separates creation from usage, I don't have to import anything
>> except the broker and works wonders while refactoring.
>>
>> I've used in on several projects and have to run into downsides yet.
>> It has not harmed reusability, managability etc etc, it has helped
>> improve my coding speed by far.
>>
>> greetz
>> JC
>>
>>
>>
>>
>> On Tue, Nov 18, 2008 at 4:11 PM, Merrill, Jason
>> <[EMAIL PROTECTED]> wrote:
>> >>> Read the article, some good, some bad.
>> >
>> > What are your thoughts on the article's baching of Cairngorm's
>> ModelLocator?  The he says its really a global var in disguise, and I
>> understand that, but I still find it very handy - maybe it makes it somewhat
>> tighter coupled to the model, but I use the same implementation of it in
>> non-Cairgorm projects just because it's so handy.  I can see where it
>> wouldn't be good in a coding environment where you have to loosely couple
>> everything, but it also seems to have its uses.  Any thoughts on that?
>> >
>> >
>> > Jason Merrill
>> > Bank of America Instructional Technology & Media   ·   GCIB & Staff
>> Support L&LD
>> >
>> > Interested in Flash Platform technologies?  Join the Bank of America
>> Flash Platform Developer Community
>> > Interested in innovative ideas in Learning?  Check out the Innovative
>> Learning Blog and subscribe.
>> >
>> >
>> >
>> > ___
>> > Flashcoders mailing list
>> > Flashcoders@chattyfig.figleaf.com
>> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> >
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
>
> --
> --Joel Stransky
> stranskydesign.com
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] frameworks and flash

2008-11-20 Thread Hans Wichman
Hi Jason,

i only saw this post now, not sure if it was directed at me or at the
list in general or both, but anyway:

i agree the naming conventions could be better, but I don't mind using
some kind of locator object. I posted previously about my approach I
think. I use an ApplicationRegistry where I register my objects:

_appReg.register (new ...Model());
_appReg.register (new ...View());

etc and I do that for all key application objects such as services, models etc

when I need them I do:
_appReg.getRegistree (IFooBarModel);

in other words, I locate my objects by interface (or concrete classes
depending on how abstract we need to get).

Usually I even wrap that using an objectbroker so the previous line becomes:

_ob.getFooBarModel():IFooBarModel

It separates creation from usage, I don't have to import anything
except the broker and works wonders while refactoring.

I've used in on several projects and have to run into downsides yet.
It has not harmed reusability, managability etc etc, it has helped
improve my coding speed by far.

greetz
JC




On Tue, Nov 18, 2008 at 4:11 PM, Merrill, Jason
<[EMAIL PROTECTED]> wrote:
>>> Read the article, some good, some bad.
>
> What are your thoughts on the article's baching of Cairngorm's ModelLocator?  
> The he says its really a global var in disguise, and I understand that, but I 
> still find it very handy - maybe it makes it somewhat tighter coupled to the 
> model, but I use the same implementation of it in non-Cairgorm projects just 
> because it's so handy.  I can see where it wouldn't be good in a coding 
> environment where you have to loosely couple everything, but it also seems to 
> have its uses.  Any thoughts on that?
>
>
> Jason Merrill
> Bank of America Instructional Technology & Media   ·   GCIB & Staff 
> Support L&LD
>
> Interested in Flash Platform technologies?  Join the Bank of America Flash 
> Platform Developer Community
> Interested in innovative ideas in Learning?  Check out the Innovative 
> Learning Blog and subscribe.
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] AS statement "this["testStudent" + i]" in JAVA ?

2008-11-17 Thread Hans Wichman
HI,

a HashTable or Dictionary type of object is your friend.

HTH,
JC

On Mon, Nov 17, 2008 at 5:35 PM, tim shaya <[EMAIL PROTECTED]> wrote:
> Apologies in advance if this is a bit off topic but are there any
> ActionScripters who know Java on here?
> I'm just starting out with Java and I'm stuck.
>
> In Actionscript you can write a for loop and have something like this:
> *
> for (var i:int=0;i<**myStudnts.length;i++){
>this["testStudent**" + i] = new Student();
> }*
>
> I'm having trouble expressing the left part of the statement --
> "*this["myStudent"
> + i]*" -- using Java.
>
> Any suggestions?
>
> Here's where I'm at with the Java code:
>
> *private static Student testStudent1, testStudent2, testStudent3,
> testStudent4, testStudent5;
> private static String[][] myStudnts = {{...}, {...}, **{...}, **{...}**,
> {...}**};
> ...
>  public static void main(String[] args){
>**initStudents();
>  }
>
>  public static void initStudents(){
>for(int i=0; i // NOT COMPILING SO FAR:
> /
> (Student)("testStudent"+(i+1)) =  new Student(myStudnts[i][0],
> myStudnts[i][1],
>
>  myStudnts[i][2], myStudnts[i][3],
>
>  myStudnts[i][4], myStudnts[i][5]);
> }
> **  }
>
> *Again, sorry if this is a bit off-topic and thank you for taking the time
> to read this.
>
> - Tim
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] text line overflow

2008-11-17 Thread Hans Wichman
Hi,

I've got an as2 implementation maybe you can convert it (and clean it:)):

//nametextfield contains actual text. Check what is smaller the actual
width of the textfield or a combo of the available width +
margin+dotwidth
//50 == margin, 20== correction, +5 == no clue old code;))
//so the actual width is the minimum of the textWidth and the given width
this.nameTextField._width = Math.min
(this.width-50-this.dotTextField._width,
this.nameTextField.textWidth+20)+5;
//position dots behind main textfield
this.dotTextField._x = this.nameTextField._x+this.nameTextField._width-2;
//determine visibility on whether text in nametextfield fits or not
this.dotTextField._visible = (this.nameTextField.textWidth >
this.nameTextField._width);

greetz
JC



On Mon, Nov 17, 2008 at 10:26 AM, Latcho <[EMAIL PROTECTED]> wrote:
> How to break a line of text on the optimal charachter and adding "..." if it
> doesn't fit a single lined textfield
> | I would like to break | this line of text.
> | I would like to br... |
>
> Any suggestions (AS3)
>
> Latcho
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Drawing a continuous curved line through n points in AS1 or AS2 (Catmull-Rom splines?)

2008-11-15 Thread Hans Wichman
Hi,

you might be looking for a bezier thingy, or it might just be as
simple as averaging the control points:

If it's the latter, there's some sample source here for something like that:
http://objectpainters.com/blog/2007/07/18/drawing-using-controlpoints/

greetz
JC


On Sat, Nov 15, 2008 at 9:40 PM, Anthony Pace <[EMAIL PROTECTED]> wrote:
> I don't know of a good as1/2 lib.  This math has a lot to do with line
> smoothing, and can be used for various applications from graphics to
> accurate signal processing.  I would suggest brushing up on your
> calculus/trig for assuming the tangency of a given point on the locus, and
> for assuming the points on the "cage".
>
> Hints:
>
>   * calculating the first segment of the curve is always the most
> intensive imho.  (although their are tons of methods for cheating
> this, they effect accuracy)
>   * It all has to do with finding the axis of symmetry to project an
> accurate curve, and finding the points on the quadratic or
> cubic(way easier but slower because it has more points) "cage".
>   * If you already have the previous points, for the last segment of
> the curve, you already know several of the points for the next
> segment.
>
> If anything, learning what is required for this project, although having an
> uphill learning curve, will make you a better mathematician.
>
> Anyone else have hints?
>
> Thank You,
> Anthony Pace
>
>
>
> matt stuehler wrote:
>>
>> All,
>>
>> I'm looking for an AS1 (ideal) or AS2 version of a function that will
>> draw a continuous curved line through n points. I don't know much
>> about the math behind this, but I think that a Catmull-Rom spline is
>> what I'm looking for.
>>
>> I've found a terrific example in AS3
>> (http://www.cartogrammar.com/blog/continuous-curves-with-actionscript-3),
>> but it uses a number of AS3 classes that I don't have access to in AS2
>> (e.g., fl.motion.BezierSegment).
>>
>> Can anyone share a working example, or point me in a useful direction?
>>
>> Many thanks in advance!
>>
>> Cheers,
>> Matt
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How much would you charge?

2008-11-15 Thread Hans Wichman
Completely unrelated conclusion, there is no relation between charging
10 hours for one hour of work and reusing standard components or not.
If I follow your line of reasoning you say that because you are so
good and can complete it in an hour instead of where someone else
would take 10 it allows you to charge the 10 hours instead of the one?

I think a couple of things are related here:
- what did you communicate to your client? If you say this will cost
you $300 and we use a standard component, and this is involved, these
are the consequences blahblah and he agrees well good for you, I don't
see a problem here (you agree on a fixed price). If you finish it in 1
lucky you, if you spent 20, too bad
- if you tell your client I'll sent you an invoice after its done
based on hours invested, and you spent 1 but send an invoice for 20,
it's being dishonest. I'm all for making money too but honesty does
not exclude making money. Honesty does not exclude smart either :).
- your wages. If you are so damn good that you finish things in 1 hour
instead of 10, one of the places this should be reflected is your
wage. That why you charge $100 an hour instead of $10 for example.
That's why people come to you, because you're that fast and good.
Of course this might differ per location and how much competition there is:)

My 2 cnts, super duper honesty has nothing to do with it.




On Fri, Nov 14, 2008 at 9:27 PM, Carl Welch <[EMAIL PROTECTED]> wrote:
>>
>> The comment about a client being 'none the wiser' and the implication that
>> you're just making the extra dough by handing off some crap someone else did
>> is what's not cool.
>>
>> The point was, if you're repackaging something that someone already did
>> without any value add, then that's dishonest. Hands down, end of story.
>
>
>
> then stop using Flash and create your own programming language while your at
> it...if you want to be completely"honest".
>
> You pay a fee to use Flash, you also can pay a fee to use an extension
> (read:component) inside of flash... speaking of components, I hope you don't
> use the datagrid component either. But hey, go ahead and waste all of your
> time and program your own - reinvent the wheel, go for it, be super duper
> "honest" sheeesh. If tools are available to help you finish your work in
> as little amount of time and with limited amount of de-bugging needed, then
> use them my point was/is to maximize your dollar to time ratio. If you
> quote someone $350 dollars for a project and you finish it in an hour, you
> can say you make $350 an hour... but if it takes you 40 hours to do the same
> job you make $8.75 an hour. I'm pretty sure that is minimum wage and you
> might as well go work for Burger King. I don't know about anyone else here,
> but I'm not in this business to make minimum wage. I have mouths to feed.
> Dollar to time ratio, baby, that's what its all about when you're a
> freelancer and I'm a one man sweat shop. No matter what you say or think,
> you have to be a smart business person too as a good developer/designer.
>
> And for the record I am not affiliated in anyway with slideshowpro. I just
> think the user interface is about as clean as they come and clients love
> it... but then again, a lot of clients love powerpoint... so, whatever.
>
>
>
> On Nov 14, 2008, at 10:56 AM, Jon Bradley wrote:
>
>>
>> On Nov 14, 2008, at 12:27 PM, Carl Welch wrote:
>>
>>> using tools of the trade is far from ripping clients off. Ridiculous
>>> statement.
>>
>>
>> It's not ridiculous at all. Read my reply to my initial email where I
>> elaborated a bit more.
>>
>> The comment about a client being 'none the wiser' and the implication that
>> you're just making the extra dough by handing off some crap someone else did
>> is what's not cool.
>>
>> The point was, if you're repackaging something that someone already did
>> without any value add, then that's dishonest. Hands down, end of story.
>>
>> - j
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> --
> Carl Welch
> http://www.carlwelch.com
> http://www.jointjam.com
> [EMAIL PROTECTED]
> 805.403.4819
>
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] frameworks and flash

2008-11-14 Thread Hans Wichman
Read the article, some good, some bad.
If anyone declares you for a fool if you prefix interfaces with 'I'
and use marker interface, I tend to gloss over the rest of the article
since it no longer comes across trustworthy... Personal preference
aside:)

On Sat, Nov 15, 2008 at 12:05 AM, David Hershberger
<[EMAIL PROTECTED]> wrote:
> Haha!  Before you try Cairngorm, check out this article:
>
> http://blog.iconara.net/2008/04/13/architectural-atrocities-part-x-cairngorms-model-locator-pattern/
>
> Having used Cairngorm for a while now I have to agree with him.  The article
> is pretty harsh, and it only talks about the ModelLocator part.
>
> Dave
>
> On 11/14/08, Joel Stransky <[EMAIL PROTECTED]> wrote:
>>
>> Thanks for the post Dave. Cairngorm sounds a lot like PureMVC which does
>> away with events and implements a global command structure. So far it's
>> appealing although my first run in with it was under bad conditions. A
>> client of a friend had mangled it something fierce before he was brought in
>> at which point he brought me in to implement deep linking. It was ugly to
>> say the least. I have however heard great things about it since then. My
>> gut
>> says I should know how to do this stuff on my own before I go relying too
>> heavily on tools that prevent me from getting to know the inner workings
>> intimately.
>>
>> It's just tough to esitmate flash/flex work effictively anymore without a
>> framework involved it seems. Clients don't have the time or budget for
>> builds from scratch. Flash used to be so fun but now it's a constant
>> learning curve. ugg.
>>
>> Interestingly enough I looked up the cairngorm site and saw a link to this
>> blog post made just yesterday:
>> http://www.anandvardhan.com/2008/11/13/popular-flex-frameworks/
>>
>> This should also be informative.
>> http://www.insideria.com/2008/11/new-poll-which-flex-framework.html
>>
>>
>>
>> On Fri, Nov 14, 2008 at 1:52 PM, David Hershberger <[EMAIL PROTECTED]
>> >wrote:
>>
>>
>> > We have been using Adobe Flex for the past year and have really liked it.
>> > It would be hard to call it "blazing" and "bloat" does seem like it might
>> > apply to some extent, but on the other hand it does so many nice things
>> for
>> > us it is hard to argue with.  MXML is very powerful, but there is
>> certainly
>> > a big learning curve.  For basic stuff, buttons and containers and text,
>> > it's easy to get started.  There are lots of subtle details though, so
>> when
>> > you start wanting to do things in ways the Flex authors didn't anticipate
>> > it
>> > often takes experimentation to find a way that works.  The Flex framework
>> > code is open source at least, so you can always dig into that and see
>> what
>> > it's doing.
>> >
>> > We have also used Cairngorm, with mixed results.  Cairngorm doesn't
>> really
>> > give you much code, it is mostly a set of design patterns.  Some of the
>> > important code it does give is a "controller" which connects Cairngorm
>> > Events to Cairngorm Commands.  Cairngorm events inherently know their
>> > dispatcher, which is a singleton, so you can just fire off events like
>> so:
>> >   new SaveGameEvent(game, user).dispatch();
>> > and the controller connects that to the appropriate
>> SaveGameCommand.  We've
>> > come to the conclusion that Cairngorm is great for situations where most
>> > user actions imply immediate communications with a server, but not so
>> > useful
>> > for situations where user actions are just manipulating data internal to
>> > the
>> > .swf.  We have ended up using Cairngorm Events and Commands just on the
>> > networking side of our app, and for everything else we do more of a basic
>> > Model/View pattern.
>> >
>> > I don't believe Cairngorm relies on Flex, but Flex gives you "data
>> binding"
>> > which works very nicely with Cairngorm.  Flex data binding lets you mark
>> > certain state variables with [Bindable] and then the compiler builds
>> > data-change events for you.  Then your view mxml classes use the data
>> > binding syntax like  and the view
>> updates
>> > automagically whenever the Game's description field changes.  A Cairngorm
>> > command might query a server and then the server-response-handler in the
>> > command can set game.description.
>> >
>> > Dave
>> >
>> > On 11/14/08, Joel Stransky <[EMAIL PROTECTED]> wrote:
>> > >
>> > > Hello,
>> > > So I'm trying to nail down a work flow for building flash sites (read:
>> > not
>> > > flash applications) in as3. I had just about mastered fast seo friendly
>> > as2
>> > > sites when as3 came out and now that I'm making a concerted effort to
>> > > modernize my skills I feel like I'm starting from scratch in many ways.
>> > >
>> > > Enter frameworks. So far I've looked at
>> > > Gaia,
>> > > PureMVC ,
>> > > Mateand Enterprise
>> > > Architect  (please

Re: [Flashcoders] How much would you charge?

2008-11-13 Thread Hans Wichman
Hi,

depends on whether you are writing it from scratch or not.
Seeing the huge amount of foto galleries already outthere including
open sourced components etc you could save some time by just using one
of those.

Then it's just implementation time x your hourly rate.

greetz
JC

On Fri, Nov 14, 2008 at 4:02 AM, dr.ache <[EMAIL PROTECTED]> wrote:
> Anthony Pace schrieb:
>>
>> What is a fair price for a simple photo gallery, in AS3, that loads the
>> photo data from an XML file?
>>
>> I said between $280 to $350; given the hours it would take me, plus some
>> contingency time. Did I under quote? over quote? what do you think? Still
>> new to this independent stuff.
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
> depends a littlebit how "professional" you gonna build this in terms of
> visual appearance but thats a normal price for that. I just offered pretty
> much the
> same but with the feature that the client can upload his files in a given
> folder
> on the server and flash gets all the files via php script, so there is no
> need for
> maintaining a xml file. the pictures will be shown in a gridwall 3x4 and
> blend
> independendly = 290€ (might be a bit underestimated)
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] FLV: reliable height&width dimensions

2008-11-10 Thread Hans Wichman
Hi,

maybe a dumb question, but what is wrong with injecting the required
metadata with burak's or something like that?

greetz
JC

On Mon, Nov 10, 2008 at 10:10 PM, Meinte van't Kruis <[EMAIL PROTECTED]> wrote:
> true, actually I've rebuild the app to get its dimensions from XML, which is
> safe and
> reliable. Though this time it's offcourse a luxury to be able to do that, it
> would be great
> to get a method out which doesn't rely on external data, it seems wishful
> thinking in
> a way.
>
> On Mon, Nov 10, 2008 at 7:26 PM, dr.ache <[EMAIL PROTECTED]> wrote:
>
>> Maybe this is not appropriate for you but since I also had this problem
>> I always put the dimensions in the xml file from which the application
>> gets its content. Its not dynamic but reliable.
>>
>> Mark
>>
>> sebastian schrieb:
>>
>>  Hi, just a little comment, but if the size reported results in 0 by 0
>>> pixels, you can always set a condition that sets it to a minimum/default
>>> size... hopefully the aspect-ratio is not also a variable.
>>>
>>> good luck!
>>>
>>> Seb.
>>>
>>> Meinte van't Kruis wrote:
>>>
 I found the post. It would be nice to have standardised metadata, but it
 seems to
 be something that's a long way from now, espessially since nothing of the
 sort
 is beeing promoted or pushed by Adobe.

 Metadata aside though, I think it's a bit of a flaw to not have
 dimensions
 ready
 when the buffer is full all the time, it seems quite illogical to me. I
 mean
 seriously,
 how hard is it for Adobe to have a consistent and flawless way of
 accessing
 duration and dimensions, it seems such a basic requirement, but oh well..
 

 On Mon, Nov 10, 2008 at 4:44 PM, Juan Delgado <[EMAIL PROTECTED]>
 wrote:

  I sent an email to the list not time ago regarding this issue. I was
> asking for a metadata standard with at least the most basic properties
> mandatory. Search the list for "flv metadata" it should appear (I've
> been trying to access the archive to give you a direct link, but
> doesn't work for me, I'm afraid).
>
> I haven't found any better way of solving the problem, to be honest.
> So I'm all ears.
>
> On Mon, Nov 10, 2008 at 3:22 PM, Meinte van't Kruis <[EMAIL PROTECTED]>
> wrote:
>
>> No, I'm actually using the Video object along with the Netstream class.
>> Wonder how that
>> ready event gets fired though, wouldn't be surprised if it's also fired
>>
> on a
>
>> buffer full, either
>> that or using timers (amuse yourself and watch the VideoPlayer and
>> FLVPlayback code
>> in the flash folder, count the number of timers used ;))
>>
>> On Mon, Nov 10, 2008 at 1:57 PM, Muzak <[EMAIL PROTECTED]>
>> wrote:
>>
>>  If you're using the FLVPlayback component, use the "ready" event:
>>>
>>>
>>>
> http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/video/FLVPlayback.html#event:ready
>
>>
>>>
>>> - Original Message - From: "Meinte van't Kruis" <
>>>
>> [EMAIL PROTECTED]>
>
>> To: "Flash Coders List" 
>>> Sent: Monday, November 10, 2008 11:56 AM
>>> Subject: [Flashcoders] FLV: reliable height&width dimensions
>>>
>>>
>>>
>>>  Hi Folks,
>>>
 I've been having trouble reliably getting FLV dimensions with both
 progressive and streaming files.
 I'm current using the buffer full event to resize the video
 proportionally,
 therefore needing videoHeight
 and videoWidth. The problem is that once every now and again those
 dimensions start out at 0 0, even
 when the buffer is full.

 Furthermore the metadata has no dimension information, so can't use

>>> that
>
>> either (plus I've heard onMetaData is unreliable as well).

 Any good solutions on this?

 Possible solutions would be to check on an interval wether the value
 changes(this would really be unpreferable). Also, since I re-use the
 Video object in the playlist, that video-object keeps remembering the
 videoHeight/videoWidth of the previous video whenever the current
 video
 has not overridden it yet, making it impossible to do a simple
 enterframe/timer kill whenever it is greater than 0 or has changed,

>>> since
>
>> I
 can't
 be sure of that (next video might have same dimensions..).

 So I'm a bit stuck here, I really don't want to have an infinite

>>> interval
>
>> checking the dimensions... Any suggestions?


 --
 M.A. van't Kruis

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

Re: [Flashcoders] open windows explorer or OSX finder from flash

2008-10-31 Thread Hans Wichman
Hi,

no, unless it's a projector or wrapped up.

regards,
Hans

On Fri, Oct 31, 2008 at 10:26 AM, thomas nordahl
<[EMAIL PROTECTED]> wrote:
> Is it possible to open either windows explorer or finder from flash ?
>
> is there maybe an jacascript that in use with Externalinterface does the
> trick?
>
> If any one have a soullution or know a tutorial please reply to this thread
> :)
>
>
> Happy coder
> Thomas
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] open windows explorer or OSX finder from flash

2008-10-31 Thread Hans Wichman
Hi,

no, unless it's a projector or wrapped up.

regards,
Hans

On Fri, Oct 31, 2008 at 10:26 AM, thomas nordahl
<[EMAIL PROTECTED]> wrote:
> Is it possible to open either windows explorer or finder from flash ?
>
> is there maybe an jacascript that in use with Externalinterface does the
> trick?
>
> If any one have a soullution or know a tutorial please reply to this thread
> :)
>
>
> Happy coder
> Thomas
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] open windows explorer or OSX finder from flash

2008-10-31 Thread Hans Wichman
Hi,

no, unless it's a projector or wrapped up.

regards,
Hans

On Fri, Oct 31, 2008 at 10:26 AM, thomas nordahl
<[EMAIL PROTECTED]> wrote:
> Is it possible to open either windows explorer or finder from flash ?
>
> is there maybe an jacascript that in use with Externalinterface does the
> trick?
>
> If any one have a soullution or know a tutorial please reply to this thread
> :)
>
>
> Happy coder
> Thomas
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] XML optimization

2008-10-30 Thread Hans Wichman
Hi,

its only 60kb?
That shouldn't take too long.

Can you see what is taking up the time? Might be parsing instead of loading.

regards,
JC

On Thu, Oct 30, 2008 at 4:00 PM, Matt S. <[EMAIL PROTECTED]> wrote:
> So I know this is kind of a mammoth XML file to load all at once, but
> it doesnt seem THAT big, but its taking longer than expected. Can
> anyone look at this XML and suggest any ways to optimize it, that dont
> involve breaking it up into multiple files?
>
> http://knowawall.com/dev/tommunro/tommunro_xml2.xml
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 - Checking if a Function Exists

2008-10-27 Thread Hans Wichman
If ( currentSection["refresh"] != null ) {
currentSection["refresh"]();
}

 ?

 grtz
 JC

>
> On Mon, Oct 27, 2008 at 3:02 PM, Karim Beyrouti <[EMAIL PROTECTED]> wrote:
>> Hello Group -
>>
>> This should be really easy. I am trying to find out how to check if a
>> function exists or not in AS3 -
>> I tried this:
>>
>> 
>>If ( currentSection.refresh != null ) {
>>currentSection.refresh();
>>}
>>
>>
>> 
>>
>> But I get "ReferenceError: Error #1069: Property refresh not found" when the
>> function does not exist.
>>
>> Any clues?
>>
>>
>> Kind Regards
>>
>>
>>
>> Karim
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 associativ array length=0

2008-10-27 Thread Hans Wichman
Hi,

I'm guessing the dictionary object allows you to retrieve the size of
the keyset, might be of help.

greetz
JC

On Mon, Oct 27, 2008 at 2:58 PM, Paul Andrews <[EMAIL PROTECTED]> wrote:
> If you want an associative array like that use Object, not Array. The length
> of an array is the number of elements in the array, so it's 0. obj["name"]
> is referring to an attribute of an object not an element of an Array..
>
> Do you really have to store values like that?
>
> Paul
>
>
> - Original Message - From: "laurent" <[EMAIL PROTECTED]>
> To: "Flash Coders List" 
> Sent: Monday, October 27, 2008 1:35 PM
> Subject: [Flashcoders] AS3 associativ array length=0
>
>
>> Hi,
>>
>> I use an array to store object with their name like that:
>> views[ "viewName" ] = Object
>>
>> then views.length return 0 ...
>>
>> It's normal behaviour ?? length work only on numerical indexes ?
>>
>> L
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Disabling Print Screen key

2008-10-23 Thread Hans Wichman
yes, thats my point: he wants to avoid, and it isn't possible to do so

On Thu, Oct 23, 2008 at 8:07 PM, Fabio Pinatti <[EMAIL PROTECTED]> wrote:
> ??
> I think he wants avoid screen grab, not take it. It's a good point, I've
> never heard about a way to do it. Maybe with JS?
>
> Pinatti
>
> On Thu, Oct 23, 2008 at 3:24 PM, Hans Wichman <
> [EMAIL PROTECTED]> wrote:
>
>> If they want to grab your screen... they will...
>> http://www.google.com/search?q=screen+grabber
>>
>>
>> On Thu, Oct 23, 2008 at 5:32 PM, Andrew Murphy <[EMAIL PROTECTED]>
>> wrote:
>> > Hi. :)
>> >
>> > I'm attempting to disable using the Print Screen button for an AS3 movie
>> on
>> > a web page.  The stage doesn't appear to fire a KeyboardEvent.KEY_DOWN
>> when
>> > the Print Screen key is pressed.
>> >
>> > Is there a way to detect the Print Screen key?  Or another method for
>> > disabling the user's ability to do a Print Screen screen cap of a Flash
>> > movie?
>> >
>> >
>> > 
>> > Andrew Murphy
>> > Interactive Media Specialist
>> > [EMAIL PROTECTED]
>> >
>> > Delvinia
>> > 214 King Street West, Suite 214
>> > Toronto Canada M5H 3S6
>> >
>> > P 416.364.1455 ext. 232  F 416.364.9830  W www.delvinia.com
>> >
>> > CONFIDENTIALITY NOTICE
>> > This email message may contain privileged or confidential information. If
>> > you are not the intended recipient or received this communication by
>> error,
>> > please notify the sender and delete the message without copying or
>> > disclosing it.
>> >
>> > AVIS DE CONFIDENTIALITÉ
>> > Ce message peut contenir de l'information légalement privilégiée ou
>> > confidentielle. Si vous n'êtes pas le destinataire ou croyez avoir reçu
>> par
>> > erreur ce message, nous vous saurions gré d'en aviser l'émetteur et d'en
>> > détruire le contenu sans le communiquer a d'autres ou le reproduire.
>> >
>> >
>> >
>> > ___
>> > Flashcoders mailing list
>> > Flashcoders@chattyfig.figleaf.com
>> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> >
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
>
> --
> Fábio Pinatti
> :: web.developer
>  www.pinatti.com.br
> :: 19. 9184.3745 / 3342.1130
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Disabling Print Screen key

2008-10-23 Thread Hans Wichman
If they want to grab your screen... they will...
http://www.google.com/search?q=screen+grabber


On Thu, Oct 23, 2008 at 5:32 PM, Andrew Murphy <[EMAIL PROTECTED]> wrote:
> Hi. :)
>
> I'm attempting to disable using the Print Screen button for an AS3 movie on
> a web page.  The stage doesn't appear to fire a KeyboardEvent.KEY_DOWN when
> the Print Screen key is pressed.
>
> Is there a way to detect the Print Screen key?  Or another method for
> disabling the user's ability to do a Print Screen screen cap of a Flash
> movie?
>
>
> 
> Andrew Murphy
> Interactive Media Specialist
> [EMAIL PROTECTED]
>
> Delvinia
> 214 King Street West, Suite 214
> Toronto Canada M5H 3S6
>
> P 416.364.1455 ext. 232  F 416.364.9830  W www.delvinia.com
>
> CONFIDENTIALITY NOTICE
> This email message may contain privileged or confidential information. If
> you are not the intended recipient or received this communication by error,
> please notify the sender and delete the message without copying or
> disclosing it.
>
> AVIS DE CONFIDENTIALITÉ
> Ce message peut contenir de l'information légalement privilégiée ou
> confidentielle. Si vous n'êtes pas le destinataire ou croyez avoir reçu par
> erreur ce message, nous vous saurions gré d'en aviser l'émetteur et d'en
> détruire le contenu sans le communiquer a d'autres ou le reproduire.
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] AS2 FlashDevelop -- Warning unsupported #include

2008-10-22 Thread Hans Wichman
Hi,

as an alternative you have different options:
- dont use the tween classes, but use the TweenMax series from
greensock. However you are bound to run into other problems using the
mx classes together with FlashDevelop.

I found the following method the easiest, although patching is an option too:
* convert macromedia all classes to intrinsic classes using asigen
* generate an injection swf containing all your mx classes
* set mx= true in mtasc
* fix any errors you still get in your intrinsic copy of the mx
classes (set them as classpath)

greetz
JC

On Wed, Oct 22, 2008 at 5:58 PM, Ian Thomas <[EMAIL PROTECTED]> wrote:
> This is because MTASC, the compiler used by FlashDevelop, doesn't
> support #include.
>
> See here:
> http://www.mtasc.org/#comparison
>
> HTH,
>   Ian
>
> On Wed, Oct 22, 2008 at 4:51 PM, Andrew Sinning <[EMAIL PROTECTED]> wrote:
>> In FlashDevelop working with AS2, I get a "Warning unsupported #include".
>>  The warning refers to the line
>>
>>   #include "Version.as"
>>
>> in mx.transitions.Tween, mx.transitions.easing.Strong and
>> mx.transitions.easing.Bounce
>>
>> I never use a "#" in front of my includes, but these are mx files and they
>> compile just fine, but what's the deal with the "#"?
>>
>> Thanks!
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] working with getPixel32 and setPixel32,

2008-10-07 Thread Hans Wichman
Hi,
ps if you are just wanting to half the alpha something along these
lines should work as well:

var newbitmap:BitmapData = new BitmapData (widht, height, true, 0x0);
newbitmap.draw (oldbitmap, new Matrix(), new ColorTransform(1,1,1,0.5,0,0,0,0));

greetz
JC

On Mon, Oct 6, 2008 at 9:17 PM, sebastian <[EMAIL PROTECTED]> wrote:
> hi folks,
>
> can any one shed some light to me on the setpixel32 and getpixel32?
>
> I'd like to be able to affect just one of the 4 components: A R G or B
> independently of another.
>
> Essentially, read the current ARGB using getPixel32 and then manipulate just
> one part of it, in my case, halve the current "A" value of the ARGB and then
> re-assign it back to the bitmap.
>
>
> //1: grab the HEX value for the current coordinate:
> var val:uint = getPixel32(x,y);
>
> //2: manipulate the HEX value of just 1 of the 4 parts, in my case the A of
> the ARGB:
> 
>
> //3: re-assign it back to the display:
> setPixel32(x,y,val);
>
> Thanks for your help!
>
> Sebastian.
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] working with getPixel32 and setPixel32,

2008-10-06 Thread Hans Wichman
Hi,

this might help:
http://objectpainters.com/blog/2007/11/30/inverting-the-alpha-of-a-bitmap-image/

It does not half but invert the alpha, but the principle is the same I think.
The problem lies in the premultiplication of the alpha.

greetz
JC

On Tue, Oct 7, 2008 at 4:48 AM, Juan Pablo Califano
<[EMAIL PROTECTED]> wrote:
> PD:
>
> Sorry, even though the result is the same, to make more sense the second
> sample should read:
>
>
> var hexaValue:int = 0x9100ff33;
> var a:int = (hexaValue >> 24) & 0xff;
> var rgb:int = hexaValue & 0xff;
>
> var newAlpha:int = 0xcc;
> copyHexaValue = newAlpha << 24 | rgb;
> trace(uint(copyHexaValue).toString(16));// traces  cc00ff33
> Using rgb as the name of the var that stores the value of the RGB
> components, instead of arg.
>
>
> 2008/10/6, Juan Pablo Califano <[EMAIL PROTECTED]>:
>>
>> Hi,
>>
>> If I haven't misread something, this
>>
>> a = a >> 1;
>>
>> makes no sense. Unless you're trying to divide alpha by 2, in which case I
>> obviously missed something.
>>
>>
>> If you want to extract the 4 components, you can use something like this:
>>
>>
>> var hexaValue:int = 0x9100ff33;
>>
>> var a:int = (hexaValue >> 24) & 0xff;
>> var r:int = (hexaValue >> 16) & 0xff;;
>> var g:int = (hexaValue >> 8) & 0xff;;
>> var b:int = hexaValue & 0xff;
>>
>> var newAlpha:int = 0xcc;
>> var copyHexaValue:int = newAlpha << 24 | r << 16 | g << 8 | b;
>> trace(uint(copyHexaValue).toString(16)); // traces  cc00ff33
>>
>> If you don't bother to get the individual RGB components, just the alpha
>> channel, try this:
>>
>> var hexaValue:int = 0x9100ff33;
>> var a:int = (hexaValue >> 24) & 0xff;
>> var arg:int = hexaValue & 0xff;
>>
>> var newAlpha:int = 0xcc;
>> copyHexaValue = newAlpha << 24 | arg;
>> trace(uint(copyHexaValue).toString(16));// traces  cc00ff33
>> Also, I'm casting to uint just to display the value in a more
>> meaningful/readable way in the trace, but as long as you don't perform
>> arithmetic on those values, you don't have to (because it's parsed as a bit
>> pattern, not as numerical value, if that makes sense...).
>>
>> Cheers
>> Juan Pablo Califano
>>
>>
>> 2008/10/6, sebastian <[EMAIL PROTECTED]>:
>>>
>>> hi Glen,
>>>
>>> Kudos for the shift >> 1 operation, knew that was a faster operand.
>>>
>>> However, this code is still now working, now it simply doesn't change
>>> anything...
>>> :(
>>>
>>> var val:uint = getPixel32(x,y);
>>> var a:uint = (val >> 24) & 0xff;
>>> var rgb:uint = val & 0xff;
>>> a = a >> 1;
>>> var newval:uint = (a << 32) | rgb;
>>> setPixel32(x,y,newval);
>>>
>>> I also tried changing it to say:
>>>
>>> ...
>>> var rgb:uint = val & 0x00ff;
>>> a = a >> 1;
>>> var newval:uint = (a << 24) | rgb;
>>> ...
>>>
>>> since I thought that was an error maybe, but that also doesn't influence
>>> the alpha of the pixel...
>>> :(
>>>
>>> Out of desperation I also tried:
>>>
>>> var a:uint = val & 0xff00;
>>> var rgb:uint = val & 0x00f;
>>> a = a >> 1;
>>> var newval:uint = a | rgb;
>>>
>>> and
>>>
>>> var a:uint = val & 0xff00;
>>> var rgb:uint = val & 0x00f;
>>> a = a >> 1;
>>> var newval:uint = (a << 24) | rgb;
>>>
>>> :(
>>>
>>> sniff...
>>>
>>> Setting alpha for the whole MC is not an option for what I am doing. I'm
>>> trying to create trails behind things that are moving by having a video-burn
>>> like effect; by operating on the pixel level. At the moment I am using code
>>> from 'Adventures in AS', but once i have it working I'll encapsulate it and
>>> use it in a different project.
>>>
>>> The original source is:
>>>
>>> http://flashcoding.blogspot.com/2008/03/small-starfield-with-bluring-effect.html
>>>
>>> And my current draft-code modification is:
>>>
>>> package
>>> {
>>>import flash.events.*;
>>>import flash.display.*;
>>>import flash.display.Bitmap;
>>>import flash.display.BitmapData;
>>>import flash.geom.Rectangle;
>>>
>>>
>>>public class Starfield
>>>{
>>>var mc:MovieClip =new MovieClip();
>>>var screendata:BitmapData;
>>>
>>>var stars:Array=new Array();
>>>var antal:Number=500;
>>>
>>>public function Starfield(timeline)
>>>{
>>>
>>>screendata=new
>>> BitmapData(320,240,false,0x);
>>>var screen:Bitmap=new Bitmap(screendata);
>>>mc.addChild(screen);
>>>
>>>for (var i:int=0;i>>{
>>>InitStar(i);
>>>}
>>>
>>>mc.addEventListener(Event.ENTER_FRAME,this.render);
>>>timeline.addChild(mc);
>>>}
>>>
>>>private function MoveStar(index:int)
>>>{
>>>if (stars[index][0]<-160 || stars[index][0]>160 ||
>>> stars[index][1]<-120 || stars[index][1]>120)
>>> 

Re: [Flashcoders] Nightmare flash File with Lots of textfields

2008-09-23 Thread Hans Wichman
Hi,

not sure but I think you are looking for text.embedRanges in jsfl.

greetz
JC

On Tue, Sep 23, 2008 at 9:00 PM, Michael William Ypes
<[EMAIL PROTECTED]> wrote:
> Yet again I find myself dealing with someone elses sh*te.
>
> Basically compile times are like a million years/5 minutes and I believe it
> is because some numpty has embedded a million textfields and some of them
> has all selected to embed fonts - just in case the whole world wants to see
> it :)
>
> Anyway my question is is there anyway of finding out which fields are using
> the 'All' font embedding.
>
> Probably not but I thought I would give it a shot.
>
> Cheers
>
> M
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] multiple classes in one swc?

2008-09-18 Thread Hans Wichman
Yes,
as2 or as3 ?

greetz
JC

On Thu, Sep 18, 2008 at 9:58 PM, eric e. dolecki <[EMAIL PROTECTED]> wrote:
> Is it possible to have many classes burned into a single SWC and then call
> classes out of it?
> - linked to SWC
> import someClass;
> import someOtherClass;
>
> var foo:SomeClass = new SomeClass();
> var bar:SomeOtherClass = new SomeOtherClass();
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Retreive name of function within scope of that function

2008-09-16 Thread Hans Wichman
Hi,
here is an as2 method, maybe it's portable:
http://objectpainters.com/blog/2007/07/16/argumentscallee_name/

greetz
JC

On Tue, Sep 16, 2008 at 1:24 PM, Jiri Heitlager
<[EMAIL PROTECTED]> wrote:
> Does somebody now if it is possible to get the name of a function from the
> scope of that function.
>
> function doSomething():void
> {
>trace('the name of this function is ' , $$name$$)
> }
>
> Where the trace would be :
> the name of this function is doSomething
>
> In Java one has acces to stack traces, does AS3 provide acces to this?
>
> Jiri
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] getURL and ExternalInterface

2008-09-10 Thread Hans Wichman
thanks!

On Sun, Sep 7, 2008 at 12:17 AM, sebastian <[EMAIL PROTECTED]> wrote:
> in AS2 externalinterface is your friend and it works PERFECT with swfaddress
> and swfobject. There are some strange issues with IE though, so make sure
> you test well on that platform.
>
> read this for more information and a working example on all OS/platform
> combos I know of:
>
> http://blog.intuitymedialab.eu/2007/07/13/actionscript-javascript-communication-externalinterface/
>
> seb.
>
> Hans Wichman wrote:
>>
>> Hi,
>>
>> I read somewhere that using getUrl for javascript calls while using
>> externalinterface at the same time will lead to problems (eg when
>> using swfaddress).
>>
>> Can anyone tell me if opening an url through getUrl will cause these
>> problems as well, or just javascript?
>> Any work arounds? What is the exact nature of the problem?
>>
>> As2 btw!
>>
>> regards,
>> Hans
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] getURL and ExternalInterface

2008-09-04 Thread Hans Wichman
Hi,

I read somewhere that using getUrl for javascript calls while using
externalinterface at the same time will lead to problems (eg when
using swfaddress).

Can anyone tell me if opening an url through getUrl will cause these
problems as well, or just javascript?
Any work arounds? What is the exact nature of the problem?

As2 btw!

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


Re: [Flashcoders] combobox still giving grief

2008-09-03 Thread Hans Wichman
Hi,
you're not using runtime file sharing right?
greetz
JC

On Wed, Sep 3, 2008 at 11:48 AM, allandt bik-elliott
(thefieldcomic.com) <[EMAIL PROTECTED]> wrote:
> sorry to necro an old thread but i still have a problem
>
> file structure:
> one index swf that preloads the main swf
> main swf that loads in several different section swfs and masks them in a
> frame
> the combobox is in one of the masked sections
>
> the issue is this:
> i have a combo box that uses an array populated by a loaded xml file as a
> dataprovider. It all works just fine apart from that when the combo box is
> first opened, the first 'page' of entries doesn't render. If the list is
> scrolled or an entry is selected (it's fully populated), the entire list
> renders properly, including the entry that's selected.
>
> This happens when the site is viewed on a server and when the file is 'test
> movie'd on it's own but it doesn't happen when the index swf is 'test
> movie'd or when the site is viewed locally in a browser
>
> The cb uses fonts used throughout the site and they are embedded (i've added
> the code for the cb below). It's been suggested that maybe the cb is loaded
> before the fonts so that it doesn't get a chance to render properly but i
> can't see how that is happeneing  - i've tried added a textfield with the
> fonts embedded make sure that that wasn't it (although i haven't added the
> fonts to a frame loaded before the cb - i'm trying that now)
>
> the cb is placed manually onstage and has the following code added on the
> timeline:
>
>function init():Void {
>xml.ignoreWhite = true;
>xmlFile = (xmldata != undefined) ? xmldata : PATH();
>xml.load(xmlFile);
>xml.onData = function (src:String) {
>if (src == undefined) {
>this.onLoad(false);
>} else {
>this.parseXML(src);
>this.loaded = true;
>this.onLoad(true);
>parse(); // creates the arrays
>}
>}
>
>var cBox:Object = {};
>cBox.change = function(o:Object):Void
>{
>//Selection.setFocus(c); // didn't work
>//o.target.onKillFocus=undefined; // didn't work
>getGeoEvents(
> arrayOfUniversitiesNames[mc_university.cb_listOfUniversities.selectedIndex]
> ); // sends user to correct tab
>lock();
>}
>
>  // this is the script for the cb
>var c:MovieClip = mc_university.cb_listOfUniversities;
>c.setStyle("fontFamily", "VAG Rounded Light");
>c.setStyle("embedFonts", true);
>c.addEventListener("change", cBox);
>c.dataProvider = arrayOfUniversitiesNames;
>c.text = "Select";
>//Selection.setFocus(c); // didn't work
>changeTab(bt_tab);
>}
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] [Flashcoders tweening glowfilter from inner to outer

2008-08-27 Thread Hans Wichman
Hi,

I don't think tweening from inner to outer is possible, unless you use
multiple glow filters.

greetz
JC

On Wed, Aug 27, 2008 at 9:43 PM, eric e. dolecki <[EMAIL PROTECTED]> wrote:
> Can tweenfilterlite tween from inner to outer glows elegantly? The server
> isn't responding for me to check myself without setting up test code. Might
> do anyway.
> Eric
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] pythagoras question

2008-08-27 Thread Hans Wichman
Hi,

I don't think pythagoras is involved here.

try:

factor = vectorLength/c;
coordX = startX + (endX-startX)*factor;
coordY = startY + (endY-startY)*factor;

greetz
JC

On Wed, Aug 27, 2008 at 7:00 PM, allandt bik-elliott
(thefieldcomic.com) <[EMAIL PROTECTED]> wrote:
> hi guys
>
> I'm doing something wrong in my pythagoras theorum but i'm not seeing what
> it is right now
>
> i'm trying to find out the coordinates for a point on a line. I know the
> start x, end x, start y, end y, c length for the line and i know how far
> along c the point should be (call it vector length) but i'm a little stumped
> as to where to go from there
>
> the psuedo code for what i've been trying is
>
> vector x = start x / end x
> vector y = start y / end y
> train x = (vector x * vector length) + start x
> train y = (vector x * vector length) + start y
>
> I think i have my maths very wrong here - hope you guys can help
>
> a
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Hans Wichman
PHP:

Description
int time ( void )
Returns the current time measured in the number of seconds since the
Unix Epoch (January 1 1970 00:00:00 GMT).

FLASH:
setTime (Date.setTime method)
public setTime(millisecond:Number) : Number
Sets the date for the specified Date object in milliseconds since
midnight on January 1, 1970, and returns the new time in milliseconds.
Availability: ActionScript 1.0; Flash Player 5

So there might be a factor thousand difference, so you might have to
do php.time()*1000, but I don't know.

greetz
JC

On Tue, Aug 26, 2008 at 2:52 PM, allandt bik-elliott
(thefieldcomic.com) <[EMAIL PROTECTED]> wrote:
>
> would that be the same as the php time() method? because that would be super
>
> On Tue, Aug 26, 2008 at 1:27 PM, Hans Wichman <
> [EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > isnt milliseconds since 1970 easier?
> > Something like:
> > 
> > new Date ().setTime(103810313))
> >
> > greetz
> > JC
> >
> > On Tue, Aug 26, 2008 at 1:33 PM, allandt bik-elliott (thefieldcomic.com) <
> > [EMAIL PROTECTED]> wrote:
> >
> > > The app is designed for people only in the uk - it will show the current
> > > time and the amount of time remaining until the countdown is finished so
> > it
> > > will probably be worth giving the time based on the server time and
> > setting
> > > the time in flash based on that
> > >
> > > the original question was about the best practise for getting the time
> > for
> > > flash from xml
> > >
> > > thanks for the input so far guys
> > > a
> > >
> > > On Tue, Aug 26, 2008 at 12:16 PM, Cor <[EMAIL PROTECTED]> wrote:
> > >
> > > > So what if a user (from another continent) starts your app.
> > > > The difference will be greater or even before the server time.
> > > > So you would get a negative value???
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED] On Behalf Of
> > allandt
> > > > bik-elliott (thefieldcomic.com)
> > > > Sent: dinsdag 26 augustus 2008 12:56
> > > > To: Flash Coders List
> > > > Subject: Re: [Flashcoders] is there a recognised date format for xml?
> > > >
> > > > yes it's local
> > > >
> > > > On Tue, Aug 26, 2008 at 11:46 AM, Cor <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > Mmmm, I don't know??
> > > > > Somebody out there who does???
> > > > >
> > > > > -Original Message-
> > > > > From: [EMAIL PROTECTED]
> > > > > [mailto:[EMAIL PROTECTED] On Behalf Of
> > > Kenneth
> > > > > Kawamoto
> > > > > Sent: dinsdag 26 augustus 2008 12:43
> > > > > To: 'Flash Coders List'
> > > > > Subject: Re: [Flashcoders] is there a recognised date format for xml?
> > > > >
> > > > > Isn't that always the case no matter how you construct the date
> > object?
> > > > >
> > > > > Kenneth Kawamoto
> > > > > http://www.materiaprima.co.uk/
> > > > >
> > > > > Cor wrote:
> > > > > > Yes, but still it is depending of the localtime.
> > > > > >
> > > > > > Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
> > > > > GMT+0200
> > > > > > 2008
> > > > > >
> > > > > >
> > > > > >
> > > > > > -Original Message-
> > > > > > From: [EMAIL PROTECTED]
> > > > > > [mailto:[EMAIL PROTECTED] On Behalf Of
> > > > Kenneth
> > > > > > Kawamoto
> > > > > > Sent: dinsdag 26 augustus 2008 12:22
> > > > > > To: Flash Coders List
> > > > > > Subject: Re: [Flashcoders] is there a recognised date format for
> > xml?
> > > > > >
> > > > > > If so I'd ask my PHP coder to generate formatted string so that I
> > > need
> > > > > > to code less ;)
> > > > > >
> > > > > > e.g.
> > > > > > var xml:XML = 
> > > > > > var targetDate:Date = new Date([EMAIL PROTECTED]());
> > > > > >
> > > > > > ...a lot less code than yours!
> > > > > >
> > > > > > Kenneth Kawamoto
> > > &

Re: [Flashcoders] is there a recognised date format for xml?

2008-08-26 Thread Hans Wichman
Hi,

isnt milliseconds since 1970 easier?
Something like:

new Date ().setTime(103810313))

greetz
JC

On Tue, Aug 26, 2008 at 1:33 PM, allandt bik-elliott (thefieldcomic.com) <
[EMAIL PROTECTED]> wrote:

> The app is designed for people only in the uk - it will show the current
> time and the amount of time remaining until the countdown is finished so it
> will probably be worth giving the time based on the server time and setting
> the time in flash based on that
>
> the original question was about the best practise for getting the time for
> flash from xml
>
> thanks for the input so far guys
> a
>
> On Tue, Aug 26, 2008 at 12:16 PM, Cor <[EMAIL PROTECTED]> wrote:
>
> > So what if a user (from another continent) starts your app.
> > The difference will be greater or even before the server time.
> > So you would get a negative value???
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of allandt
> > bik-elliott (thefieldcomic.com)
> > Sent: dinsdag 26 augustus 2008 12:56
> > To: Flash Coders List
> > Subject: Re: [Flashcoders] is there a recognised date format for xml?
> >
> > yes it's local
> >
> > On Tue, Aug 26, 2008 at 11:46 AM, Cor <[EMAIL PROTECTED]> wrote:
> >
> > > Mmmm, I don't know??
> > > Somebody out there who does???
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf Of
> Kenneth
> > > Kawamoto
> > > Sent: dinsdag 26 augustus 2008 12:43
> > > To: 'Flash Coders List'
> > > Subject: Re: [Flashcoders] is there a recognised date format for xml?
> > >
> > > Isn't that always the case no matter how you construct the date object?
> > >
> > > Kenneth Kawamoto
> > > http://www.materiaprima.co.uk/
> > >
> > > Cor wrote:
> > > > Yes, but still it is depending of the localtime.
> > > >
> > > > Trace(targetDate); gives me in the Netherlands: Tue Aug 26 12:00:00
> > > GMT+0200
> > > > 2008
> > > >
> > > >
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED] On Behalf Of
> > Kenneth
> > > > Kawamoto
> > > > Sent: dinsdag 26 augustus 2008 12:22
> > > > To: Flash Coders List
> > > > Subject: Re: [Flashcoders] is there a recognised date format for xml?
> > > >
> > > > If so I'd ask my PHP coder to generate formatted string so that I
> need
> > > > to code less ;)
> > > >
> > > > e.g.
> > > > var xml:XML = 
> > > > var targetDate:Date = new Date([EMAIL PROTECTED]());
> > > >
> > > > ...a lot less code than yours!
> > > >
> > > > Kenneth Kawamoto
> > > > http://www.materiaprima.co.uk/
> > > >
> > > > Cor wrote:
> > > >> In PHP you can do whatever you want: see http://nl.php.net/date
> > > >> I think it can also depend on your server.
> > > >>
> > > >> -Original Message-
> > > >> From: [EMAIL PROTECTED]
> > > >> [mailto:[EMAIL PROTECTED] On Behalf Of
> > allandt
> > > >> bik-elliott (thefieldcomic.com)
> > > >> Sent: dinsdag 26 augustus 2008 11:48
> > > >> To: Flash Coders List
> > > >> Subject: [Flashcoders] is there a recognised date format for xml?
> > > >>
> > > >> hi guys
> > > >>
> > > >> i'm speccing an xml file for a server side dev that needs to return
> a
> > > > target
> > > >> date and time and i wanted to make sure i wasn't doing anything
> stupid
> > > >>
> > > >> what would a php dev be expecting to use for time / date and how
> would
> > > > that
> > > >> be supplied in an xml file? And what would the best way of
> converting
> > > the
> > > >> return string for flash to use?
> > > >>
> > > >> I was thinking something along the lines of
> > > >> 
> > > >>
> > > >> and using something like
> > > >>
> > > >> var sDate:String = node.attributes.date;
> > > >> var sTime:String = node.attributes.time;
> > > >>
> > > >> var arDate:Array = sDate.split(",");
> > > >> var nYear:Number = Number(arDate[0]);
> > > >> var nMonth:Number = Number(arDate[1]-1); // months start at 0
> > > >> var nDate:Number = Number(arDate[2]);
> > > >>
> > > >> var arTime:Array = sTime.split(",");
> > > >> var nTimeHours:Number = Number(arTime[0]);
> > > >> var nTimeMinutes:Number = Number(arTime[1]);
> > > >> var nTimeSeconds:Number = Number(arTime[2]);
> > > >>
> > > >> var targetDate:Date = new Date(nYear, nMonth, nDate, nTimeHours,
> > > >> nTimeMinutes, nTimeSeconds);
> > > >
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figle

Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-26 Thread Hans Wichman
Hi,

interfaces are pretty simple in reality and they are everywhere.
Imagine every wall outlet looked different, and not only different, but that
in order to use them, you had to remove the outlet first, take a look at the
wiring and then bolt it back on with you finally knowing how to use it.

Would we accept that as a fact of life? No sir.
So what would we do?

We'd come up with a brilliant plan to take over the world, and it involves
agreeing on what a wall outlet looks like and what we expect it to do. So no
matter the device I want to plug in, as long as my device agrees with the
interface it has been offered, it's good to go.

Will it work without problems everywhere and always? Nah try to plug in your
dutch mp3player in the uk, no go, but within a certain context they can work
wonders.

hth :)
JC

On Tue, Aug 26, 2008 at 9:49 AM, Cor <[EMAIL PROTECTED]> wrote:

> Very good, Claus,
>
> Do you have a visual of this... LOL
>
> Regards
> Cor
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] On Behalf Of Claus Wahlers
> Sent: dinsdag 26 augustus 2008 9:42
> To: Flash Coders List
>  Subject: Re: [Flashcoders] A Question that I've been asking for years!!
>
> An example is worth a thousand words.
>
> public interface IBounce {
>function bounce():void;
> }
>
> public class Balls implements IBounce {
>public function bounce():void { }
> }
>
> public class Boobs implements IBounce {
>public function bounce():void { }
> }
>
> var balls:Balls = new Balls();
> var boobs:Boobs = new Boobs();
> doSomethingWith(balls);
> doSomethingWith(boobs);
>
> function doSomethingWith(bouncyObject:IBounce):void {
>bouncyObject.bounce();
> }
>
> Cheers,
> Claus.
>
> Omar Fouad wrote:
>
> > This could seem weird...
> > But what the hell is an interface!!! I've read lots of books and
> > posts without getting the answer. I bought "Essential AS3" to read about
> > interfaces and he says that helps for multi inheritance. In other places
> I
> > read that it is a "deal" to ensure that a class has some methods and so
> on.
> > But what is the real benefit that I can come out with using
> interfaces
> >
> > Maybe that is stupidity or I am not smart enough to get the concept but
> > believe me... its is been two years now!!
> >
> > Please Help!!!
> >
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] external interface from different clips

2008-08-25 Thread Hans Wichman
Hi,

i'm building an app, which loads another app, so lets say main loads sub.

Sub is always the same and is not under my control, and it performs a:
_lockroot = true
ExternalInterface.addCallback (, _root.obj, _root.obj.function);

The first time sub is loaded, its _root points at _level0.a (for example),
the second time its _root may point at _level0.b.

The first time sub functions ok, the second time it fails.

I think it has to do with the fact that the callbacks can't be cleared when
sub unloads the first time, but I'm not sure.
Does this scenario ring any bells with anyone?

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


Re: [Flashcoders] how many coders here actually have a degree relatedto computer science?

2008-08-23 Thread Hans Wichman
That is true, although it's hard to see how your live would be if you'd
taken 'that other road' :)

On Sat, Aug 23, 2008 at 12:11 PM, Eamonn Faherty <[EMAIL PROTECTED]>wrote:

> I have a computer science degree and I think it is so valuable.
>
> The things I learnt on my course help me with my developing all the
> time.
>
> >From what I have seen (which is fairly limited) I think being taught
> formally gives you a different attitude towards developing and learning
> new languages.
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of chas
> warn
> Sent: 23 August 2008 09:52
> To: Flash Coders List
> Subject: Re: [Flashcoders] how many coders here actually have a degree
> relatedto computer science?
>
>  The tool you've got in front of you will tell you everything you need to
> know.  Give or take.
>
> On Fri, Aug 22, 2008 at 1:40 AM, allandt bik-elliott (thefieldcomic.com)
> <
> [EMAIL PROTECTED]> wrote:
>
> > so here's a question - if you have spent any amount of time doing the
> job,
> > would you consider going back and getting degree?
> >
> > On Fri, Aug 22, 2008 at 3:26 AM, Helmut Granda
> <[EMAIL PROTECTED]
> > >wrote:
> >
> > > Right, and that is why I partially agree with the post I was
> referring
> > to,
> > > specially because life without a college is not for everyone.
> > > Going back to my main point I still believe that not having a degree
> does
> > > not necessary mean that you are not motivated.
> > >
> > > On Thu, Aug 21, 2008 at 7:32 PM, Kerry Thompson
> <[EMAIL PROTECTED]
> > > >wrote:
> > >
> > > > Helmut Granda wrote:
> > > >
> > > > > But i still feel that not having a degree shows that you are not
> > > > motivated.
> > > >
> > > > That's a good rule of thumb, and words to live by (and study by).
> Of
> > > > course,
> > > > we can point to the exceptions--Bill Gates dropped out of Harvard,
> I
> > > > believe
> > > > it was--but the odds are heavily in your favor with a degree. From
> time
> > > to
> > > > time I see reports of studies that show lifetime earnings, and,
> without
> > > > exception, average lifetime earnings with a degree are hundreds of
> > > > thousands
> > > > of dollars more than without.
> > > >
> > > > Cordially,
> > > >
> > > > Kerry Thompson
> > > >
> > > > ___
> > > > Flashcoders mailing list
> > > > Flashcoders@chattyfig.figleaf.com
> > > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > > >
> > >
> > >
> > >
> > > --
> > > ...helmut
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] how many coders here actually have a degree related to computer science?

2008-08-22 Thread Hans Wichman
HI,

ok formal cs university degree here... would I recommend it? Erm depends on
the work you have to do. I don't believe it's the best education/background
for this kind of work. It has helped me to do the work I have to do, but
it's not helping me getting the work I want to do :). And then again it's
been so long ago, I'm probably led by experience 99% of the time anyway and
not by what I 'learned' in school.
When the kids grow a little bit older I'll be sure to pickup some kind of
education again, but it will probably be art or music (or psychology always
a favorite as well). I don't see myself doing CS university stuff again to
see what's new in the field, I'd rather do some selfstudy then.
One of the biggest issues I always had with this kind of education is that,
although you learn to stick through something hard etc etc, almost none of
the teachers could give me a valid reason why I had to learn what they were
teaching. Instead of "well if you are building this cool rpg game you'll be
needing a*", it was more like "well because I was told to teach you this
stuff". That's why it's theorical cs, you know a lot, and you can't do
[EMAIL PROTECTED] if you don't get some work experience :)

regards,
JC

On Fri, Aug 22, 2008 at 7:26 PM, Kerry Thompson <[EMAIL PROTECTED]>wrote:

> John Winkelman wrote:
>
> > Well, I got my degree in Russian Studies, which means I can read all of
> my
> > spam.
>
> LOL. It must be Friday.
>
> Cordially,
>
> Kerry Thompson
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] json & flash 8/9

2008-08-22 Thread Hans Wichman
Hi,

thanks but I forgot to mention its AS2, will I need the additional libraries
there?
(they argue its as2 that has to run in fp9, go figure ;))

regards,
JC

On Fri, Aug 22, 2008 at 4:17 PM, Eduardo Omine <[EMAIL PROTECTED]>wrote:

> On Fri, Aug 22, 2008 at 9:49 AM, Hans Wichman
> <[EMAIL PROTECTED]> wrote:
> > - does n1 know of a good reason to use webservices through json through
> > javascript in flash
>
> Some developers prefer JSON over XML. But there's no need to use a JS
> library to connect Flash to server. With AS3 you load and send JSONs
> with URLLoader. To decode and encode JSON objects use the as3corelib
> library:
> http://code.google.com/p/as3corelib/
>
> Performance-wise, it is best to use AMF (binary format) if possible.
> Working with JSON should be slower than XML because XML parsing is
> native to AS3.
>
> --
> Eduardo Omine
> http://blog.omine.net/
> http://www.omine.net/
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] json & flash 8/9

2008-08-22 Thread Hans Wichman
Hi,

I'm currently involved in a project, where webservices are being accessed
from flash, through a 400kb microsoft javascript library.
The developer claims it is webservices through json, which is supposedly
done because of the big performance improvement.

All I see is a 400kb javascript overhead for something flash supports
natively and locks up my browser.

Anyway, another thing is they claim the content (created in flash 8) has to
be run in the flash 9 player since there are 'issues' with JSON in Flash 8.

So my questions to you folks are:
- does n1 know of a good reason to use webservices through json through
javascript in flash
- are there any known problems using this approach in flash 8

And some good sources on json in flash would be nice, ofcourse I've been
googling, but there are a LOT of hits.

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


[Flashcoders] fast performing as2 pano

2008-08-20 Thread Hans Wichman
Hi folks,

I was searching for a fast performing as2 panorama tool, and stumbled into
pano2vr.
Although it's a great tool, the output seems a bit sluggish, but maybe I'm
just spoiled by looking at flash 9 pano's.

Does anybody know of a better as2 panorama tool that outputs fast performing
panorama's?
I did some work myself using displacementmaps, but that didn't quite result
in what I was looking for:)

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


Re: [Flashcoders] Removing loaded swf...

2008-08-15 Thread Hans Wichman
Hi,

I thought the point of Grant's article was that it's hopelessly bugged in
player 9 even if you are an academic?:)

greetz
JC



On Fri, Aug 15, 2008 at 3:47 PM, Eduardo Omine <[EMAIL PROTECTED]>wrote:

> In gotoPage(), try this:
>
> var loader:Loader = Loader(currentPage.parent);
>
>
> instead of:
>
> var loader:Loader = Loader(e.target); // e.target refers to currentPage
>
>
> --
> Eduardo Omine
> http://blog.omine.net/
> http://www.omine.net/
>  ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Drawing an arc with curveTo

2008-08-04 Thread Hans Wichman
ok ignore that, i misread the question:)

On Mon, Aug 4, 2008 at 11:22 AM, Hans Wichman <
[EMAIL PROTECTED]> wrote:

>  Hi,
>
> here is a simple one usig curveTo's to create a fluid line:
> http://objectpainters.com/blog/2007/07/18/drawing-using-controlpoints/
>
> greetz
> JC
>
>   On Mon, Aug 4, 2008 at 10:03 AM, Ivan Dembicki <[EMAIL PROTECTED]>
> wrote:
>
>> Hello Alias,
>>
>> http://bezier.googlecode.com
>> you need Bezier.setPoint method
>> http://bezier.ru/wp-content/uploads/2008/06/bezier.swf?demo=3
>> You can approximate circle arc using quadratic bezier - minimal
>> number of curves for one circle is 8.
>>
>> Advanced drawing methods in Macromedia Flash MX:
>> http://www.adobe.com/devnet/flash/articles/adv_draw_methods.html
>>
>> Also you can look at AS1 library at layer51, for example:
>> http://proto.layer51.com/d.aspx?f=388
>>
>> Also I can add usage examples to Bezier package
>> just I need to know what exactly you need.
>>
>> --
>> iv
>> http://www.bezier.ru
>> http://bezier.googlecode.com
>>  ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Drawing an arc with curveTo

2008-08-04 Thread Hans Wichman
Hi,

here is a simple one usig curveTo's to create a fluid line:
http://objectpainters.com/blog/2007/07/18/drawing-using-controlpoints/

greetz
JC

On Mon, Aug 4, 2008 at 10:03 AM, Ivan Dembicki <[EMAIL PROTECTED]>
wrote:

> Hello Alias,
>
> http://bezier.googlecode.com
> you need Bezier.setPoint method
> http://bezier.ru/wp-content/uploads/2008/06/bezier.swf?demo=3
> You can approximate circle arc using quadratic bezier - minimal
> number of curves for one circle is 8.
>
> Advanced drawing methods in Macromedia Flash MX:
> http://www.adobe.com/devnet/flash/articles/adv_draw_methods.html
>
> Also you can look at AS1 library at layer51, for example:
> http://proto.layer51.com/d.aspx?f=388
>
> Also I can add usage examples to Bezier package
> just I need to know what exactly you need.
>
> --
> iv
> http://www.bezier.ru
> http://bezier.googlecode.com
>  ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] as2 alert box

2008-07-31 Thread Hans Wichman
Hi folks,

1 in a coupe hundred times, my v2 alert box does not appear in the middle of
the screen, but with its center at 0,0 of my stage.
And of course we can roll our own again, but if there is a simple fix, I'd
rather not:)

Any ideas?

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


Re: [Flashcoders] flv lagging when changes the frame via code

2008-07-25 Thread Hans Wichman
Hi,
might not be your issue, but are you telling the timeline on which the flv
is embedded to go back, or the flv itself?
greetz
JC

On Fri, Jul 25, 2008 at 7:18 PM, Fabio Pinatti <[EMAIL PROTECTED]> wrote:

> Hello all!
>
> I'm doing a kind of navigation application using a flv embedded on
> flash. When I use a command to play it, it runs well.. But if I go to
> to a specific frame backwards the current frame, it gives a small lag
> before plays again... Is it a codec restriction? Any way to avoid that
> lag, using only a big flv, like my situation?
>
> Thanks so much,
>
> --
> Fábio Pinatti
> :: web.developer
>  www.pinatti.com.br
> :: 19. 9184.3745 / 3342.1130
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ...Friday, 5:38 pm

2008-07-25 Thread Hans Wichman
My favourite movie happy tree friends is in there woohoo!

On Fri, Jul 25, 2008 at 6:30 PM, allandt bik-elliott (thefieldcomic.com) <
[EMAIL PROTECTED]> wrote:

> it brings up a serious point tho - can flash survive with the amount of
> animosity there is towards it?
>
> On Fri, Jul 25, 2008 at 4:56 PM, Zárate <[EMAIL PROTECTED]> wrote:
>
> > Hahahahaha, pretty accurate, i'd say :P
> >
> > Nah, don't even try to edit it, they will jump like animals... I
> > honestly don't give a rat's ass about that sort of "criticism" any
> > more.
> >
> > Nice OT, tho :D
> >
> > Cheers!
> >
> > On Fri, Jul 25, 2008 at 4:38 PM, laurent <[EMAIL PROTECTED]>
> wrote:
> > >
> > >
> > > http://encyclopediadramatica.com/Flash
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> >
> >
> >
> > --
> > Juan Delgado - Zárate
> > http://zarate.tv
> > http://dandolachapa.com
> > http://loqueyosede.com
> >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Compare brightness of RGB values

2008-07-24 Thread Hans Wichman
Hi,
just guessing here, but i think converting them to HSB first might work.
Then you only need the B value.

hth
JC

On Thu, Jul 24, 2008 at 8:55 PM, Jim McIntyre <[EMAIL PROTECTED]> wrote:

> Does anyone know a good formula for comparing brightness of RGB color
> values?
>
> Obviously, 0xCC is brighter than 0x33. But one can't always infer
> that a larger number is brighter than a smaller: 0x33 is a larger
> number, but much darker than, 0x00.
>
> Would averaging (or simply adding) the three color components work, or is
> it more nuanced than that?
>
> Thanks,
> Jim
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ColorPicker.selectedValue to #hex?

2008-07-24 Thread Hans Wichman
Hi Jason,

trace (Number(102).toString(16));

hth,
JC

On Thu, Jul 24, 2008 at 8:46 PM, Merrill, Jason <
[EMAIL PROTECTED]> wrote:

> >>If you're manipulating the number, as opposed to storing or
> >>displaying it,
>
> Thanks, but yeah, the purpose is to display the hex #, the full 6
> digits, to the user as #006699.  thanks though!
>
> Jason Merrill
> Bank of America
> Enterprise Technology & Global Risk L&LD
> Instructional Technology & Media
>
> Join the Bank of America Flash Platform Developer Community
>
> Are you a Bank of America associate interested in innovative learning
> ideas and technologies?
> Check out our internal  GT&O Innovative Learning Blog & subscribe.
>
>
> ___
>  Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] [SOLVED] arguments.caller -- name of this function?

2008-07-16 Thread Hans Wichman
Hi,

and nowhere near complete:). But it might suffice for most cases.

greetz
JC



On Thu, Jul 17, 2008 at 8:24 AM, Leonardo Scattola - New Vision srl <
[EMAIL PROTECTED]> wrote:

> Thanks everybody for your prompt response.
>
> A dude on the FlashMedia List (on which we crossposted) proposed this
> solution:
>
> setFunctionNames = function (pObjContainer) {
>  // Description:
>  // Sets the property "name" for every Function
>  // that was found in "pObjContainer"
>  // Arguments:
>  // pObjContainer -> Obj|Mc in which to recursively
>  //  search for functions
>  pObjContainer = pObjContainer || _root;
>  for (var p in pObjContainer) {
> if (typeof pObjContainer[p] == 'object') {
>   arguments.callee(pObjContainer[p]);
> } else if (typeof pObjContainer[p] == 'function') {
>   pObjContainer[p].name = p; // <-- sets the name
>   arguments.callee(pObjContainer[p].prototype);
> }
>  }
> }
>
> Quick, swift and efficient.
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arguments.caller -- name of this function?

2008-07-16 Thread Hans Wichman
ps this is a very old article, the new reflection package is done, if you
are interested let me know

On Wed, Jul 16, 2008 at 7:22 PM, Hans Wichman <
[EMAIL PROTECTED]> wrote:

>  http://objectpainters.com/blog/2007/07/16/argumentscallee_name/
>
> HTH
> JC
>
>   On Wed, Jul 16, 2008 at 6:06 PM, Leonardo Scattola - New Vision srl <
> [EMAIL PROTECTED]> wrote:
>
>> Hi list!
>> I apologize in advance if this question has already been asked... it is my
>> little Wednesday puzzle :D
>>
>> Given this sample code (AS2):
>>
>> myFunction=function() {
>>   // call the second one:
>>   trace("Now calling secondFunction");
>>   secondFunction();
>>   trace("End.");
>> }
>>
>> secondFunction=function() {
>>   // who summoned me?
>>   trace("arguments.caller= "+arguments.caller);
>> }
>>
>> The question is simple: secondFunction traces (of course)
>> "arguments.caller= [type Function]".
>> Is there a method to return the name of the caller function (in this case
>> "myFunction")?
>>
>> Thank you.
>>
>> --
>> * Logo New Vision Leonardo Scattola*
>> /Research & Development/
>> New Vision Group
>>
>> tel.049.8841146fax049.8840366
>> videoconf. newvision.comunicarepro.it <http://newvision.comunicarepro.it>
>> web site www.newvision.it <http://www.newvision.it>
>>
>>
>>
>> Le informazioni contenute in questa e-mail e nei suoi eventuali allegati
>> sono da intendersi confidenziali e riservate esclusivamente ai destinatari.
>> Ne sono proibiti l'utilizzo e la divulgazione a qualunque fine senza previa
>> autorizzazione del mittente.
>> Se avete ricevuto questa e-mail per errore, vi preghiamo cortesemente di
>> notificarlo (via e-mail, fax, o telefono) al mittente e di distruggerla.
>> Tutti i messaggi elettronici sono suscettibili di alterazioni. I dati
>> personali vengono trattati esclusivamente per le finalità della presente
>> comunicazione in conformità con la legislazione vigente (D.L. 196/2003
>> "Codice Privacy").
>> Per qualunque informazione si prega di fare riferimento a
>> [EMAIL PROTECTED] <mailto:info:@newvision.it>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] arguments.caller -- name of this function?

2008-07-16 Thread Hans Wichman
http://objectpainters.com/blog/2007/07/16/argumentscallee_name/

HTH
JC

On Wed, Jul 16, 2008 at 6:06 PM, Leonardo Scattola - New Vision srl <
[EMAIL PROTECTED]> wrote:

> Hi list!
> I apologize in advance if this question has already been asked... it is my
> little Wednesday puzzle :D
>
> Given this sample code (AS2):
>
> myFunction=function() {
>   // call the second one:
>   trace("Now calling secondFunction");
>   secondFunction();
>   trace("End.");
> }
>
> secondFunction=function() {
>   // who summoned me?
>   trace("arguments.caller= "+arguments.caller);
> }
>
> The question is simple: secondFunction traces (of course)
> "arguments.caller= [type Function]".
> Is there a method to return the name of the caller function (in this case
> "myFunction")?
>
> Thank you.
>
> --
> * Logo New Vision Leonardo Scattola*
> /Research & Development/
> New Vision Group
>
> tel.049.8841146fax049.8840366
> videoconf. newvision.comunicarepro.it 
> web site www.newvision.it 
>
>
>
> Le informazioni contenute in questa e-mail e nei suoi eventuali allegati
> sono da intendersi confidenziali e riservate esclusivamente ai destinatari.
> Ne sono proibiti l'utilizzo e la divulgazione a qualunque fine senza previa
> autorizzazione del mittente.
> Se avete ricevuto questa e-mail per errore, vi preghiamo cortesemente di
> notificarlo (via e-mail, fax, o telefono) al mittente e di distruggerla.
> Tutti i messaggi elettronici sono suscettibili di alterazioni. I dati
> personali vengono trattati esclusivamente per le finalità della presente
> comunicazione in conformità con la legislazione vigente (D.L. 196/2003
> "Codice Privacy").
> Per qualunque informazione si prega di fare riferimento a
> [EMAIL PROTECTED] 
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Overriding the trace command

2008-07-15 Thread Hans Wichman
Hi,

one of the easiest methods to override/set a logger is to either use mtasc,
which allows you to specify where the traces go, you can specify a class and
method to trace to OR another method is to replace all traces with
_global.log and add
_global.log = function (info:String) { trace (info); } for starters.

That gives you a quick start with a logger that's easy to replace later.

We use our own custom logger, built upon a custom reflection engine (in
As2), which combines log statements per method call and is very easy to use.

for example if I use _global.log ("here", {a:2, b:3}) it would print:

[LOG]: MyClass.myMethod says:
[0] here
[1] object ->
 a:2,
 b:3

We thought long and hard about using _global.log vs Logger.log (ie _global
untyped vs static typed), but in this specific case we decided to go with
_global.log.

greetz
JC

On Tue, Jul 15, 2008 at 7:24 AM, Adam Jowett <[EMAIL PROTECTED]>
wrote:

> Hi all,
>
>
>
> A very quick one, I haven't had to over-ride or extend built in classes
> since the good old days of prototyping in AS1, specifically this time I
> want
> to extend the built in trace() statement with some conditions etc. Can this
> be done? or do I need to do my own custom logger such as those out there at
> the moment?
>
>
>
> Cheers
>
> Adam
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Listeners and onLoadComplete

2008-07-14 Thread Hans Wichman
Hi,
im missing the creating of the listener?
JC

On Mon, Jul 14, 2008 at 9:14 PM, Lehr, Theodore M (N-SGIS) <
[EMAIL PROTECTED]> wrote:

> Trying again
>
>
>
> I have:
>
>
>
> this.createEmptyMovieClip("img_mc",999);
>
> var my_mcl:MovieClipLoader = new MovieClipLoader();
>
> mclListener.onLoadComplete = function(target_mc:MovieClip):Void {
>
>   trace("onLoadComplete: "+target_mc);
>
> };
>
> my_mcl.addListener(mclListener);
>
> my_mcl.loadClip(http://www.helpexamples.com/flash/images/image1.jpg,
> img_mc);
>
>
>
>
>
> I am not getting the trace - does this code look right?
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Overlay problem

2008-07-14 Thread Hans Wichman
Hmm not entirely sure what you mean, but normally a :

_parent.onPress = function(){}
_parent.useHandcursor = false;

does the trick.

greetz
JC

On Mon, Jul 14, 2008 at 1:37 PM, Rajiv Seth (Pixelated) <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> I want to create an effect like
> http://www.limoosoft.com/Limoosoft-En.html
>
> When user clicks on "zoom image", large image loads in a movie, and all
> links, rollver effects/actions are disabled by a semi-transparent image.
> How
> to create such layer, which can disable all links?
> --
> Regards
>
> Rajiv Seth
> Ph: 09839157388
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Overlay problem

2008-07-14 Thread Hans Wichman
ps where _parent refers to the layer you want to disable clicks for etc

On Mon, Jul 14, 2008 at 1:56 PM, Hans Wichman <
[EMAIL PROTECTED]> wrote:

>  Hmm not entirely sure what you mean, but normally a :
>
> _parent.onPress = function(){}
> _parent.useHandcursor = false;
>
> does the trick.
>
> greetz
> JC
>
>   On Mon, Jul 14, 2008 at 1:37 PM, Rajiv Seth (Pixelated) <
> [EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> I want to create an effect like
>> http://www.limoosoft.com/Limoosoft-En.html
>>
>> When user clicks on "zoom image", large image loads in a movie, and all
>> links, rollver effects/actions are disabled by a semi-transparent image.
>> How
>> to create such layer, which can disable all links?
>> --
>> Regards
>>
>> Rajiv Seth
>> Ph: 09839157388
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] loop or if

2008-07-13 Thread Hans Wichman
sorry i misread it, i thought u needed to double i, but it seems you want to
up it by 2, that's i+=2.

On Sun, Jul 13, 2008 at 1:25 PM, Hans Wichman <
[EMAIL PROTECTED]> wrote:

>  Hi,
>
>  function f1(e:MouseEvent):void {
>  var i:Number = 2 ;   //set i to 2
>  if (i < 10) {  //if i<10 => true, so this always executes
>  i = i++;  //i = now 3
>  trace("i = " + i);  //traces 3 not 2?
>  }
> you probably want to declare i as an instance variable, not a local var and
> then do i += i; or  i *= 2; or i <<= 1;
>
> greetz
> JC
>
>   On Sun, Jul 13, 2008 at 12:56 PM, Bassam M <[EMAIL PROTECTED]> wrote:
>
>> Hi guys
>>  I have this simple question
>> I have this script
>>
>> btn.addEventListener(MouseEvent.CLICK, f1);
>> function f1(e:MouseEvent):void {
>>  var i:Number = 2 ;
>>  if (i < 10) {
>>  i = i++;
>>  trace("i = " + i);
>>  }
>> }
>> I want to multiple i when I click on btn I m getting i =  2 always i don't
>> understand  I need to change fon first click 2 then second 4 and so until
>> 10
>>
>> thank u
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] loop or if

2008-07-13 Thread Hans Wichman
Hi,

function f1(e:MouseEvent):void {
 var i:Number = 2 ;   //set i to 2
 if (i < 10) {  //if i<10 => true, so this always executes
 i = i++;  //i = now 3
 trace("i = " + i);  //traces 3 not 2?
 }
you probably want to declare i as an instance variable, not a local var and
then do i += i; or  i *= 2; or i <<= 1;

greetz
JC

On Sun, Jul 13, 2008 at 12:56 PM, Bassam M <[EMAIL PROTECTED]> wrote:

> Hi guys
>  I have this simple question
> I have this script
>
> btn.addEventListener(MouseEvent.CLICK, f1);
> function f1(e:MouseEvent):void {
>  var i:Number = 2 ;
>  if (i < 10) {
>  i = i++;
>  trace("i = " + i);
>  }
> }
> I want to multiple i when I click on btn I m getting i =  2 always i don't
> understand  I need to change fon first click 2 then second 4 and so until
> 10
>
> thank u
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 - Displaying images from a directory

2008-07-08 Thread Hans Wichman
Hi,

well there is only one other option I know (assuming that without xml you
mean without any kind of scripting) and that is a consistent naming pattern.

Eg: image1.jpg,image2.jpg,image3.jpg, etc

This way you just keep loading the images until the first one that fails.

HTH
JC

On Tue, Jul 8, 2008 at 2:02 PM, SJM - Flash <[EMAIL PROTECTED]> wrote:

> Hi Guys
>
> Is it possible to display a number of images in flash from a directory
> without the need for XML?
>
> SJM
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What's happened to my var?

2008-07-07 Thread Hans Wichman
try this:

import mx.utils.Delegate;
TweenFilterLite.to(m, tweenTime, {_y:targetPos, onComplete:Delegate.create
(this, moveShape), onCompleteParams:[_timeline.y1]});

if it works, move the declaration of the delegate into your constructor, so
it isn't recreated every time.

greetz
JC

On Mon, Jul 7, 2008 at 4:41 PM, Ali Drongo <[EMAIL PROTECTED]> wrote:

> Hi there, I've noticed this happen before and can't figure out why. I have
> built a simple class that is passed a reference to the timeline. The class
> then moves an object on the timeline repeatedly using the TweenFilterLite
> class.
>
> My problem is that the second time the moveShape method is called the
> moveAmt variable is undefined.
>
> If anyone can suggest what's going on I would be really thankful!
> Cheers
> Ali
>
> //Main.as
> import gs.TweenFilterLite;
> import utils.Numbers;
> class Main {
>
>var minTime:Number = 1;
>var maxTime:Number = 2;
>//number of pixels to move shape up or down
>var moveAmt:Number = 15;
>var _timeline:MovieClip;
>
>function Main(timeline){
>_timeline = timeline;
>moveShape(_timeline.y1);
>}
>//moves a shape up or down
>private function moveShape(m:MovieClip)
>{
>trace("moveShape:"+m+" up:"+m.up);
>var moveDir:Number = 1;
>//if movieclip is tagged as moving up
>if(m.up){
>moveDir = -1;
>m.up= false;
>}else{
>m.up=true;
>}
>var targetPos:Number = moveDir*moveAmt;
>trace("moveDir:"+moveDir);
>trace("moveAmt:"+moveAmt);
>trace("target:"+targetPos);
>var tweenTime:Number = Numbers.randRange(minTime, maxTime);
>TweenFilterLite.to(m, tweenTime, {_y:targetPos,
> onComplete:moveShape, onCompleteParams:[_timeline.y1]});
>}
>
> }
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: window create popup weirdness as2

2008-07-02 Thread Hans Wichman
ps anyone else knows of a set that completely replaces the v2 components
with actionscript only mtasc strict compiled components?



On Wed, Jul 2, 2008 at 11:36 AM, Ian Thomas <[EMAIL PROTECTED]> wrote:

> In AS2, I didn't, actually. Our stuff is very simple (for very young
> kids) and mostly doesn't need form entry etc.
>
> Anything which _does_ need form entry and complicated stuff we're
> doing in AS3 with the Flex components.
>
> Ian
>
> On Wed, Jul 2, 2008 at 9:57 AM, Hans Wichman
>  <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > yep same conclusions here. Add the fact that _lockroot is just plain
> buggy
> > and you've got yourself a nice recipe for 'ZOMG WTF I WANT TO  arhghg
> > gurlglgl'. Which set did you switch to then, bitcomponents?
> >
> > thanks,
> > JC
> >
> > On Wed, Jul 2, 2008 at 9:39 AM, Ian Thomas <[EMAIL PROTECTED]> wrote:
> >
> >> Yes, unfortunately I found pretty early on that most V2 components
> >> require _lockroot _and_ that the component be included in both the
> >> loaded SWF and SWF that's loading it.
> >>
> >> So I stopped using V2 components. They're pretty rubbish. :-(
> >>
> >> Ian
> >>
> >> On Wed, Jul 2, 2008 at 8:13 AM, Hans Wichman
> >>  <[EMAIL PROTECTED]> wrote:
> >> > Hmm,
> >> >
> >> > okay I think I've found the cause. Some time ago I posted an issue
> about
> >> > using _lockroot.
> >> > I have an application that runs some legacy content, which uses
> _lockroot
> >> > even from non movieclip classes.
> >> > When this content is loaded, unloaded and loaded again, _lockroot no
> >> longer
> >> > works, and the _root it uses default to the main root.
> >> >
> >> > There were no takers on that one either by the way hehe, but it
> suffices
> >> to
> >> > say that using _lockroot/_root is evil and using it from non movieclip
> >> > classes is beyond evil ;) since the _root that _root points to (still
> >> > following this one?) is determined by the swf that loaded the class
> and
> >> not
> >> > by the swf using the class.
> >> >
> >> > argghg i just love flash
> >> >
> >> > greetz
> >> > JC
> >> >
> >> >
> >> >
> >> > On Wed, Jul 2, 2008 at 8:48 AM, Hans Wichman <
> >> [EMAIL PROTECTED]>
> >> > wrote:
> >> >
> >> >> Really no takers?
> >> >> I love these things only I run into :)).
> >> >>
> >> >> oh btw the call was PopUpManager.createPopUp and not
> Window.createPopup
> >> >>
> >> >>   On Tue, Jul 1, 2008 at 5:27 PM, Hans Wichman <
> >> >> [EMAIL PROTECTED]> wrote:
> >> >>
> >> >>> Hi list,
> >> >>>
> >> >>> I have a project that uses the v2 window.createPopup functionality.
> >> >>> However now and then, the window that is opened has only half a
> title
> >> bar,
> >> >>> no content pane (only a very small rectangle), appears momentarily
> in
> >> the
> >> >>> top left corner of the player, and then is centered to where it
> should
> >> be.
> >> >>> After this no more user input is possible.
> >> >>>
> >> >>> I'm stumped, does this sound familiar to anyone (not about the being
> >> >>> stumped part, but the window weirdness)?
> >> >>>
> >> >>> greetz
> >> >>> JC
> >> >>>
> >> >>
> >> >>
> >> > ___
> >> > Flashcoders mailing list
> >> > Flashcoders@chattyfig.figleaf.com
> >> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >> >
> >> ___
> >> Flashcoders mailing list
> >> Flashcoders@chattyfig.figleaf.com
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: window create popup weirdness as2

2008-07-02 Thread Hans Wichman
ooh how i wish i could migrate this system to as3 ;). Just found another
bug, menu components can only be created on the _root 


On Wed, Jul 2, 2008 at 11:36 AM, Ian Thomas <[EMAIL PROTECTED]> wrote:

> In AS2, I didn't, actually. Our stuff is very simple (for very young
> kids) and mostly doesn't need form entry etc.
>
> Anything which _does_ need form entry and complicated stuff we're
> doing in AS3 with the Flex components.
>
> Ian
>
> On Wed, Jul 2, 2008 at 9:57 AM, Hans Wichman
>  <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > yep same conclusions here. Add the fact that _lockroot is just plain
> buggy
> > and you've got yourself a nice recipe for 'ZOMG WTF I WANT TO  arhghg
> > gurlglgl'. Which set did you switch to then, bitcomponents?
> >
> > thanks,
> > JC
> >
> > On Wed, Jul 2, 2008 at 9:39 AM, Ian Thomas <[EMAIL PROTECTED]> wrote:
> >
> >> Yes, unfortunately I found pretty early on that most V2 components
> >> require _lockroot _and_ that the component be included in both the
> >> loaded SWF and SWF that's loading it.
> >>
> >> So I stopped using V2 components. They're pretty rubbish. :-(
> >>
> >> Ian
> >>
> >> On Wed, Jul 2, 2008 at 8:13 AM, Hans Wichman
> >>  <[EMAIL PROTECTED]> wrote:
> >> > Hmm,
> >> >
> >> > okay I think I've found the cause. Some time ago I posted an issue
> about
> >> > using _lockroot.
> >> > I have an application that runs some legacy content, which uses
> _lockroot
> >> > even from non movieclip classes.
> >> > When this content is loaded, unloaded and loaded again, _lockroot no
> >> longer
> >> > works, and the _root it uses default to the main root.
> >> >
> >> > There were no takers on that one either by the way hehe, but it
> suffices
> >> to
> >> > say that using _lockroot/_root is evil and using it from non movieclip
> >> > classes is beyond evil ;) since the _root that _root points to (still
> >> > following this one?) is determined by the swf that loaded the class
> and
> >> not
> >> > by the swf using the class.
> >> >
> >> > argghg i just love flash
> >> >
> >> > greetz
> >> > JC
> >> >
> >> >
> >> >
> >> > On Wed, Jul 2, 2008 at 8:48 AM, Hans Wichman <
> >> [EMAIL PROTECTED]>
> >> > wrote:
> >> >
> >> >> Really no takers?
> >> >> I love these things only I run into :)).
> >> >>
> >> >> oh btw the call was PopUpManager.createPopUp and not
> Window.createPopup
> >> >>
> >> >>   On Tue, Jul 1, 2008 at 5:27 PM, Hans Wichman <
> >> >> [EMAIL PROTECTED]> wrote:
> >> >>
> >> >>> Hi list,
> >> >>>
> >> >>> I have a project that uses the v2 window.createPopup functionality.
> >> >>> However now and then, the window that is opened has only half a
> title
> >> bar,
> >> >>> no content pane (only a very small rectangle), appears momentarily
> in
> >> the
> >> >>> top left corner of the player, and then is centered to where it
> should
> >> be.
> >> >>> After this no more user input is possible.
> >> >>>
> >> >>> I'm stumped, does this sound familiar to anyone (not about the being
> >> >>> stumped part, but the window weirdness)?
> >> >>>
> >> >>> greetz
> >> >>> JC
> >> >>>
> >> >>
> >> >>
> >> > ___
> >> > Flashcoders mailing list
> >> > Flashcoders@chattyfig.figleaf.com
> >> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >> >
> >> ___
> >> Flashcoders mailing list
> >> Flashcoders@chattyfig.figleaf.com
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: window create popup weirdness as2

2008-07-02 Thread Hans Wichman
Hi,

yep same conclusions here. Add the fact that _lockroot is just plain buggy
and you've got yourself a nice recipe for 'ZOMG WTF I WANT TO  arhghg
gurlglgl'. Which set did you switch to then, bitcomponents?

thanks,
JC

On Wed, Jul 2, 2008 at 9:39 AM, Ian Thomas <[EMAIL PROTECTED]> wrote:

> Yes, unfortunately I found pretty early on that most V2 components
> require _lockroot _and_ that the component be included in both the
> loaded SWF and SWF that's loading it.
>
> So I stopped using V2 components. They're pretty rubbish. :-(
>
> Ian
>
> On Wed, Jul 2, 2008 at 8:13 AM, Hans Wichman
>  <[EMAIL PROTECTED]> wrote:
> > Hmm,
> >
> > okay I think I've found the cause. Some time ago I posted an issue about
> > using _lockroot.
> > I have an application that runs some legacy content, which uses _lockroot
> > even from non movieclip classes.
> > When this content is loaded, unloaded and loaded again, _lockroot no
> longer
> > works, and the _root it uses default to the main root.
> >
> > There were no takers on that one either by the way hehe, but it suffices
> to
> > say that using _lockroot/_root is evil and using it from non movieclip
> > classes is beyond evil ;) since the _root that _root points to (still
> > following this one?) is determined by the swf that loaded the class and
> not
> > by the swf using the class.
> >
> > argghg i just love flash
> >
> > greetz
> > JC
> >
> >
> >
> > On Wed, Jul 2, 2008 at 8:48 AM, Hans Wichman <
> [EMAIL PROTECTED]>
> > wrote:
> >
> >> Really no takers?
> >> I love these things only I run into :)).
> >>
> >> oh btw the call was PopUpManager.createPopUp and not Window.createPopup
> >>
> >>   On Tue, Jul 1, 2008 at 5:27 PM, Hans Wichman <
> >> [EMAIL PROTECTED]> wrote:
> >>
> >>> Hi list,
> >>>
> >>> I have a project that uses the v2 window.createPopup functionality.
> >>> However now and then, the window that is opened has only half a title
> bar,
> >>> no content pane (only a very small rectangle), appears momentarily in
> the
> >>> top left corner of the player, and then is centered to where it should
> be.
> >>> After this no more user input is possible.
> >>>
> >>> I'm stumped, does this sound familiar to anyone (not about the being
> >>> stumped part, but the window weirdness)?
> >>>
> >>> greetz
> >>> JC
> >>>
> >>
> >>
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: window create popup weirdness as2

2008-07-02 Thread Hans Wichman
Hmm,

okay I think I've found the cause. Some time ago I posted an issue about
using _lockroot.
I have an application that runs some legacy content, which uses _lockroot
even from non movieclip classes.
When this content is loaded, unloaded and loaded again, _lockroot no longer
works, and the _root it uses default to the main root.

There were no takers on that one either by the way hehe, but it suffices to
say that using _lockroot/_root is evil and using it from non movieclip
classes is beyond evil ;) since the _root that _root points to (still
following this one?) is determined by the swf that loaded the class and not
by the swf using the class.

argghg i just love flash

greetz
JC



On Wed, Jul 2, 2008 at 8:48 AM, Hans Wichman <[EMAIL PROTECTED]>
wrote:

> Really no takers?
> I love these things only I run into :)).
>
> oh btw the call was PopUpManager.createPopUp and not Window.createPopup
>
>   On Tue, Jul 1, 2008 at 5:27 PM, Hans Wichman <
> [EMAIL PROTECTED]> wrote:
>
>> Hi list,
>>
>> I have a project that uses the v2 window.createPopup functionality.
>> However now and then, the window that is opened has only half a title bar,
>> no content pane (only a very small rectangle), appears momentarily in the
>> top left corner of the player, and then is centered to where it should be.
>> After this no more user input is possible.
>>
>> I'm stumped, does this sound familiar to anyone (not about the being
>> stumped part, but the window weirdness)?
>>
>> greetz
>> JC
>>
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: window create popup weirdness as2

2008-07-01 Thread Hans Wichman
Really no takers?
I love these things only I run into :)).

oh btw the call was PopUpManager.createPopUp and not Window.createPopup

On Tue, Jul 1, 2008 at 5:27 PM, Hans Wichman <[EMAIL PROTECTED]>
wrote:

> Hi list,
>
> I have a project that uses the v2 window.createPopup functionality.
> However now and then, the window that is opened has only half a title bar,
> no content pane (only a very small rectangle), appears momentarily in the
> top left corner of the player, and then is centered to where it should be.
> After this no more user input is possible.
>
> I'm stumped, does this sound familiar to anyone (not about the being
> stumped part, but the window weirdness)?
>
> greetz
> JC
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] window create popup weirdness as2

2008-07-01 Thread Hans Wichman
Hi list,

I have a project that uses the v2 window.createPopup functionality.
However now and then, the window that is opened has only half a title bar,
no content pane (only a very small rectangle), appears momentarily in the
top left corner of the player, and then is centered to where it should be.
After this no more user input is possible.

I'm stumped, does this sound familiar to anyone (not about the being stumped
part, but the window weirdness)?

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


Re: [Flashcoders] Calling super.apply

2008-06-26 Thread Hans Wichman
Hi,

not going to work I think. Ran into this some time ago, the Array class is a
beastie in its own right.
The only around it that I found was adding a static createFromArray method
to my subclass (which is slow).

greetz
JC

On Thu, Jun 26, 2008 at 5:02 PM, Morten Barklund <[EMAIL PROTECTED]>
wrote:

> Hi Sidney,
>
> You have of course tried the obvious:
>
>  super.apply(this, args)
>
> How did it fail, compiler error or?
>
> Regards,
> Morten Barklund
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] On Behalf Of Sidney de Koning
> Sent: Thursday, June 26, 2008 4:30 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Calling super.apply
>
> He Jer,
>
> In the docs it says: public dynamic class Array
> So you can extend it. My problem is that now i have to use push() to
> get items in and i want to use the constructor to pass through items,
> like so var blah:ArrayInterator = new ArrayIterator("1", "2","3");
>
> My constructor uses ..rest so with apply i pass though all the
> arguments one, by one instead of as one big array because ...rest is
> an array itself
>
> Does this all makes sense?
>
> The problem is that i cant seem to figure out how to call apply on the
> super.
>
> Does any body know? let me know!!!
>
> Cheers, Sid
>
>
> On Jun 26, 2008, at 3:31 PM, Jer Brand wrote:
>
> > I'm probably wrong (and mostly want to know as well), but I didn't
> > think you could extend the Array class. Not that AS won't let you do
> > it, but it doesn't actually work. I know this is the case with AS2,
> > but am only guessing that it's the case with AS3 from the behavior you
> > describe.
> >
> > My suggestion would be to use composition rather than inheritance.
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Is there any way to get a list of the classes compiled into a SWF?

2008-06-17 Thread Hans Wichman
Hi,

as2 or as3?

In as2 i'd use the verbose option on mtasc.

greetz
JC

On Tue, Jun 17, 2008 at 11:33 AM, Piers Cowburn <[EMAIL PROTECTED]> wrote:

> I'm trying to nail down where a reference to an unwanted class is coming
> from, and I need to be able to work out which classes are being compiled
> from my classpath.
>
> The reason is because I'm trying to take small element out of a larger
> project and put it into its own SWF. I've done this by extending the classes
> that are involved to override anything which has references to parts of the
> app which won't be in the smaller SWF, but one of them is still being
> included from somewhere, and I can't work out where.
>
> Thanks,
> Piers
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] adding value of radiobutton to number in resultTxt.text field.. help please

2008-05-20 Thread Hans Wichman
Hi,

read a programming or flash manual, or subscribe to the newbie list.
This is not meant harshly but these questions are so basic that you
are doing yourself (and us) a favor by sharpening your axe before you
set off in the woods.

You do:
>resultTxt.text = parseInt(resultTxt.text) + 
> (event.target.selection.value).toString();

as in:
string = number + string

so yeah an implicit type cast will occur, appending your string to
your number. If you want to add them make sure you do:
string = ""+ (number+number);

regards,
JC


On Tue, May 20, 2008 at 3:07 AM, rlyn ben <[EMAIL PROTECTED]> wrote:
> how can i add a radiobutton value from the number at resultTxt.text... here 
> is my code.. it wont do the math.. all it does is puts the value right beside 
> the numbers at resultTxt.text.. help..
>
> stop();
>
> var gRB:RadioButtonGroup = RadioButtonGroup.getGroup("genderGroup");
> gRB.addEventListener(MouseEvent.CLICK, genderHandler);
>
> function genderHandler(event:MouseEvent):void {
>trace("event.target.selection.name", event.target.selection.name);
>trace("event.target.selection.value", event.target.selection.value);
>trace("resultTxt.text", resultTxt.text);
>
>switch(event.target.selection.name) {
>case "maleRB":
>maleRB.value = 1;
>break;
>case "femaleRB":
>femaleRB.value = 0;
>break;
>}
>resultTxt.text = parseInt(resultTxt.text) + 
> (event.target.selection.value).toString();
> }
>
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Player 8 and the Alert component

2008-05-13 Thread Hans Wichman
drop an instance in the main fla as well.

On Tue, May 13, 2008 at 2:30 PM, Lehr, Theodore M (N-SGIS)
<[EMAIL PROTECTED]> wrote:
> The problem seems to be that the alert component is in a mc that is
> being loaded into another mc... is this a known issue? Any thought on
> how I get it to work?
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Glen
> Pike
> Sent: Wednesday, May 07, 2008 2:43 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Player 8 and the Alert component
>
> Hi,
>
>Yes, you may need to drag an instance of it onto the stage in your
> FLA file so it gets compiled in.
>
>Glen
>
> Lehr, Theodore M (N-SGIS) wrote:
>> Should the Alert component work in 8 (player)?
>>
>> Ted
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>>
>
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk 
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] SOLVED Re: hitarea not working when cacheAsBitmap is true?

2008-04-23 Thread Hans Wichman
Hi,

for n1 who is interested, if I simply attach a dynamically drawn
bitmap as hitarea instead of a dynamically drawn movieclip, it works
just fine. Crappy bug tbh.

greetz
JC

On Wed, Apr 23, 2008 at 10:16 PM, Hans Wichman
<[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I have a clip with a hitarea attached ie:
>
> myClip.hitArea = myHitArea;
>
> works like a charm... but now I want to attach a filter to the hitArea.
> Attaching a filter automatically sets cacheAsBitmap to true, and the
> hitarea no longer works.
>
> Any ideas why this is happening? It is only happening in a certain
> version of the player 8 (in as2).
>
> When I run my content in the default flashdevelop player or player 9,
> it all works ok.
>
> greetz
> JC
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: hitarea not working when cacheAsBitmap is true?

2008-04-23 Thread Hans Wichman
Hi,
further investigation reveals it only happens when myHitArea is drawn
by code :-S and we turn on cacheAsBitmap

greetz
JC

On Wed, Apr 23, 2008 at 10:16 PM, Hans Wichman
<[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I have a clip with a hitarea attached ie:
>
> myClip.hitArea = myHitArea;
>
> works like a charm... but now I want to attach a filter to the hitArea.
> Attaching a filter automatically sets cacheAsBitmap to true, and the
> hitarea no longer works.
>
> Any ideas why this is happening? It is only happening in a certain
> version of the player 8 (in as2).
>
> When I run my content in the default flashdevelop player or player 9,
> it all works ok.
>
> greetz
> JC
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] hitarea not working when cacheAsBitmap is true?

2008-04-23 Thread Hans Wichman
Hi folks,

I have a clip with a hitarea attached ie:

myClip.hitArea = myHitArea;

works like a charm... but now I want to attach a filter to the hitArea.
Attaching a filter automatically sets cacheAsBitmap to true, and the
hitarea no longer works.

Any ideas why this is happening? It is only happening in a certain
version of the player 8 (in as2).

When I run my content in the default flashdevelop player or player 9,
it all works ok.

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


[Flashcoders] 64 bit OS and FMS

2008-04-18 Thread Hans Wichman
Hi,

does n1 have any experience with running FMS on a 64bit Vista OS?
We are migrating one of our testservers shortly and we are trying to
identify possible bottlenecks.

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


Re: [Flashcoders] Is Adobe fixing this big FP9 problem?

2008-04-16 Thread Hans Wichman
hmm, as in:

myMovie.unload (false);

which would then be documented as:

"Unload unloads your movie except when false is passed"

Feels...wrong somehow;)

On Wed, Apr 16, 2008 at 1:40 PM, Piers Cowburn <[EMAIL PROTECTED]> wrote:
> I think any kind of fix they implement now would have to have some level of
> backwards-compatibility. Like passing a boolean which indicates whether you
> want to fully unload the movie or not. It's been too long without a fix for
> that in my opinion.
>
> Piers
>
>
>
>
> On 16 Apr 2008, at 12:19, Andrei Thomaz wrote:
>
> > dear Jonathan,
> >
> > and what if Adobe fixes this in a near future? Your code would be
> broken...
> > So, I don't think is a good idea to write code that needs this "feature"
> of
> > Flash Player.
> >
> >
> > []'s
> > andrei
> >
> >
> > On Wed, Apr 16, 2008 at 8:00 AM, jonathan howe <[EMAIL PROTECTED]>
> > wrote:
> >
> >
> > > To put a practical question out about this. I'm setting up something
> that
> > > is
> > > more or less a game with levels. Each level has a different set of
> > > movieclips as its background graphics and enemies for the level.
> > > I store all assets for a single level in an external swf, and using
> > > techniques we've talked about before on the list (swc +
> > > getDefinitionByName)
> > > use these assets once they're loaded in via the swf.
> > > The plan was then to dump the assets once the level ends and load a new
> > > level's assets.
> > >
> > > The game is small enough that I can conceivably tolerate all level
> assets
> > > being in memory by the time the game is done. What I need to know is,
> > > should
> > > I NOT treat the data as if it's unloaded, given FP9+AS3 behavior?
> Because
> > > if  the player revisits a level, I would normally reload the asset swf
> for
> > > that level ... now I wonder if that would make a duplicate copy of the
> > > assets in memory? There wouldn't be two copies of the swf's contents in
> > > memory because they'd have identical class definitions... right... or
> > > maybe
> > > not?
> > >
> > > Now I'm leaning towards an architecture that says: First time you play a
> > > level, load the assets for it, and keep it around always. Next time you
> > > play
> > > that level, the assets are already loaded.
> > >
> > > -jonathan
> > >
> > >
> > > On Tue, Apr 15, 2008 at 2:37 PM, Paul Andrews <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > > I find it rather bizarre that people feel that it's necessary to beat
> a
> > > > drum about this. I doubt that Adobe are sitting back on the issues
> > > >
> > > raised.
> > >
> > > >
> > > > The thread has the Air of an hysterical mob. It's amazing how so many
> > > > people have produced fantastic systems using Actionscript 3 in spite
> of
> > > >
> > > the
> > >
> > > > gloom and doom spouted here.
> > > >
> > > >  From what I've read, the FP9 garbage collection is pretty much
> standard
> > > >
> > > > >
> > > > >
> > > > technology for object based systems - you can't just discard objects
> > > >
> > > that
> > >
> > > > have references to them. The real problem seems to be related to the
> > > >
> > > other
> > >
> > > > infrastructure that creates multiple object references that aren't
> > > >
> > > always
> > >
> > > > removable. I'm not saying bthere isn't a problem, just that it's not
> > > >
> > > worthy
> > >
> > > > of the histeria being generated. I understand completely it can be a
> > > >
> > > serious
> > >
> > > > issue for some people.
> > > >
> > > > Anyway, I'll express some faith that Adobe will resolve the issues - I
> > > > won't be rolling back to AS2 despite the expert advice of some. I'll
> > > >
> > > consign
> > >
> > > > a lot of this thread to the same place as the 'end of the world is
> nigh'
> > > > material that those people with placards dispense.
> > > >
> > > > No need to hand me a flaming torch just yet..
> > > >
> > > > - Original Message - From: "Chris Hill" <[EMAIL PROTECTED]>
> > > > To: "Flash Coders List" 
> > > > Sent: Tuesday, April 15, 2008 6:40 PM
> > > > Subject: Re: [Flashcoders] Is Adobe fixing this big FP9 problem?
> > > >
> > > >
> > > >  ON TOPIC:
> > > >
> > > > >
> > > > > I can see that most of us feel very strongly about this bug. Adobe
> has
> > > > > made it clear that their formal channel to do something about it is
> to
> > > > >
> > > >
> > > vote
> > >
> > > >
> > > > > in their ticketing system for the bug. If there already is a bug,
> can
> > > > > someone link to it? Otherwise let's get a bug in there. And then
> let's
> > > > >
> > > >
> > > vote
> > >
> > > >
> > > > > for it. I'm pretty sure that based upon the support here we can make
> > > > >
> > > >
> > > this
> > >
> > > >
> > > > > the #1 bug in their database.
> > > > >
> > > > > Apologies if someone has already mentioned this. This thread is long
> > > > >
> > > >
> > > and
> > >
> > > >
> > > > > noisy.
> > > > > C
> > > > > ___
> > > > > Flashcoders mailing list
> > > > > Flash

Re: [Flashcoders] Dynamic class instantiation

2008-04-04 Thread Hans Wichman
btw new eval("_global.myPackage.MyClass")(); does the trick as well.
If you please add
Assert.assertNotNull (eval("_global.myPackage.MyClass"))
etc

On Fri, Apr 4, 2008 at 5:01 PM, Jiri Heitlager
<[EMAIL PROTECTED]> wrote:
> Thanx Alan, using a custom error exception is a nice little added touch :)
>
> Jiri
>
>
>
> Alan MacDougall wrote:
> > Here is the class I use for dynamic instantiation. Note that it throws a
> custom exception type, you'll have to create that type yourself or alter
> that line of code. I copied the instantiation technique from Drew Cummins at
> blog.generalrelativity.org.
> >
> > class com.phoenixgp.common.utils.ClassLoader
> > {
> >   /* CLASS METHODS */
> >   /**
> >   Returns a new instance of a class given the fully-qualified name
> of
> >   the class. The instance will be returned as an Object,
> so
> >   the caller must cast the return value to the expected type or
> supertype.
> > Original author: Drew Cummins,
> blog.generalrelativity.org
> > @param classPath The fully-qualified class name, in dot
> notation
> >   @return A new instance of the named class, using its default
> constructor
> >   @throws ClassNotFoundException if the named class is not present.
> This
> >   may indicate an error or omission in the
> ClassRegistry.
> >   */
> >   public static function createInstance(classPath:String):Object
> >   {
> >   var packageList:Array = classPath.split(".");
> >   var constructor:Function = Function(_global);
> > while (packageList.length > 0)
> >   {
> >   constructor = constructor[String(packageList.shift())];
> >   }
> > if (constructor == null)
> >   {
> >   throw new ClassNotFoundException(classPath);
> >   return null;
> >   }
> > return new constructor();
> >   }
> > }
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Hans Wichman
hi,
creating a webservice is asynchronous, at least in as2, you will have
to wait for the creation to complete.
That probably doesnt solve your problem ,but is a prerequisite anyway

greetz
JC

On Tue, Apr 1, 2008 at 11:46 AM, Gert-Jan van der Wel
<[EMAIL PROTECTED]> wrote:
> Thanks for your suggestion, but it doesn't seem to work...
>
> Gert-Jan
>
> 2008/4/1, Jason Van Cleave <[EMAIL PROTECTED]>:
>
> >
> > you can try and authenticate before you go to the page or hardcode your
> > user/pass like
> >
> > var url:String = http://user:[EMAIL PROTECTED];
> >
> >
> > On Mon, Mar 31, 2008 at 11:32 AM, Gert-Jan van der Wel <
> > [EMAIL PROTECTED]> wrote:
> >
> > > Hi everybody,
> > >
> > > I'm having some trouble with connecting to a SOAP web service from my
> > > AS2 app. I need to log in on the web service to use it, but I don't
> > > know when I should use the login/pass. I use this script:
> > >
> > > var service:WebService = new WebService( url );
> > > var call:PendingCall = service.doSomething();
> > >
> > > call.onResult = function( result:XML ) {
> > >trace( result );
> > > };
> > > call.onFault = function( fault:SOAPFault ) {
> > >trace("Webservice fault: "+ fault.faultcode + "," +
> > > fault.faultstring );
> > > }
> > >
> > > When I run it on my local machine there's no problem, but when I run
> > > it from our server a html dialog appears and I get a SOAPFault.
> > >
> > > Any suggestions?
> > >
> > > Cheers,
> > > Gert-Jan
> > >
> > >
> > >
> >
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> Gert-Jan van der Wel
> Co-Founder & CTO
>
> Floorplanner.com
> +31 (0)10 281 0799
> +31 (0)6 1665 0338
> [EMAIL PROTECTED]
> http://www.floorplanner.com
> skype: gertjan-floorplanner
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Decorator Pattern - removing a decorator

2008-03-20 Thread Hans Wichman
it only gets worse :)

This is a nice read too:

http://www.moserware.com/2008/03/what-does-it-take-to-become-grandmaster.html

On Thu, Mar 20, 2008 at 11:08 PM, Jiri Heitlager <
[EMAIL PROTECTED]> wrote:

> Steven,
>
> thanks for that helpfull reply. It is funny becuase I was just thinking
> about the dualism, on the one hand there are these wonderfull elegant
> design patterns that supposed to make things easier and on the other
> hand it seems like coding has just became harder ever since when I
> started applying them. Knowing about them seems sometimes almost a
> burden. But the absolute elegance of how they can be used, which is
> reflected in the many articles and books on them, just makes me want to
> understand them better. And as you say, applying them and failing
> horribly is a perfect way to get to know their individual intrisic
> workings.
>
> Strategy is the one that I am just now looking into, because the
> Decorator and the possibilty of not removing them just doesnt make them
> suitable for the behaviour I was after on that level.
>
> I have something like this now.
>
> var item = new Item()
> item.executeModifier() {
>
>modifier.execute(item.mc)
> }
> item.setModifier(modifier) this.modifier = modifier
> item.setClip(mc) this.mc = mc
>
>
> Then I will use the Decorator pattern, for decorating (what else) the
> items. It so happens that some Items contain text that can be edited.
>
>
> class ItemTextDecorator implements itemInterface{
>_item:Iteminterface
>
> function ItemTextDecorator(item:Iteminterface)
>{
>_item = item
>}
>
>function executeModifier() {
>
>_item.executeModifier(_item.mc)
>}
>
>function setModifier(modifier) {
>
>_item.setModifier(modifier)
>}
>
>function.setClip(mc) this.mc = mc
>
>//additional function to set Text and edit text
> }
>
> It feels beautiful to piece things together like this :)
>
>  >Just understand that you won't understand until
>  > you code yourself into a corner a few times.  :)
> When will it end, if ever?
>
>
> > "What you're experiencing is premature enlightenment." - Tyler Durden
> >
> > The Gang of Four specifically warns about this, and it's important to
> > acknowledge that it's happening.
> >
> > When people first learn about design patterns, they will immediately
> > begin looking for places to apply them.  They will do this and fail in
> > some particular way, and in doing so, learn more about that design
> > pattern or perhaps one that they don't know of, yet.  The issue most
> > people have is trying to solve a problem with a design pattern they just
> > learned without understanding that it isn't an appropriate pattern.
> > But, you have to do it wrong in order to learn why.  Prepare to fail and
> > learn from those failures.  It will make you a better coder.
> >
> > Your initial hunch is that your problem would best be solved by the
> > Decorator pattern, but it very well may not be.  The Decorator pattern
> > has fallen out of favor in recent years, as many people believe it
> > violates good OOP practices.  It has its uses, but they're limited.
> >
> > You should continue coding this using Decorator if you like, so you can
> > discover what its limitations are.  It sounds like you're already
> > hitting them.  It's possible that Strategy and Composition might be
> > useful here, as well.  Just understand that you won't understand until
> > you code yourself into a corner a few times.  :)
> >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Writing Custom MovieClip Classes

2008-03-20 Thread Hans Wichman
i'm betting it's the 

sorry couldn't resist;)

On Thu, Mar 20, 2008 at 4:49 PM, Omar Fouad <[EMAIL PROTECTED]> wrote:

> Man Here is what I wrote.
>
> *
>
> public* *class* A_window *extends* MovieClip{
>
> *public* static *const* CLOSE:String = *"close"*;
>
> *public* *function* A_window() {
>
> initListeners();
>
> }
>
> *private* *function* initListeners():*void* {
>
> *this*.addEventListener(MouseEvent.CLICK, handleListener);
>
> }
>
> *private* *function* handleListener(e:MouseEvent):*void* {
>
> dispatchEvent(A_window.CLOSE);
>
> *trace*(*"Dispatched"*);
>
> }
>
> }
>
> }
> in The FLA
>
> *
>
> public* *class* Amlak *extends* Sprite {
>
> *public* *function* Amlak() {
>
> *trace*(*"Application Started"*);
>
> Init();
>
> }
>
> *public* *function* Init():*void* {
>
> *for*(*var* i:int; i<6; i++) {
>
> *var* MyWindow:A_window = *new* A_window();
>
> MyWindow.x = Math.random()*500;
>
> MyWindow.y = Math.random()*500;*
> *
>
> MyWindow.addEventListener(MyWindow.CLOSE, onClose);*
> *
>
> addChild(MyWindow);
>
> }
>
> }
>
> *public* *function* onClose(e:Event):*void* {
>
>trace("It Works!");
>
> }
>
> }
> The error is
>
> " 1119: Access of possibly undefined property CLOSE through a reference
> with
> static type A_window. "
>
> It does not work.
> On Thu, Mar 20, 2008 at 4:53 PM, Merrill, Jason <
> [EMAIL PROTECTED]> wrote:
>
>  > >>nope this is not working..
> >
> > Ambiguous posts like that always make me laugh.  "You told me my car
> > needs a new radiator - so I replaced it, but my car still does not
> > work."  Do see any kind of problem with that?  :) Explain what you did
> > in order for us to determine why it's not working - what I described
> > should work, so the only thing I can tell you is you must have done
> > something differently.
> >
> > Jason Merrill
> > Bank of America
> > GT&O and Risk L&LD Solutions Design & Development
> > eTools & Multimedia
> >
> > Bank of America Flash Platform Developer Community
> >
> >
> > Are you a Bank of America associate interested in innovative learning
> > ideas and technologies?
> > Check out our internal  GT&O Innovative Learning Blog & subscribe.
> >
> >
> >  ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> Omar M. Fouad - Digital Emotions
> http://www.omarfouad.net
>
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.
> ___
>  Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Source Control [WAS] to mac or not to mac

2008-03-15 Thread Hans Wichman
Hi Muzak,

i thought trac already offered a wiki, svn, emailnotifications and more,
could you spare some details on what assembla offers over trac?

greetz
JC

On Sat, Mar 15, 2008 at 8:56 PM, Muzak <[EMAIL PROTECTED]> wrote:

> And on a similar note, I use Assembla as an online repository:
> http://www.assembla.com/
>
> It's free (there's a paying version with some extra's)
> Setting up a projects is a breeze.
> Includes TRAC, Wiki, SVN, email notificiations, and more..
>
> Whenever I work on a project with other freelancers (who, like me, work
> from home) this is invaluable.
>
> regards,
> Muzak
>
> - Original Message -
> From: "Jon Bradley" <[EMAIL PROTECTED]>
> To: "Flash Coders List" 
>  Sent: Saturday, March 15, 2008 8:22 PM
> Subject: Re: [Flashcoders] Source Control [WAS] to mac or not to mac
>
>
> >
> > On Mar 15, 2008, at 6:36 AM, Muzak wrote:
> >
> >> There's a new(er) plugin, called subversive that might be worth
> >> looking into.
> >> I haven't tried it yet, but heard good things about it:
> >> http://www.polarion.org/index.php?page=overview&project=subversive
> >> http://www.eclipseplugincentral.com/Web_Links-index-req-viewlink-
> >> cid-611.html
> >
> > That's what I use, while running subversion on OS X and a remote
> > linux machine.
> >
> >> Before I used Eclipse as my primary IDE, I used TortoiseSVN, but
> >> having it all in one IDE makes life easier.
> >
> > SVNx on OS X is pretty good. Eclipse does it fairly well too with the
> > subversive pack, but I still like the GUI tool.
> >
> > Of course, you can't beat the command line (I almost always have it
> > open). Just cd'ing to my source directory and running svn on any
> > google code or sourceforge project is priceless, and way faster than
> > opening an application and filling in all the required params to
> > check out a trunk.
> >
> > I just have to get better at actually using the source control for
> > small projects where I'm pretty much the main person working.
> >
> > :)
> >
> > - jon
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: doDecoding

2008-03-12 Thread Hans Wichman
sigh murphy's law

I was doing:
var pend:PendingCall = myWS.system_ExecuteEvent(...
var myCall:SOAPCall = pend.myCall;
myCall.doDecoding = true;
myCall.doLazyDecoding = true;
but i should have done:
var myCall:SOAPCall = myWS.getCall("system_ExecuteEvent");
myCall.doDecoding = true;
myCall.doLazyDecoding = true;
var pend:PendingCall = myWS.system_ExecuteEvent(
Don't mind the bad code it's a quick an dirty test I'm working on.

greetz
JC

On Wed, Mar 12, 2008 at 9:06 AM, Hans Wichman <
[EMAIL PROTECTED]> wrote:

> Hi list,
>
> I'm trying to find out the difference in webservice results when
> alternating myCall.doDecoding between true and false, but no matter what i
> set it to, my results are passed as converted xml objects. Any pointers on
> what the real difference is? The documentation is very unclear on this
> subject.
>
> regards,
> JC
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] doDecoding

2008-03-12 Thread Hans Wichman
Hi list,

I'm trying to find out the difference in webservice results when alternating
myCall.doDecoding between true and false, but no matter what i set it to, my
results are passed as converted xml objects. Any pointers on what the real
difference is? The documentation is very unclear on this subject.

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


Re: [Flashcoders] dictionary vs array

2008-03-11 Thread Hans Wichman
On a sidenote, it's pretty easy to implement for as2 too btw, although the
performance is probably not uber.
I gotta admit once you get used to object-to-object mapping ... ;)
On Tue, Mar 11, 2008 at 9:07 PM, Claus Wahlers <[EMAIL PROTECTED]>
wrote:

> Claus Wahlers wrote:
>
> > An associative Array behaves similar to a Dictionary.
>
> (if you are using string keys)
>
> Cheers,
> Claus.
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] dictionary vs array

2008-03-11 Thread Hans Wichman
Hi,
its a conceptual difference, array maps indices to objects, while a
dictionary maps objects to objects.
There is no such thing as better, it depends on what you need.

greetz
JC

On Tue, Mar 11, 2008 at 7:02 PM, Dwayne Neckles <[EMAIL PROTECTED]>
wrote:

> can anyone say why dictionary is better than array.. Im seeing it used in
> alot of papervision examples and i dont get why?
> I will research this on my own as well..
>
> _
> Need to know the score, the latest news, or you need your Hotmail(R)-get
> your "fix".
>
> http://www.msnmobilefix.com/Default.aspx___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] mouse x and y

2008-03-11 Thread Hans Wichman
google for flash mouse x y

On Tue, Mar 11, 2008 at 12:49 PM, Lehr, Theodore M (N-SGIS) <
[EMAIL PROTECTED]> wrote:

>
> How can I trace the x and y of the mouse? I would want to grab it on a
> click
>
> Ted
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] bitMapData - function optimization

2008-02-29 Thread Hans Wichman
ah yeah lol i just found the old thread:
http://readlist.com/lists/chattyfig.figleaf.com/flashcoders/5/27731.html


On Fri, Feb 29, 2008 at 12:15 PM, Karim Beyrouti <[EMAIL PROTECTED]> wrote:

> Yeh - saw that a while ago, Hans got this in answer to a question I posted
> here a while ago. However, I just managed to get it working, and yeh -
> it's
> really fast.
>
> Thanks for the reminder...
>
>
> - karim
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Hans
> Wichman
> Sent: 28 February 2008 19:16
> To: Flash Coders List
> Subject: Re: [Flashcoders] bitMapData - function optimization
>
>
> http://objectpainters.com/blog/2007/11/30/inverting-the-alpha-of-a-bitmap-im
> age/
> of
> any help?
>
>
>
> On Thu, Feb 28, 2008 at 6:56 PM, Steven Sacks <[EMAIL PROTECTED]>
> wrote:
>
> > maybe...
> >
> > private function createInvertedMask()
> > {
> >var r:int = mask_bitmap.width;
> >var c:int = mask_bitmap.height;
> >var v:int;
> >
> >while (--r -(-1))
> >{
> >while (--c -(-1))
> >{
> >v = mask_bitmap.getPixel32(r, c);
> >mask_bitmap.setPixel32(r, c, v ? 0x : 0xFF00);
> > }
> >}
> > }
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.21.2/1304 - Release Date:
> 29/02/2008
> 08:18
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] bitMapData - function optimization

2008-02-28 Thread Hans Wichman
http://objectpainters.com/blog/2007/11/30/inverting-the-alpha-of-a-bitmap-image/
of
any help?



On Thu, Feb 28, 2008 at 6:56 PM, Steven Sacks <[EMAIL PROTECTED]>
wrote:

> maybe...
>
> private function createInvertedMask()
> {
>var r:int = mask_bitmap.width;
>var c:int = mask_bitmap.height;
>var v:int;
>
>while (--r -(-1))
>{
>while (--c -(-1))
>{
>v = mask_bitmap.getPixel32(r, c);
>mask_bitmap.setPixel32(r, c, v ? 0x : 0xFF00);
> }
>}
> }
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Copypixels transparency with percentage

2008-02-25 Thread Hans Wichman
Hi,

have you tried public draw(source:Object, [matrix:Matrix],
[colorTransform:ColorTransform], [blendMode:Object], [clipRect:Rectangle],
[smooth:Boolean]) : Void using the colortransform?

greetz
JC



On Mon, Feb 25, 2008 at 10:48 AM, Elia Morling <[EMAIL PROTECTED]> wrote:

> How do I make a copypixels function that will copy bitmapdata with
> transparency indicated by percentage? Like the opacity setting of a layer
> in
> photoshop.
>
> I have been trying different kind of angles with no success.
>
> Thanks
> Elia
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Exporting AS2 classes across multiple frames?

2008-02-12 Thread Hans Wichman
Hi,
you can put classes in an swf and use the swf as a dll.
It's a hassle but its doable.

You load the swf in a specific frame, the swf only contains classes and they
become available from that frame onwards.
Again, im not sure if you should do this if the only reason is that you'd
rather write the preloader in as2 instead of as1.
It's a great opportunity to hack timelime as1 you know and nowadays those
chances are slim:))

greetz
JC

On Tue, Feb 12, 2008 at 4:21 PM, Glen Pike <[EMAIL PROTECTED]>
wrote:

> Hi,
>
>Don't think you can do this - I think all classes (code) are
> exported to the same frame, but your movieclips can be distributed along
> the timeline so you gain something there.  You may want to look at your
> ultimate aim as you could do this a different way:
>
>If you are trying to create a library of classes linked to
> movieclips, you may want to put these in a separate SWF and create a
> Runtime Shared Library that you preload into your main movie.  You can
> use an XML file to exclude the classes from being compiled into your
> main SWF file.
>
>Colin Moock has a good example of this if you have his EAS2 book.
> He has an example of doing this, but would recommend reading the chapter
> too if you can.
>
>http://moock.org/eas2/examples/ Chapter 14, Distributing Class
> libraries.
>
>Search for Runtime Shared Library.  The following search - different
> params - finds some useful articles:
>
>
>
> http://www.google.co.uk/search?hl=en&q=actionscript+load+classes+runtime+xml+exclude&btnG=Google+Search&meta=
> <
> http://www.google.co.uk/search?hl=en&q=actionscript+load+classes+runtime+xml+exclude&btnG=Google+Search&meta=
> >
>
>The bottom of this article has a good snippet about excluding classes:
>
>http://osflash.org/using_a_swf_as_a_dll
>
>
>
>
>
> Henry Cooke wrote:
> > Hey all,
> >
> > I'm trying to work out if there's a way I can export AS2 classes to
> > more than one frame: I'm experimenting with fine-grained loading and
> > preloaders written in AS2.
> >
> > So for instance, does anyone know if it's possible to write a
> > preloader in AS2, then export *only* that class to frame 1 of a movie,
> > then some more classes to frame 2, a few more to frame three and so
> > on?
> >
> > Cheers,
> > Henry
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >
> >
>
> --
>
> Glen Pike
> 01736 759321
> www.glenpike.co.uk 
>  ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] getBytesLoaded() and actions execution

2008-02-09 Thread Hans Wichman
Hi,

no i don't think so, check out moviecliploader.

greetz
JC

On Sat, Feb 9, 2008 at 4:31 PM, strk <[EMAIL PROTECTED]> wrote:

> Is it safe to assume that as soon as
> loaded.getBytesLoaded() == loaded.getBytesTotal()
> actions in first frame of the loaded 'loaded' movieclip
> were executed ?
>
> --strk;
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] is there a way of detecting whether or not the mouse is in a movie at all?

2008-02-08 Thread Hans Wichman
Hi,

that is only detectable when the mouse is down (try tracing xmouse and
ymouse while mouse is down, versus when its not).
Another thing you can do is look at how long the mouse hasnt moved.

greetz
JC

On Feb 8, 2008 1:40 PM, Allandt Bik-Elliott (Receptacle) <
[EMAIL PROTECTED]> wrote:

> hi guys
>
> just a quickie
>
> i've got an expandable flash banner that has a transparent movie clip
> (called roll_mc) over the top of it to detect whether to expand or
> not but because i can't seem to get an accurate false from my hittest
> if the mouse goes out of the banner, i was wondering if there was a
> way to detect if the mouse was in the movie at all
>
> here is what i have
>
> function gotoExpand():Void {
>trace ("x mouse is "+_root._xmouse);
>trace ("y mouse is "+_root._ymouse);
>if (roll_mc.hitTest(_root._xmouse, _root._ymouse) &&
> _root._xmouse<345 && _root._ymouse<345) nextFrame();
> }
>
> the movie is 350x350 but if you move the mouse out of the movie
> pretty quickly, it registers that the mouse is still within the movie
>
> example traces:
> //mouse is moved fairly slowly
> x mouse is 349
> y mouse is 208
> x mouse is 349
> y mouse is 208
> x mouse is 185
> y mouse is 349
> x mouse is 348
> y mouse is 95
> //mouse moved fairly quickly
> x mouse is 336
> y mouse is 225
>
> anyone have any ideas?
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Save MC as JPG

2008-02-03 Thread Hans Wichman
Hi,
are you loading all images from the same domain?

greetz
JC

On Feb 3, 2008 4:00 PM, Dave Mennenoh <[EMAIL PROTECTED]> wrote:

> OK -it seems to be the BitmapData.draw() method that is failing. On just
> certain images (though all are jpeg's imported into Flash and turned into
> MC's) draw() is copying an all white image, and on some it works. It
> doesn't
> seem to be a size issue since some rather large images are working.
>
>
> Dave -
> Head Developer
> http://www.blurredistinction.com
> Adobe Community Expert
> http://www.adobe.com/communities/experts/
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Save MC as JPG

2008-02-03 Thread Hans Wichman
Hi,
can u put a test online? With fla that is.
greetz
JC

On Feb 3, 2008 3:24 PM, Dave Mennenoh <[EMAIL PROTECTED]> wrote:

> Nobody?
> I am still not figuring this out. Using getPixel() on certain clips is
> returning #FF when it's cleary not a white pixel. But it makes no
> sense.
> On one clip it works, on another it doesn't. Both are just movie clips
> containing imported bitmap images. I've searched for problems with
> getPixel() but haven't found anything regarding returning white when it
> shouldn't. This is frustrating.
>
> Dave -
> Head Developer
> http://www.blurredistinction.com
> Adobe Community Expert
> http://www.adobe.com/communities/experts/
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] dynamically including MC's

2008-02-01 Thread Hans Wichman
Hi,
if it runs from a server you could do exactly that, write some kind of
script that returns the contents of the folder in xml format.
It's not supported in flash to loop through a set of files without such a
script.

greetz
JC

On Fri, Feb 1, 2008 at 3:25 PM, Ted Lehr <[EMAIL PROTECTED]> wrote:

> I want to have a folder where I can throw in some swf's then have another
> mc
> that will dynamically display these mc's. So what I need is a way to
> dynamically display a file structure, I guess. Kind of like
> FileSystemObject
> in .asp. Something that will dynamically loop through a set of files give
> the folder.
>
>
>
> Thanks!
>
>
>
> Ted
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] loadMovie from subdirectory - change base path

2008-02-01 Thread Hans Wichman
Hi,
i think this applies to using an html file in location a loading an swf from
location b.
Seeing Amanda has two different basepaths, setting the base to nr 1 will
confuse nr 2 and vice versa.

Copying everything to the same directory like Bob said seems a good and
simple solution though:).
greetz
JC


On Fri, Feb 1, 2008 at 11:31 AM, Glen Pike <[EMAIL PROTECTED]>
wrote:

> Can you use the "base" attribute in the params to set somewhere that you
> can then use relative paths.
>
> |http://www.example.com/pages/";>
>
>
> http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_04157&sliceId=2
> <
> http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_04157&sliceId=2
> >
>
>
> Glen
>  |
> Bob Leisle wrote:
> > One simple solution would be to physically move your controller swf
> > into the screens directory and run it from there. Then they'll all
> > have the same path and no retrofitting needed.
> >
> > hth,
> > Bob
> >
> > Amanda Kuek wrote:
> >> @Deepanjan Das, @JC
> >>
> >> Thanks for your replies! It seems that, despite my fondest hopes,
> >> there is
> >> no easy way to "retro-fit" hundreds of SWFs originally built without
> >> this
> >> loadMovie() requirement in mind.
> >>
> >> Cheers and thanks :-)
> >>
> >>
> >> On Jan 30, 2008 8:05 PM, Hans Wichman <[EMAIL PROTECTED]>
> >> wrote:
> >>
> >>
> >>> Hi,
> >>>
> >>> check this out:
> >>> http://objectpainters.com/blog/2007/01/03/where-am-i-relative-paths/
> >>>
> >>> The getPath things works in most cases. If you want a more complex
> >>> version
> >>> that takes more things into account, you can use this:
> >>> You will need to replace the RuntimeExceptions with your own error
> >>> mechanism
> >>> (eg traces, regular errors).
> >>>
> >>>  /**
> >>>  * Resolves pAssetPath against pBasePath.
> >>>  *
> >>>  * - if pAssetPath is not a relative path, pAssetPath is returned
> >>> (eg the
> >>> full url)
> >>>  * - if pBasePath is an empty path, pAssetPath is returned
> >>>  * - if pBasePath is a relative path, an error is thrown
> >>>  * - in all other situation a path is returned which may still be or
> >>> not
> >>> valid.
> >>>  *
> >>>  * @param pAssetPath, a full or relative url
> >>>  * @param pBasePath, a full or empty url, this url MAY contain a
> >>> file as
> >>> well, it is stripped automatically
> >>>  *
> >>>  */
> >>>  public static function resolve (pAssetPath:String,
> >>> pBasePath:String):String
> >>> {
> >>>  //no base path
> >>>  if (pBasePath == null || pBasePath.length == 0) return pAssetPath;
> >>>  if (pAssetPath == null) {
> >>>throw new RuntimeException (
> >>> "Assetpath cannot be null.",
> >>> Path, arguments.callee, null, null);
> >>>  }
> >>>
> >>>  //file asset path
> >>>  if (pAssetPath.indexOf ("http") == 0 || pAssetPath.indexOf ("ftp")
> >>> == 0
> >>> ||
> >>>   pAssetPath.indexOf ("rmtp") == 0 || pAssetPath.indexOf ("file") ==
> 0)
> >>> return pAssetPath;
> >>>  //asset is relative, test basepath for correctness
> >>>  if (pBasePath.indexOf ("http") != 0 && pBasePath.indexOf ("ftp") !=
> >>> 0 &&
> >>>   pBasePath.indexOf ("rmtp") != 0 && pBasePath.indexOf ("file") != 0)
> {
> >>>throw new RuntimeException (
> >>> "Basepath is not null and not a full url, but needs to be either
> >>> empty
> >>> or a full url.",
> >>> Path, arguments.callee, null, null);
> >>>   }
> >>>
> >>>  //so now we know that pAssetPath is a relative url and pBasePath is a
> >>> full
> >>> url.
> >>>  //first normalize both urls so that we are dealing with only one
> >>> type of
> >>> separator
> >>>  var lAssetPath:String = pAssetPath.split
> >>> ("\\").join("/
> >>> ");
> >>>  var lBasePath:String = pBasePath.split
> >>> ("\\").join("/
> >>>

Re: [Flashcoders] loadMovie from subdirectory - change base path

2008-01-30 Thread Hans Wichman
Hi,

check this out:
http://objectpainters.com/blog/2007/01/03/where-am-i-relative-paths/

The getPath things works in most cases. If you want a more complex version
that takes more things into account, you can use this:
You will need to replace the RuntimeExceptions with your own error mechanism
(eg traces, regular errors).

 /**
 * Resolves pAssetPath against pBasePath.
 *
 * - if pAssetPath is not a relative path, pAssetPath is returned (eg the
full url)
 * - if pBasePath is an empty path, pAssetPath is returned
 * - if pBasePath is a relative path, an error is thrown
 * - in all other situation a path is returned which may still be or not
valid.
 *
 * @param pAssetPath, a full or relative url
 * @param pBasePath, a full or empty url, this url MAY contain a file as
well, it is stripped automatically
 *
 */
 public static function resolve (pAssetPath:String, pBasePath:String):String
{
  //no base path
  if (pBasePath == null || pBasePath.length == 0) return pAssetPath;
  if (pAssetPath == null) {
throw new RuntimeException (
 "Assetpath cannot be null.",
 Path, arguments.callee, null, null);
  }

  //file asset path
  if (pAssetPath.indexOf ("http") == 0 || pAssetPath.indexOf ("ftp") == 0 ||
   pAssetPath.indexOf ("rmtp") == 0 || pAssetPath.indexOf ("file") == 0)
return pAssetPath;
  //asset is relative, test basepath for correctness
  if (pBasePath.indexOf ("http") != 0 && pBasePath.indexOf ("ftp") != 0 &&
   pBasePath.indexOf ("rmtp") != 0 && pBasePath.indexOf ("file") != 0) {
throw new RuntimeException (
 "Basepath is not null and not a full url, but needs to be either empty
or a full url.",
 Path, arguments.callee, null, null);
   }

  //so now we know that pAssetPath is a relative url and pBasePath is a full
url.
  //first normalize both urls so that we are dealing with only one type of
separator
  var lAssetPath:String = pAssetPath.split("\\").join("/
");
  var lBasePath:String = pBasePath.split("\\").join("/
");
  //strip everything after ? to strip parameters from basepath
  if (lBasePath.indexOf("?") > -1) {
   lBasePath = lBasePath.substr (lBasePath.lastIndexOf("?"));
  }
  //check if basepath ends with /, if not check if everything after /
contains a .
  //if it ends with / it is a directory, if it doesnt end with / and
everything after contains a . we assume
  //we are dealing with a file, otherwise a directory
  if (lBasePath.charAt (lBasePath.length-1) != "/") {
   //and the last part contains a . cut it off
   var lLastDir:String = lBasePath.substr (lBasePath.lastIndexOf("/"));
   if (lLastDir.indexOf (".") != -1) {
//dealing with file
lBasePath = lBasePath.substr (0, lBasePath.lastIndexOf("/")+1);
   } else {
//assume the last part was a dir and the trailing slash was forgotten,
so add it
lBasePath += "/";
   }
  }

  //at this point we have a relative url and full directory path with a
trailing /
  //now create two stacks
  var lAssetStack:Array = lAssetPath.split ("/");
  var lBaseStack:Array = lBasePath.split ("/");

  //remove trailing / from baseStack to provide a correct starting point,
  //our invariant is that each directory 'starts' with a slash and not ends
  lBaseStack.pop();

  //remove any superflous items (pointers to current directory
  //. points to current dir and isnt relative
  //"" points to double slashes or a starting slash, we remove that too
  while (lAssetStack[0] == "." || lAssetStack[0] == "") {
   lAssetStack.shift();
  }

  //remove .. from assetStack AND end of basestack
  while (lAssetStack[0] == "..") {
   lAssetStack.shift();
   lBaseStack.pop();
  }

  return lBaseStack.join("/")+"/"+lAssetStack.join("/");
 }

Usage eg:
xml.load (Path.resolve ("assets/config.xml"), _clip._url));

greetz
JC


On Wed, Jan 30, 2008 at 6:24 AM, Deepanjan Das <[EMAIL PROTECTED]>
wrote:

> Hi,
> You need to keep duplicate files if you want it to work as single and also
> when loaded from main movie.
> Easiest way is to create an xml directory at the place where the main
> movie
> resides and set the path as "xml/1.xml"
>
> also copy this directory in the screens directory
>
> so ths ame path will work for both :)
> Hope this helps
>
> Deepanjan Das
>
> On Jan 30, 2008 10:10 AM, confusticate and bebother these dwarves! <
>  [EMAIL PROTECTED]> wrote:
>
> > Hello Flashcoders,
> >
> > I'm trying to make a main movie ("controller.swf") that loads other
> movies
> > ("screen1.swf", "screen2.swf", etc), which are stored in a subdirectory
> > called "screens".
> >
> > In controller.swf I'm using loadMovie("screens/screenx.swf") to load the
> > movies from the "screens" subdirectory, and this works fine. But the
> > problem
> > is that the movies in the "screens" subdirectory often reference XML
> files
> > (which also live in the "screens" subdirectory). All works well when you
> > play the individual screenx.swf files, obviously, but when you play
> > controller.swf, it is looking for the XML files in the same directory as
> > itself (one direct

Re: [Flashcoders] how to return in this function

2008-01-29 Thread Hans Wichman
seems like an item for the newbie list tbh:)

On Tue, Jan 29, 2008 at 8:27 PM, Claudio M. E. Bastos Iorio <
[EMAIL PROTECTED]> wrote:

> Thanks for your answer. But how? Where?. I think that
> ProgressEvent.bytesLoaded, and ProgressEvent.bytesTotal could help. But
> where should I check the status?
>
> 
> Claudio M. E. Bastos Iorio
> http://www.blumer.com.ar
>
>  -Original Message-
> From: [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] On Behalf Of eric e. dolecki
> Sent: Tuesday, January 29, 2008 4:07 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] how to return in this function
>
> you could use an event to listen to, to pass the XML out of the class.
>
> On Jan 29, 2008 1:42 PM, Claudio M. E. Bastos Iorio <[EMAIL PROTECTED]
> >
> wrote:
>
> > Hi guys, hope you can help me on this one.
> >
> > I have a class to load an XML file. I'm trying this:
> >
> >
> >
> >
> > package {
> >   import flash.net.URLRequest;
> >   import flash.net.URLLoader;
> >   import flash.events.*;
> >   public class retornaXML{
> >  private var _xml:XML;
> >  public function retornaXML() {
> > cargarXML();
> >  }
> >
> >  private function cargarXML():void {
> > var loader:URLLoader = new URLLoader();
> > loader.addEventListener(Event.COMPLETE, xmlLoaded);
> > loader.load(new URLRequest("LocalData.xml"));
> >  }
> >  private function xmlLoaded(e:Event):void {
> > _xml = new XML(e.target.data);
> > trace(_xml);
> > //THE TRACE HERE WORKS PERFECT AND RETURNS THE XML
> >
> >  }
> >  public function get elXML():XML {
> > return _xml;
> > //THIS RETURNS null
> >  }
> >
> >   }
> > }
> >
> >
> >
> > I want something like this:
> >
> >
> >
> > var mivariable:retornaXML = new retornaXML();
> > trace(mivariable.elXML);
> >
> >
> >
> > but this trace returns null, since the xml file (I think) is not loaded
> > yet.
> > What should I do?
> >
> >
> >
> > Thanks in advance.
> >
> > 
> >
> > Claudio M. E. Bastos Iorio
> >
> >   http://www.blumer.com.ar
> >
> >
> >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash 8, AS 2.0. I want to use symbols from child movie in parent movie. Possible?

2008-01-29 Thread Hans Wichman
Hi,

you've answered your own question I'm afraid.

There is one other option, paint bitmaps to a symbol :).
So all the assets for an interactive smiley are stored as bitmaps and you
create a movieclip from that.

greetz
JC

On Tue, Jan 29, 2008 at 5:33 PM, Donald Trump <[EMAIL PROTECTED]> wrote:

> Hey!
>
> Suppose I load an SWF that contains symbols inside the main movie. Let it
> be smiles for
> chat application - smiles.swf.
> Then I want to instantiate some of these symbols putting them on the main
> movie _root.
> That is essential, I want to add the instances to the main movie _root or
> _root's
> descendants.
> Is it possible with Flash 8?
>
> I have made some experiments and have come to conlusion that Flash allows
> to create
> symbol instances only inside the movie that the symbol is coming from.
> Am I right?
>
> Well, I know one workaround - to paint a symbol to a bitmap and add this
> bitmap to the
> main movie. However in my application I deal with interactive symbols not
> the smile
> bitmaps, so this approach doesn't work for me.
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Event Handling in ActionScript 3

2008-01-28 Thread Hans Wichman
Hi,
basically you look at every method in the interface, and write a method in
your own class with the exact same signature and then you declare the class
as an implemenation of that interface.

Say you'd have an interface ISerializable which would allow you to convert
an object to xml , the interface would have a method:
public function serialize():XML;

And each class that implemented it would have to write the actual method to
do so.

And about the monkey island thing, I'm not sure myself now and then:)

greetz
JC

On Mon, Jan 28, 2008 at 3:43 AM, Guybrush Threepwood <
[EMAIL PROTECTED]> wrote:

> Hans/JC/Glen,Thanks for your great advice.
>
> I understand the new event mechanism is far better than the callback thing
> I
> used to do.
> I think I'll do as you say. Just wanted to know if it was possible at all.
>
> Any URLs on how to implement IEventDispatcher? I'm not used to implement
> interfaces. I'm used to extend classes (using inheritance) but not sure
> how
> to implement interfaces in AS3.
>
> Thanks!!
> Guybrush
>
> PS: How do you know I'm not in Monkey Island?
>  ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] 2 fonts different results

2008-01-28 Thread Hans Wichman
Hi list,

ive got 2 fonts, both non standard that I'm playing with.

While doing:
ta_test.setStyle ("fontFamily", [font1here]);
ta_test.setStyle ("fontSize", 20);

i see the font in the textarea, although its not aliased.

If I do:
ta_test.setStyle ("fontFamily", [font2here]);
ta_test.setStyle ("fontSize", 20);

i see nothing.

Now the last result is exactly what I expect:), what baffles me, is that
some fonts still display, even though they're non standard.
If it because they are installed on my system, then why does it work for
font1 but not for font2.

Note that my fla is empty for a textarea called ta_test on stage.

Any ideas?

The only difference is that one is installed through adobe type manager
(font 1), and the other is a standard ttf font (font2)

Flash 8, windows.

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


Re: [Flashcoders] Event Handling in ActionScript 3

2008-01-26 Thread Hans Wichman
Hi,

If you dont like the as3 event mechanism, you can write your own, but
looking at your code, there are a number of things I wouldn't do:
- setting local variables on the activation stack, it leads to memory waste
- executing the asynchronoustask before setting the callback handlers
- prepending everything with m
- using simple strings as type instead of static public event types
- using the callback mechanism (overriding the onTasketc method) combined
with the event types and required params

So to be honest I wouldnt port this way of working to AS3 , I'd take it as
an opportunity to do it better this time around. We're not on monkey island
you know;-)

greetz
JC



On Sat, Jan 26, 2008 at 3:48 PM, Guybrush Threepwood <
[EMAIL PROTECTED]> wrote:

> Hello. I'm new to AS3. I'm using Flash CS3.I've been reading recent posts
> about event handling, EventDispatcher, and the Delegate class which used
> in
> AS2.
> I've read the documentation about the EventDispatcher class, and learnt
> how
> to use it in Flash.
>
> How ever I can't seem to fin a way to do what I used to do in AS2. I
> didn't
> use Delegate. I did something like this:
>
> import org.guybrush.MySuperFeaturedClass;
> class MyWrapperClass {
>var mySuperObject:MySuperFeaturedClass;
>function whatever( n:String ):void{
>this.mySuperObject = new MySuperFeaturedClass();
>this.mySuperObject.mDoSomeAsynchronousTask( n );
>var self:MyWrapperClass = this;
>*this.mySuperObject.mOnTaskCompleted = function ( type:String,
> arg2:String ){*
>switch(type){
>case "one":
>trace("ok, task returned 'one'");
>break;
>case "red":
>trace("look! task returned 'red'");
>break;
>case "bananas":
>trace("wel... task returned 'bananas'");
>break;
>default:
>trace("oh! task returned " + type);
>break;
>}
>};
>}
> }
>
> I know how to achieve the same with addEventListener. The thing is, doing
> it
> that way I always need to create handling function for each event I'm
> "registering". And the other disadvantage is that when the class I'm
> consuming is a custom class coded by my self, I need to either make it a
> subclass of EventDispatcher, or implement its interface somehow.
>
> So basically, my question is: *"how can I do what I used to to in AS2, now
> in AS3?"*
>
>
> Thanks in advance for any replies,
> Guybrush
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


<    1   2   3   4   5   6   7   8   >