Re: [Flashcoders] use get / set functions or make your own

2008-12-09 Thread Hans Wichman
Hi,

I'm still in the middle. I used to use getMyVariable setMyVariable for
everything, now I usually use public variables for entity/value objects. I
still hate not being able to see whether something is a variable or
function, so for everything else than very simple objects I prefer
setMyVariable getMyVariable instead of get set. I find it way easier to read
back my code that way, so it depends on whether I know whether I am going to
have to read it back or not ;).

greetz
JC




On Tue, Dec 9, 2008 at 12:28 PM, allandt bik-elliott (thefieldcomic.com) <
[EMAIL PROTECTED]> wrote:

> i would have to agree - i use the built in ones and can't see any benefit
> from using bespoke ones apart from maybe being able to use the variable
> name
> i want rather than adding extra characters to it (although i use a leading
> underscore for class variables anyway)
>
> On Tue, Dec 9, 2008 at 10:48 AM, Ian Thomas <[EMAIL PROTECTED]> wrote:
>
> > I use Actionscript getters and setters.
> >
> > Because I can start off using ordinary public properties, and change
> > them into getters and setters if I need more control/notification
> > without changing any of the code that _uses_ my class.
> >
> > In order to achieve that otherwise, I'd have to make a getValue() and
> > setValue() for every single public property (as is done in Java). And
> > a fair few of those would simply be this._property=value (setter) or
> > return this._property (getter) i.e. essentially just placeholder
> > methods that bloat the code.
> >
> > The beauty of the actionscript get and set functions is that they are
> > indistinguishable from public properties from the outside of the
> > class. It's a huge improvement over Java.
> >
> > Ian
> >
> > On Tue, Dec 9, 2008 at 10:24 AM, allandt bik-elliott
> > (thefieldcomic.com) <[EMAIL PROTECTED]> wrote:
> > > hi guys
> > >
> > > quick poll - Do you use the actionscript getter/setter functions or do
> > you
> > > make your own, and why.
> > >
> > > I've noticed with a lot of the public domain code (like SWFAddress, for
> > > instance) that you see a lot of 'public function getVariable()' type
> > getters
> > > instead of using the flash 'public function get variable()' adobe
> > > recommended getters(and setters) and i was wondering why people do
> this?
> > >
> > > thanks
> > > 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
> >
> ___
> 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] use get / set functions or make your own

2008-12-09 Thread Hans Wichman
ps we're probably not the first ones discussing this old subject, has n1
found some good sources/references?
Most of the old CS textbooks sentence you to hell for using public variables
so let's not refer to those ;)

On Wed, Dec 10, 2008 at 8:28 AM, Hans Wichman <
[EMAIL PROTECTED]> wrote:

> Hey,
>
> I'm not against using public variables, but I dont like using get set as
> you did below *if *setting the data has sideeffects outside the area of
> validation.
> If you are setting a property and you want to test or verify it or
> whatever, I can imagine using set get.
> If you are setting a property and it causes state changes or whatever I
> like to use an explicit method. Yeah you can mouse over it, codeinspect it
> or whatever and see it's an implicit get/setter, but just looking at an
> interface I find it easer to have either public methods or properties and
> not something in between that lends itself to misuse (ie this set data WAS
> only validating, but damn now it needs to change state as well, ah heck,
> lets cram in there instead of )
>
> So for me it's usually either a public var or a method.
>
> And there's more behind it than good coders being forced to work with bad
> coders at least as far as the public variables are concerned, it has to do
> with the whole mumbo jumbo of the OO asking versus simply taking. An object
> giving access to its internals instead of an object grabbing access,
> although in a lot of cases it doesn't pay to make such an academic
> distinction.
>
> I liked the clear explanation Steven gave, although comparing it to
> masturbating sounds a bit like promoting it ;0)
>
> JC
>
>
>
>
> And a *big* +1 for this:
>
>>
>>
>> That being said, I don't abide by the retarded rule that you shouldn't
>>> have public vars in a class.
>>>
>>
>> regards,
>> Muzak
>>
>> - Original Message - From: "Steven Sacks" <
>> [EMAIL PROTECTED]>
>> To: "Flash Coders List" 
>> Sent: Wednesday, December 10, 2008 5:01 AM
>> Subject: Re: [Flashcoders] use get / set functions or make your own
>>
>>
>>  For clarity, they're referred to as implicit and explicit.
>>>
>>> get prop / set prop = implicit
>>> getProp() / setProp = explicit
>>>
>>> In AS2, it made a difference because implicits were available right away,
>>> whereas explicits were not available for 1 frame.  This limitation is not
>>> present in AS3.
>>>
>>> Basically, implicit implies properties of a class, whereas explicit
>>> implies methods of a class.
>>>
>>> I opt for implicit over explicit because this:
>>>
>>> foo.prop = value;
>>>
>>> makes more sense than
>>>
>>> foo.setProp(value);
>>>
>>> I leave methods for methods, not properties.
>>>
>>> That being said, I don't abide by the retarded rule that you shouldn't
>>> have public vars in a class.  People who do this
>>>
>>> private var _foo:Boolean;
>>> public function get foo():Boolean { return _foo; }
>>> public function set foo(value:Boolean):void { _foo = value; }
>>>
>>> are masturbating and I'm not impressed by their bloated ego...I mean
>>> code. ;)
>>>
>>> Unless something needs to happen immediately within the class when you
>>> set or get a prop (i.e. a state change), it's fine for it to be a public
>>> var.  It's faster, it's less bloat and most of us aren't writing large
>>> applications with a bunch of other developers.  Some of these rules were
>>> created for when good coders are forced to work with bad coders and the good
>>> ones need to protect their code from the bad ones.  When it's just you and a
>>> couple other devs, and you're all competent, you don't need all these checks
>>> and balances that are nothing more than compensation for people who you wish
>>> you didn't have to code with.  /rant   ;)
>>>
>>>
>>>
>>  ___
>> 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] use get / set functions or make your own

2008-12-09 Thread Hans Wichman
Hey,

I'm not against using public variables, but I dont like using get set as you
did below *if *setting the data has sideeffects outside the area of
validation.
If you are setting a property and you want to test or verify it or whatever,
I can imagine using set get.
If you are setting a property and it causes state changes or whatever I like
to use an explicit method. Yeah you can mouse over it, codeinspect it or
whatever and see it's an implicit get/setter, but just looking at an
interface I find it easer to have either public methods or properties and
not something in between that lends itself to misuse (ie this set data WAS
only validating, but damn now it needs to change state as well, ah heck,
lets cram in there instead of )

So for me it's usually either a public var or a method.

And there's more behind it than good coders being forced to work with bad
coders at least as far as the public variables are concerned, it has to do
with the whole mumbo jumbo of the OO asking versus simply taking. An object
giving access to its internals instead of an object grabbing access,
although in a lot of cases it doesn't pay to make such an academic
distinction.

I liked the clear explanation Steven gave, although comparing it to
masturbating sounds a bit like promoting it ;0)

JC




And a *big* +1 for this:

>
>
> That being said, I don't abide by the retarded rule that you shouldn't have
>> public vars in a class.
>>
>
> regards,
> Muzak
>
> - Original Message - From: "Steven Sacks" <
> [EMAIL PROTECTED]>
> To: "Flash Coders List" 
> Sent: Wednesday, December 10, 2008 5:01 AM
> Subject: Re: [Flashcoders] use get / set functions or make your own
>
>
>  For clarity, they're referred to as implicit and explicit.
>>
>> get prop / set prop = implicit
>> getProp() / setProp = explicit
>>
>> In AS2, it made a difference because implicits were available right away,
>> whereas explicits were not available for 1 frame.  This limitation is not
>> present in AS3.
>>
>> Basically, implicit implies properties of a class, whereas explicit
>> implies methods of a class.
>>
>> I opt for implicit over explicit because this:
>>
>> foo.prop = value;
>>
>> makes more sense than
>>
>> foo.setProp(value);
>>
>> I leave methods for methods, not properties.
>>
>> That being said, I don't abide by the retarded rule that you shouldn't
>> have public vars in a class.  People who do this
>>
>> private var _foo:Boolean;
>> public function get foo():Boolean { return _foo; }
>> public function set foo(value:Boolean):void { _foo = value; }
>>
>> are masturbating and I'm not impressed by their bloated ego...I mean code.
>> ;)
>>
>> Unless something needs to happen immediately within the class when you set
>> or get a prop (i.e. a state change), it's fine for it to be a public var.
>>  It's faster, it's less bloat and most of us aren't writing large
>> applications with a bunch of other developers.  Some of these rules were
>> created for when good coders are forced to work with bad coders and the good
>> ones need to protect their code from the bad ones.  When it's just you and a
>> couple other devs, and you're all competent, you don't need all these checks
>> and balances that are nothing more than compensation for people who you wish
>> you didn't have to code with.  /rant   ;)
>>
>>
>>
>  ___
> 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] colour and transform matrices

2008-12-10 Thread Hans Wichman
Hi,

have you seen this one:
http://www.quasimondo.com/archives/000565.php

Or are you looking behind the math of it?

greetz
JC

On Wed, Dec 10, 2008 at 12:25 PM, allandt bik-elliott (thefieldcomic.com) <
[EMAIL PROTECTED]> wrote:

> Hi guys
>
> After a brief discussion with some of the devs where i'm working at the mo,
> i was wondering if anyone could point me at a decent tutorial for using and
> manipulating objects and colours using matrices. It seems to be one of
> those
> things that people only learn a teeny bit of but could be immensly powerful
> in the wrong... i mean right hands.
>
> thanks
> 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


[Flashcoders] asset versioncontrol

2008-12-10 Thread Hans Wichman
Hi list,

I was wondering how you handle your assets in version control.

I usually follow a standard project setup something like:
trunk
branches
tags

The trunk contains for example sources, deploy, deploy/assets

Now especially the assets folder tends to get very large.
Each time I tag the trunk, the size multiplies.

I was wondering how others are handling this, and looking for a better way
to handle the assets.
Not sure if there is a quick solution to this though:)

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


Re: [Flashcoders] use get / set functions or make your own

2008-12-10 Thread Hans Wichman
Hi,

yep that was the article, but the original poster asked a subtly different
question (unless I'm mistaken).
allandt asked about implicit vs explicit getters setters.

Darron talks about using public variables vs implicit no brain getters
setters.

First time I read that article I thought he was talking about implicit vs
explicit, to which my conclusion was: this article sucks. Rereading it and
seeing its about public variables vs implicit, it's a nice read ;). But
another discussion:).

greetz
JC

On Wed, Dec 10, 2008 at 3:42 PM, Merrill, Jason <
[EMAIL PROTECTED]> wrote:

> I tend to send this link on whenever this debate comes up, good article on
> public vars vs. getters and setters from a well respected Actionscript
> coder.
>
> http://www.darronschall.com/weblog/2005/03/no-brain-getter-and-setters.cfm
>
> And I also agree with Steve, Ian, the others, I used to be against public
> vars, but now I see when they don't need to have a "brain" i.e logic is run
> when they are called, and it's ok to allow them as a pair (i.e. both get and
> set), then there is no reason to not use public vars since from an interface
> perspective, they are exactly the same.  And if you ever need the "brain"
> inserted into getting or setting, it's extremely simple to add them
> afterwards.  Just writing out get and set for everything just bloats your
> code.  There is a place for both.  I code public vars all the time now,
> probably more than get/set pairs.
>
>
> 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] use get / set functions or make your own

2008-12-10 Thread Hans Wichman
hmmm no guess I didn't, been pixelstaring too long already today;)

On Wed, Dec 10, 2008 at 4:18 PM, Merrill, Jason <
[EMAIL PROTECTED]> wrote:

> >> yep that was the article, but the original poster asked a subtly
> different
> question (unless I'm mistaken).
> allandt asked about implicit vs explicit getters setters.
> >> Rereading it and
> seeing its about public variables vs implicit, it's a nice read ;). But
> another discussion:).
>
> Uh, I guess you didn't notice, I was not responding to the original poster
> - we have deviated from that.  i.e. Ian's comment, " so why not use a
> public? If they do matter, use getters/setters."
>
>
> 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] asset versioncontrol

2008-12-10 Thread Hans Wichman
Hi,

yep using subversion.
I usually create the tag in my workingcopy, but on the server would be fine
as well.

We have one system though with some 500 small projects, all in a single
repository, which are tagged before they are released.
But the structure for that repository is like:
project1\tags
project1\trunk
project2\tags
project2\trunk

Some contentdevelopers have to work on a number of those small projects, so
they just check out the root of the repository :).
Would be nice if you could say something like "get this directory and all
subdirectories but ignore the tags" or something like that.

Another issue though is that binary assets often completely change after
updating (eg an flv thats rerendered), so the whole file is submitted to svn
again (since about every byte differs). Not sure what I'm looking for here,
something like being able to put a file in a repository, without tracking
it's history I guess (since it's content are derived from other material
which is leading).

regards,
JC

On Wed, Dec 10, 2008 at 5:59 PM, Ian Thomas <[EMAIL PROTECTED]> wrote:

> Don't know how you've got your server setup, or which version control
> system you are using...
>
> We are using SVN. If you create a tag, it just creates an alias to the
> files, not a true copy; so the size in the repository doesn't go up by
> a huge amount.
>
> Are you keeping a local copy of all your tagged code or something?
>
> Ian
>
> On Wed, Dec 10, 2008 at 2:36 PM, Hans Wichman
> <[EMAIL PROTECTED]> wrote:
> > Hi list,
> >
> > I was wondering how you handle your assets in version control.
> >
> > I usually follow a standard project setup something like:
> > trunk
> > branches
> > tags
> >
> > The trunk contains for example sources, deploy, deploy/assets
> >
> > Now especially the assets folder tends to get very large.
> > Each time I tag the trunk, the size multiplies.
> >
> > I was wondering how others are handling this, and looking for a better
> way
> > to handle the assets.
> > Not sure if there is a quick solution to this though:)
> >
> > regards,
> > 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


Re: [Flashcoders] asset versioncontrol

2008-12-10 Thread Hans Wichman
Hi,
no only the checkout. At least thats how it should be, or its time to kill
the sysadmin (for a variety of reasons;)).

Maybe I'll wait a bit more for the filter option.

Thanks to all who responded!
Hans

On Wed, Dec 10, 2008 at 8:40 PM, Glen Pike <[EMAIL PROTECTED]>wrote:

> Hi,
>
>   Is it your checked out repository which increases in size when you tag
> stuff, or is it your actual repo' on the server?
>
>   Like the guy said before, a tag is just a snapshot of a revision - it
> should not exist in full unless you get it out of the repository - but I may
> be wrong...
> Also, you can "ignore" directories and files from the versioning
> http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.ignore.html
>
>   Using TortoiseSVN, you can right click, look at the properties for the
> file / folder and add a "New" one - "ignore" is in the drop down list - this
> can be a bit fiddly for folders - I think I had to do this with a freshly
> checked out repo' before it stopped moaning at me.
> Ignoring does not solve your "filtering out" tags problem - it looks
> like people asked for this a while ago, but it has not been implemented.
>
>
> http://www.google.co.uk/search?hl=en&q=svn+checkout+filtering&btnG=Search&meta=<
> http://www.google.co.uk/search?hl=en&q=svn+checkout+filtering&btnG=Search&meta=
> >
>
>   You can checkout various parts of a repository into the same directory,
> but I understand that this could be a pain if you have to root around and
> find the place to start.
> HTH
>
>   Glen
>
>
> Hans Wichman wrote:
>
>> Hi,
>>
>> yep using subversion.
>> I usually create the tag in my workingcopy, but on the server would be
>> fine
>> as well.
>>
>> We have one system though with some 500 small projects, all in a single
>> repository, which are tagged before they are released.
>> But the structure for that repository is like:
>> project1\tags
>> project1\trunk
>> project2\tags
>> project2\trunk
>>
>> Some contentdevelopers have to work on a number of those small projects,
>> so
>> they just check out the root of the repository :).
>> Would be nice if you could say something like "get this directory and all
>> subdirectories but ignore the tags" or something like that.
>>
>> Another issue though is that binary assets often completely change after
>> updating (eg an flv thats rerendered), so the whole file is submitted to
>> svn
>> again (since about every byte differs). Not sure what I'm looking for
>> here,
>> something like being able to put a file in a repository, without tracking
>> it's history I guess (since it's content are derived from other material
>> which is leading).
>>
>> regards,
>> JC
>>
>> On Wed, Dec 10, 2008 at 5:59 PM, Ian Thomas <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>> Don't know how you've got your server setup, or which version control
>>> system you are using...
>>>
>>> We are using SVN. If you create a tag, it just creates an alias to the
>>> files, not a true copy; so the size in the repository doesn't go up by
>>> a huge amount.
>>>
>>> Are you keeping a local copy of all your tagged code or something?
>>>
>>> Ian
>>>
>>> On Wed, Dec 10, 2008 at 2:36 PM, Hans Wichman
>>> <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>> Hi list,
>>>>
>>>> I was wondering how you handle your assets in version control.
>>>>
>>>> I usually follow a standard project setup something like:
>>>> trunk
>>>> branches
>>>> tags
>>>>
>>>> The trunk contains for example sources, deploy, deploy/assets
>>>>
>>>> Now especially the assets folder tends to get very large.
>>>> Each time I tag the trunk, the size multiplies.
>>>>
>>>> I was wondering how others are handling this, and looking for a better
>>>>
>>>>
>>> way
>>>
>>>
>>>> to handle the assets.
>>>> Not sure if there is a quick solution to this though:)
>>>>
>>>> regards,
>>>> 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
>>
>>
>>
>>
>
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk <http://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] asset versioncontrol

2008-12-10 Thread Hans Wichman
Hi Ian,

yes thanks thats helpful, but unfortunately especially in the way that there
is no secret cool option (like ctrl-shift-1:)), I'm overlooking.
I'm aware that SVN stores only links and that the size only becomes a
problem in the local checkout, fact is the original layout was like you
describe, but with 500 subprojects I kind of lost it ;).
Doesn't tagging take an awful lot of time this way?

Maybe your solution is a lot easier. The downside is like you say, if you
pass someone a link to version 1 of project 1 he gets the rest too. Must
sleep on this :)

Thanks for your time and ideas!
Hans
On Wed, Dec 10, 2008 at 9:54 PM, Ian Thomas <[EMAIL PROTECTED]> wrote:

> Hi Hans,
>
> Sounds like your problem is really that you're pulling all your tags
> from the repository to your local machines (in the repository, they're
> just links - on your local machine, they are actual copies). Maybe you
> need to reorganise a bit, or make sure your developers only pull out
> trunk?
>
> We have something more like:
>
> trunk/
>   project1/
>   project2/
>   shared-code/
>   build-utils/
> tags/
>   project-1-v1-0/
>   project1/
>   project2/
>   shared-code/
>   build-utils/
>   project-2-v1-0/
>   project1/
>   project2/
>   shared-code/
>   build-utils/
>
> which isn't ideal (see the unecessary inclusion of project2 inside
> project1's tag) but it doesn't cost much in the way of extra space on
> the server (since all tags are just logical links, not physical
> copies) and means that when we extract project1 at v1-0 we can roll
> back our shared code to exactly the right point too. It also means our
> build utils are the right versions to recreate that project at v1-0.
>
> Hope that's helpful!
>
> Ian
>
>
> On Wed, Dec 10, 2008 at 7:21 PM, Hans Wichman
>  <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > yep using subversion.
> > I usually create the tag in my workingcopy, but on the server would be
> fine
> > as well.
> >
> > We have one system though with some 500 small projects, all in a single
> > repository, which are tagged before they are released.
> > But the structure for that repository is like:
> > project1\tags
> > project1\trunk
> > project2\tags
> > project2\trunk
> >
> > Some contentdevelopers have to work on a number of those small projects,
> so
> > they just check out the root of the repository :).
> > Would be nice if you could say something like "get this directory and all
> > subdirectories but ignore the tags" or something like that.
> >
> > Another issue though is that binary assets often completely change after
> > updating (eg an flv thats rerendered), so the whole file is submitted to
> svn
> > again (since about every byte differs). Not sure what I'm looking for
> here,
> > something like being able to put a file in a repository, without tracking
> > it's history I guess (since it's content are derived from other material
> > which is leading).
> >
> > regards,
> > JC
> >
> > On Wed, Dec 10, 2008 at 5:59 PM, Ian Thomas <[EMAIL PROTECTED]> wrote:
> >
> >> Don't know how you've got your server setup, or which version control
> >> system you are using...
> >>
> >> We are using SVN. If you create a tag, it just creates an alias to the
> >> files, not a true copy; so the size in the repository doesn't go up by
> >> a huge amount.
> >>
> >> Are you keeping a local copy of all your tagged code or something?
> >>
> >> Ian
> >>
> >> On Wed, Dec 10, 2008 at 2:36 PM, Hans Wichman
> >> <[EMAIL PROTECTED]> wrote:
> >> > Hi list,
> >> >
> >> > I was wondering how you handle your assets in version control.
> >> >
> >> > I usually follow a standard project setup something like:
> >> > trunk
> >> > branches
> >> > tags
> >> >
> >> > The trunk contains for example sources, deploy, deploy/assets
> >> >
> >> > Now especially the assets folder tends to get very large.
> >> > Each time I tag the trunk, the size multiplies.
> >> >
> >> > I was wondering how others are handling this, and looking for a better
> >> way
> >> > to handle the assets.
> >> > Not sure if there is a quick solution to this though:)
> >> >
> >> > regards,
> >> > 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


Re: [Flashcoders] strange textfield behaviour in browser

2008-12-11 Thread Hans Wichman
Hi,
does trapallkeys make any difference?

greetz
JC

On Thu, Dec 11, 2008 at 11:05 AM, laurent <[EMAIL PROTECTED]> wrote:

> Hi list,
>
> I made some form in my app and the textfields work fine on local from the
> flash ide.
> But when the site is in the browser the texfield don't recognise that the
> shift key is press. So on a french laptop you can't type numbers or @.
> This behavior is so strange that i don't know where to look. Anyone ever
> got that problem ??
>
> thanks
> Laurent
> ___
> 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] strange textfield behaviour in browser

2008-12-11 Thread Hans Wichman
Hi,

ok I misunderstood the problem at first, thinking you were trying to detect
shift keypress, but the whole textfield breaks... that is weird.
Which browser are you testing it in? Does it break in all browsers? But
plays fine in the IDE... any difference in player version?

Are you using firefox with wmode transparent?

greetz
JC
On Thu, Dec 11, 2008 at 12:38 PM, laurent <[EMAIL PROTECTED]> wrote:

> Hi JC,
>
> Thanks for the reply. Hm no effect. Actually I noticed this bug only on
> laptop running windows.
> My team member running all on mac, laptop and boxes did not notice this
> horrible bug :(
>
> L
>
> Hans Wichman a écrit :
>
> Hi,
>> does trapallkeys make any difference?
>>
>> greetz
>> JC
>>
>> On Thu, Dec 11, 2008 at 11:05 AM, laurent <[EMAIL PROTECTED]>
>> wrote:
>>
>>
>>
>>> Hi list,
>>>
>>> I made some form in my app and the textfields work fine on local from the
>>> flash ide.
>>> But when the site is in the browser the texfield don't recognise that the
>>> shift key is press. So on a french laptop you can't type numbers or @.
>>> This behavior is so strange that i don't know where to look. Anyone ever
>>> got that problem ??
>>>
>>> thanks
>>> Laurent
>>> ___
>>> 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] strange textfield behaviour in browser

2008-12-11 Thread Hans Wichman
Hi,

I can enter my email in the bottom textfield, win xp sp2, ie,player10. Ar
you using a non english keyboard?
And what happens when you turn wmode transparent off?

greetz
JC

On Thu, Dec 11, 2008 at 3:46 PM, laurent <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> The weird thing is that upper case work, the player in browser get the
> SHIFT is pressed but does not want to apply it's effect on certain keyboard
> buttons.
>
> So fare we have seen the bug on firefox, IE, safari player 9 and 10 windows
> laptop
>
> with wmode = transparent
>
> hm I guess people can check here on the platform we have not tested,
> ...like mac..:)
> http://240plan.ovh.net/~frenchda/index2.php
>
> down right menu: 'MON COMPTE' you have a email texfield, try to write you
> one ;)
>
>
> L
>
>
>
>
> Hans Wichman a écrit :
>
>> Hi,
>>
>> ok I misunderstood the problem at first, thinking you were trying to
>> detect
>> shift keypress, but the whole textfield breaks... that is weird.
>> Which browser are you testing it in? Does it break in all browsers? But
>> plays fine in the IDE... any difference in player version?
>>
>> Are you using firefox with wmode transparent?
>>
>> greetz
>> JC
>> On Thu, Dec 11, 2008 at 12:38 PM, laurent <[EMAIL PROTECTED]>
>> wrote:
>>
>>
>>
>>> Hi JC,
>>>
>>> Thanks for the reply. Hm no effect. Actually I noticed this bug only on
>>> laptop running windows.
>>> My team member running all on mac, laptop and boxes did not notice this
>>> horrible bug :(
>>>
>>> L
>>>
>>> Hans Wichman a écrit :
>>>
>>> Hi,
>>>
>>>
>>>> does trapallkeys make any difference?
>>>>
>>>> greetz
>>>> JC
>>>>
>>>> On Thu, Dec 11, 2008 at 11:05 AM, laurent <[EMAIL PROTECTED]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Hi list,
>>>>>
>>>>> I made some form in my app and the textfields work fine on local from
>>>>> the
>>>>> flash ide.
>>>>> But when the site is in the browser the texfield don't recognise that
>>>>> the
>>>>> shift key is press. So on a french laptop you can't type numbers or @.
>>>>> This behavior is so strange that i don't know where to look. Anyone
>>>>> ever
>>>>> got that problem ??
>>>>>
>>>>> thanks
>>>>> Laurent
>>>>> ___
>>>>> Flashcoders mailing list
>>>>> Flashcoders@chattyfig.figleaf.com
>>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> ___
>>>> Flashcoders mailing list
>>>> Flashcoders@chattyfig.figleaf.com
>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.com
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>>
>>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>>
>>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] asset versioncontrol (beginning to go OT:))

2008-12-11 Thread Hans Wichman
Hi Ian,

ok thanks, are you using some kind of DTAP setup as well (development,
test,acceptation, production) and if yes, could you shed some light on
whether you tag beta releases, test versions etc?

regards,
Hans

On Wed, Dec 10, 2008 at 11:04 PM, Ian Thomas <[EMAIL PROTECTED]> wrote:

> On Wed, Dec 10, 2008 at 9:22 PM, Hans Wichman
> <[EMAIL PROTECTED]> wrote:
> > Hi Ian,
> >
> > Doesn't tagging take an awful lot of time this way?
>
> No, not really. We only tag on release of a new version (not every
> build or anything), and the time taken is worth it.
>
> Ian
>  ___
> 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] strange textfield behaviour in browser

2008-12-11 Thread Hans Wichman
http://bugs.adobe.com/jira/browse/FP-479

;)

At least I think that was it, lucky guess tbfh, but hey you've got to have
luck sometimes now don't we :)

On Thu, Dec 11, 2008 at 8:59 PM, laurent  wrote:

>
>
> !!!yes...wmode='normal' fixed it.
>
> do you know why ??
>
> it was  french keyboard
>
> thank you!
>
> L
>
>
> Hans Wichman a écrit :
>
>> Hi,
>>
>> I can enter my email in the bottom textfield, win xp sp2, ie,player10. Ar
>> you using a non english keyboard?
>> And what happens when you turn wmode transparent off?
>>
>> greetz
>> JC
>>
>> On Thu, Dec 11, 2008 at 3:46 PM, laurent 
>> wrote:
>>
>>
>>
>>> Hi,
>>>
>>> The weird thing is that upper case work, the player in browser get the
>>> SHIFT is pressed but does not want to apply it's effect on certain
>>> keyboard
>>> buttons.
>>>
>>> So fare we have seen the bug on firefox, IE, safari player 9 and 10
>>> windows
>>> laptop
>>>
>>> with wmode = transparent
>>>
>>> hm I guess people can check here on the platform we have not tested,
>>> ...like mac..:)
>>> http://240plan.ovh.net/~frenchda/index2.php
>>>
>>> down right menu: 'MON COMPTE' you have a email texfield, try to write you
>>> one ;)
>>>
>>>
>>> L
>>>
>>>
>>>
>>>
>>> Hans Wichman a écrit :
>>>
>>>
>>>
>>>> Hi,
>>>>
>>>> ok I misunderstood the problem at first, thinking you were trying to
>>>> detect
>>>> shift keypress, but the whole textfield breaks... that is weird.
>>>> Which browser are you testing it in? Does it break in all browsers? But
>>>> plays fine in the IDE... any difference in player version?
>>>>
>>>> Are you using firefox with wmode transparent?
>>>>
>>>> greetz
>>>> JC
>>>> On Thu, Dec 11, 2008 at 12:38 PM, laurent 
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> Hi JC,
>>>>>
>>>>> Thanks for the reply. Hm no effect. Actually I noticed this bug only on
>>>>> laptop running windows.
>>>>> My team member running all on mac, laptop and boxes did not notice this
>>>>> horrible bug :(
>>>>>
>>>>> L
>>>>>
>>>>> Hans Wichman a écrit :
>>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> does trapallkeys make any difference?
>>>>>>
>>>>>> greetz
>>>>>> JC
>>>>>>
>>>>>> On Thu, Dec 11, 2008 at 11:05 AM, laurent 
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi list,
>>>>>>>
>>>>>>> I made some form in my app and the textfields work fine on local from
>>>>>>> the
>>>>>>> flash ide.
>>>>>>> But when the site is in the browser the texfield don't recognise that
>>>>>>> the
>>>>>>> shift key is press. So on a french laptop you can't type numbers or
>>>>>>> @.
>>>>>>> This behavior is so strange that i don't know where to look. Anyone
>>>>>>> ever
>>>>>>> got that problem ??
>>>>>>>
>>>>>>> thanks
>>>>>>> Laurent
>>>>>>> ___
>>>>>>> Flashcoders mailing list
>>>>>>> Flashcoders@chattyfig.figleaf.com
>>>>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ___
>>>>>> Flashcoders mailing list
>>>>>> Flashcoders@chattyfig.figleaf.com
>>>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> ___
>>>>> Flashcoders mailing list
>>>>> Flashcoders@chattyfig.figleaf.com
>>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> ___
>>>> Flashcoders mailing list
>>>> Flashcoders@chattyfig.figleaf.com
>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.com
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>>
>>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>>
>>
>
> ___
> 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] autosize and dropshadow

2008-12-15 Thread Hans Wichman
Hi list,

when creating a dynamic textfield with a dropshadow, autosize stops working
correctly.
Unfortunately only for some textfields so it's not easily reproduced.

I found someone with the same problem (
http://www.gotoandlearnforum.com/viewtopic.php?f=28&t=15359 ) and applying
the filter after the text works, but I was wondering if someone knows what
causes this, and if there is another fix (which saves me from reapplying the
filter every time).

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


Re: [Flashcoders] round number to closet value of 8

2008-12-18 Thread Hans Wichman
Hi,
I think you are looking for :
function roundToEight (pVal:Number) {
 return Math.round(pVal/8)<<3;
}
although 44.9 and 44.4 will both return 48, don't you mean 43.9 and 44.4?

greetz
JC

On Thu, Dec 18, 2008 at 3:51 PM, Lehr, Ross (N-SGIS) wrote:

> Oops. TYPO!!
>
> This is it
>
> Math.round(Math.round(32.3)/8)*8
>
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri
> Heitlager
> Sent: Thursday, December 18, 2008 8:55 AM
> To: Flash Coders List
> Subject: [Flashcoders] round number to closet value of 8
>
>  I am trying to figure out the fastest way to get the closest multitude
> of 8 from a random Number
> and I am really not a math person.
>
> var tN:Number = 32.3
> //32
> var tN:Number = 32.00
> //32
> var tN:Number = 44.9
> //48
> var tN:Number = 44.4
> //40
>
> Much appreciated if someone could help me out
>
> 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
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] round number to closet value of 8

2008-12-18 Thread Hans Wichman
very cool!

On Thu, Dec 18, 2008 at 4:26 PM, Benjamin Wolsey wrote:

> Am Donnerstag, den 18.12.2008, 16:13 +0100 schrieb Hans Wichman:
> > Hi,
> > I think you are looking for :
> > function roundToEight (pVal:Number) {
> >  return Math.round(pVal/8)<<3;
> > }
> > although 44.9 and 44.4 will both return 48, don't you mean 43.9 and 44.4?
> >
>
> int(pVal + 4) &~ 7;
>
> will also do it.
>
> --
> Free Flash, use Gnash
> http://www.gnu.org/software/gnash/
>
> Benjamin Wolsey, Software Developer - http://benjaminwolsey.de
>
> ___
> 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] round number to closet value of 8

2008-12-19 Thread Hans Wichman
Hey,

it cuts off the lowest 3 bits. These lowest 3 bits are 001, 010, 011 etc, so
1,2,3,4,5,6,7

But cutting off only the lowest three bits, will result in 0..7 being 0,
8..15 being 8, while you want 0..4 -> 0 , 5..12 -> 8, etc, so 4 is added.

But Benjamin can prolly explain better hehe since it's his trick :)

greetz
JC

On Fri, Dec 19, 2008 at 10:04 AM, Jiri Heitlager <
jiriheitla...@googlemail.com> wrote:

> Indeed it looks very impressive. Could some explain what is does exactly?
>
>
>
> Hans Wichman wrote:
>
>> very cool!
>>
>> On Thu, Dec 18, 2008 at 4:26 PM, Benjamin Wolsey > >wrote:
>>
>> Am Donnerstag, den 18.12.2008, 16:13 +0100 schrieb Hans Wichman:
>>>
>>>> Hi,
>>>> I think you are looking for :
>>>> function roundToEight (pVal:Number) {
>>>>  return Math.round(pVal/8)<<3;
>>>> }
>>>> although 44.9 and 44.4 will both return 48, don't you mean 43.9 and
>>>> 44.4?
>>>>
>>>> int(pVal + 4) &~ 7;
>>>
>>> will also do it.
>>>
>>> --
>>> Free Flash, use Gnash
>>> http://www.gnu.org/software/gnash/
>>>
>>> Benjamin Wolsey, Software Developer - http://benjaminwolsey.de
>>>
>>> ___
>>> 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] Tweening a Bitmap Blur in combo w/generateFilterRect?

2009-01-09 Thread Hans Wichman
Hi,

how about setting up a couple properties, and tween them using TweenLite,
calling your apply method using TweenLite's onUpdate method?

greetz
JC

On Fri, Jan 9, 2009 at 6:49 PM, Matt S.  wrote:

> So I'm applying a blur to a bitmap via the code below (a little clunky
> perhaps, this is for testing only), and it's accomplishing my goal,
> which is to blur a bitmap WITHOUT the annoying fuzzing out and fading
> away of the edges. I just want a uniform blur across the whole image.
> The tricky part, though, is that I want to TWEEN the blur, while
> preserving the generateFilterRect effect of having the blur go edge to
> edge evenly. I've looked at all the tween classes but none seem to
> allow for this. Does anyone know of a way to either tween an
> "applyFilter" for a bitmap, or else accomplish the same effect while
> simply blurring a movieclip or sprite?
>
> thanks,
>
> .matt
>
> var bmd:BitmapData = new BitmapData(157,157);
> bmd.draw(myRoot.testbitmap);
> var bFilter:BlurFilter = new BlurFilter(15.0,15.0,3);
> var filterRect:Rectangle = bmd.generateFilterRect(bmd.rect, bFilter);
> var bmdFinal:BitmapData = new BitmapData(157, 157, true, 0x);
> bmdFinal.applyFilter(bmd, bmd.rect, new Point(0, 0), bFilter);
> var bm:Bitmap = new Bitmap(bmdFinal);
> ___
> 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] change the origin of rotation for a movieclip?

2009-01-13 Thread Hans Wichman
What I don't understand is that someone takes the time to write an elaborate
answer and you have the nerve to reply with "how about a real answer", some
attitude dude. Although noone seems to take offense, it's a one way trip to
my ignore list.


On Mon, Jan 12, 2009 at 9:24 PM, Anthony Pace wrote:

> How about a real answer?
>
>
> Jack Doyle wrote:
>
>> There's a new plugin for TweenLite/Max that'll cause transformation
>> (rotation/scale) tweens to occur around any point, so it'll be as easy as:
>>
>> TweenLite.to(mc, 2, {transformAroundPoint:{point:new Point(100, 100),
>> rotation:85}});
>>
>> Or if you want to use the center of the object as its origin, you could
>> simply do:
>>
>> TweenLite.to(mc, 2, {transformAroundCenter:{rotation:80}});
>>
>> It works for the scale too, like:
>>
>> TweenLite.to(mc, 2, {transformAroundCenter:{scaleX:1.5, scaleY:2,
>> rotation:-70}});
>>
>> NOTE: The plugin is a membership benefit of Club GreenSock.
>>
>> You can see an interactive demo at http://blog.greensock.com/sneak-peek/
>> (scroll all the way down in the list of plugins - they're at the bottom -
>> click "example"). For those of you who are wondering "what's this 'plugin'
>> talk with TweenLite - I didn't know there were any plugins!", it's a new
>> feature that's part of a big update I'm rolling out soon. It adds lots of
>> flexibility. Read more at the site.
>>
>> Jack
>>
>> PS There's also TransformMatrixProxy which has been around for a while and
>> it'll do something similar and also let you skew things.
>> http://blog.greensock.com/transformmatrixproxy/ It's not quite as
>> convenient
>> as a plugin for TweenLite/Max, though.
>>
>>
>> -Original Message-
>> From: Anthony Pace [mailto:anthony.p...@utoronto.ca] Sent: Saturday,
>> January 10, 2009 6:12 PM
>> To: Flash Coders List
>> Subject: [Flashcoders] change the origin of rotation for a movieclip?
>>
>> How do you change the origin of rotation dynamically? can it be done?  or
>> will it always be 0,0
>>
>> I was hoping that with the new features of as3 that this I would be able
>> to indicate where I wanted the origin; yet, I am starting to think that I
>> was hoping for too much.
>>
>>
>>
>>
>>
>> ___
>> 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] inversed mask (bitmapData/matrix) help.. AS2

2009-01-13 Thread Hans Wichman
HI,

can you put up a simplified zip that allows us to try it out?

And then for something else, if you don't get a response within a day,
there's need to get cynical or offensive referring to us as 'coders' as if
everyone here is only a wannabe of some sort. Last time I checked I'm geting
paid to respond within 4 hours of one of your emails :).

get in line and give it some time ;)

grtz
JC

On Tue, Jan 13, 2009 at 1:21 AM, -whispers-  wrote:

> Nope, it is not...
>
> the images that seems to break the application is 1500x1500.. while other
> (smaller) images around 550x450 seem to work fine
> quick overview:
>
> A.) contentContainer
> B.) |-faceContainer
> C.) |--lineContainer (where I drawmy
> lineTo() shape to be used as the base of my invertedMask function)
> D.) |--maskContainer (where the actual
> invertedMask is created with the function I provided/am using)
> E.) |--centeredContainer (where the
> image is loaded into)
>
> faceContainer X/Y is centered is the absolute middle of the display area
> all child clips of faceContainer (clips C-E above) are then off set by
> height & width /2..  so that when I scale or rotate faceContainer.. all
> child clips scale from the 'center'..
>
> when I load in ANY image.. I check its height..and if bigger than my
> display area.. I scale it down...
>
> again this works fine is I load in a smaller image...
> the only code is 1 (one) function.. (13 lines only) that breaks
> when the image loaded is over a certain size (I believe sets the X/Y to a
> negative number, beyond zero)
>
> this is the function in question:
>
> INVERSED MASK: ( mc = contentContainer.faceContainer.lineContainer)
>
> //- [reverse mask code] - //
> function inverseMask(mc:MovieClip) {
> contentContainer.faceContainer.centeredContainer.cacheAsBitmap = true;
> var _BMP:BitmapData = new
> BitmapData(contentContainer.faceContainer.centeredContainer._width,
> contentContainer.faceContainer.centeredContainer._height, true, 0x);
> var invert:ColorTransform = new ColorTransform(0, 0, 0, 1);
> var matrix:Matrix = new Matrix();
> matrix.translate(0, 0);
>
> //matrix.translate(mc._x, mc._y);  //doesnt work
> //matrix.translate(contentContainer.faceContainer.centeredContainer._x,
> contentContainer.faceContainer.centeredContainer._y); //doesnt work
> //matrix.identity();
>//matrix.scale(contentContainer.faceContainer.centeredContainer._xscale,
> contentContainer.faceContainer.centeredContainer._yscale);
>
> _BMP.draw(mc, matrix, invert);
> _BMP.threshold(_BMP, new Rectangle(0, 0, Stage.width, Stage.height),
> new Point(0, 0), "<", 0x, 0x00FF);
> var BMP:BitmapData = _BMP.clone();
> var maskMC:MovieClip =
> contentContainer.faceContainer.maskContainer.createEmptyMovieClip("invertedMask",
> contentContainer.faceContainer.maskContainer.getNextHighestDepth());
> maskMC.attachBitmap(BMP,
> contentContainer.faceContainer.maskContainer.getNextHighestDepth());
> maskMC.cacheAsBitmap = true;
> mc._visible = false;
> return maskMC;
> }
>
>
> thanks to anyone that even point me in the right direction on debugging...
>
>  - Original Message -
>  From: Jason Van Pelt
>  To: Flash Coders List
>  Sent: Monday, January 12, 2009 4:20 PM
>  Subject: RE: [Flashcoders] inversed mask (bitmapData/matrix) help.. AS2
>
>
>   I can't go through all of your info, but just off the top of my head
> what
>  is the size of the image you are trying to load? Is it larger than the
> 2880
>  x 2880 pixel limit?
>
>
>  JASON VAN PELT  •  SENIOR INTERACTIVE DEVELOPER
>
>  PETER A MAYER ADVERTISING
>  324 CAMP ST  •  NEW ORLEANS, LA 70130
>  TEL 504-210-1232  •  FAX 504-529-4431
>
>  vanpe...@peteramayer.com  •  WWW.PETERAMAYER.COM
>
>
>
>  -
>  PETER MAYER ADVERTISING CONFIDENTIALITY NOTICE:
>  Confidentially, we loathe confidentiality notices. Still, our lawyers tell
> us they are essential in today's world. That said, please consider yourself
> confidentially notified that this email and any attachments may contain
> confidential and privileged information. If you are not the intended
> recipient, please notify the sender with a reply email-confidentially, of
> course-and destroy all copies. And, just between you and us, any
> dissemination by a person other than the intended recipient is unauthorized
> and may be illegal.
>
>  -
>
>
>
> --
>
>
>  ___
>  Flashcoders mailing list
>  Flashcoders@chattyfig.figleaf.com
>  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> __

Re: [Flashcoders] change the origin of rotation for a movieclip?

2009-01-13 Thread Hans Wichman
Load of bull period.

>"Hi I have a problem I need solved"
<"Hi I have a product that solves it, I invested thousands of hours in it"
>"WHAT I CANT GET IT FOR FREE, HOW DARE YOU???"
He was telling you exactly how to solve it, it involved a good product.
That's not telling you you should buy it, he's giving you an option.

Was "Thanks Jack for your elaborate answer, but I'd appreciate some clues
how to solve this myself" too much trouble?
I'm amazed he even took the time to write a second answer instead of 'screw
you' so cheers to Jack, who has to read you 'appreciate his answer' only
through a post where you get told off for being rude in the first place
since you couldn't take the time to thank him normally?

Anywayz this is not about sticking up for Jack I'm sure he is quite capable
of that himself, it's about list etiquette, that no matter what someone
answers, he/she is investing time at that moment to help you solve your
problem, and in my opinion that always deserves some respect/gratitude
instead of some shitty reply.


On Tue, Jan 13, 2009 at 7:06 PM, Anthony Pace wrote:

> When someone is telling you to buy their product or a purchase a membership
> to their club, it is not a real answer.
>
> As I said, I appreciated his second answer, where he actually gave
> information about how to accomplish it on my own.
>
>
> allandt bik-elliott (thefieldcomic.com) wrote:
>
>> i thought it was so rude that you were being sarcastic
>>
>> On Tue, Jan 13, 2009 at 9:17 AM, Hans Wichman <
>> j.c.wich...@objectpainters.com> wrote:
>>
>>
>>
>>> What I don't understand is that someone takes the time to write an
>>> elaborate
>>> answer and you have the nerve to reply with "how about a real answer",
>>> some
>>> attitude dude. Although noone seems to take offense, it's a one way trip
>>> to
>>> my ignore list.
>>>
>>>
>>> On Mon, Jan 12, 2009 at 9:24 PM, Anthony Pace >>
>>>
>>>> wrote:
>>>>  How about a real answer?
>>>>
>>>>
>>>> Jack Doyle wrote:
>>>>
>>>>
>>>>
>>>>> There's a new plugin for TweenLite/Max that'll cause transformation
>>>>> (rotation/scale) tweens to occur around any point, so it'll be as easy
>>>>>
>>>>>
>>>> as:
>>>
>>>
>>>> TweenLite.to(mc, 2, {transformAroundPoint:{point:new Point(100, 100),
>>>>> rotation:85}});
>>>>>
>>>>> Or if you want to use the center of the object as its origin, you could
>>>>> simply do:
>>>>>
>>>>> TweenLite.to(mc, 2, {transformAroundCenter:{rotation:80}});
>>>>>
>>>>> It works for the scale too, like:
>>>>>
>>>>> TweenLite.to(mc, 2, {transformAroundCenter:{scaleX:1.5, scaleY:2,
>>>>> rotation:-70}});
>>>>>
>>>>> NOTE: The plugin is a membership benefit of Club GreenSock.
>>>>>
>>>>> You can see an interactive demo at
>>>>>
>>>>>
>>>> http://blog.greensock.com/sneak-peek/
>>>
>>>
>>>> (scroll all the way down in the list of plugins - they're at the bottom
>>>>>
>>>>>
>>>> -
>>>
>>>
>>>> click "example"). For those of you who are wondering "what's this
>>>>>
>>>>>
>>>> 'plugin'
>>>
>>>
>>>> talk with TweenLite - I didn't know there were any plugins!", it's a new
>>>>> feature that's part of a big update I'm rolling out soon. It adds lots
>>>>>
>>>>>
>>>> of
>>>
>>>
>>>> flexibility. Read more at the site.
>>>>>
>>>>> Jack
>>>>>
>>>>> PS There's also TransformMatrixProxy which has been around for a while
>>>>>
>>>>>
>>>> and
>>>
>>>
>>>> it'll do something similar and also let you skew things.
>>>>> http://blog.greensock.com/transformmatrixproxy/ It's not quite as
>>>>> convenient
>>>>> as a plugin for TweenLite/Max, though.
>>>>>
>>>>>
>>>>> -Original Message-
>>>>> From: Anthony Pace [mailto:an

Re: [Flashcoders] object passed to function has values undefined

2009-01-31 Thread Hans Wichman
Hi,

can you reproduce the problem and put up some fla for download for us to
test?

greetz
JC

On Fri, Jan 30, 2009 at 10:07 PM, Matt McKeon  wrote:

> Hi all,
>
> I've got some code in AS2, and a function that has one parameter of type
> Object. That function gets called from a callback function from an
> event; basically its just passing along the object.
>
> The crazy thing is in the callback function I can loop through the
> object parameter and see all the properties and values, but in the other
> function looping through the object only displays the property names and
> *not* the values (values all say "undefined"). Very bizarre.
>
> // in class A
> // this is the callback for an event
> // say o is the object:
> var o:Object = {}
> o.param1 = 'val1';
> o.param2 = 'val2';
>
> public function onObjectReceivedHandler(o:Object) : Void  {
>// this prints the object with all values
>for(var d in o) {
>trace(d + " :: " + o[d]);
>}
>
>mc.classb.testobjectparam(o);
>}
> }
>
> // in class B
> public function testobjectparam(myobj:Object) : Void {
>// this only prints the property name, no value
>for(var d in myobj) {
>trace(d + " :: " + myobj[d]);
>}
> }
>
> Both classes extend MovieClip and are in separate SWF's. So class B is
> in a dynamically loaded SWF if that makes any difference.
>
> Has anyone seem something like this happen? I'm hitting my head here and
> not sure what to try next. Any advice would be great!
>
> 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


Re: [Flashcoders] jpeg enhancement

2009-02-04 Thread Hans Wichman
Hi,

are you loading them or are they in the library?
greetz
JC



On Tue, Feb 3, 2009 at 3:45 PM, Matt S.  wrote:

> As Laurent said, check the smoothing, eg "image.smoothing = true;" ,
> that's almost always the issue, especially if they're being scaled
> down and appearing jaggy. This is assuming you're not scaling your
> JPG's > 100%, for which there's not much you can do, although
> smoothing helps somewhat.
>
> .m
>
> On Mon, Feb 2, 2009 at 7:21 PM, [p e r c e p t i c o n]
>  wrote:
> > Hi All,I have some JPEGs that I display in my app...the problem is that
> the
> > quality isn't so great...does anyone know of a way to enhance the quality
> of
> > a jpeg once you load it or am i skrewed
> > thanks
> > percy
> > ___
> > 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] MovieClip Opacity

2009-02-05 Thread Hans Wichman
Definitely do that:).

Are you using as2 or as3? In any case reading through a book such as
essential actionscript or a similar book, covers all of this stuff and saves
you many headaches.

TO get you started:
http://www.google.com/search?q=flash+embed+font+example&rls=com.microsoft:en-us:IE-SearchBox&ie=UTF-8&oe=UTF-8&sourceid=ie7&rlz=1I7GFRC

On Thu, Feb 5, 2009 at 2:32 AM, K-Dawg  wrote:

> On Wed, Feb 4, 2009 at 8:59 PM, -whispers- 
> wrote:
>
> > are you embedding the fonts?
> >
>
> No.  Though when I do and then try to enumerate the fonts, I get 0 fonts
> and
> no text shows up.  I guess I don't understand what the embedding fonts do.
> I'll have to read more on that.
>
> Thanks.
>
> Kevin
> ___
> 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] jpeg enhancement

2009-02-05 Thread Hans Wichman
Hi,
assuming you are using as2?
http://www.kaourantin.net/2005/12/dynamically-loading-bitmaps-with.html

Besides that make sure that the source jpeg is a high quality one of course,
smoothing a crappy jpeg is not going to make it better:)

hth
JC

On Wed, Feb 4, 2009 at 7:18 PM, [p e r c e p t i c o n] <
percepti...@gmail.com> wrote:

> Hi,
> I'm loading them...appreciate all the tips...
> cheers
>
> percy
>
> On Wed, Feb 4, 2009 at 12:05 AM, Hans Wichman <
> j.c.wich...@objectpainters.com> wrote:
>
> > Hi,
> >
> > are you loading them or are they in the library?
> > greetz
> > JC
> >
> >
> >
> > On Tue, Feb 3, 2009 at 3:45 PM, Matt S.  wrote:
> >
> > > As Laurent said, check the smoothing, eg "image.smoothing = true;" ,
> > > that's almost always the issue, especially if they're being scaled
> > > down and appearing jaggy. This is assuming you're not scaling your
> > > JPG's > 100%, for which there's not much you can do, although
> > > smoothing helps somewhat.
> > >
> > > .m
> > >
> > > On Mon, Feb 2, 2009 at 7:21 PM, [p e r c e p t i c o n]
> > >  wrote:
> > > > Hi All,I have some JPEGs that I display in my app...the problem is
> that
> > > the
> > > > quality isn't so great...does anyone know of a way to enhance the
> > quality
> > > of
> > > > a jpeg once you load it or am i skrewed
> > > > thanks
> > > > percy
> > > > ___
> > > > Flashcoders mailing list
> > > > Flashcoders@chattyfig.figleaf.com
> > > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > > >
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] php proxy

2009-02-06 Thread Hans Wichman
Hi list,

I'm looking for a good proxy solution to circumvent flash cross domain
policies.

Fact is I'm not a php geek and can't discern whether the google results I've
found open up major security holes in my server.

I;m looking for something that will allow me to proxy files from remote
server, allow me to specify which servers are allowed to be proxied, and
maybe implement some kind of token mechanism making it a little harder to
call the proxy from just anywhere.

Any ideas/resources would be appreciated.

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


Re: [Flashcoders] php proxy

2009-02-08 Thread Hans Wichman
Hi Glen,

thanks, but I missing this part ", allow me to specify which servers are
allowed to be proxied, and
maybe implement some kind of token mechanism making it a little harder to
call the proxy from just anywhere" :)

Any other ones?

thanks!
JC

On Fri, Feb 6, 2009 at 1:11 PM, Glen Pike  wrote:

> http://xmlrpcflash.mattism.com/proxy_info.php
>
> Hans Wichman wrote:
>
>>  Hi list,
>>
>> I'm looking for a good proxy solution to circumvent flash cross domain
>> policies.
>>
>> Fact is I'm not a php geek and can't discern whether the google results
>> I've
>> found open up major security holes in my server.
>>
>> I;m looking for something that will allow me to proxy files from remote
>> server, allow me to specify which servers are allowed to be proxied, and
>> maybe implement some kind of token mechanism making it a little harder to
>> call the proxy from just anywhere.
>>
>> Any ideas/resources would be appreciated.
>>
>> regards
>> 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


Re: [Flashcoders] How to know coordinates of letters in non fixed-width fonts

2009-02-23 Thread Hans Wichman
and for as2:
http://objectpainters.com/blog/2008/10/12/finding-character-positions/

On Tue, Feb 24, 2009 at 1:24 AM, Matt Gitchell wrote:

> Is this AS3? you can use TextField.getCharBoundaries()
>
> I used it in an experiment a while back here to pretty good effect:
> http://www.moonbootmedia.com/interactive/m/textcompare.html
>
> --Matt
>
>
>
> On Mon, Feb 23, 2009 at 3:01 PM, Glen Pike  >wrote:
>
> > Hi,
> >
> >   You should be able to get the width of each sprite with the single
> letter
> > in???
> >
> >   Maybe mask the stream area out.  Start each letter at x - letterWidth,
> > increase the x after each interval, when the letter reaches x=0, create &
> > show the next one, add it to your array.
> > Loop through the array each timer increasing the x position of the
> > letters, removing them when they reach the other side???
> > Something like that??/
> > Glen
> >
> > ali drongo wrote:
> >
> >> Hi there, I'm animating some letters that are dynamically created in
> their
> >> own sprites across the screen as if they are being fired in a stream.
> >> Currently I am using a fixed width font so it's straight forward to find
> >> their final position. My problem is that I need to use a non fixed-width
> >> font and I don't know how to calculate the position of each letter.
> >>
> >> Any ideas very gratefully received!
> >>
> >> Thanks :)
> >> Ali
> >> ___
> >> 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


Re: [Flashcoders] Duplicate Bitmap and scale question

2009-03-04 Thread Hans Wichman
Hi,

you create a clip based on mc's width, called img.
then you scale image, so its width is half of what it used to be.
Then you draw img into img2. Img2's size is based on half the height and
width, but the draw method ignores those transformation, so it draws an
unscaled version of img in img2.

regards
JC

On Sun, Mar 1, 2009 at 3:58 PM, natalia Vikhtinskaya
wrote:

> Hi
> Please explain what is wrong in this code:
> function duplicateMovieClipImage(from:MovieClip, target:MovieClip){
>var visuals = new flash.display.BitmapData(from._width,
> from._height);
>visuals.draw(from);
>target.attachBitmap(visuals, 1,"auto",true);
>
> }
>
> duplicateMovieClipImage(mc,img)
> img._xscale=50;
> img._yscale=50;
> duplicateMovieClipImage(img,img2)
> I expected that img1 and img2 have the same scale. Instead of that
> img2 show 50% of mc.
> ___
> 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] OOP AS3 learning

2009-03-05 Thread Hans Wichman
Hey Pedro,

i think with as3 the remark that OOP is only for big projects is not
strictly true anymore (and it wasn't with as2 either). The thing is though
that as3 forces your hand more than as2 did, it terms that every movieclip
can be a class as well etc, so if you create one clip in the library that
you want to add to the stage using as3, you're already OOP-ing.
I think it would be better to say that employing complex design patterns and
a rocksolid OOP architecture is more suited to big projects than to small
projects. And with small I then mean small projects that are going to stay
small.

The reason is mostly that employing a solid architecture and design patterns
might require a lot of work up front, which will pay itself back as the
project gets bigger and bigger. If your project stays small it's easier to
manage your hacks and shortcuts.

That isn't to say that you shouldnt design upfront or use design patterns in
small projects, only that you must take care that the architecture and
designpatterns don't become an end onto itself, they are a means to an end.

For pluses and minuses, just a few I advise you to pick up as 3 design
patterns, it's an easy read.
Pluses:
- common vocabulary makes communicating about your projects to other easier
- time proven solutions prevent you from reinventing the wheel

Minuses:
- may make your application overly complex without good reasons to do so

I saw an example once of a hello world application as a joke, which they
refactored, ending up with a lot of classes and designs pattern, for just a
hello world application. Like I said it was a joke, meant to teach you to
match up the complexity of your application with the complexities of the
design artifacts you apply.

The best situation I think is where your framework allows you to start out
very simple, and allows your application to evolve and be refactored along
the way as demands on your application grow. We had that framework in as 2,
and havent yet in as3 unfortunately, but I'm sure we will eventually:).

regards
JC



On Thu, Mar 5, 2009 at 12:16 PM, Pedro Kostelec  wrote:

> Hi
>
> Can you recommend a good source for learning OOP in as3?
> Until now i found two books:
> ActionScript 3.0 Design Patterns - Object Oriented Programming Techniques
> By
> William B. Sanders , Chandima
> Cumaranatunge 
> and:
> Object-Oriented ActionScript 3.0 by Todd
> Yard<
> http://www.amazon.com/exec/obidos/search-handle-url/ref=ntt_athr_dp_sr_1?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Todd%20Yard
> >(Author),
> Peter
> Elst<
> http://www.amazon.com/exec/obidos/search-handle-url/ref=ntt_athr_dp_sr_2?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Peter%20Elst
> >(Author),
> Sas
> Jacobs<
> http://www.amazon.com/exec/obidos/search-handle-url/ref=ntt_athr_dp_sr_3?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Sas%20Jacobs
> >(Author)
> Which
> one is better? What i am looking for is a book (max 500 pages) with an
> overview of the different design patterns, and some case studies or
> examples
> on how to write OOP
>
> I have one question that i can't really understand: Why people say OOP
> programming is only for big projects? What are the pluses and minuses of
> sticking to some design patterns?
>
> Pedro D. Kostelec
> ___
> 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] Duplicate Bitmap and scale question

2009-03-05 Thread Hans Wichman
Out of the top of my head:
>> function duplicateMovieClipImage(from:MovieClip, target:MovieClip){
>>var visuals = new flash.display.BitmapData(from._width,
>> from._height);
var m:Matrix = new Matrix(); //dont forget to import this
m.scale (from._xscale/100, from._yscale/100);
>>visuals.draw(from, m);
>>target.attachBitmap(visuals, 1,"auto",true);
>>
>> }


On Thu, Mar 5, 2009 at 12:54 PM, natalia Vikhtinskaya  wrote:

> How to create img2 correctly?
>
> 2009/3/4 Hans Wichman :
>  > Hi,
> >
> > you create a clip based on mc's width, called img.
> > then you scale image, so its width is half of what it used to be.
> > Then you draw img into img2. Img2's size is based on half the height and
> > width, but the draw method ignores those transformation, so it draws an
> > unscaled version of img in img2.
> >
> > regards
> > JC
> >
> > On Sun, Mar 1, 2009 at 3:58 PM, natalia Vikhtinskaya
> > wrote:
> >
> >> Hi
> >> Please explain what is wrong in this code:
> >> function duplicateMovieClipImage(from:MovieClip, target:MovieClip){
> >>var visuals = new flash.display.BitmapData(from._width,
> >> from._height);
> >>visuals.draw(from);
> >>target.attachBitmap(visuals, 1,"auto",true);
> >>
> >> }
> >>
> >> duplicateMovieClipImage(mc,img)
> >> img._xscale=50;
> >> img._yscale=50;
> >> duplicateMovieClipImage(img,img2)
> >> I expected that img1 and img2 have the same scale. Instead of that
> >> img2 show 50% of mc.
> >> ___
> >> 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] OOP AS3 learning

2009-03-05 Thread Hans Wichman
lmao erm yes definately:)

On Thu, Mar 5, 2009 at 2:04 PM, Paul Andrews  wrote:

> - Original Message - From: "Hans Wichman" <
> j.c.wich...@objectpainters.com>
> To: "Flash Coders List" 
> Sent: Thursday, March 05, 2009 12:08 PM
> Subject: Re: [Flashcoders] OOP AS3 learning
>
>
> snip
>
> If your project stays small it's easier to
>> manage your hacks and shortcuts.
>>
>
> I think you meant "manage your lightweight interconnected architecture
> optimised for the smaller project and desparate client"..  ;-)
>
> LOL
>
> Paul
>
>
>
> snip
>
> regards
>> 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


Re: [Flashcoders] Duplicate Bitmap and scale question

2009-03-05 Thread Hans Wichman
I'm guessing the point is to create a scaled version for some reason;) if
not well yes thats even easier:)

On Thu, Mar 5, 2009 at 5:02 PM, Keith Reinfeld wrote:

>
>
> > How to create img2 correctly?
>
> The same way you created img:
>
> duplicateMovieClipImage(mc,img2);
> img2._xscale=50;
> img2._yscale=50;
>
>
> Regards,
>
> -Keith
> http://keithreinfeld.home.comcast.net
>
>
> > -Original Message-
> > From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-
> > boun...@chattyfig.figleaf.com] On Behalf Of natalia Vikhtinskaya
> > Sent: Thursday, March 05, 2009 5:54 AM
> > To: Flash Coders List
> > Subject: Re: [Flashcoders] Duplicate Bitmap and scale question
> >
> > How to create img2 correctly?
> >
> > 2009/3/4 Hans Wichman :
> > > Hi,
> > >
> > > you create a clip based on mc's width, called img.
> > > then you scale image, so its width is half of what it used to be.
> > > Then you draw img into img2. Img2's size is based on half the height
> and
> > > width, but the draw method ignores those transformation, so it draws an
> > > unscaled version of img in img2.
> > >
> > > regards
> > > JC
> > >
> > > On Sun, Mar 1, 2009 at 3:58 PM, natalia Vikhtinskaya
> > > wrote:
> > >
> > >> Hi
> > >> Please explain what is wrong in this code:
> > >> function duplicateMovieClipImage(from:MovieClip, target:MovieClip){
> > >>var visuals = new flash.display.BitmapData(from._width,
> > >> from._height);
> > >>visuals.draw(from);
> > >>target.attachBitmap(visuals, 1,"auto",true);
> > >>
> > >> }
> > >>
> > >> duplicateMovieClipImage(mc,img)
> > >> img._xscale=50;
> > >> img._yscale=50;
> > >> duplicateMovieClipImage(img,img2)
> > >> I expected that img1 and img2 have the same scale. Instead of that
> > >> img2 show 50% of mc.
> > >> ___
> > >> 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] Check for Full Screen Availability

2009-03-11 Thread Hans Wichman
Hi,

how about switching to full screen and back, and catching any security
exceptions?
If you can switch and back it is allowed, if a security exception occurs, it
isn't

greetz
JC

On Wed, Mar 11, 2009 at 6:34 PM, Glen Pike wrote:

> Aha, I see - don't think you can read this for some strange reason.  I had
> problems trying to get it working, probably part of the security thing.  I
> could not even get a context menu to do the same...
>
> Glen
>
>
> John Giotta wrote:
>
>> Yes, Stage.displayState vs StageDisplayState.NORMAL or
>> StageDisplayState.FULL_SCREEN, but its always NORMAL and I can only
>> compare when full screen is the event for resize is called. Its a
>> reactionary condition; I need the event first.
>>
>> I want to know if its possible from a security/capability stand point
>> before the end-user has the chance request full screen.
>>
>> - John G
>>
>> On Wed, Mar 11, 2009 at 10:20 AM, Glen Pike 
>> wrote:
>>
>>
>>> John Giotta wrote:
>>>
>>>
 I want to render the UI based on availability of features. One of them
 is a full screen Button/Sprite that I want to not appear if
 allowFullScreen is false.

 Does anyone know of a way to check for full screen availability? I've
 been scouring the interwebs for an answer, but no luck so far. Is it
 just not possible?

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





>>> I think there is a property on the Stage instance to get the state -
>>> compare
>>> to StageDisplayState constant values??
>>> ___
>>> 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] using applyFilter with a BitmapData object (AS2)

2009-03-11 Thread Hans Wichman
Hi,

yes it is destructive, but as you can read here:
http://www.adobe.com/devnet/flash/articles/image_api_05.html
you can find out the size of the bitmap after filtering (imagine a big
blur), create a new bitmap and specify a source bitmap to the applyfilter
call.
If you don't want it to be destructive, attach the bitmap to a movieclip
first, and set the filters on that.

HTH
JC

On Wed, Mar 11, 2009 at 6:14 PM, allandt bik-elliott (thefieldcomic.com) <
alla...@gmail.com> wrote:

> Hi guys
>
> I have a question - if I use a ColorMatrixFilter on a BitmapData object,
> does it work like mc.filters = arFiltersArray in that it is non-destructive
> to the mc (it can be removed) or is it destructive (once you apply it, you
> can't then un-apply it)?
>
> ta
>
> 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] Particle Playground, Flash 10 General Purpose Comuting with Pixel Bender

2009-03-18 Thread Hans Wichman
awesome:)

On Wed, Mar 18, 2009 at 12:45 PM, mike cann  wrote:

> Hey List,
>
> I have been playing around with particles again...
>
> I have just released my latest little saunter into the world of particles
> and shaders in flash 10. It started off as and idea to use the new pixel
> bender shaders of flash 10 as a more efficient method of updating particle
> simulations.
>
> Well after a few struggling evenings I managed to get a little prototype
> going. I was so amazed at some of the beautiful patterns and effects that
> the particles were making I thought it may be nice rather than just
> releasing a tech demo, to add abit more to it and release it for others to
> enjoy.
>
> I will be releasing the source code in the coming weeks along with a blog
> post which should explain in detail how the technical aspects of updating
> and rendering tens of thousands of particles per frame works.
>
> The tool features a gallery tab which you can use to take screenshots then
> upload them to my picassa account (proxyed via php). The hope is to get
> some
> realy beautiful images in here, perhaps if some are good enough ill get
> them
> printed and framed ;)
>
> You can see it in action over on my blog: http://www.mikecann.co.uk/?p=384
>
> Let me know what you think!
> 
> Mike Cann
> http://www.mikecann.co.uk/
> http://www.artificialgames.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] swfobject 2.1

2009-03-20 Thread Hans Wichman
Hi list,

I reinstalled my pc recently and I only installed the latest flash 10
player.

I opened my site and it tells me I don't have flash installed (using
swfobject 2.1).
So just for fun, I installed player version 6, and now it tells me I have
version 10 installed.

Can anyone tell me what is going on?
(swfobject tests for a minimum version of 8.0.0)

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


[Flashcoders] setBufferTime on stream locks up flashplayer

2009-03-20 Thread Hans Wichman
Hi list,

when setting the buffertime on a stream thats played through http, setting
the buffertime completely locks up my interface for a few seconds.
has anyone seen this before?

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


Re: [Flashcoders] setBufferTime on stream locks up flashplayer

2009-03-21 Thread Hans Wichman
Im getting it on 8, 9 and 10 :(

On Fri, Mar 20, 2009 at 3:47 PM, Glen Pike wrote:

> I had a problem with FP9 connecting to a http stream which went with
> FP10...
>
> Hans Wichman wrote:
>
>>  Hi list,
>>
>> when setting the buffertime on a stream thats played through http, setting
>> the buffertime completely locks up my interface for a few seconds.
>> has anyone seen this before?
>>
>> 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


Re: [Flashcoders] Storing x and y in a bytearray

2009-03-30 Thread Hans Wichman
ah no then you'll be fine !
Although if it's just a simple shape, hittest will work as well of course,
depending on the performance you need.

On Mon, Mar 30, 2009 at 1:52 PM, Jiri  wrote:

> On stage there is a draw shape. I copy it to BitmapData and use the
> transparancy for testing walkable or not.
> So i dont use compressed image format, just raw bitmap data. Or am i
> missing something?
>
> Jiri
>
>
> Hans Wichman wrote:
>
>> yup exactly, only thing is that I'm not sure how detailed this info can be
>> when using compressed image formats...
>>
>> On Mon, Mar 30, 2009 at 1:13 PM, Jiri 
>> wrote:
>>
>> Good point, i can use getPixel to retrieve the color value and based on
>>> that 'know' if it is walkable.
>>>
>>> Cheers.
>>>
>>> Jiri
>>>
>>>
>>> Hans Wichman wrote:
>>>
>>> Hi,
>>>>
>>>> why not use an image? Eg use an image that represents your area, lookup
>>>> the
>>>> pixel values, AND them and decide what you can or cannot do in that
>>>> area.
>>>>
>>>> greetz JC
>>>>
>>>> On Mon, Mar 30, 2009 at 12:41 PM, Jiri 
>>>> wrote:
>>>>
>>>> I have a byte question.
>>>>
>>>>> I have to store a walkable area so a character 'knows' where it can
>>>>> walk
>>>>> or
>>>>> not. Currently I am using a multi-dim array based on the x and y pos of
>>>>> the
>>>>> tiles .
>>>>>
>>>>> so [[1],[0],[1]..etc]
>>>>>
>>>>> where pos(0,0) => array[0][0] => 1 (walkable)
>>>>>
>>>>> I was wondering if I could store this using a bytearray, for storing
>>>>> and
>>>>> possibly faster lookup using bitwise operators. I am very knew to this,
>>>>> so I
>>>>> am ot sure where to begin and how to deal with it.
>>>>> The range of int is sufficient to store all the data, because a full
>>>>> walkarea would take 370560 (772*480) elements in the previous mentioned
>>>>> multi array.
>>>>>
>>>>> I could be completely wrong, but would like some advice.
>>>>>
>>>>> 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
>>>>
>>>> ___
>>>>
>>> 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] Storing x and y in a bytearray

2009-03-30 Thread Hans Wichman
yup exactly, only thing is that I'm not sure how detailed this info can be
when using compressed image formats...

On Mon, Mar 30, 2009 at 1:13 PM, Jiri  wrote:

> Good point, i can use getPixel to retrieve the color value and based on
> that 'know' if it is walkable.
>
> Cheers.
>
> Jiri
>
>
> Hans Wichman wrote:
>
>> Hi,
>>
>> why not use an image? Eg use an image that represents your area, lookup
>> the
>> pixel values, AND them and decide what you can or cannot do in that area.
>>
>> greetz JC
>>
>> On Mon, Mar 30, 2009 at 12:41 PM, Jiri 
>> wrote:
>>
>> I have a byte question.
>>> I have to store a walkable area so a character 'knows' where it can walk
>>> or
>>> not. Currently I am using a multi-dim array based on the x and y pos of
>>> the
>>> tiles .
>>>
>>> so [[1],[0],[1]..etc]
>>>
>>> where pos(0,0) => array[0][0] => 1 (walkable)
>>>
>>> I was wondering if I could store this using a bytearray, for storing and
>>> possibly faster lookup using bitwise operators. I am very knew to this,
>>> so I
>>> am ot sure where to begin and how to deal with it.
>>> The range of int is sufficient to store all the data, because a full
>>> walkarea would take 370560 (772*480) elements in the previous mentioned
>>> multi array.
>>>
>>> I could be completely wrong, but would like some advice.
>>>
>>> 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
>>
>> ___
> 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] Storing x and y in a bytearray

2009-03-30 Thread Hans Wichman
Hi,

why not use an image? Eg use an image that represents your area, lookup the
pixel values, AND them and decide what you can or cannot do in that area.

greetz JC

On Mon, Mar 30, 2009 at 12:41 PM, Jiri  wrote:

> I have a byte question.
> I have to store a walkable area so a character 'knows' where it can walk or
> not. Currently I am using a multi-dim array based on the x and y pos of the
> tiles .
>
> so [[1],[0],[1]..etc]
>
> where pos(0,0) => array[0][0] => 1 (walkable)
>
> I was wondering if I could store this using a bytearray, for storing and
> possibly faster lookup using bitwise operators. I am very knew to this, so I
> am ot sure where to begin and how to deal with it.
> The range of int is sufficient to store all the data, because a full
> walkarea would take 370560 (772*480) elements in the previous mentioned
> multi array.
>
> I could be completely wrong, but would like some advice.
>
> 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] can you pease take me off of this list

2009-03-30 Thread Hans Wichman
unsubscribe here http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




On Mon, Mar 30, 2009 at 2:22 PM, krayg bartley wrote:

> can you pease take me off of this list
>
>
>
>
> ___
> 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] problem with this code

2009-04-01 Thread Hans Wichman
Hi,

I'm guessing it's overshooting because of your easing function set to
bounce.
As you start your tween your object start moving, but your if statement is
evaluated right away.
You might have better luck executing it onUpdate of the tween if such a
thing exists in the fl tween classes.

regards
JC

On Wed, Apr 1, 2009 at 8:28 PM, Gustavo Duenas <
gdue...@leftandrightsolutions.com> wrote:

> Hi Coders I have this code, is for a dynamic tween., pretty easy actually
> but when the logo hits floor(645 value y) I would like to have something
> else, because the logo is a movie clip, there is the code.
>
> stop();
> import fl.transitions.Tween;
> import fl.transitions.easing.*;
>
>
>
> var ballXTween:Tween = new Tween(logoCacao, "y",Bounce.easeInOut,
> logoCacao.y,
> 645, 2, true);
>
> //here is my problem when I try to calculate, when it hits the floor(645)
>
> if(logoCacao.y>=645){
> trace("I'm here");
> }
>
> it would work with <=, but no with >= or ==
> any ideas, I've been trying to resolve this too much time, I rather have
> some fresh ideas or pointer what am I missing.
>
> Gustavo
>
> ___
> 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] Bitwise selection

2009-04-02 Thread Hans Wichman
Hi,

isn't the absence of break statements messing things up?

greetz
JC

On Thu, Apr 2, 2009 at 12:08 PM, Jiri  wrote:

> I am new to bitwise operators, so I am trying to learn it.
>
> I have the following code and it works half. I am using a switch case to
> get the result, but this is messing things up. I could revert to and if -
> else statement, but I was wondering if there is a more elagant way of doing
> it. I post my code below, and would have some advice.
>
> var NO_RESTRICTION:int = 1;
> var NUM_ONLY:int = 2;
> var CHAR_ONLY:int = 4;
>
> var RESTRICTION:int =  NUM_ONLY ;
>
> function setInputCharRestriction(tInt:int):void {
>RESTRICTION = tInt | tInt&2 | tInt&3;
> }
>
> function getRestrict():String{
>var tRestrict:String = '';
>
>trace('all ' , Boolean(RESTRICTION&1))
>trace('num ' , Boolean(RESTRICTION&2))
>trace('char ' ,Boolean(RESTRICTION&4))
>
>switch(RESTRICTION){
>case RESTRICTION&1 :
>tRestrict +="\u0020-\u007E";
>trace('all')
>case RESTRICTION&2:
>tRestrict =" 0-9";
>trace('num')
>case RESTRICTION&4:
>tRestrict =" A-Z a-z";
>trace('char')
>}
>trace('restrict field ' , tRestrict)
>return tRestrict;
> }
>
> getRestrict()
>
> Thank you.
>
> 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] isseu with a custom function in AS2

2009-04-03 Thread Hans Wichman
Hi Jimmi,

your parameter is being passed by value not object since it's a literal
value.
In your previous situation the function applied itself to a global variable
so this problem didn't occur.

Add a return statement to your function at the end:
function interpunk (par1):Void {
.
return par1;
}

And call it like: outputString = interpunk (outputString);

Note however that reassigning parameter values is not considered good
practice, and you should avoid it.


HTH
JC

On Fri, Apr 3, 2009 at 10:19 AM, jimmi  wrote:

> Good morning,
>
> I have made a function that adds interpunction marks to a value, for
> example the value 1 gets changed to 10.000, 10 to 100.000 and
> so forth.
>
> The function work fine, but I'm trying to make it reusable so that i
> can use it in a large scale project. That's where the problem comes
> up.
>
> This is what the working code looks like:
>
>
> 
> var outputNumber:Number = 1 // input value
> var outputString:String = new String();
>
> function init ()
> {
>outputString = String(Number(outputNumber));
>interpunk (outputString);
>
>trace(outputNumber); // output is 1
>trace(outputString); // output is 10.000
> }
>
> function interpunk (par1):Void
> {
>trace(par1)
>switch (par1.length)
>{
>case 4 :
>outputString = String(par1.charAt (0) + "." +
> par1.slice (1))
>break;
>
>case 5 :
>outputString = String(par1.charAt (0) + par1.charAt
> (1) + "." +
> par1.slice (2))
>break;
>
>case 6 :
>outputString = String(par1.charAt (0) + par1.charAt
> (1) +
> par1.charAt (2) + "." + par1.slice (3))
>break;
>
>default :
>outputString = String(par1)
>break;
>}
> }
>
> init ();
>
>
> 
>
> So i tried to make it reusable, so i tried this(changed outputString to
> par1).
> But now the value comes out unchanged so 1 stays 1, while i
> expected it to become 10.000.
>
>
> I hope someone can help i the right direction.
>
> This is what the non working code looks like :
>
>
> 
> function interpunk (par1):Void
> {
>trace(par1)
>switch (par1.length)
>{
>case 4 :
>par1 = String(par1.charAt (0) + "." + par1.slice
> (1))
>break;
>
>case 5 :
>par1 = String(par1.charAt (0) + par1.charAt (1) +
> "." + par1.slice (2))
>break;
>
>case 6 :
>par1 = String(par1.charAt (0) + par1.charAt (1) +
> par1.charAt (2) +
> "." + par1.slice (3))
>break;
>
>default :
>par1 = String(par1)
>break;
>}
> }
>
>
> 
> ___
> 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] Loading MC

2009-04-05 Thread Hans Wichman
Hi Karl,

your best bet is probably to checkout the imageloader source from martijn de
visser that you are using, and adapt that to be able to get at the values
you want.

Maybe this works:
 target._width = target._width / 3;
 target._height = target._height / 3;
 _root.stage_mc["LargePic" + ID].previewW = target._width;
 _root.stage_mc["LargePic" + ID].previewH = target._height;

regards,
JC

On Fri, Apr 3, 2009 at 12:03 PM, Karl DeSaulniers wrote:

> Hello,
> I was wondering if anyone can point me in the rigth direction.
>
> I have been trying for days now to figure this out.
> I know there is some little thing I am missing
> and its probably right under my nose so to speak.
>
> Here is my code:
>
> //--
> // Start Image loader
> //--
>
> import com.martijndevisser.ImageLoader;
>
> _root.stage_mc.attachMovie("LargePic","LargePic" +
> ID,this.getNextHighestDepth());
> _root.stage_mc["LargePic" + ID].ID = ID;
> _root.stage_mc["LargePic" + ID]._x = originalX;
> _root.stage_mc["LargePic" + ID]._y = originalY;
> var mcProgress:Number = 0;
>
> var checkLoader:Object = new Object();
> checkLoader.onLoadStart = function(target:MovieClip):Void  {
>trace("Start Width:" + _root.stage_mc["LargePic" + ID].previewW);
>trace("Start Height:" + _root.stage_mc["LargePic" + ID].previewH);
>_root.stage_mc["LargePic" + ID].newPic.spiralLoader._visible = true;
>_root.stage_mc["LargePic" + ID].newPic.spiralLoader.gotoAndPlay(2);
> };
> checkLoader.onLoadComplete = function(target:MovieClip) {
>target = _root.stage_mc["LargePic" + ID].newPic.Image_mc;
>_root.stage_mc["LargePic" + ID].newPic.percentCom.text = "";
>_root.stage_mc["LargePic" + ID].newPic.spiralLoader.stop();
>_root.stage_mc["LargePic" + ID].newPic.spiralLoader.gotoAndStop(1);
>_root.stage_mc["LargePic" + ID].newPic.spiralLoader._visible =
> false;
>target._width = target._width / 3;
>target._height = target._height / 3;
>_root.stage_mc["LargePic" + ID].previewW = _root.stage_mc["LargePic"
> + ID].newPic._width;
>_root.stage_mc["LargePic" + ID].previewH = _root.stage_mc["LargePic"
> + ID].newPic._height;
>trace("End Width:" + _root.stage_mc["LargePic" + ID].previewW);
>trace("End Height:" + _root.stage_mc["LargePic" + ID].previewH);
> };
> checkLoader.onLoadProgress = function(target:MovieClip, bytesLoaded:Number,
> bytesTotal:Number):Void  {
>mcProgress = Math.ceil((bytesLoaded / bytesTotal) * 100);
>_root.stage_mc["LargePic" + ID].newPic.percentCom.text =
> mcProgress.toString() + "%";
> };
> var loader:ImageLoader = new ImageLoader(_root.stage_mc["LargePic" +
> ID].newPic.Image_mc);
> loader.addListener(checkLoader);
> loader.loadImage(_global.projectPic,_root.stage_mc["LargePic" +
> ID].newPic.Image_mc);
>
> //--
> // End Image Loader
> //--
>
>
> To explain further, I have a oversized image loading at first which is
> sized down 3 times.
> Once it sizes down, I want previewW and previewH to equal the new width and
> height.
> Everything loads fine, it loads and the progress runs and it resizes fine,
> but when I hit my resize button to make it smaller, the variables previewW
> and previewH
> take on the dimensions of _root.stage_mc["LargePic" + ID].newPic.Image_mc
>  before anything was loaded into it.
> (my resize button works off of the previewW and previewH vairables, this
> info is just FYI)
> var fitSizeW:Number = previewW;
> var fitSizeH:Number = previewH;
> var maxSizeW:Number = (previewW * 3);
> var maxSizeH:Number = (previewW * 3);
> var minSizeW:Number = (previewW / 3);
> var minSizeH:Number = (previewH / 3);
>
> Note: I have to keep previewW and previewH also because I have a
> mousescroll attached to that variable as well.
>
> I have a feeling that because the ImageLoader class loads a dummy MC for
> the bitmap
> and then removes it to place the "img" MC for smoothing, my script is not
> getting the final value
> of what is loaded into it and so previewW and previewH do not inherit its
> final values, just its beginning values.
> There is a background bitmap that gets replaced by the loaded image that is
> in the MC when it is placed on stage.
> This is the beginning value.
>
> This is in AS2 BTW.
>
> Any help would be GREATLY appreciated at this point.
>
> THX
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.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] Creating Dynamic addEventListeners with AS3

2009-04-05 Thread Hans Wichman
Might it be possible to only add a single listener to the parent for all
buttons?

On Mon, Apr 6, 2009 at 3:10 AM, Rob Romanek  wrote:

> You can try something along the lines of
>
> var stateButton = getChildByName("State_" + rs[i]);
> stateButton.addEventListener(MouseEvent.CLICK, StateButtonClicked);
>
> hth,
>
> Rob
>
> On 5-Apr-09, at 8:33 PM, Graham Pearson wrote:
>
>>
>> What I am trying to do is when I retrieve the recordset back from the
>> coldfusion component is to loop through the results like
>>
>> function GetClientsWithinCategory_Result(rs.Object) {
>> for (var i:int = 0; i < rs.length; i++) {
>>  State_rs[i].addEventListener(MouseEvent.CLICK, StateButtonClicked);
>>  // The Value of rs[i] will return the 2 letter abriviation of the
>> State eg: IN, WI, etc
>> }
>> }
>>
>>
>> How do I go about combining State_ + the result from rs[i] so that
>> when a user clicks on Indiana it will run the actionscript within the
>> State Button Clicked Function
>>
>>
>  ___
> 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] Loading MC

2009-04-05 Thread Hans Wichman
Hi,

erm no that's not what I said:).

Just read the original source file to deduct where it goes wrong, or try out
the replacement I suggested in your own code.

regards,
JC

On Mon, Apr 6, 2009 at 12:24 AM, Karl DeSaulniers wrote:

> Hey thanks for your thoughts. Do you mean take the code out of the class
> and put it directly in my fla?
>
> Karl
>
> Sent from losPhone
>
>
> On Apr 5, 2009, at 10:20 AM, Hans Wichman 
> wrote:
>
> Hi Karl,
>>
>> your best bet is probably to checkout the imageloader source from martijn
>> de
>> visser that you are using, and adapt that to be able to get at the values
>> you want.
>>
>> Maybe this works:
>> target._width = target._width / 3;
>> target._height = target._height / 3;
>> _root.stage_mc["LargePic" + ID].previewW = target._width;
>> _root.stage_mc["LargePic" + ID].previewH = target._height;
>>
>> regards,
>> JC
>>
>> On Fri, Apr 3, 2009 at 12:03 PM, Karl DeSaulniers > >wrote:
>>
>> Hello,
>>> I was wondering if anyone can point me in the rigth direction.
>>>
>>> I have been trying for days now to figure this out.
>>> I know there is some little thing I am missing
>>> and its probably right under my nose so to speak.
>>>
>>> Here is my code:
>>>
>>> //--
>>> // Start Image loader
>>> //--
>>>
>>> import com.martijndevisser.ImageLoader;
>>>
>>> _root.stage_mc.attachMovie("LargePic","LargePic" +
>>> ID,this.getNextHighestDepth());
>>> _root.stage_mc["LargePic" + ID].ID = ID;
>>> _root.stage_mc["LargePic" + ID]._x = originalX;
>>> _root.stage_mc["LargePic" + ID]._y = originalY;
>>> var mcProgress:Number = 0;
>>>
>>> var checkLoader:Object = new Object();
>>> checkLoader.onLoadStart = function(target:MovieClip):Void  {
>>>  trace("Start Width:" + _root.stage_mc["LargePic" + ID].previewW);
>>>  trace("Start Height:" + _root.stage_mc["LargePic" + ID].previewH);
>>>  _root.stage_mc["LargePic" + ID].newPic.spiralLoader._visible = true;
>>>  _root.stage_mc["LargePic" + ID].newPic.spiralLoader.gotoAndPlay(2);
>>> };
>>> checkLoader.onLoadComplete = function(target:MovieClip) {
>>>  target = _root.stage_mc["LargePic" + ID].newPic.Image_mc;
>>>  _root.stage_mc["LargePic" + ID].newPic.percentCom.text = "";
>>>  _root.stage_mc["LargePic" + ID].newPic.spiralLoader.stop();
>>>  _root.stage_mc["LargePic" + ID].newPic.spiralLoader.gotoAndStop(1);
>>>  _root.stage_mc["LargePic" + ID].newPic.spiralLoader._visible =
>>> false;
>>>  target._width = target._width / 3;
>>>  target._height = target._height / 3;
>>>  _root.stage_mc["LargePic" + ID].previewW = _root.stage_mc["LargePic"
>>> + ID].newPic._width;
>>>  _root.stage_mc["LargePic" + ID].previewH = _root.stage_mc["LargePic"
>>> + ID].newPic._height;
>>>  trace("End Width:" + _root.stage_mc["LargePic" + ID].previewW);
>>>  trace("End Height:" + _root.stage_mc["LargePic" + ID].previewH);
>>> };
>>> checkLoader.onLoadProgress = function(target:MovieClip,
>>> bytesLoaded:Number,
>>> bytesTotal:Number):Void  {
>>>  mcProgress = Math.ceil((bytesLoaded / bytesTotal) * 100);
>>>  _root.stage_mc["LargePic" + ID].newPic.percentCom.text =
>>> mcProgress.toString() + "%";
>>> };
>>> var loader:ImageLoader = new ImageLoader(_root.stage_mc["LargePic" +
>>> ID].newPic.Image_mc);
>>> loader.addListener(checkLoader);
>>> loader.loadImage(_global.projectPic,_root.stage_mc["LargePic" +
>>> ID].newPic.Image_mc);
>>>
>>> //--
>>> // End Image Loader
>>> //--
>>>
>>>
>>> To explain further, I have a oversized image loading at first which is
>>> sized down 3 times.
>>> Once it sizes down, I want previewW and previewH to equal the new width
>>> and
>>> height.
>>> Everything loads fine, it loads and the progress runs and it resizes
>>&g

[Flashcoders] flash ocx on c++ form

2009-04-05 Thread Hans Wichman
Hi list,

I'm adapting an existing c++ application, but I'm not well versed in it.
I have a flash ocx on a form, which loads a movie fine the first time, but
not the 2nd time.

It seems timeline based flash files are no problem, but my class based swf
is.
It is initialized and loaded, but things like onEnterFrame do no longer
work.
In addition if I load another swf first, the background color is different
and stays different from the movies I subsequently load.

Does anyone have experience with resetting a flash ocx completely?

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


Re: [Flashcoders] MovieClip inside MoveClip. Path confusion.

2009-04-09 Thread Hans Wichman
pages.page1.width :)

On Thu, Apr 9, 2009 at 12:35 PM, Dav  wrote:

> Hi all,
>
>
>
> Wondering if anyone can help me with a problem that's left me scratching my
> head!
>
>
>
> Basically I have a main movieclip (group) and then several other movieclips
> inside it (page[1-6]).
>
>
>
> I was thinking I could access them like this group.page1, group.page2 and
> so
> on. However it is not working for me.
>
>
>
> Here is some stripped down sample code, obviously the moviclips have
> content
> rather than just being blank:
>
>
>
> ///
>
> var group:MovieClip   = new MovieClip();
>
> addChild(group);
>
>
>
> var pages:Object  = new Object();
>
> pages["page1"]= new MovieClip();
>
> pages["page2"]= new MovieClip();
>
> pages["page3"]= new MovieClip();
>
> pages["page4"]= new MovieClip();
>
> pages["page5"]= new MovieClip();
>
> pages["page6"]= new MovieClip();
>
>
>
> for each (var page:MovieClip in pages)
>
> {
>
>group.addChild(page);
>
> }
>
>
>
> group.page1.width = 200;// [Fault] exception,
> information=TypeError: Error #1010: A term is undefined and has no
> properties. Fault, initScene() at Main.as:103
>
> 
>
>
>
> So I get this error when trying to access the width of page1 inside group:
> [Fault] exception, information=TypeError: Error #1010: A term is undefined
> and has no properties. Fault, initScene() at Main.as:103
>
>
>
> Any ideas how I can access the page movieclips within the group movieclip?
>
>
>
> Thanks!
>
> Dav
>
> ___
> 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] arguments.caller.name in AS 3

2009-04-10 Thread Hans Wichman
Hi Lists,

I was looking for a way to trace the name of the current function or the
calling function and I came up with a hackish bit of code.

Don't know if anyone already came up with something like this but anyway, I
thought it was pretty cool so I'd like to share it with you.
I'm still working on making it more general, and you should not use it in a
production enviroment (unless the compiler directive is set to false)

package nl.trimm.lang
{

 /**
  * @author JC Wichman
  */
 public class DebugUtil
 {

  public static function getCallingInfo(pInfo:String = "", pFull:Boolean =
false):String {
   return getInfo (pInfo, pFull, 2);
  }
  public static function traceCallingInfo(pInfo:String = "", pFull:Boolean =
false):void {
   trace (getCallingInfo (pInfo, pFull));
  }
  public static function getCallerInfo(pInfo:String = "", pFull:Boolean =
false):String {
   return getInfo(pInfo, pFull, 3)
  }
  public static function traceCallerInfo(pInfo:String = "", pFull:Boolean =
false):void {
   trace (getCallerInfo (pInfo, pFull));
  }

  private static function getInfo (pInfo:String = "", pFull:Boolean = false,
pIndex:Number = 0):String {
   CONFIG::EXTENDED_INFO_ON {
try {
 throw new Error();
} catch (e:Error) {
 var lTrace:String = e.getStackTrace().split("\tat ")[pIndex+1];
 lTrace = pFull?lTrace:lTrace.split("[")[0];
 return (lTrace + "->" + pInfo);
}
   }
   return pInfo;
  }
 }

}

Usage:
- define a compiler directive and set it to true or false (can be optimized)

Example:
 public class Test extends Sprite
 {

  public function Test():void
  {
 init();
  }

  private function init():void
  {
trace (DebugUtil.getCallerInfo("here", true));
trace (DebugUtil.getCallingInfo("here", true));
  }

 }

Prints:

Test()[D:\MY_DATA\checkouts\co_as3_library\\src\Test.as:21]->here

Test/init()[D:\MY_DATA\checkouts\co_as3_library\src\Test.as:42]->here

If you use DebugUtil.getCallingInfo("here", false) the source line is
omited.

In the next version that will be a global flag as well.

I'm not sure what happens in other languages, you might need to replace \tat
with \t

Have fun!

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


Re: [Flashcoders] UK time clock

2009-04-22 Thread Hans Wichman
or use something like this:

*http://www.earthtools.org/timezone-1.1/39.96/5.6250*


On Wed, Apr 22, 2009 at 10:29 PM, Weyert de Boer  wrote:

> You can check if the locale takes DST into account by compare the offsets
> of a winter day with a summer day. If they are the same the locale doesn't
> care about DST.
> If not, I would need to fix my alarm clock ;)
>
>
> On 22/04/2009, at 10:12 PM, Keith Reinfeld wrote:
>
> Pedro,
>>
>>
>> To calculate the time elsewhere you have to factor-in the local machine's
>> timezone offset value.
>> I worked out the following for my World Clock last year:
>>
>> 
>> // Local Time
>> var lDate:Date = new Date();
>> // Elsewhere Time: London Standard Time: 0, DST: 1
>> var utcH:Number = 1;
>> var utcM:Number = 0;
>> var wDate:Date = new Date(lDate.getTime() + (lDate.getTimezoneOffset() *
>> 1000 * 60) + (utcH * 1000 * 60 * 60) + (utcM * 1000 * 60));
>> trace("wDate = "+wDate);
>> 
>>
>> Note:
>> The GMT value in the trace will still reflect the local machine's
>> timezone.
>> Just ignore it. The important data are the time and date.
>>
>> Going forward you will want to consider the issues presented by Daylight
>> Saving Time:
>> Does the locale of the local machine observe DST?
>> Is the locale of the local machine currently in DST?
>> Do they observe DST in the designated Elsewhere?
>> Is the designated Elsewhere currently in DST?
>>
>> Regards,
>>
>> -Keith
>> http://keithreinfeld.home.comcast.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 mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Video reflection with masked video

2009-04-28 Thread Hans Wichman
Hi Natalia,

I recently wrote a reflection class that takes masking into account, it
takes masks into account, hope it helps:
http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/

Gots lots of samples in the zip including video.

greetz
JC

On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya <
natavi.m...@gmail.com> wrote:

> Hi to all
>
> I use reflection effect for video. But I want to draw not horizontal
> line between video and reflection Mc. So I mask my video with shape:
>
> var distance:Number=20;
> function drawShapeMask(mc:MovieClip, startX:Number, startY:Number,
> w:Number, h:Number) {
>   mc.beginFill(0xFF);
>   mc.moveTo(startX, startY);
>   mc.lineTo(startX + w, startY);
>   mc.lineTo(startX + w, startY + h);
>   mc.lineTo(startX, startY + h-distance);
>   mc.lineTo(startX, startY);
>   mc.endFill();
> }
> Now bottom line of video has an angle.
>
> Reflection code works correctly without masked video. With masked
> video it shows only half of video without gradient mask.
> This is how that looks http://www.natavi.co.uk/test/reflect.jpg
> .
> What  is wrong? Maybe I can create the same angle position between
> video and reflection without using mask?
>
>
> var reflectionDropoff:Number=1.1;
> var reflectionAlpha:Number=50;
>
>
> reflectIt=function(){
>   var bounds = new Object();
>   bounds.width = myVideo_mc._width;
>   bounds.height = myVideo_mc._height;
>   matrixHeight = bounds.height/reflectionDropoff;
>   var myBitmapData = new flash.display.BitmapData(bounds.width,
> bounds.height, true, 0xFF);
>   myBitmapData.draw(myVideo_mc);
>   var reflect=this.createEmptyMovieClip("reflect", 10);
>   reflect.attachBitmap(myBitmapData, 1);
>   reflect._yscale = -100;
>   reflect._x =myVideo_mc._x;
>   reflect._y =myVideo_mc._y+(bounds.height*2)-distance;
>   reflect._alpha = reflectionAlpha;
>   var gra=this.createEmptyMovieClip("gra", 15);
>   var fillType = "linear";
>   var colors = [0xFF, 0xFF];
>   var alphas = [80, 0];
>   var ratios = [0, 255];
>   var matrix = {matrixType:"box", x:0, y:0, w:bounds.width,
> h:matrixHeight, r:(90/180)*Math.PI};
>   var spreadMethod:String = "pad";
>   gra.beginGradientFill(fillType, colors, alphas, ratios, matrix,
> spreadMethod);
>   gra.moveTo(0, 0);
>   gra.lineTo(bounds.width, distance);
>   gra.lineTo(bounds.width, bounds.height);
>   gra.lineTo(0, bounds.height);
>   gra.lineTo(0, 0);
>   gra.endFill();
>   gra._y = reflect._y - reflect._height;
>   gra._x = reflect._x;
>   reflect.cacheAsBitmap = true;
>   gra.cacheAsBitmap = true;
>   reflect.setMask(gra);
>   this.onEnterFrame = function ()
>   {
>   myBitmapData.draw(myVideo_mc);
>   };
>
>   }
>
> Thanks for any 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


Re: [Flashcoders] Video reflection with masked video

2009-04-28 Thread Hans Wichman
Hi,

no don't think so, there is an example in there of a masked clip, and a
sample of video.
I'm assuming you've tried my code with masked video and it didn't work, or
are you asking me to try that for you? I wasn't quite sure;). Because I see
no reason why it wouldn't work :)

regards,
JC

On Tue, Apr 28, 2009 at 11:55 AM, natalia Vikhtinskaya <
natavi.m...@gmail.com> wrote:

> Yes, I saw these excellent examples and learned a lot. But it does not
> help with this situation. Do you have example where you have masked
> video?
>
> 2009/4/28 Hans Wichman :
>  > "that takes masking into account, it takes masks into account" - some
> days
> > I'm like a broken record lol
> >
> >
> >
> >
> > On Tue, Apr 28, 2009 at 11:28 AM, Hans Wichman <
> > j.c.wich...@objectpainters.com> wrote:
> >
> >> Hi Natalia,
> >>
> >> I recently wrote a reflection class that takes masking into account, it
> >> takes masks into account, hope it helps:
> >> http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/
> >>
> >> Gots lots of samples in the zip including video.
> >>
> >> greetz
> >> JC
> >>
> >>   On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya <
> >> natavi.m...@gmail.com> wrote:
> >>
> >>> Hi to all
> >>>
> >>> I use reflection effect for video. But I want to draw not horizontal
> >>> line between video and reflection Mc. So I mask my video with shape:
> >>>
> >>> var distance:Number=20;
> >>> function drawShapeMask(mc:MovieClip, startX:Number, startY:Number,
> >>> w:Number, h:Number) {
> >>>   mc.beginFill(0xFF);
> >>>   mc.moveTo(startX, startY);
> >>>   mc.lineTo(startX + w, startY);
> >>>   mc.lineTo(startX + w, startY + h);
> >>>   mc.lineTo(startX, startY + h-distance);
> >>>   mc.lineTo(startX, startY);
> >>>   mc.endFill();
> >>> }
> >>> Now bottom line of video has an angle.
> >>>
> >>> Reflection code works correctly without masked video. With masked
> >>> video it shows only half of video without gradient mask.
> >>> This is how that looks http://www.natavi.co.uk/test/reflect.jpg
> >>> .
> >>> What  is wrong? Maybe I can create the same angle position between
> >>> video and reflection without using mask?
> >>>
> >>>
> >>> var reflectionDropoff:Number=1.1;
> >>> var reflectionAlpha:Number=50;
> >>>
> >>>
> >>> reflectIt=function(){
> >>>   var bounds = new Object();
> >>>   bounds.width = myVideo_mc._width;
> >>>   bounds.height = myVideo_mc._height;
> >>>   matrixHeight = bounds.height/reflectionDropoff;
> >>>   var myBitmapData = new flash.display.BitmapData(bounds.width,
> >>> bounds.height, true, 0xFF);
> >>>   myBitmapData.draw(myVideo_mc);
> >>>   var reflect=this.createEmptyMovieClip("reflect", 10);
> >>>   reflect.attachBitmap(myBitmapData, 1);
> >>>   reflect._yscale = -100;
> >>>   reflect._x =myVideo_mc._x;
> >>>   reflect._y =myVideo_mc._y+(bounds.height*2)-distance;
> >>>   reflect._alpha = reflectionAlpha;
> >>>   var gra=this.createEmptyMovieClip("gra", 15);
> >>>   var fillType = "linear";
> >>>   var colors = [0xFF, 0xFF];
> >>>   var alphas = [80, 0];
> >>>   var ratios = [0, 255];
> >>>   var matrix = {matrixType:"box", x:0, y:0, w:bounds.width,
> >>> h:matrixHeight, r:(90/180)*Math.PI};
> >>>   var spreadMethod:String = "pad";
> >>>   gra.beginGradientFill(fillType, colors, alphas, ratios, matrix,
> >>> spreadMethod);
> >>>   gra.moveTo(0, 0);
> >>>   gra.lineTo(bounds.width, distance);
> >>>   gra.lineTo(bounds.width, bounds.height);
> >>>   gra.lineTo(0, bounds.height);
> >>>   gra.lineTo(0, 0);
> >>>   gra.endFill();
> >>>   gra._y = reflect._y - reflect._height;
> >>>   gra._x = reflect._x;
> >>>   reflect.cacheAsBitmap = true;
> >>>   gra.cacheAsBitmap = true;
> >>>   reflect.setMask(gra);
> >>>   this.onEnterFrame = function ()
> >>>   {
> >>>   myBitmapData.draw(myVideo_mc);
> >>>   };
> >>>
> >>>   }
> >>>
> >>> Thanks for any 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 mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Video reflection with masked video

2009-04-28 Thread Hans Wichman
"that takes masking into account, it takes masks into account" - some days
I'm like a broken record lol




On Tue, Apr 28, 2009 at 11:28 AM, Hans Wichman <
j.c.wich...@objectpainters.com> wrote:

> Hi Natalia,
>
> I recently wrote a reflection class that takes masking into account, it
> takes masks into account, hope it helps:
> http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/
>
> Gots lots of samples in the zip including video.
>
> greetz
> JC
>
>   On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya <
> natavi.m...@gmail.com> wrote:
>
>> Hi to all
>>
>> I use reflection effect for video. But I want to draw not horizontal
>> line between video and reflection Mc. So I mask my video with shape:
>>
>> var distance:Number=20;
>> function drawShapeMask(mc:MovieClip, startX:Number, startY:Number,
>> w:Number, h:Number) {
>>   mc.beginFill(0xFF);
>>   mc.moveTo(startX, startY);
>>   mc.lineTo(startX + w, startY);
>>   mc.lineTo(startX + w, startY + h);
>>   mc.lineTo(startX, startY + h-distance);
>>   mc.lineTo(startX, startY);
>>   mc.endFill();
>> }
>> Now bottom line of video has an angle.
>>
>> Reflection code works correctly without masked video. With masked
>> video it shows only half of video without gradient mask.
>> This is how that looks http://www.natavi.co.uk/test/reflect.jpg
>> .
>> What  is wrong? Maybe I can create the same angle position between
>> video and reflection without using mask?
>>
>>
>> var reflectionDropoff:Number=1.1;
>> var reflectionAlpha:Number=50;
>>
>>
>> reflectIt=function(){
>>   var bounds = new Object();
>>   bounds.width = myVideo_mc._width;
>>   bounds.height = myVideo_mc._height;
>>   matrixHeight = bounds.height/reflectionDropoff;
>>   var myBitmapData = new flash.display.BitmapData(bounds.width,
>> bounds.height, true, 0xFF);
>>   myBitmapData.draw(myVideo_mc);
>>   var reflect=this.createEmptyMovieClip("reflect", 10);
>>   reflect.attachBitmap(myBitmapData, 1);
>>   reflect._yscale = -100;
>>   reflect._x =myVideo_mc._x;
>>   reflect._y =myVideo_mc._y+(bounds.height*2)-distance;
>>   reflect._alpha = reflectionAlpha;
>>   var gra=this.createEmptyMovieClip("gra", 15);
>>   var fillType = "linear";
>>   var colors = [0xFF, 0xFF];
>>   var alphas = [80, 0];
>>   var ratios = [0, 255];
>>   var matrix = {matrixType:"box", x:0, y:0, w:bounds.width,
>> h:matrixHeight, r:(90/180)*Math.PI};
>>   var spreadMethod:String = "pad";
>>   gra.beginGradientFill(fillType, colors, alphas, ratios, matrix,
>> spreadMethod);
>>   gra.moveTo(0, 0);
>>   gra.lineTo(bounds.width, distance);
>>   gra.lineTo(bounds.width, bounds.height);
>>   gra.lineTo(0, bounds.height);
>>   gra.lineTo(0, 0);
>>   gra.endFill();
>>   gra._y = reflect._y - reflect._height;
>>   gra._x = reflect._x;
>>   reflect.cacheAsBitmap = true;
>>   gra.cacheAsBitmap = true;
>>   reflect.setMask(gra);
>>   this.onEnterFrame = function ()
>>   {
>>   myBitmapData.draw(myVideo_mc);
>>   };
>>
>>   }
>>
>> Thanks for any 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


Re: [Flashcoders] Video reflection with masked video

2009-04-28 Thread Hans Wichman
Hmmm,
might be that some values end up negative while they shouldn't or as floats
while they should be integers.
To be honest, I don't completely understand what you are trying to do in the
left image, the lower part has to have an angle in it?
I'm not sure that's going to work without skewing of some sort.

regards,
JC


On Tue, Apr 28, 2009 at 1:05 PM, natalia Vikhtinskaya  wrote:

> Yes I could not get correct rusult with masked video using neither
> your code nor my code.
>
> 2009/4/28 Hans Wichman :
> > Hi,
> >
> > no don't think so, there is an example in there of a masked clip, and a
> > sample of video.
> > I'm assuming you've tried my code with masked video and it didn't work,
> or
> > are you asking me to try that for you? I wasn't quite sure;). Because I
> see
> > no reason why it wouldn't work :)
> >
> > regards,
> > JC
> >
> > On Tue, Apr 28, 2009 at 11:55 AM, natalia Vikhtinskaya <
> > natavi.m...@gmail.com> wrote:
> >
> >> Yes, I saw these excellent examples and learned a lot. But it does not
> >> help with this situation. Do you have example where you have masked
> >> video?
> >>
> >> 2009/4/28 Hans Wichman :
> >>  > "that takes masking into account, it takes masks into account" - some
> >> days
> >> > I'm like a broken record lol
> >> >
> >> >
> >> >
> >> >
> >> > On Tue, Apr 28, 2009 at 11:28 AM, Hans Wichman <
> >> > j.c.wich...@objectpainters.com> wrote:
> >> >
> >> >> Hi Natalia,
> >> >>
> >> >> I recently wrote a reflection class that takes masking into account,
> it
> >> >> takes masks into account, hope it helps:
> >> >> http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/
> >> >>
> >> >> Gots lots of samples in the zip including video.
> >> >>
> >> >> greetz
> >> >> JC
> >> >>
> >> >>   On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya <
> >> >> natavi.m...@gmail.com> wrote:
> >> >>
> >> >>> Hi to all
> >> >>>
> >> >>> I use reflection effect for video. But I want to draw not horizontal
> >> >>> line between video and reflection Mc. So I mask my video with shape:
> >> >>>
> >> >>> var distance:Number=20;
> >> >>> function drawShapeMask(mc:MovieClip, startX:Number, startY:Number,
> >> >>> w:Number, h:Number) {
> >> >>>   mc.beginFill(0xFF);
> >> >>>   mc.moveTo(startX, startY);
> >> >>>   mc.lineTo(startX + w, startY);
> >> >>>   mc.lineTo(startX + w, startY + h);
> >> >>>   mc.lineTo(startX, startY + h-distance);
> >> >>>   mc.lineTo(startX, startY);
> >> >>>   mc.endFill();
> >> >>> }
> >> >>> Now bottom line of video has an angle.
> >> >>>
> >> >>> Reflection code works correctly without masked video. With masked
> >> >>> video it shows only half of video without gradient mask.
> >> >>> This is how that looks http://www.natavi.co.uk/test/reflect.jpg
> >> >>> .
> >> >>> What  is wrong? Maybe I can create the same angle position between
> >> >>> video and reflection without using mask?
> >> >>>
> >> >>>
> >> >>> var reflectionDropoff:Number=1.1;
> >> >>> var reflectionAlpha:Number=50;
> >> >>>
> >> >>>
> >> >>> reflectIt=function(){
> >> >>>   var bounds = new Object();
> >> >>>   bounds.width = myVideo_mc._width;
> >> >>>   bounds.height = myVideo_mc._height;
> >> >>>   matrixHeight = bounds.height/reflectionDropoff;
> >> >>>   var myBitmapData = new flash.display.BitmapData(bounds.width,
> >> >>> bounds.height, true, 0xFF);
> >> >>>   myBitmapData.draw(myVideo_mc);
> >> >>>   var reflect=this.createEmptyMovieClip("reflect", 10);
> >> >>>   reflect.attachBitmap(myBitmapData, 1);
> >> >>>   reflect._yscale = -100;
> >> >>>   reflect._x =myVideo_mc._x;
> >> >>>   r

Re: [Flashcoders] Video reflection with masked video

2009-04-28 Thread Hans Wichman
nice find!
I wonder what happens if you nest the video_mc and its coded mask into
another parent clip and reflect that.

regards,
JC



On Tue, Apr 28, 2009 at 2:15 PM, natalia Vikhtinskaya  wrote:

> I found that if I use layer mask reflection code works correctly
> http://www.natavi.co.uk/test/video_perspective.html
>
> If I try to use script mask over my video clip
>
> var videoMaska=this.createEmptyMovieClip("videoMaska",100);
> videoMaska._x=myVideo_mc._x;
> videoMaska._y=myVideo_mc._y;
> drawShapeMask(videoMaska, 0, 0, myVideo_mc._width,myVideo_mc._height);
> myVideo_mc.setMask(videoMaska);
>
> Result is wrong
> http://www.natavi.co.uk/test/video_perspective_wrong.html
>
>
>
>
>
>
>
> 2009/4/28 Hans Wichman :
> > Hmmm,
> > might be that some values end up negative while they shouldn't or as
> floats
> > while they should be integers.
> > To be honest, I don't completely understand what you are trying to do in
> the
> > left image, the lower part has to have an angle in it?
> > I'm not sure that's going to work without skewing of some sort.
> >
> > regards,
> > JC
> >
> >
> > On Tue, Apr 28, 2009 at 1:05 PM, natalia Vikhtinskaya <
> natavi.m...@gmail.com
> >> wrote:
> >
> >> Yes I could not get correct rusult with masked video using neither
> >> your code nor my code.
> >>
> >> 2009/4/28 Hans Wichman :
> >> > Hi,
> >> >
> >> > no don't think so, there is an example in there of a masked clip, and
> a
> >> > sample of video.
> >> > I'm assuming you've tried my code with masked video and it didn't
> work,
> >> or
> >> > are you asking me to try that for you? I wasn't quite sure;). Because
> I
> >> see
> >> > no reason why it wouldn't work :)
> >> >
> >> > regards,
> >> > JC
> >> >
> >> > On Tue, Apr 28, 2009 at 11:55 AM, natalia Vikhtinskaya <
> >> > natavi.m...@gmail.com> wrote:
> >> >
> >> >> Yes, I saw these excellent examples and learned a lot. But it does
> not
> >> >> help with this situation. Do you have example where you have masked
> >> >> video?
> >> >>
> >> >> 2009/4/28 Hans Wichman :
> >> >>  > "that takes masking into account, it takes masks into account" -
> some
> >> >> days
> >> >> > I'm like a broken record lol
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Tue, Apr 28, 2009 at 11:28 AM, Hans Wichman <
> >> >> > j.c.wich...@objectpainters.com> wrote:
> >> >> >
> >> >> >> Hi Natalia,
> >> >> >>
> >> >> >> I recently wrote a reflection class that takes masking into
> account,
> >> it
> >> >> >> takes masks into account, hope it helps:
> >> >> >>
> http://objectpainters.com/blog/2008/11/23/visual-reflections-in-as2/
> >> >> >>
> >> >> >> Gots lots of samples in the zip including video.
> >> >> >>
> >> >> >> greetz
> >> >> >> JC
> >> >> >>
> >> >> >>   On Tue, Apr 28, 2009 at 10:26 AM, natalia Vikhtinskaya <
> >> >> >> natavi.m...@gmail.com> wrote:
> >> >> >>
> >> >> >>> Hi to all
> >> >> >>>
> >> >> >>> I use reflection effect for video. But I want to draw not
> horizontal
> >> >> >>> line between video and reflection Mc. So I mask my video with
> shape:
> >> >> >>>
> >> >> >>> var distance:Number=20;
> >> >> >>> function drawShapeMask(mc:MovieClip, startX:Number,
> startY:Number,
> >> >> >>> w:Number, h:Number) {
> >> >> >>>   mc.beginFill(0xFF);
> >> >> >>>   mc.moveTo(startX, startY);
> >> >> >>>   mc.lineTo(startX + w, startY);
> >> >> >>>   mc.lineTo(startX + w, startY + h);
> >> >> >>>   mc.lineTo(startX, startY + h-distance);
> >> >> >>>   mc.lineTo(startX, startY);
> >> >> >>>   mc.endFill();
> >> >> >>> }
> >> >&

Re: [Flashcoders] Tween a matrix transformation

2009-05-01 Thread Hans Wichman
Hi,

there is probably a better way, but one solution is to do: x* state1Matrix +
(x-1)*state2Matrix and tween x over 0..1

greetz
JC

On Fri, May 1, 2009 at 4:31 PM, Mendelsohn, Michael <
michael.mendels...@fmglobal.com> wrote:

> Hi list...
>
> I'm trying to think of the best way to tween a sprite that's been
> transformed, with all 6 props of its matrix property having been altered.  I
> use TweenLite a lot...should I write 6 lines of code, one for each matrix
> property?
>
> Any suggestions for the most optimal way to tween a matrix transform?
>
> Thanks,
> - Michael 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] Dynamically generate blend colors

2009-05-01 Thread Hans Wichman
Hi,

mask out the r,g, b and tween them individually.

eg write a class:

RGBTween.getRGB (source, dest, 0..1);

The getRGB should mask out the r,g,b values, calculate the result r,g,b
based on source, dest and a 0..1 factor and combine the parts into a new rgb
value.

It will do the trick, but Im not sure its visually correct.

HTH
JC

On Fri, May 1, 2009 at 2:38 PM, natalia Vikhtinskaya
wrote:

> Thank you. Yes this class allows to create gradient. But I need code
> that allows to have N  MovieClips with blend colors from one to
> another.
>
> 2009/5/1 Glen Pike :
>  > Have a look at the Greensock Tween classes - they might help.
> >
> > natalia Vikhtinskaya wrote:
> >>
> >> Hi to all
> >> I need dynamically generate blend colors from one color to another.
> >> For example RGB:
> >> 1Mc 255  255 255
> >> 2?
> >> 3?
> >> 4?
> >> 5?
> >> 6?
> >> 7 136 114 141
> >> Is there a way to calculate blend colors for 5 steps?
> >> Thanks you for any help or links.
> >> ___
> >> 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] Creating for loops for event listeners

2009-05-01 Thread Hans Wichman
yes you can accomplish that with one loop.

On Fri, May 1, 2009 at 6:10 PM,  wrote:

>
>
> Is there a better way to write Event Listeners for a large number of
> buttons that increment the names by 1? example:
> solution_button1.addEventListener(MouseEvent.MOUSE_DOWN, s_btn1_down);
> solution_button2.addEventListener(MouseEvent.MOUSE_DOWN, s_btn2_down);
> solution_button3.addEventListener(MouseEvent.MOUSE_DOWN, s_btn3_down);
> solution_button4.addEventListener(MouseEvent.MOUSE_DOWN, s_btn4_down);
> solution_button5.addEventListener(MouseEvent.MOUSE_DOWN, s_btn5_down);
> solution_button6.addEventListener(MouseEvent.MOUSE_DOWN, s_btn6_down);
> solution_button7.addEventListener(MouseEvent.MOUSE_DOWN, s_btn7_down);
> solution_button8.addEventListener(MouseEvent.MOUSE_DOWN, s_btn8_down);
> solution_button9.addEventListener(MouseEvent.MOUSE_DOWN, s_btn9_down);
>
>  can the above be accomplished with a for loop? what about more than one
> event over, out, down, click. can those also be automated or would I need 4
> loops for that.
> ___
> 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] ClassPath madness

2009-05-03 Thread Hans Wichman
Hi,

shouldnt your classpath be:
"Macintosh HD:Users:gingerman:Sites:project:ACC:flash:src"

instead of 

"Macintosh HD:Users:gingerman:Sites:project:ACC:flash:src:com"

?

And then your classes will have a package statement com.YourClass ?

regards
JC

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Stephen
Matthews
Sent: zondag 3 mei 2009 16:43
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] ClassPath madness

I am working out of the "src" directory ( which is shown in fully  
qualified the classpath below )

"Macintosh HD:Users:gingerman:Sites:project:ACC:flash:src:com"

In this instance you would think that I could go relative and use  
"com" instead, seeing that my FLA is in the "Macintosh  
HD:Users:gingerman:Sites:project:ACC:flash:src" directory.

This does not work.

ClassPaths drive me Math.abs( mad );


If you have any hints or have seen anything which makes ClassPaths  
seem easier to manage - please let me know

Thanks Steve
___
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] Try... catch......

2009-05-08 Thread Hans Wichman
Hi,
yup

either
public function myBall( value:int ):Ball
   {
   var ball:Ball

   try{

  //my code goes here.
  return ball;
  } catch (e:TypeError ){
  trace("Whoops");
   }
   return null;
   }

or

public function myBall( value:int ):Ball
   {
   var ball:Ball = null;

   try{

  //my code goes here.
  } catch (e:TypeError ){

   }
   return ball;
 }
There are more possibilities, some of which are better practice than others,
but in such a small method, I wouldn't make to much of a fuss about it.

regards,
JC


On Sat, May 9, 2009 at 3:22 AM, ACE Flash  wrote:

> Hi there,
>
> I am trying to add try block in my code, how can I deal it with return
> function?
>
> If the code without any problems, I'd like to return "ball" , otherwise I'd
> like to EXIT or return null.
>
> Thanks
>
> -
>
>  public function myBall( value:int ):Ball
>{
>var ball:Ball
>
>try{
>
>   //my code goes here.
>   return ball;
>   } catch (e:TypeError ){
>
>}
>
>   // shall I add => return null here?
>}
> ___
> 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] mail from as3

2009-05-15 Thread Hans Wichman
Hi list,

is it possible to send an email with attachment (based on bytearray or
something like that) directly from actionscript 3?
Or is it best/easiest to use some kind of amf solution for that ?

thanks in advance!
Hans
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Rounded Polygons; rounded triangles

2009-05-17 Thread Hans Wichman
Hi,

nope not really, but I do know polymercode
http://www.polymercode.com/code/index.php has a nice set of drawing tools
for as2.

If you combine that with the knowledge of how to draw a curve through a
controlpoint:
http://books.google.com/books?id=zK7zaGGVi60C&pg=PA78&lpg=PA78&dq=how+to+draw+a+curve+through+a+controlpoint&source=bl&ots=yRYuZFe8Vh&sig=H5GgAEoYJmMpxmUd-7_Fn9dmZfo&hl=en&ei=dt0PSrHaD6HUjAf3henkCA&sa=X&oi=book_result&ct=result&resnum=6

(from foundation actionscript 3 animation)

it shouldn't be too hard to turn the hard curves in the drawing into rounded
corners.

hth!
JC



On Fri, May 15, 2009 at 9:49 PM, John Giotta  wrote:

> I've searched for polygon draw classes and functions, but I can't find
> anything that can do rounded corner polygons. Anyone on the list come
> across or written a decent set of code that can?
> ___
> 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] mail from as3

2009-05-17 Thread Hans Wichman
k tnx glen, ill look into it!

On Fri, May 15, 2009 at 12:11 PM, Glen Pike wrote:

> Hans Wichman wrote:
>
>>  Hi list,
>>
>> is it possible to send an email with attachment (based on bytearray or
>> something like that) directly from actionscript 3?
>> Or is it best/easiest to use some kind of amf solution for that ?
>>
>> thanks in advance!
>> Hans
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>>
>>
> Hi,
>
>   I think there is an AS3 SMTP library for sending emails, but you will
> need to have access to an SMTP relay and probably set up the Socket Policy
> server on the same host because of restrictions (unless you are using AIR
> maybe).
>
>   http://www.bytearray.org/?p=27
>
>   Possibly better off posting to a server side script that will just use
> the standard mailing libs and work out how to do the attachment there.  I am
> guessing you would still be able to POST the attachment data in a fairly raw
> format and then splurge it out into your mailing libs "attach()" function or
> similar...
>
>   Glen
> ___
> 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] inserting object into swf

2009-05-23 Thread Hans Wichman
Hi,

by far the easiest way, if you don't have the original source and don't want
to decompile the original movie is doing something like this:

1. create a new movie with same size as the old movie
2. put this on frame one of the timeline:
import [new version of old class goes here];
var cls_0:[new version of old class goes here]=null;
loadMovie ('myOldSwf.swf");
3. compile and run

hth
JC



On Sat, May 23, 2009 at 12:00 AM, Andrew Sinning wrote:

> A few days ago I made a post with the subject "unexpected result with
> linked classes in embedded swf".  The lesson I learned from this is that an
> object is only imported into a movie player once, regardless of how many
> swfs it occurs in.
>
> Well, I'm dealing with a situation where I forgot to back up my source code
> following the most recent official release of a product.  I made about a
> month of changes as we were adding a bunch of features before I realized
> this.
>
> Anyway, we haven't had an official release in a while, but we've found a
> rather critical problem that is affecting a customer.
>
> I just need to add one line to one object to make the problem go away.
>
> So, is there a way to insert the corrected object into the last official
> release of the compiled swf?
> ___
> 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] inserting object into swf

2009-05-23 Thread Hans Wichman
Hi Andrew,

both are possible, either loading it in a child, or replacing root
completely. Look into loadmovie and loadmovienum.
With respect to the flashvars, no clue, you'll have to try, but if not, I
think:
loadMovieNum ("oldswf.swf?"+[replace by string with original flashvars], 0);

will do the trick, you'll have to experiment first though, maybe the
originals vars are retained automatically.

regards
JC

On Sat, May 23, 2009 at 4:35 PM, Andrew Sinning wrote:

> That's exactly what I was looking for Hans.  Thanks so much.
>
> I didn't mention that this is AS2, but it is and it looks like you're
> assuming that, too.
> Will using loadMovie without specifying a target cause myOldSwf.swf to
> become _root, or will it become a child of _root?
>
> Will myOldSwf.swf have access to flashVars?
>
> Of course, I should figure this out for myself, but if you happen to know
> .
>
>
> Hans Wichman wrote:
>
>> Hi,
>>
>> by far the easiest way, if you don't have the original source and don't
>> want
>> to decompile the original movie is doing something like this:
>>
>> 1. create a new movie with same size as the old movie
>> 2. put this on frame one of the timeline:
>> import [new version of old class goes here];
>> var cls_0:[new version of old class goes here]=null;
>> loadMovie ('myOldSwf.swf");
>> 3. compile and run
>>
>> hth
>> JC
>>
>>
>>
>> On Sat, May 23, 2009 at 12:00 AM, Andrew Sinning > >wrote:
>>
>>
>>
>>> A few days ago I made a post with the subject "unexpected result with
>>> linked classes in embedded swf".  The lesson I learned from this is that
>>> an
>>> object is only imported into a movie player once, regardless of how many
>>> swfs it occurs in.
>>>
>>> Well, I'm dealing with a situation where I forgot to back up my source
>>> code
>>> following the most recent official release of a product.  I made about a
>>> month of changes as we were adding a bunch of features before I realized
>>> this.
>>>
>>> Anyway, we haven't had an official release in a while, but we've found a
>>> rather critical problem that is affecting a customer.
>>>
>>> I just need to add one line to one object to make the problem go away.
>>>
>>> So, is there a way to insert the corrected object into the last official
>>> release of the compiled swf?
>>> ___
>>> 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] flv can seek to end yes/no

2009-05-25 Thread Hans Wichman
Hi list,

I'm still struggling with blocking video now and then (video that locks up
my complete flash player).
I have a couple of flv's now that play fluently, and one of the differences
I'm noticing is that these videos have 'can seek to end' set to no.

What does 'can seek to end' actually do, and how can I set this to no? Does
anyone know whether this can actually improve the performance of the video?

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


Re: [Flashcoders] flv can seek to end yes/no

2009-05-27 Thread Hans Wichman
Hi Karl,

it's as2. The buffertime is set to 5. The biggest problem is that the
sysadmins seem incapable of setting up a stable test environment:).

regards
JC




On Tue, May 26, 2009 at 12:25 AM, Karl DeSaulniers wrote:

> AS2 or AS3?
>
> On May 25, 2009, at 6:26 AM, Hans Wichman wrote:
>
>   Hi list,
>>
>> I'm still struggling with blocking video now and then (video that locks up
>> my complete flash player).
>> I have a couple of flv's now that play fluently, and one of the
>> differences
>> I'm noticing is that these videos have 'can seek to end' set to no.
>>
>> What does 'can seek to end' actually do, and how can I set this to no?
>> Does
>> anyone know whether this can actually improve the performance of the
>> video?
>>
>> thanks!
>> Hans
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
> Karl DeSaulniers
> Design Drumm
> k...@designdrumm.com
> http://designdrumm.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] Papervision Help

2009-05-27 Thread Hans Wichman
nice tuts: 
http://papervision2.com/
http://pv3d.org/




On Tue, May 26, 2009 at 4:10 PM, Merrill, Jason <
jason.merr...@bankofamerica.com> wrote:

> Have you tried the Papervision list?  I think these questions specific to
> Papervision are more appropriate there.
>
>
> Jason Merrill
>
> Bank of  America   Global Learning
> Shared Services Solutions Development
>
> Monthly meetings on the Adobe Flash platform for rich media experiences -
> join the Bank of America Flash Platform Community
>
>
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Omar Fouad
> Sent: Sunday, May 24, 2009 5:49 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Papervision Help
>
> Well my concern now is, how can I apply a light and a shadow to a
> MovieMaterial. I've searched the whole google for it but invain.
>
> On Sun, May 24, 2009 at 9:18 AM, Ashim D'Silva  >wrote:
>
> > Well, papervision will be able to do that, and the docs are quite
> > helpful. You'll have to be specific when you search google for this
> > stuff though. I did find some nice tutorials on lighting and shaders
> > that should be helpful but that I can't remember offhand.
> >
> > However, you might want to re-evaluate using the default flash 10
> > stuff. Lighting and shadowing live is only necessary if your object
> > are going to change enough to make a difference. You might find you
> > can get away with baking all that into textures and saving your
> > processing power.
> >
> > Ashim
> >
> > The Random Lines
> > My online portfolio
> > www.therandomlines.com
> >
> >
> >
> > 2009/5/24 Omar Fouad :
> > > Hi all,
> > >
> > > I am working on a project where I need to create 6 circles (planes)
> with
> > > different colors. the cirlces are placed one over the other and
> centered,
> > so
> > > when I move the mouse down those they rotate to show something like a
> > > piramid. I could just use the native 3d in Flash but my boss needs each
> > > circle to be clickable, have a shadow and be shaded (lighted).
> > >
> > > I actually played around with papervision lately, using BasicView and
> > some
> > > kind of materials, but now I feel frustrated as I just can't figure out
> > how
> > > to do this work.
> > >
> > > Any Ideas?
> > >
> > > I also cannot find a "decent" papervision explanation on the net. What
> I
> > am
> > > looking for is a conceptual explanation about papervision not just how
> to
> > > create some shapes and put them on the stage.
> > >
> > >
> > > --
> > > Omar M. Fouad -
> > > www.omar-fouad.net
> > > Cellular: (+20) 1011.88.534
> > > Mail: m...@omar-fouad.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
> >
>
>
>
> --
> Omar M. Fouad - Adobe Flash™ Platform Developer
> www.omar-fouad.net
> Cellular: (+20) 1011.88.534
> Mail: m...@omar-fouad.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
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Papervision Help

2009-05-28 Thread Hans Wichman
Hey,

on that matter: has anyone found any guidelines on which engine is 'better'
or a good set of selectioncriteria for which engine is best for you? All the
pv3d vs away google results same a bit outdated:)

regards,
JC

On Thu, May 28, 2009 at 2:58 AM, Omar Fouad  wrote:

> Thanks buddies, I've switched to Away3D, which is (in my opinion) better
> explained, supported and more straightforward in terms of API, than
> Papervision3D.
>
> Thanks for the supports guys!
>
> On Wed, May 27, 2009 at 1:54 PM, Hans Wichman <
> j.c.wich...@objectpainters.com> wrote:
>
> > nice tuts: <http://papervision2.com/>
> > http://papervision2.com/
> > http://pv3d.org/
> >
> >
> >
> >
> > On Tue, May 26, 2009 at 4:10 PM, Merrill, Jason <
> > jason.merr...@bankofamerica.com> wrote:
> >
> > > Have you tried the Papervision list?  I think these questions specific
> to
> > > Papervision are more appropriate there.
> > >
> > >
> > > Jason Merrill
> > >
> > > Bank of  America   Global Learning
> > > Shared Services Solutions Development
> > >
> > > Monthly meetings on the Adobe Flash platform for rich media experiences
> -
> > > join the Bank of America Flash Platform Community
> > >
> > >
> > >
> > >
> > > -Original Message-
> > > From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
> > > flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Omar Fouad
> > > Sent: Sunday, May 24, 2009 5:49 PM
> > > To: Flash Coders List
> > > Subject: Re: [Flashcoders] Papervision Help
> > >
> > > Well my concern now is, how can I apply a light and a shadow to a
> > > MovieMaterial. I've searched the whole google for it but invain.
> > >
> > > On Sun, May 24, 2009 at 9:18 AM, Ashim D'Silva <
> as...@therandomlines.com
> > > >wrote:
> > >
> > > > Well, papervision will be able to do that, and the docs are quite
> > > > helpful. You'll have to be specific when you search google for this
> > > > stuff though. I did find some nice tutorials on lighting and shaders
> > > > that should be helpful but that I can't remember offhand.
> > > >
> > > > However, you might want to re-evaluate using the default flash 10
> > > > stuff. Lighting and shadowing live is only necessary if your object
> > > > are going to change enough to make a difference. You might find you
> > > > can get away with baking all that into textures and saving your
> > > > processing power.
> > > >
> > > > Ashim
> > > >
> > > > The Random Lines
> > > > My online portfolio
> > > > www.therandomlines.com
> > > >
> > > >
> > > >
> > > > 2009/5/24 Omar Fouad :
> > > > > Hi all,
> > > > >
> > > > > I am working on a project where I need to create 6 circles (planes)
> > > with
> > > > > different colors. the cirlces are placed one over the other and
> > > centered,
> > > > so
> > > > > when I move the mouse down those they rotate to show something like
> a
> > > > > piramid. I could just use the native 3d in Flash but my boss needs
> > each
> > > > > circle to be clickable, have a shadow and be shaded (lighted).
> > > > >
> > > > > I actually played around with papervision lately, using BasicView
> and
> > > > some
> > > > > kind of materials, but now I feel frustrated as I just can't figure
> > out
> > > > how
> > > > > to do this work.
> > > > >
> > > > > Any Ideas?
> > > > >
> > > > > I also cannot find a "decent" papervision explanation on the net.
> > What
> > > I
> > > > am
> > > > > looking for is a conceptual explanation about papervision not just
> > how
> > > to
> > > > > create some shapes and put them on the stage.
> > > > >
> > > > >
> > > > > --
> > > > > Omar M. Fouad -
> > > > > www.omar-fouad.net
> > > > > Cellular: (+20) 1011.88.534
> > > > > Mail: m...@omar-fouad.net
> > > > >
> > > > > This e-mail and any attachment is for authorised use by the
> intended
> > > > > recipient(s) only. It may con

Re: [Flashcoders] how to reload swf in Flash IDE Player

2009-05-28 Thread Hans Wichman
Hi,

one option is loadMovieNum (_root._url, 0);
Possibly attach some keyhandler to it, so you can press space to reload it,
or set up a timer to reload it.

Why do you need it? Editing data ?

regards
JC


On Thu, May 28, 2009 at 5:40 PM, Andrew Sinning wrote:

> To compile and play a movie within Flash, I use control-enter.  But suppose
> I want to reload the local copy of movie within the Flash Player without
> recompiling.  How do I do this?  Rewind seems to do nothing at all.
> ___
> 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] ie 8 flash crashes

2009-05-29 Thread Hans Wichman
Hi list,

we're getting reports some of our flash sites are crashing in ie8, mostly
player 10 it seems.
Anyone experiencing this, it seems to come from BtwVdpCapFilter.dll.

Both content in both as2 and as3 is crashing.

Any insights would be appreciated. This is content that has run fine for
about 3 to 4 years now in previous versions of IE and flash.

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


Re: [Flashcoders] ie 8 flash crashes

2009-06-01 Thread Hans Wichman
Hi,

ok thanks both! I didn't think it was this issue since I'm not using the
webcam and/or video but apparently it is, nice:).

regards
JC

On Fri, May 29, 2009 at 5:52 PM, Anthony Pace wrote:

> //Its a blue tooth webcam video capture filter, and it is not a part of the
> default windows or ie8 installation.  Rename the dll and things should be
> fine.
>
> Hans Wichman wrote:
>
>>  Hi list,
>>
>> we're getting reports some of our flash sites are crashing in ie8, mostly
>> player 10 it seems.
>> Anyone experiencing this, it seems to come from BtwVdpCapFilter.dll.
>>
>> Both content in both as2 and as3 is crashing.
>>
>> Any insights would be appreciated. This is content that has run fine for
>> about 3 to 4 years now in previous versions of IE and flash.
>>
>> regards
>> 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


Re: [Flashcoders] Re: Runtime Align Panel package AS3

2009-06-09 Thread Hans Wichman
Hi Ktu,

seems great, but havent had time to really dive into it, don't take the lack
of response the wrong way it happens now and then, but has nothing to do
with whether or not you're building something great;)

regards,
JC

On Sun, Jun 7, 2009 at 5:54 AM, Ktu  wrote:

> Did anyone check it out at all?
> Any bit of feedback would be good, even if you don't think you personally
> would ever use it.
>
> Capabilities SWF<
> http://www.cataclysmicrewind.com/vizalign/examples/capabilities.html>
> Method Descriptions<
> http://www.cataclysmicrewind.com/vizalign/examples/MethodDescriptions.html
> >
> Documentation 
>
>
> On Thu, Jun 4, 2009 at 5:01 PM, Ktu 
> wrote:
>
> > Hey List,
> >
> > I have created a fairly robust alignment tool I have dubbed VizAlign.
> This
> > package duplicates the align panel and more!
> >
> > License: I was thinking of releasing under GPL.
> >
> > Compiled code size - 5.8kb... for now
> >
> > Features:
> > Straight Forward Human-like API
> > Ignores Nesting
> > Treat Multiple Objects As Groups
> > Works In Full Screen Mode
> > Use As Many Targets As You Need
> > Use As Many Alignment Methods You Need In One Method Call
> > 25 Different Alignment Methods
> > Easily Add New Alignment Methods
> > TruePixel Option For Even Pixel Results
> > Choose To Apply Results Immediately
> > Or Just Get Return Values For Animating
> > 70% Documented Using ASDoc
> >
> > This is an example of the kind of stuff you can do with the VizAlign
> class.
> > Capabilities.html cannot handle grouping options.
> > http://www.cataclysmicrewind.com/viz...abilities.html<
> http://www.cataclysmicrewind.com/vizalign/examples/capabilities.html>
> > http://www.cataclysmicrewind.com/viz...les/groups.swf<
> http://www.cataclysmicrewind.com/vizalign/examples/groups.swf>
> >
> > Method Descriptions:
> >
> http://www.cataclysmicrewind.com/vizalign/examples/MethodDescriptions.html
> >
> > View current documentation here:
> > http://www.cataclysmicrewind.com/vizalign/docs
> >
> >
> > Question: I have ideas for more functionality but am not sure if they are
> > worth it. Are you interested in this type of tool being released and
> > maintained? I see much potential for this package. Do you?
> >
> > If enough people are interested then I will consider adding functionality
> > and reducing file size.
> >
> > Ktu
> >
> >
> >
> >
> ___
> 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] Projector, loaded SWFs and audio files

2009-06-11 Thread Hans Wichman
i just read that post again and boy is that thing old... anyway the basic
idea is still the same, but the execution can be improved:)

On Thu, Jun 11, 2009 at 8:11 PM, Hans Wichman <
j.c.wich...@objectpainters.com> wrote:

> Hi Eric,
>
> are you using as2 or as3?
>
> The basic solution is to look at the url of the loading swf, and make your
> paths relative to that.
> If you make it a little more complex (but usually some splitting and
> joining will be enough) you can use something like this:
> http://objectpainters.com/blog/2007/01/03/where-am-i-relative-paths/
>
> but it's as2.
> I have an as3 version as well if you need it.
>
> greetz
> JC
>
>   On Thu, Jun 11, 2009 at 3:27 PM, Eric E. Dolecki wrote:
>
>> Quick question.
>> I have a projector that loads SWFs on demand. The SWFs are in a
>> subdirectory
>> called "Sections". Each section SWF that loads into the directory loads
>> it's
>> own audio from a folder inside the Sections directory. Works fine on their
>> own, but when loaded into the Projector, the relative path is off as the
>> SWFs loaded into the projector now think they are at the same directory
>> level as the projector and the load audio gets botched.
>>
>> How can I fix this so it works from the SWF themselves as well as within
>> the
>> projector (without embedding the audio anywhere)?
>>
>> E
>> ___
>> 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] Projector, loaded SWFs and audio files

2009-06-11 Thread Hans Wichman
Hi Eric,

are you using as2 or as3?

The basic solution is to look at the url of the loading swf, and make your
paths relative to that.
If you make it a little more complex (but usually some splitting and joining
will be enough) you can use something like this:
http://objectpainters.com/blog/2007/01/03/where-am-i-relative-paths/

but it's as2.
I have an as3 version as well if you need it.

greetz
JC

On Thu, Jun 11, 2009 at 3:27 PM, Eric E. Dolecki  wrote:

> Quick question.
> I have a projector that loads SWFs on demand. The SWFs are in a
> subdirectory
> called "Sections". Each section SWF that loads into the directory loads
> it's
> own audio from a folder inside the Sections directory. Works fine on their
> own, but when loaded into the Projector, the relative path is off as the
> SWFs loaded into the projector now think they are at the same directory
> level as the projector and the load audio gets botched.
>
> How can I fix this so it works from the SWF themselves as well as within
> the
> projector (without embedding the audio anywhere)?
>
> E
> ___
> 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] flash stops redrawing the stage

2009-06-26 Thread Hans Wichman
Hi list,

I have an app in AS2, which I run in flash player 10.
If I use fscommand ("fullscreen", "true") and mouseover the stage a lot,
flash simply stops redrawing the stage.
I can click on stuff, I hear sounds from a video thats playing, but I don't
see anything, UNTIL I press escape, at which point the interface exits
fullscreen mode and flash happily starts to redraw the stage again.

Completely stumped, any ideas would be appreciated!

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


Re: [Flashcoders] flash stops redrawing the stage

2009-06-27 Thread Hans Wichman
Hi Karl,

what should I wrap in an onEnterFrame?
The fullscreen call is triggered once at startup.

I've found though that it seems be caused by the 'use hardware accerelation'
flag.
If I disable hardware acceleration the problem goes away.

grrr
Hans

On Fri, Jun 26, 2009 at 10:55 PM, Karl DeSaulniers wrote:

> Have you tried wrapping in an onEnterFrame? May make it slow though.
>
> Karl
>
> Sent from losPhone
>
>
> On Jun 26, 2009, at 7:15 AM, Hans Wichman 
> wrote:
>
>   Hi list,
>>
>> I have an app in AS2, which I run in flash player 10.
>> If I use fscommand ("fullscreen", "true") and mouseover the stage a lot,
>> flash simply stops redrawing the stage.
>> I can click on stuff, I hear sounds from a video thats playing, but I
>> don't
>> see anything, UNTIL I press escape, at which point the interface exits
>> fullscreen mode and flash happily starts to redraw the stage again.
>>
>> Completely stumped, any ideas would be appreciated!
>>
>> 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] difference in player 10 and player 8 while playing the same 8 content

2009-06-28 Thread Hans Wichman
Hi List,

most of you probably already know, but there are some differences between
player 10 and 8 when playing 8 content.
One was the performance of the same content, running notably better in
player 10, that appeared to be the (buggy on my pc) hardware accelaration
amongst other things.

But I've found some other issues as well. My reflection class runs fine in
auto bounds detection mode in player 10, but not for all content in player 8
(the same swf), this means that player 10 initializes 8 content differently
from player 8 then it does in 10, or that the getBounds methods work
differently, haven't figured that out yet.
Another thing is that loadClip ("myimage.jpg?blabla") works fine in 10, but
doesn't in 8 (yeah the ?blablah doesn't have to be there, but still).

Anyway moral of the story, I've found that when developing stuff I now have
to test it against player 8,9 and 10. And I'm not even doing exotic stuff
:). Gotta love it.
What is a great help to me is not using any paths directly but pass them all
through some sort of Path.normalize (myPath) method, that way if you find
something weird, it's easy to fix in one place.

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


Re: [Flashcoders] flash stops redrawing the stage

2009-06-29 Thread Hans Wichman
Hi Karl,

no problem, I'm glad you're thinking along. Most problems I seem to
encounter don't involve any non-working-code but rather player bugs etc.
I've tried the same swf on another pc and it runs fine. I'm starting to
think my pc requires a reinstall:).
thanks!
Hans


On Sun, Jun 28, 2009 at 11:36 PM, Karl DeSaulniers wrote:

> :) - Hi Hans
> I guess I was thinking that the user initiated the "Full-Screen" somehow by
> a button or something. I was thinking that if you had the code that
> controlled wither the movie was playing in full screen or not wrapped in an
> onEnterFrame, it would keep it in "Full Screen" when you had it "in-frame"
> per say, or something to that effect. Sorry I didn't get a chance to see
> your code, so I apologize, I was more so just guessing.
>
> Hope you fine the solution.
>
> Best,
>
> Karl
>
>
> On Jun 28, 2009, at 1:22 AM, Hans Wichman wrote:
>
> Hi Karl,
>>
>> what should I wrap in an onEnterFrame?
>> The fullscreen call is triggered once at startup.
>>
>> I've found though that it seems be caused by the 'use hardware
>> accerelation'
>> flag.
>> If I disable hardware acceleration the problem goes away.
>>
>> grrr
>> Hans
>>
>> On Fri, Jun 26, 2009 at 10:55 PM, Karl DeSaulniers > >wrote:
>>
>> Have you tried wrapping in an onEnterFrame? May make it slow though.
>>>
>>> Karl
>>>
>>> Sent from losPhone
>>>
>>>
>>> On Jun 26, 2009, at 7:15 AM, Hans Wichman <
>>> j.c.wich...@objectpainters.com>
>>> wrote:
>>>
>>>  Hi list,
>>>
>>>>
>>>> I have an app in AS2, which I run in flash player 10.
>>>> If I use fscommand ("fullscreen", "true") and mouseover the stage a lot,
>>>> flash simply stops redrawing the stage.
>>>> I can click on stuff, I hear sounds from a video thats playing, but I
>>>> don't
>>>> see anything, UNTIL I press escape, at which point the interface exits
>>>> fullscreen mode and flash happily starts to redraw the stage again.
>>>>
>>>> Completely stumped, any ideas would be appreciated!
>>>>
>>>> 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
>>
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.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] [OT] generate serial for onlinepayment

2009-07-02 Thread Hans Wichman
Hi List,

this is a bit off topic, but I need to generate a serial for an online
payment.

Basic process is:
* customer pays
* mail with invoice and serial should be generated including account data
* customer logs into account with data from email, downloads game
* installs game using given serial

Seems to me there should be out of the box solutions for this, but I'm
having a hard time finding any.
Currently I'm thinking about using paypal, ipn and a custom script.

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


Re: [Flashcoders] rendering 3d model of a car for use in flash as an image sequence (360)

2009-07-02 Thread Hans Wichman
Hi,

if you are rendering it to jpg's what does the polygon count matter? Crank
it up until it looks so good you're pc is on its knees:)
We've been doing like wise things, which required about 180 jpg's, but you
might be able to skip a lot of those using some nice effects.
In addition in our setup you can only stop every 20 frames I think, and all
the frames in between (while moving) are lower quality to save filesize.

regards,
JC

On Thu, Jul 2, 2009 at 3:02 PM, Matt Muller  wrote:

> Hi, I am about to get some rendered frames of a car for a 360 as a targa
> sequence for use in flash as an image (JPG's) sequence.
>
> Does anyone know what the optimum target polygon count is for the vehicle
> exterior?
>
> Does anyone know roughly how many JPGs will be needed to create a smooth
> sequence?
>
> Any other tips or tricks or URL' s greatly appreciated.
>
> thanks,
>
> 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] papervision as2 mouse projection

2009-07-24 Thread Hans Wichman
Hi list,

I need to find the coordinates of a mouseclick within a plane in
actionscript 2 papervision and I can't figure out how to do it.
Has anyone got any pointers for me, my 3d math skills are vry rusty?

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


Re: [Flashcoders] papervision as2 mouse projection

2009-07-24 Thread Hans Wichman
Hi,

yes the as3 version does:)
But I'm very lucky to be stuck on the same as2 project for 5 years in a
row...

However I chose the easy way out, I've drawn the hotspot in a separate layer
and now I can click.
Not sure how this is going to add up performance wise, but time will tell!

tnx
JC

On Fri, Jul 24, 2009 at 2:35 PM, Glen Pike wrote:

> Hi,
>
>   I thought that PaperVision provided that information for you - check the
> docs...
>
>   Glen
>
> Hans Wichman wrote:
>
>>  Hi list,
>>
>> I need to find the coordinates of a mouseclick within a plane in
>> actionscript 2 papervision and I can't figure out how to do it.
>> Has anyone got any pointers for me, my 3d math skills are vry rusty?
>>
>> regards,
>> 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


Re: [Flashcoders] papervision as2 mouse projection

2009-07-28 Thread Hans Wichman
Ok,

it seems the as2 papervision horribly distorts the perspective, and each
addded hotspot makes the panorama slower.

So back at square one.
Essentially what I'm looking for is a panorama that takes 6 cube faces and a
hotspot definition and generates a cool panorama with hotspots that light up
as you mouse over them in 3d space, and that all in as2 :).

So I'm looking for the documentation that provides me with the knowledge on
how cubic panorama's work... yes grasping at straws here:), any pointers
pretty plz...

regards,
JC

On Fri, Jul 24, 2009 at 3:37 PM, Hans Wichman <
j.c.wich...@objectpainters.com> wrote:

> Hi,
>
> yes the as3 version does:)
> But I'm very lucky to be stuck on the same as2 project for 5 years in a
> row...
>
> However I chose the easy way out, I've drawn the hotspot in a separate
> layer and now I can click.
> Not sure how this is going to add up performance wise, but time will tell!
>
> tnx
> JC
>
>   On Fri, Jul 24, 2009 at 2:35 PM, Glen Pike wrote:
>
>> Hi,
>>
>>   I thought that PaperVision provided that information for you - check the
>> docs...
>>
>>   Glen
>>
>> Hans Wichman wrote:
>>
>>>  Hi list,
>>>
>>> I need to find the coordinates of a mouseclick within a plane in
>>> actionscript 2 papervision and I can't figure out how to do it.
>>> Has anyone got any pointers for me, my 3d math skills are vry rusty?
>>>
>>> regards,
>>> 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


Re: [Flashcoders] dynamically capture and display the name of the currently executing function in the Output panel

2009-07-29 Thread Hans Wichman
Yep only in debug player.
Annoying as this was perfectly possible in as 2 (and easy as well). No good
way in as3 though.

Here is one method beside throwing an error and parsing the stack, but it
has to be improved, just show the basic idea (which is kinda the same as in
as2):

  private var d:Dictionary = new Dictionary();

  public function TestOne():void
  {
   var methodNames:Array = getNonstaticAccessors(TestOne);
   for (var i:Number = 0; i < methodNames.length; i++ ) {
d[this[methodNames[i]]] = methodNames[i];
   }

   init();
  }

  public static function getNonstaticAccessors(classOfInterest:Class):Array
{
   var xmlDescriptionOfClass:XML = describeType(classOfInterest);
   var nonstaticAccessorsXML:XMLList = xmlDescriptionOfClass.factory.method;
   var accessors:Array = [];
   for each (var accessorXML:XML in nonstaticAccessorsXML) {
accessors.push(accessorx...@name);
   }
   return accessors;
  }

public function init(e:Event = null):void
  {
  trace (d[arguments.callee]);
}

Only works for public methods though, private methods have to be registered
explicitly.

I think that a utility to parse the bytecode and add this information on the
fly should be possible though:)

regards,
JC



On Tue, Jul 28, 2009 at 11:27 PM, Steve Mathews  wrote:

> There is a way to this as a hack. No good way though.
> The hack way is to do a try catch, throw an error in the try and parse the
> error message in the catch. Only works with the debug player I believe.
>
>
> On Tue, Jul 28, 2009 at 11:51 AM, Cor  wrote:
>
> > Question: Is there a simple way to dynamically capture and display the
> name
> > of the currently executing function in the Output panel?
> >
> > Sample function:
> >
> > function doStuff ():void {
> > trace ("Function: doStuff()" );
> > //run doStuff code...
> > }
> >
> > Without hardcoding the name of the function in the trace statement shown
> > above, can I somehow display the function name dynamically when it runs?
> > I've never seen this done but thought I'd ask anyway
> >
> > TIA
> > Cor
> > ___
> > 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] palet of an index based image

2009-07-29 Thread Hans Wichman
Hi folks,

the subject is probably incorrect english, but what I meant was:
is it possible when saving an indexed coloured image from say photoshop, to
load it in flash (as2) and access and modify the underlying palette
directly?

As far as my tests have shown, the image data is completely converted to
32-bit pixel data, and the palette is lost.
Correct?

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


Re: [Flashcoders] ExternalInterface.call not working on desktop...??

2009-07-31 Thread Hans Wichman
Hi,

html on the desktop is not going work, but you might have some luck when
updating the security settings.
I have the following batch file in most of my projects:
@echo off
rem echo %APPDATA%
rem echo %CD%
echo [Enter name for security file inserted into %APPDATA%]:
echo (use a single keyword, no spaces, no dots and no .cfg in it)
SET /p fileName=
echo Creating %APPDATA%\Macromedia\Flash
Player\#Security\FlashPlayerTrust\%fileName%.cfg
echo %CD% >> "%APPDATA%\Macromedia\Flash
Player\#Security\FlashPlayerTrust\%fileName%.cfg"

Store it in a batch file in the same dir as your fla, run it and enter some
bogus keyword to identify your settings with, eg desktop.

regards
JC

On Fri, Jul 31, 2009 at 1:08 AM, Barry Hannah  wrote:

> AFAIK ExternalInterface doesn't work in the standalone player, only in the
> browser.
>
> You should be getting error messages to that effect. You can test whether
> or not it's available to use with the Boolean ExternalInterface.available
> property.
>
>
> BH
>
>
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of BOYD SPEER
> Sent: Friday, 31 July 2009 10:49 a.m.
> To: Flash Coders List
> Subject: Re: [Flashcoders] ExternalInterface.call not working on
> desktop...??
>
> The menu.swf actually is set to "Access local files only" and seems to work
> only from the website...
>
> Thanks for responding Karl... would changing the setting to "Access network
> files only" allow a broader or narrower selection of files...?
>
> - Original Message -
> From: Karl DeSaulniers 
> Date: Thursday, July 30, 2009 5:31 pm
> Subject: Re: [Flashcoders] ExternalInterface.call not working on
> desktop...??
> To: Flash Coders List 
>
> > Check you publish settings, you probably have it set to network only.
> >
> > Karl
> >
> >
> > On Jul 30, 2009, at 5:21 PM, BOYD SPEER wrote:
> >
> > > Hi all,
> > > I am probably missing something obvious but I have a flash
> > .swf in
> > > embedded in .html and an ExternalInterface.call( to javascript).
> > > It works great  from my website in both I.E. and Firefox -
> > but not
> > > from the computer desktop (even though all the files are in
> > the
> > > same relationship in their folders, etc..) Is there some
> > security
> > > setting or other setting that I need to check to make this
> > work? or
> > > is it just not possible?
> > > Thanks for any insights!
> > >
> > > -Boyd
> > >
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Karl DeSaulniers
> > Design Drumm
> > http://designdrumm.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
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] LocalConnection: call functions on passed object

2009-08-03 Thread Hans Wichman
Hi,
nope, but wouldn't it be nice:)

greetz
JC

On Sun, Aug 2, 2009 at 4:16 PM, Andrew Sinning wrote:

> Using the LocalConnection object, is it be possible to pass a reference to
> an object from one movie to another, and hence forth call functions within
> the passed object directly, without having to go through the
> LocalConnection?
>
> This is in AS3.
> ___
> 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] Preloading FLV with NetStream

2009-08-07 Thread Hans Wichman
Hi,

I stumbled on this thread and kind of need to do the same thing.
I have an area where a number of persons should be walking around randomly.

I was thinking about something like this:
* each person gets 4 flv's: (or 2 if i mirror them): turn right, walk right,
turn left, walk left
* all the flv's get preloaded
* a player class plays 'walk right' for x times, then 'turn left', 'walk
left' for y times (x & y are random), 'turn right' and repeat

Is this feasible? Can I put 6 video objects on stage without any problems?
And concerning the preloading, I was thinking about simply setting
bufferTime to a very high value or is that naive?
Is preloading all the flv's in the cache and keeping the bufferTime as
normal a better option?
What happens if the user has disabled his/her browser cache?

Another option would be to load the walk cycles as still images, not sure
what the better option, your opinion is appreciated:)

regards
JC




On Wed, Apr 4, 2007 at 6:49 PM, Jack Doyle  wrote:

> The PreloadAssetManager class simply preloads your assets into your
> browser's cache; it is not meant to be used for playback or managing your
> FLVs once they're preloaded. There's nothing special that you need to do
> in
> order to access the preloaded FLVs - just call them as you normally would
> either using a NetStream object of your own or an FLVPlayback component or
> whatever. The user's browser will be smart enough to used the cached FLVs
> instead of going out to the web and downloading them again.
>
> You might want to search the Flash Help files for NetStream or
> FLVPlayback.
>
> Jack
>
> -Original Message-
> Date: Wed, 04 Apr 2007 10:59:02 -0400
> From: leolea 
>  Subject: Re: [Flashcoders] Preloading FLV with NetStream
> To: flashcoders@chattyfig.figleaf.com
> Message-ID: 
> 
> >
> Content-Type: text/plain; charset=US-ASCII
>
>
> Preloading works super fine! Thank you very much for this class.
>
> I am preloading a bunch of FLVs. Once they get at 100%, how do I access
> them
> using a NetStream object (or other) ?
>
> (I need to implement something that initates the playback of the first
> one,
> when it reaches the end I must start the second one, so on...)
>
>
> On 4/3/07 6:42 PM, "Jack Doyle"  wrote:
>
> > Yep, you can preload FLVs with the NetStream. Check out the
> > PreloadAssetManager class which will handle it all for you:
> > http://www.greensock.com/ActionScript/PreloadAssetManager
> >
> > Jack
> >
> > -Original Message-
> > Date: Tue, 03 Apr 2007 16:04:35 -0400
> > From: leolea 
> > Subject: [Flashcoders] Preloading FLV with NetStream
> > To: Flashcoders mailing list 
> > Message-ID: 
> > 
> >
> > Content-Type: text/plain; charset=US-ASCII
> >
> > Hi,
> >
> > Is it possible, using the NetStream object, to "preload" a FLV.
> >
> > I have multiple FLV videos that I need to play back-to-back smoothly. I
> want
> > all of them to be preloaded so that when I start playback it doesn't
> buffer
> > or lag in any way.
> >
> > I can't seem to find a way so my next alternative would be to use SWF
> with
> > MovieClipLoader. I'd like to avoid that.
> >
> > Thanks
>
>
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Preloading FLV with NetStream

2009-08-07 Thread Hans Wichman
Hmm Jack is there an as3 version of that cool PreloadManager as well:)?
greetz
JC

On Fri, Aug 7, 2009 at 10:13 AM, Hans Wichman <
j.c.wich...@objectpainters.com> wrote:

> Hi,
>
> I stumbled on this thread and kind of need to do the same thing.
> I have an area where a number of persons should be walking around randomly.
>
> I was thinking about something like this:
> * each person gets 4 flv's: (or 2 if i mirror them): turn right, walk
> right, turn left, walk left
> * all the flv's get preloaded
> * a player class plays 'walk right' for x times, then 'turn left', 'walk
> left' for y times (x & y are random), 'turn right' and repeat
>
> Is this feasible? Can I put 6 video objects on stage without any problems?
> And concerning the preloading, I was thinking about simply setting
> bufferTime to a very high value or is that naive?
> Is preloading all the flv's in the cache and keeping the bufferTime as
> normal a better option?
> What happens if the user has disabled his/her browser cache?
>
> Another option would be to load the walk cycles as still images, not sure
> what the better option, your opinion is appreciated:)
>
> regards
> JC
>
>
>
>
> On Wed, Apr 4, 2007 at 6:49 PM, Jack Doyle  wrote:
>
>> The PreloadAssetManager class simply preloads your assets into your
>> browser's cache; it is not meant to be used for playback or managing your
>> FLVs once they're preloaded. There's nothing special that you need to do
>> in
>> order to access the preloaded FLVs - just call them as you normally would
>> either using a NetStream object of your own or an FLVPlayback component or
>> whatever. The user's browser will be smart enough to used the cached FLVs
>> instead of going out to the web and downloading them again.
>>
>> You might want to search the Flash Help files for NetStream or
>> FLVPlayback.
>>
>> Jack
>>
>> -Original Message-
>> Date: Wed, 04 Apr 2007 10:59:02 -0400
>> From: leolea 
>>  Subject: Re: [Flashcoders] Preloading FLV with NetStream
>> To: flashcoders@chattyfig.figleaf.com
>> Message-ID: 
>> 
>> >
>> Content-Type: text/plain; charset=US-ASCII
>>
>>
>> Preloading works super fine! Thank you very much for this class.
>>
>> I am preloading a bunch of FLVs. Once they get at 100%, how do I access
>> them
>> using a NetStream object (or other) ?
>>
>> (I need to implement something that initates the playback of the first
>> one,
>> when it reaches the end I must start the second one, so on...)
>>
>>
>> On 4/3/07 6:42 PM, "Jack Doyle"  wrote:
>>
>> > Yep, you can preload FLVs with the NetStream. Check out the
>> > PreloadAssetManager class which will handle it all for you:
>> > http://www.greensock.com/ActionScript/PreloadAssetManager
>> >
>> > Jack
>> >
>> > -Original Message-
>> > Date: Tue, 03 Apr 2007 16:04:35 -0400
>> > From: leolea 
>> > Subject: [Flashcoders] Preloading FLV with NetStream
>> > To: Flashcoders mailing list 
>> > Message-ID: 
>> > 
>> >
>> > Content-Type: text/plain; charset=US-ASCII
>> >
>> > Hi,
>> >
>> > Is it possible, using the NetStream object, to "preload" a FLV.
>> >
>> > I have multiple FLV videos that I need to play back-to-back smoothly. I
>> want
>> > all of them to be preloaded so that when I start playback it doesn't
>> buffer
>> > or lag in any way.
>> >
>> > I can't seem to find a way so my next alternative would be to use SWF
>> with
>> > MovieClipLoader. I'd like to avoid that.
>> >
>> > Thanks
>>
>>
>>
>>
>> ___
>> Flashcoders@chattyfig.figleaf.com
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Interface for displayObjects

2009-08-07 Thread Hans Wichman
Hi,

when you declare them like this:
var myObj1:MyInterface
addChild (myObj1) wont work

if you do
var myObj1:Sprite = ...
addChild (myObj1)

it probably will.

The thing is that you essentially provide two different interfaces for your
object. By extending Sprite you satisfy the DisplayObject requirement for
addChild(). By implementing your interface you satisfy the requirement for
your own class that the objects have to of a certain interface. Telling your
own class, here is a display object isn't going to work, since it needs the
interface, vice versa telling the display list here is my own interface
isn't going to work either, you have to pass the objects in the form
expected in both cases.

hth,
JC




On Fri, Aug 7, 2009 at 10:00 AM, Tom Huynen  wrote:

> Hi!
>
> I have a tiny little problem with the following:
>
> I have two classes that should have the same dataType in order to use them
> in a third class. So I created an Interface that both of them implement.
> The two classes extend Sprite because they have a visual representation.
> However, when I try to add them to the displayList flash doesn't recognise
> them as a displayObject.
> I read that many people at this moment cast them back to a displayObject
> but
> that to me feels like a workaround.
>
> Anybody any suggestions?
>
> Thanks!
>
> Tom
> ___
> 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] Preloading FLV with NetStream

2009-08-07 Thread Hans Wichman
Hi Paul,

ok thanks cool.
Meanwhile I've whipped up a sample using flv's but I might have to switch to
images like you said!
If anyone would care to see if this works okay on their browsers it'd be
appreciated:
http://www.wichman-media.com/misc/bin/

The awesome floor texture:) will become a 3d background, the arrows will
become persons walking to and fro, the line will become a microphone
allowing you to interview people. And yes its a prototype and looks like
crap ;)

player 10 required btw

tia!
Hans



On Fri, Aug 7, 2009 at 11:42 AM, Paul Andrews  wrote:

> Hans Wichman wrote:
>
>> Hi,
>>
>> I stumbled on this thread and kind of need to do the same thing.
>> I have an area where a number of persons should be walking around
>> randomly.
>>
>> I was thinking about something like this:
>> * each person gets 4 flv's: (or 2 if i mirror them): turn right, walk
>> right,
>> turn left, walk left
>> * all the flv's get preloaded
>> * a player class plays 'walk right' for x times, then 'turn left', 'walk
>> left' for y times (x & y are random), 'turn right' and repeat
>>
>> Is this feasible? Can I put 6 video objects on stage without any problems?
>> And concerning the preloading, I was thinking about simply setting
>> bufferTime to a very high value or is that naive?
>> Is preloading all the flv's in the cache and keeping the bufferTime as
>> normal a better option?
>> What happens if the user has disabled his/her browser cache?
>>
>> Another option would be to load the walk cycles as still images, not sure
>> what the better option, your opinion is appreciated:)
>>
>>
> I have done this for people silhouettes using walk cycles generated with
> poser!
>
> Basically it was used to build a pseudo crowd-scene (lots of instances of
> the movieclips) with the movement of the people controlled with
> actionscript. No video,  just frame by frame walk cycles playing in a
> movieclip controlled by actionscript. Given your application I would use
> that exact same technique again, or at least experiment with it.
>
> Paul
>
>> regards
>> 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


Re: [Flashcoders] Preloading FLV with NetStream

2009-08-07 Thread Hans Wichman
lol it's the vanishing point actually:) but thanks for checking and the tip
about the feet!

On Fri, Aug 7, 2009 at 1:22 PM, Paul Andrews  wrote:

> Hans Wichman wrote:
>
>> Hi Paul,
>>
>> ok thanks cool.
>> Meanwhile I've whipped up a sample using flv's but I might have to switch
>> to
>> images like you said!
>> If anyone would care to see if this works okay on their browsers it'd be
>> appreciated:
>> http://www.wichman-media.com/misc/bin/
>>
>> The awesome floor texture:) will become a 3d background, the arrows will
>> become persons walking to and fro, the line will become a microphone
>> allowing you to interview people. And yes its a prototype and looks like
>> crap ;)
>>
>>
> Seems to work OK. The sound man is already ready - I can see his mike at
> the top of the movie!  ;-)
>
> Just one thing to be careful about when doing this kind of thing where the
> feet are visible (this is an old walk cycle problem).
>
> If the feet are visible and the character is moving, the speed at which the
> character can be moved without looking as though they are doing some variant
> of a MJ moonwalk will be determined by the walkcycle animation. Move too
> fast and they look like they are being dragged along the ground. Too slow
> and the moonwalk springs to mind.
>
> Paul
>
>
>
>
> player 10 required btw
>>
>> tia!
>> Hans
>>
>>
>>
>> On Fri, Aug 7, 2009 at 11:42 AM, Paul Andrews  wrote:
>>
>>
>>
>>> Hans Wichman wrote:
>>>
>>>
>>>
>>>> Hi,
>>>>
>>>> I stumbled on this thread and kind of need to do the same thing.
>>>> I have an area where a number of persons should be walking around
>>>> randomly.
>>>>
>>>> I was thinking about something like this:
>>>> * each person gets 4 flv's: (or 2 if i mirror them): turn right, walk
>>>> right,
>>>> turn left, walk left
>>>> * all the flv's get preloaded
>>>> * a player class plays 'walk right' for x times, then 'turn left', 'walk
>>>> left' for y times (x & y are random), 'turn right' and repeat
>>>>
>>>> Is this feasible? Can I put 6 video objects on stage without any
>>>> problems?
>>>> And concerning the preloading, I was thinking about simply setting
>>>> bufferTime to a very high value or is that naive?
>>>> Is preloading all the flv's in the cache and keeping the bufferTime as
>>>> normal a better option?
>>>> What happens if the user has disabled his/her browser cache?
>>>>
>>>> Another option would be to load the walk cycles as still images, not
>>>> sure
>>>> what the better option, your opinion is appreciated:)
>>>>
>>>>
>>>>
>>>>
>>> I have done this for people silhouettes using walk cycles generated with
>>> poser!
>>>
>>> Basically it was used to build a pseudo crowd-scene (lots of instances of
>>> the movieclips) with the movement of the people controlled with
>>> actionscript. No video,  just frame by frame walk cycles playing in a
>>> movieclip controlled by actionscript. Given your application I would use
>>> that exact same technique again, or at least experiment with it.
>>>
>>> Paul
>>>
>>>
>>>
>>>> regards
>>>> 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


Re: [Flashcoders] How to Exit/Close the Web Browser from Flash Applications?

2009-08-07 Thread Hans Wichman
The timeout is a good idea, I realized I stopped doing that somewhere along
the way, but especially macs as well had a knack for crashing if the calling
object was destroyed in the process of the call.

On Fri, Aug 7, 2009 at 4:15 PM, Jer Brand  wrote:

> Here's a simple example. Note that if you don't "own" the window your flash
> is running in -- you opened it with window.open(...) --  this code will
> again prompt the user if they really want to close the window in IE, or do
> nothing (Firefox, chrome, etc).
>
> There are ways around that, but I can't bring myself help others be evil.
> ;-)
>
> Anyway:
> --
> in the flash:
>
>
> import flash.external.ExternalInterface;
>
> function onUserConfirmedTheyWantToExit():void
> {
>ExternalInterface.call("closeWindowAsync", "") ;
> }
>
>
> in the HTML page
> 
> function closeWindowAsync()
> {
> setTimeout("closeWindowCallback()", 500) ;
> }
> function closeWindowCallback()
> {
> window.close() ;
> }
> 
>
> 
>
>
> The use of setTimeout in the javascript is there because of some problems
> we
> had calling "window.close" directly in IE6 (very weird IE-locking bugs if
> there were other browser windows open).
>
> Jer
>
>
> On Fri, Aug 7, 2009 at 8:38 AM,  wrote:
>
> >
> > Hello,
> > How to Exit/Close the Web Browser from Flash  Applications?
> > Could anyone suggest a code to exit the flash application and  close the
> > web browser window?
> > I realize, the solution might be using ExternalInterface with  JS.  The
> > question is how?
> > The user can exit the flash application by clicking on an exit  button or
> > he/she can click on the Window “X”.
> > When clicking either on the “exit” button or on the Window “X”,  the
> > flash application will show an alert message, asking the user whether
> > he/she
> > really want to exit.  Upon clicking  “yes” the application and web
> browser
> > will close.
> > Therefore, when the user clicks on the Window “X” the flash  application
> > needs to detect this click.
> > Thanks,
> > Daniel Abramovich
> > **A Good Credit Score is 700 or Above. See yours in just 2
> easy
> > steps!
> > (
> >
> http://pr.atwola.com/promoclk/100126575x1222846709x1201493018/aol?redir=http://www.freecreditreport.com/pm/default.aspx?sc=668072&hmpgID=115&bcd
> > =JulystepsfooterNO115)
> > ___
> > 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] actionscript 3 block rationale

2009-08-18 Thread Hans Wichman
Hey list,

does anyone know the cool rationale behind the fact that the compiler won't
allow me to execute a completely sane piece of code such as:

private function _demo():void {
for (var i:Number = 0; i < 10;i++) {
  //evil stuff here
}
 for (var i:Number = 0; i < 10;i++) {
  //evil stuff here
}
}

(getting a redefined blablah variable, to which there is no workaround but
to rename the loop variables I think)

But WILL allow me to do something stupid like:

  private function _demo():void {
   for (var i:int = 0; i < 10; i++)
   {
trace (this[j]);
   }
   var j:Object = null;
  }


:)

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


  1   2   3   4   5   6   7   8   >