Re: [Flashcoders] Actionscript lives on.

2012-09-17 Thread Ben Sand
Agreed.

By converting from vectored to rastered art for some of our complex
components we tripled the frame rate in Flash.

At the same time, we converted our character from 6MB to 42KB by converting
it from a sprite sheet into animated components in Flash, but it took the
artist quite a while! (still raster mind you, but not sprites)

On 17 September 2012 17:54, Henrik Andersson  wrote:

> Paul Andrews skriver:
> > Adobe has said for years that mobile platforms should use bitmaps to
> > conserve processor utilisation. The other real problem with flash is
> > that some developers use inefficient processing loops that eat up
> > processing power - I can often see it on my laptop when the fan suddenly
> > kicks in after I've launched a flash app.
> >
>
> I am of the opinion that things can be stored as vectors and then cached
> as bitmaps at runtime. The issue here is that the built in caching is
> limited to just one version of each object and objects can't share caches.
>
> Flash needs a more powerful caching system for rasterized vector art.
> ___
> Flashcoders mailing list
> Flashcoders@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] Converting a flash game to facebook app

2012-05-31 Thread Ben Sand
The way an app should work (and bear in mind this could be different for
hosted games):


Tracking of an individual user should all be handled as per normal with
your server, using cookies. You should be able to find a user account
plugin for whatever framework you're working with to manage this for you.
Ideally find one that integrates with facebook to make your life easier.

The client shouldn't communicate with Facebook directly, except to get
publicly available data, such as a small profile pic of any user.

Background:
* You as a developer create an App on Facebook, specifying the permission
the app should have, eg. see friend lists, create events, read messages,
post on wall etc.
(for some reason you also specify this when you connect to the facebook
servers, not sure why...). Facebook then issues you with an API key/secret
for your app. You can recreate this if it becomes compromised in some way.

* Your server holds the facebook API key.

1. Client talks to your server and asks to login/authenticate.
2. Your server redirects client to Facebook, with a login request for your
app and a list of permissions (again, not sure why this needs to be
repeated, possibly because you're allowed to request a subset of
permissions).
3. Facebook presents the app name and a list of desired permissions and
asks the user to agree. The screen used to do this changes all the time,
which is quite annoying, they don't seem to have worked out an ideal
presentation for it yet.
4. If the user accepts, your app gets notified (probably by the user,
although it might be by facebook) and the user is redirected to your site.
At any rate. you now have a user token that can be used to connect to
facebook to enquire about the user.
5. At any point in time, using a combination of your API key and the user
token your server can access the permissions the user granted you, by
contacting facebook directly.

If you release the API key, at the very least, someone can masquerade as
your app. They may be able to access data for users they don't have a token
for, not sure about that.

And one more fun thing we found out the other day - if a user changes their
password, the token will change, and your app needs to have some mechanism
for updating it, or the user will likely hit a 500 error.

On 1 June 2012 04:13, Hans Wichman  wrote:

> Hi Henrik,
>
> not to hijack Paul's thread, but do you have some more info on this
> subject. Eg the client would need some way to uniquely id itself to the
> server, lest the server give out this data to anyone which is kind of the
> same as making your api key public?. The client could be decompiled etc
> etc, referrers can be faked.. is there some kind of standard setup that you
> know of that prevents this?
> My guess it would benefit Paul as well as the rest of us (me;)).
>
> regards,
> Hans
>
> On 31-5-2012 18:00, Henrik Andersson wrote:
>
>> The idea is obviously to let your server be the one who asks the
>> Facebook servers for the data, meaning that the only possible attack
>> points are the server itself and the connection. If your server is
>> compromised then you have fail security. If the connection is
>> compromised then SSL failed. SSL is much less likely to fail.
>>
>> Point is, the client never sees the key.
>>
>> Hans Wichman skriver:
>>
>>> Hi Ben,
>>>
>>> if you put the keys on your server, can't they be sniffed anyway or am i
>>> missing something?
>>> tnx
>>> H
>>>
>>>
>> __**_
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.**com 
>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>
>>
>
> __**_
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.**com 
> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Converting a flash game to facebook app

2012-05-31 Thread Ben Sand
It's fairly straight forward to add facebook functionality to a
website/app, there's lots of apis floating around, or you can just talk to
fb directly. Be aware their API does change over time. I'm not sure how
good they are at maintaining backwards compatibility.

My experience is in external flash app development with facebook
authentication and access to fb data such as friends and groups via ruby on
rails. I haven't done a game on facebook itself.

Be careful with the API keys, for a standard app (ie. just using facebook
for authentication and access to fb data, not hosted on fb itself) the keys
should only be on your server and never put inside the app - since if users
pull them out they can grab personal data of every other user for your app.
I've seen cases of people being a bit lax with this and it's fine if it's
just your team running the app for testing, but you must not do this for a
public app.

On 31 May 2012 02:17, Paul Steven  wrote:

> I am a bit of a dinosaur when it comes to facebook and have been asked to
> turn a flash game into a facebook app.
>
> Before I make a decision on whether I can take on this job I wanted a quick
> heads up on how complex a process is to do this?
>
> Thanks in advance.
>
> ___
> Flashcoders mailing list
> Flashcoders@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] MVC style Correction

2012-02-25 Thread Ben Sand
Different frameworks have different tweaks to the conventions. It's usually
best to have a specific framework in mind when working on this.

Eg. We do things differently in RubyonRails to RobotLegs. I've worked with
Django in the past as well. It has hard blockers to keep logic getting into
the views which occasionally make things incredibly difficult, whereas
Rails doesn't force you as much. Django also calls controllers views and
views templates, in case you're confused when reading their doco.

The best thing is to go with a framework that has the developer culture and
features that you like and then work with their way of doing things. It's
particularly important to follow framework conventions as it makes upgrades
much easier.

On 26 February 2012 02:05, John McCormack  wrote:

> I have really appreciated this thread too.
>
> The basic ideas of MVC seem straight forward enough, but the problems
> arise in implementing it.
>
> Disagreements about the roles inside MVC can really help us understand it.
> So if anyone has a specific example in which they struggled to determine
> the responsibilities of the roles, then it would be good to hear about it.
>
> John
>
>
> __**_
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.**com 
> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Platform roadmap released - time to start learning HTML 5 unless you make games.

2012-02-22 Thread Ben Sand
We are building a full screen game with a novel interface and we need the
power of Flash.

My primary concern is not seeing any mention of Alchemy's successor on the
Roadmap as we are hanging out for it's features.

On 23 February 2012 05:50, James Merrill  wrote:

> http://www.adobe.com/devnet/flashplatform/whitepapers/roadmap.html
>
> A new version of AS3 will be nice, it's just too bad no one wants Flash
> anymore. Flash player is basically dead in the water, with its future usage
> being hardcore gaming. How many of you guys/gals are doing that?
>
>
>
> --
> James Merrill
> ___
> Flashcoders mailing list
> Flashcoders@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] MVC style Correction

2012-02-17 Thread Ben Sand
This is particular to RobotLegs.

RobotLegs links a lot of the components in the Context* and then handles
dependency injection.

Other MVC frameworks may have different approaches, here's a good
comparison of Flash MVC frameworks:
http://www.slideshare.net/RichardLord/application-frameworks-the-good-the-bad-the-ugly

*In RobotLegs there is also the possibility to setup a different type of
Context that uses Signals instead of Events for some communication. This
provides greater type safety, but because signals can't replace all events
it leaves you with two systems to manage, so we ultimately decided against
it.

On 20 February 2012 08:17, John McCormack  wrote:

> That is a great picture.
>
> Does a controller know an instance of a model?
> Orr does the model register with the controller as a subscriber for
> specific data changes or events?
>
> Most of all, I wonder how all the parts gets to know each other.
>
> John
>
>
>
> On 17/02/2012 09:11, Ben Sand wrote:
>
>> maybe this will help:
>> http://www.robotlegs.org/**diagram/ <http://www.robotlegs.org/diagram/>
>>
>> the solid lines are method calls, the dashed lines are events
>>
>> On 17 February 2012 18:58, Cor  wrote:
>>
>>  Jord,
>>>
>>> This is exactly what I don't understand to do in actionscript!
>>> And that's why I think some example will visualize it to me.
>>> So I can analyze the flow of it all.
>>> Feel free to contact me offlist if you prefer.
>>>
>>> Best regards,
>>> Cor van Dooren
>>>
>>>
>>> -Original Message-
>>> From: 
>>> flashcoders-bounces@chattyfig.**figleaf.com[mailto:
>>> flashcoders-bounces@chattyfig.**figleaf.com]
>>> On Behalf Of
>>> jchilcott@**interactivityunlimited.com
>>> Sent: donderdag 16 februari 2012 19:44
>>> To: Flash Coders List
>>> Subject: RE: [Flashcoders] MVC style Correction
>>>
>>>
>>> Models shouldn't have any knowledge of each other or anything outside of
>>> themselves. The controller should usually be the first area to set up.
>>> Everything else is set up and managed by the controller (views, models,
>>> services). Usually, there will be one central controller that handles
>>> your
>>> main program management. Other controllers can be set up and delegated by
>>> the main controller, but this is not always necessary. In a well set up
>>> MVC
>>> application, Models and Views don't talk to each other.
>>> Rather, they let the controller carry out that communication.
>>>
>>> jord
>>>
>>>  Original Message 
>>> Subject: Re: [Flashcoders] MVC style Correction
>>> From: John McCormack
>>> Date: Sat, February 18, 2012 1:22 pm
>>> To: Flash Coders 
>>> List
>>> >
>>>
>>> A really nice explanation.
>>>
>>> I tried to find your EastAsMVC after being on your site, is it on the
>>> way?
>>>
>>> Also, what comes first, ie. how do the models, controller and Views find
>>>
>>> out about each other?
>>>
>>> Does everything register with the (single) controller?
>>>
>>> John
>>>
>>>
>>>
>>>
>>> __**_
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.**com 
>>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>
>>>
>>>
>>> __**_
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.**com 
>>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>
>>>
>>>  __**_
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.**com 
>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>
>>
>>
>>
>>
>>
>
> __**_
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.**com 
> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-02-17 Thread Ben Sand
maybe this will help:
http://www.robotlegs.org/diagram/

the solid lines are method calls, the dashed lines are events

On 17 February 2012 18:58, Cor  wrote:

> Jord,
>
> This is exactly what I don't understand to do in actionscript!
> And that's why I think some example will visualize it to me.
> So I can analyze the flow of it all.
> Feel free to contact me offlist if you prefer.
>
> Best regards,
> Cor van Dooren
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of
> jchilc...@interactivityunlimited.com
> Sent: donderdag 16 februari 2012 19:44
> To: Flash Coders List
> Subject: RE: [Flashcoders] MVC style Correction
>
>
> Models shouldn't have any knowledge of each other or anything outside of
> themselves. The controller should usually be the first area to set up.
> Everything else is set up and managed by the controller (views, models,
> services). Usually, there will be one central controller that handles your
> main program management. Other controllers can be set up and delegated by
> the main controller, but this is not always necessary. In a well set up MVC
> application, Models and Views don't talk to each other.
> Rather, they let the controller carry out that communication.
>
> jord
>
>  Original Message 
> Subject: Re: [Flashcoders] MVC style Correction
> From: John McCormack 
> Date: Sat, February 18, 2012 1:22 pm
> To: Flash Coders List 
>
> A really nice explanation.
>
> I tried to find your EastAsMVC after being on your site, is it on the way?
>
> Also, what comes first, ie. how do the models, controller and Views find
>
> out about each other?
>
> Does everything register with the (single) controller?
>
> John
>
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@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] MVC style

2012-02-16 Thread Ben Sand
We work with two MVC frameworks: RobotLegs in Flash and RubyonRails on the
server.

RubyonRails mandates a "thin controller fat model" paradigm and we try to
user that in Flash as well.

Under this paradigm, wherever possible, things should be in the model. One
good reason for doing this is code reuse. The last thing you want to be
doing is putting the same thing in multiple controllers.

Where context matters, things need to be in the controller, but I usually
then have them call controller methods.

There are different ways of thinking about this, but this is how rails
mandates it and the pattern we follow.

No matter what MVC paradigm you follow, I think everyone would agree the
model is responsible for ensuring data integrity. Any validations etc.
should be in the model as part of the setter methods to ensure only
compliant data ever makes into your value objects / database.

When it comes to permissions we handle them at a controller level, but they
are centralised in a utility configuration. The system we use allows for
model based permissions as well but we find these are too limited as
context matters for permissions and it's hard to deal with this
meaningfully in the model.

On 16 February 2012 05:32, David Hunter  wrote:

> Hello list,
>
> If I am making an application with MVC pattern and calculations are needed
> to be performed on the data when the user interacts with the application,
> would you:
>
> do the calculations in the Model?
>
> create a separate class that handles the calculations and puts the results
> in the model?
>
> do the calculations in the Controller?
>
> looking forward to hearing people's thoughts on this,
>
> david
>
> --
> David Hunter
>
> www.davidhunterdesign.com
> +44 (0) 7869 104 906
> ___
> Flashcoders mailing list
> Flashcoders@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] Large Images with Alpha Channel

2012-02-14 Thread Ben Sand
On 14 February 2012 21:17, Paul Andrews  wrote:

> On 11/02/2012 05:43, Ben Sand wrote:
>
>> I'm working on a game with some large images (up to 4k x 4k)
>>
> I might look at paging images that size - I guess they're backgrounds of
> some sort?
>
Yes, backgrounds that will be panned and zoomed

What do you mean by paging them? breaking them into pieces? we are planning
on doing that so we can hide the portions that are off the stage and
improve performance.'



>
> For the transparency, I'd probably look at creating a shape to act as a
> mask, then you can create a MC or sprite which will have the correct
> transparency, but you won't need a transparent file format.


what do you mean by MC?
will this allow for anti-aliased edges (ie. an alpha gradient)? If the
images are moving relative to one another, will there be much of a
performance overhead, or does the resulting masked image get processed just
once, rather than on every draw.


>
>
> Paul
>
> __**_
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.**com 
> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Large Images with Alpha Channel

2012-02-12 Thread Ben Sand
Thanks Beatrix, that looks very helpful

2012/2/12 Beatrix Krümmer-Frau 

> Hi Ben,
>
> I am not 100% sure what exactly you wnat to achieve.
> But why don't you use 2 jpg's with one as a masc where transperency is
> black.
> You can generate an alpha channel form this.
> Check this: http://www.adobe.com/devnet/**flash/articles/optimize_**
> transparent_images.html<http://www.adobe.com/devnet/flash/articles/optimize_transparent_images.html>
>
> Greatings
> ||
>
> *Beatrix Kruemmer-Frau*
> Director Codergang.com
> Master of Arts in Designer | Developer | CEH-LPIG
>
> www.actionscripthero.org  | @ASHero_org | @birikini
>
>
> Am 11.02.2012 06:43, schrieb Ben Sand:
>
>> I'm working on a game with some large images (up to 4k x 4k)
>>
>> The pngs with alpha channels come out at 5-10MB each and we need to put a
>> few large ones and many smaller ones in the game.
>>
>> jpeg-xr would do the job, but we are targetting Flash 10
>>
>> This blog shows how to combine a jpeg with a png alpha mask to get file
>> sizes down, but it is for HTML5, although they were able to use a flash
>> converter successfully:
>> http://blog.jackadam.net/2010/**alpha-jpegs/<http://blog.jackadam.net/2010/alpha-jpegs/>
>>
>> Is a PNG transparency mask the best way to go, or are there other options
>> to get the file size down?
>>
>> I've found one set of code here:
>> http://www.actionscript.org/**forums/showthread.php3?s=**
>> 9629c531325d52cdececd6ebf1f27a**61&t=215886&page=2<http://www.actionscript.org/forums/showthread.php3?s=9629c531325d52cdececd6ebf1f27a61&t=215886&page=2>
>> I thought I should check here before using it, as we're going to need to
>> do
>> a lot of these...
>>
>> Thanks,
>>
>> Ben
>> __**_
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.**com 
>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>
>>
>>
>>  __**_
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.**com 
> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders<http://chattyfig.figleaf.com/mailman/listinfo/flashcoders>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Large Images with Alpha Channel

2012-02-10 Thread Ben Sand
I'm working on a game with some large images (up to 4k x 4k)

The pngs with alpha channels come out at 5-10MB each and we need to put a
few large ones and many smaller ones in the game.

jpeg-xr would do the job, but we are targetting Flash 10

This blog shows how to combine a jpeg with a png alpha mask to get file
sizes down, but it is for HTML5, although they were able to use a flash
converter successfully:
http://blog.jackadam.net/2010/alpha-jpegs/

Is a PNG transparency mask the best way to go, or are there other options
to get the file size down?

I've found one set of code here:
http://www.actionscript.org/forums/showthread.php3?s=9629c531325d52cdececd6ebf1f27a61&t=215886&page=2
I thought I should check here before using it, as we're going to need to do
a lot of these...

Thanks,

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


[Flashcoders] Re: Flash + jQuery

2011-11-04 Thread Ben Sand
Our server is rails.  Getting flash to talk to it direct results in a lot
of pain as the responses sometimes come back with non 200 status codes, so
most browsers will refuse to pass content through to flash.

I think the simplest solution is to make JavaScript an intermediary.

We looked into intercepting the responses inside rails and rewriting the
status codes, appending the real codes as xml commemts, but this did not
appear to be a stable solution due to the fast moving nature of rails and
the dirtiness of the hack required to achieve this

On Friday, 4 November 2011, Henrik Andersson  wrote:
> You sure that you need javascript to access the server? Flash is
> perfectly capable of making http requests on it's own.
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash + jQuery

2011-11-04 Thread Ben Sand
That'll do the trick, I was wondering whether there was a framework or
paradigm for dealing with this as it things scale.

The app we're building is quite large and we need to keep it maintainable.

We work on RobotLegs, so I suppose some of this would fit into the
services section, but other parts would fit in to the views, so it
feels like it could get a bit out of hand.

It's a bit simpler when some the divide is server side, but when
you've got two client side systems running side by side the
conventions I've seen seem to break down.

On 4 November 2011 17:17, Nathan Mynarcik  wrote:
> Why not use ExternalInterface.call('functionName')?
>
> ExternalInterface
> Documentation
> ___
> Flashcoders mailing list
> Flashcoders@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] Nice looking bit map scaling in flash

2011-11-03 Thread Ben Sand
Openzoom looks great, we're going to test it out in a week.

Thank you also to Henrik for the smoothing suggestion, we're going to
use that in some parts of the app too.

On 21 October 2011 11:15, Ross Sclafani  wrote:
> Best solution for bitmap scaling like that is openzoom , basically a port of 
> silver light deepzoom
>
> Ross P. Sclafani
> Design | Technology | Creative
> 347.204.5714
> http://ross.sclafani.net
> http://www.twitter.com/rosssclafani
>
> On Oct 20, 2011, at 8:04 PM, Ben Sand  wrote:
>
>> Need to zoom a background image. We'd rather do it as a bitmap than a
>> vector.
>>
>> Image will be up to 5120x2880, with the centre portion displaying by
>> default.
>>
>> We'd like to zoom up to double in and half out. ie. assuming a  2560x1440
>> screen.
>> * Zooming in all the way would give: 1280x720 with each pixel double in
>> size
>> * Zooming out all the way would give: 5120x2880 with each pixel halved in
>> size.
>>
>> Scaling will be dynamic, ie. you could zoom to 101%, 102% etc.
>>
>> Can bitmaps look nice doing this, or do we have to use vectors?
>>
>> Thanks,
>>
>> Ben
>> ___
>> Flashcoders mailing list
>> Flashcoders@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] Flash + jQuery

2011-11-03 Thread Ben Sand
What's the best way to get Flash and jQuery communicating?

* I'll need flash to access a rails server via jQuery
* Also be doing a lot of javascript work on the client and need
updates to flow through to flash.

I'd prefer a solution that was flexible and robust, rather than quick
and easy. There will need to be a lot of communication later on.

Thanks,

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


[Flashcoders] Nice looking bit map scaling in flash

2011-10-20 Thread Ben Sand
Need to zoom a background image. We'd rather do it as a bitmap than a
vector.

Image will be up to 5120x2880, with the centre portion displaying by
default.

We'd like to zoom up to double in and half out. ie. assuming a  2560x1440
screen.
 * Zooming in all the way would give: 1280x720 with each pixel double in
size
 * Zooming out all the way would give: 5120x2880 with each pixel halved in
size.

Scaling will be dynamic, ie. you could zoom to 101%, 102% etc.

Can bitmaps look nice doing this, or do we have to use vectors?

Thanks,

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


Re: [Flashcoders] Flash on top of flash

2011-09-21 Thread Ben Sand
This will probable be inconsistent across browsers and operating systems,
however you can always try!

Also, if you can get it to work, you may lose all 2D (and in the future 3D)
acceleration by the video card, as everything will have to be processed in
software

>From memory, window and direct modes allow for 3d, opaque and transparent
specifiy software and allow overlays of other content, eg. html menus
popping up over the flash, possibly other flash player instances too. see
here for more details:

*wmode* - Possible values: window, direct, opaque, transparent, gpu. Sets
the Window Mode property of the Flash movie for transparency, layering,
positioning, and rendering in the browser. If this attribute is omitted, the
default value is "window". For more information, see Using Window Mode
(wmode) 
values
 below.
http://kb2.adobe.com/cps/127/tn_12701.html

On 21 September 2011 16:09, Mikael Enroos  wrote:

> Hi,
>
> I’m trying to position a windowed swf on top of another windowed swf on my
> site. The underlaying swf (windowed) is the main application and now I need
> to add a separate swf on top of it, which is another application.
>
> I tried with some css work including z-layer but without any luck. Has
> anyone else done this?
>
> Mikael Enroos
> Webmaster
>
> ___
> Flashcoders mailing list
> Flashcoders@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] ASyncToken - How does it work / Alternatives

2011-06-30 Thread Ben Sand
We have a lot of client-server communication going on and want the right
responses to match up.

We Currently using URLLoader + URLRequest to send/receive XML from a Ruby on
Rails (v3) server.
We want to keep doing that, until JSON is nice in Flash (v11?), and we don't
plan to us AMF, etc.
We use RobotLegs and I'm currently reading about Promises and Oil, but I'm
not sure how they all fit together yet:
https://github.com/darscan/robotlegs-extensions-Oil

Q1:
How does ASyncToken work?
What is being stored and is it being held by flash, the browser?, sent to
the server and returned?
Does it need server side support/browser support/anything else that I need
to worry about outside of actionscript?

Q2:
Are there alternatives to ASyncToken that don't depend on flex?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] PureMVC vs Cairngorm // who's better?

2011-06-23 Thread Ben Sand
We use robotlegs

On Thursday, 23 June 2011, Jordan L. Chilcott - Interactivity
Unlimited  wrote:
> Huge vote for RobotLegs as well.
>
> jord
> --
> Jordan L. Chilcott
>
> Sent from my iPhone... because I can
>
> On 2011-06-23, at 9:23 AM, "Merrill, Jason"  
> wrote:
>
>> Robotlegs +1
>>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 load and unload swf from different movies

2011-06-14 Thread Ben Sand
You're welcome.

Also, if anyone gets word Adobe has solved this, I'd love to know.

On Tuesday, 14 June 2011, Matt Perkins  wrote:
> Thanks for sharing all of that Ben! I think this addresses some issues that
> I'm having on a project now.
>
>
> Matt Perkins
> -
> http://www.nudoru.com
> http://udon.nudoru.com
>
>
> On Mon, Jun 13, 2011 at 6:57 PM, Ben Sand  wrote:
>
>> While the below shows it is technically unfeasible to completely
>> unload a flex app, that doesn't mean you shouldn't try loading and
>> unloading. It just means if you can't limit the total number of times
>> that it is done, you have to be prepared for the flash player and/or
>> browser to crash / lock up.
>>
>> It Is Impossible To Unload A Flex Application!
>> http://www.dz015.com/?p=166
>>
>> Also see:
>> These guys report some success by replacing the loaded swf:
>> http://forums.adobe.com/thread/26128
>>
>> This says unloadAndStop won't do all that's needed to reclaim the memory:
>> http://forums.adobe.com/message/3645431
>>
>> Here's some other references:
>> http://www.moock.org/blog/archives/000279.html
>> http://gskinner.com/blog/archives/2008/07/additional_info.html
>> http://www.dz015.com/?p=139
>> http://symmetri.blogsome.com/2010/07/28/unloadandstop-memory-problems/
>> http://www.kirupa.com/forum/archive/index.php/t-360573.html
>>
>>
>> On 14 June 2011 08:22, Bassam M  wrote:
>> > Hi Ben
>> > pls give me the link let me go through  it may help, I also had problem
>> with
>> > memory when i try to load movie into another  because I still didn't get
>> the
>> > logic of AS3 for load and unload.
>> >
>> > On Tue, Jun 14, 2011 at 1:32 AM, Ben Sand  wrote:
>> >
>> >> Looked into this a while ago. Bottom line was you can never guarantee
>> >> an unload, so repeated load/unload always have the potential for
>> >> memory leaks.
>> >>
>> >> In the case of Flex apps it was never possible to completely clear
>> >> them from memory.
>> >>
>> >> Our solution was to load other swfs in another window, though I
>> >> appreciate this won't suit everyone. It may be possibleto load them on
>> >> the same page with JavaScript communication between apps. If there is
>> >> a physical overlap between the display areas, eg using z-index of CSS
>> >> you may give up the option of 3d acceleration in flash 11 and there
>> >> may be issues with display on some operating systems/ browsers
>> >>
>> >> On my phone now, but I can give links if you're interested
>> >>
>> >> On Tuesday, 14 June 2011, Bassam M  wrote:
>> >> > hi guys
>> >> > I'm try to move from AS2 to AS3 I did some work with AS3 it seems to
>> be
>> >> easy
>> >> > anyway i have problem with load and unload swf, in AS2 I use to use
>> >> >
>> >> > loadMovie("movie.swf",level)
>> >> > then from the movie.swf" I can use back button to load the main movie
>> >> again
>> >> > or unload the movie if the level more the 0
>> >> > in AS3 I use code
>> >> > menu.movieBtn.addEventListener(MouseEvent.CLICK,loadMovieSwf);
>> >> >
>> >> > function loadMovieSwf(event:Event)
>> >> > {
>> >> > var requestURL:URLRequest = new URLRequest("movie.swf")
>> >> > var loader:Loader = new Loader()
>> >> > loader.load(requestURL)
>> >> > addChildAt(loader)
>> >> >
>> >> > }
>> >> >
>> >> > the problem I'm not able to unload movie from movie.swf I can unload
>> >> > movie.swf from the main movie by this code
>>

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


Re: [Flashcoders] AS3 load and unload swf from different movies

2011-06-13 Thread Ben Sand
While the below shows it is technically unfeasible to completely
unload a flex app, that doesn't mean you shouldn't try loading and
unloading. It just means if you can't limit the total number of times
that it is done, you have to be prepared for the flash player and/or
browser to crash / lock up.

It Is Impossible To Unload A Flex Application!
http://www.dz015.com/?p=166

Also see:
These guys report some success by replacing the loaded swf:
http://forums.adobe.com/thread/26128

This says unloadAndStop won't do all that's needed to reclaim the memory:
http://forums.adobe.com/message/3645431

Here's some other references:
http://www.moock.org/blog/archives/000279.html
http://gskinner.com/blog/archives/2008/07/additional_info.html
http://www.dz015.com/?p=139
http://symmetri.blogsome.com/2010/07/28/unloadandstop-memory-problems/
http://www.kirupa.com/forum/archive/index.php/t-360573.html


On 14 June 2011 08:22, Bassam M  wrote:
> Hi Ben
> pls give me the link let me go through  it may help, I also had problem with
> memory when i try to load movie into another  because I still didn't get the
> logic of AS3 for load and unload.
>
> On Tue, Jun 14, 2011 at 1:32 AM, Ben Sand  wrote:
>
>> Looked into this a while ago. Bottom line was you can never guarantee
>> an unload, so repeated load/unload always have the potential for
>> memory leaks.
>>
>> In the case of Flex apps it was never possible to completely clear
>> them from memory.
>>
>> Our solution was to load other swfs in another window, though I
>> appreciate this won't suit everyone. It may be possibleto load them on
>> the same page with JavaScript communication between apps. If there is
>> a physical overlap between the display areas, eg using z-index of CSS
>> you may give up the option of 3d acceleration in flash 11 and there
>> may be issues with display on some operating systems/ browsers
>>
>> On my phone now, but I can give links if you're interested
>>
>> On Tuesday, 14 June 2011, Bassam M  wrote:
>> > hi guys
>> > I'm try to move from AS2 to AS3 I did some work with AS3 it seems to be
>> easy
>> > anyway i have problem with load and unload swf, in AS2 I use to use
>> >
>> > loadMovie("movie.swf",level)
>> > then from the movie.swf" I can use back button to load the main movie
>> again
>> > or unload the movie if the level more the 0
>> > in AS3 I use code
>> > menu.movieBtn.addEventListener(MouseEvent.CLICK,loadMovieSwf);
>> >
>> > function loadMovieSwf(event:Event)
>> > {
>> > var requestURL:URLRequest = new URLRequest("movie.swf")
>> > var loader:Loader = new Loader()
>> > loader.load(requestURL)
>> > addChildAt(loader)
>> >
>> > }
>> >
>> > the problem I'm not able to unload movie from movie.swf I can unload
>> > movie.swf from the main movie by this code
>> >     loader.unloadAndStop();
>> >     removeChild(_loader);
>> >     loader= null;
>> > but if I place this code in movie.swf I get error
>> > it was easy to do it in AS2 just unloadMovie(level)
>> > I'm doing project with many swf files I have to load it from main page
>> and
>> > go back to main page I hope the problem is clear
>> >
>> > thank you
>> > Bassam
>> > ___
>> > Flashcoders mailing list
>> > Flashcoders@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 Button Behavior

2011-06-13 Thread Ben Sand
Pretty sure you can only do network access from local apps with air.
Adding trusted will just be ignored by the flash player, it'll
(silently) refuse to attempt network connections with anything that
didn't originate from the web. And vice versa with manipulating local
files

On Tuesday, 14 June 2011, Steve Abaffy  wrote:
> It is not an exe. I am accessing the swf file via webpage. I tried adding
> Security.LOCAL_TRUSTED; to the code but that didn't work either. Tried
> making it a exe file but then it won't run from the CD because the link to
> it is via a web page and the browser objects as the exe file does not have a
> digital signature.
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
> Sent: Monday, June 13, 2011 4:03 AM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Strange Button Behavior
>
> Hmm, an exe should be exempt from the "local vs network" restrictions,
> but maybe something else is failing.
>
> Have you tried tracing the error?
>
> I vaguely rememeber having problems with "_blank", etc. in the past.
> See if it works without those?
>
> Here are some links I found that may help.
> http://probertson.com/articles/2006/10/11/geturl-flash-projector-firefox-pro
> blem/
> http://www.adobe.com/devnet/flash/articles/local_network_playback.html
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net
> /package.html#navigateToURL%28%29
>
> Glen
>
>
> On 11/06/2011 19:35, Steve Abaffy wrote:
>> Hello,
>>
>>
>>
>> After some more investigation I have found that the buttons not working
>> problem I was having is not a browser malfunction. I have found that when
> I
>> put the site on a web server all works well regardless of the browser. But
>> when I put the site on a CD a run it from there, all calls to outside
>> sources do not work.
>>
>> All calls to local sources such as url:String = "/Documents/some.pdf" in
> the
>> below function works just fine.
>>
>> And insight to this problem would be appreciated.
>>
>>
>>
>> function GotoURLAustinMopac(e:MouseEvent):void{
>>
>>                  var url:String =
>>
> "6836 Austin Center Blvd. 
> A 
>> ustin+TX+78731";
>>
>>                  var request:URLRequest = new URLRequest(url);
>>
>>                  try {
>>
>>                  navigateToURL(request,'_blank');
>>
>>                  } catch (e:Error) {
>>
>>                   //Do Nothing
>>
>>                  }
>>
>> }
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@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] AS3 load and unload swf from different movies

2011-06-13 Thread Ben Sand
Looked into this a while ago. Bottom line was you can never guarantee
an unload, so repeated load/unload always have the potential for
memory leaks.

In the case of Flex apps it was never possible to completely clear
them from memory.

Our solution was to load other swfs in another window, though I
appreciate this won't suit everyone. It may be possibleto load them on
the same page with JavaScript communication between apps. If there is
a physical overlap between the display areas, eg using z-index of CSS
you may give up the option of 3d acceleration in flash 11 and there
may be issues with display on some operating systems/ browsers

On my phone now, but I can give links if you're interested

On Tuesday, 14 June 2011, Bassam M  wrote:
> hi guys
> I'm try to move from AS2 to AS3 I did some work with AS3 it seems to be easy
> anyway i have problem with load and unload swf, in AS2 I use to use
>
> loadMovie("movie.swf",level)
> then from the movie.swf" I can use back button to load the main movie again
> or unload the movie if the level more the 0
> in AS3 I use code
> menu.movieBtn.addEventListener(MouseEvent.CLICK,loadMovieSwf);
>
> function loadMovieSwf(event:Event)
> {
> var requestURL:URLRequest = new URLRequest("movie.swf")
> var loader:Loader = new Loader()
> loader.load(requestURL)
> addChildAt(loader)
>
> }
>
> the problem I'm not able to unload movie from movie.swf I can unload
> movie.swf from the main movie by this code
>     loader.unloadAndStop();
>     removeChild(_loader);
>     loader= null;
> but if I place this code in movie.swf I get error
> it was easy to do it in AS2 just unloadMovie(level)
> I'm doing project with many swf files I have to load it from main page and
> go back to main page I hope the problem is clear
>
> thank you
> Bassam
> ___
> Flashcoders mailing list
> Flashcoders@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] Fullscreen Hardware Acceleration and Video Player Skins

2011-01-12 Thread Ben Sand
Using youtube, i find the controls are distorted, but they don't seem to
have been blown up as big as the video.

It appears' they've shrunk the controls before they're attached and then
zoomed the whole thing up.

If you can detect the size of the screen and don't mind the controls being a
bit pixelated you could try that.

On 13 January 2011 16:34, David Bellerive  wrote:

> Hi everyone,
>
> This question has been puzzling me forever. How is it possible, when you
> build a video player in Flash, to have a fullscreen button that sends the
> video in fullscreen mode USING HARDWARE ACCELERATION but without distorting
> (scaling) the video player skin with it?
>
> I know it's possible because YouTube does it, and also the new Strobe Media
> Playback (and associated Flash Media Playback) does it. I think even the
> popular JW player does it.
>
> As far as I know, there's only one method to go into fullscreen with
> hardware, which is the Stage.fullScreenSourceRect property. And that
> property doesn't seem to allow some display objects to use the hardaware
> rendering (like the video itself) and some display objects to use software
> rendering (like the skin).
>
> What am I missing? I've looked through the Strobe Media Playback code ad
> can't find anything.
>
> Anyone has a clue???
>
>
> ___
> Flashcoders mailing list
> Flashcoders@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] Sound.extract

2009-06-23 Thread ben gomez farrell

Hey guys,
I'm just digging into the Sound.extract feature in FP10.  I've been 
using code found at http://www.bytearray.org/?p=329 to learn from, but 
have a few questions.  I'm able to create a waveform and draw to the 
stage, but want to take it beyond that.


Basically the code I have is this:

   var samples:ByteArray = new ByteArray();
   var extract:Number = Math.floor 
((_sound.length/1000)*44100);
  
   _sound.extract(samples, extract);
  
   var step:int = samples.length/4096;

   do step-- while ( step % 4 );

   samples.position = 0;
  
   for (var c:int = 0; c < 4096; c++) {

   left = samples.readFloat();
   right = samples.readFloat();
   samples.position = c*step;
   }

My questions are:

   1.  I understand incrementing the byteArray read position by a step 
amount.  What I don't understand is why the step amount needs to be a 
multiple of four?  I get some very wacky results from my readFloat() if 
I don't do this.


   2.  Anybody know why the number of samples we're taking is a power 
of two?  Is this important, maybe just for graphic performance?


   3.  Here's the big one - is it possible to isolate amplitude at 
certain frequencies - to get something like you'd get from 
computeSpectrum?  I guess I'm overly confused by the data I'm getting 
back from the byte array and how to dig deep with it.  The way I imagine 
this byteArray in my head is that each position in the byteArray, one by 
one, would be a composite amplitude of all frequencies at a small point 
in time.  I think I must be imagining this data wrong - and you'll 
probably cringe at my composite amplitude remark cause it'll probably 
make no sense.


Thanks - and again, I really think I have some huge knowledge gap in how 
sound data is used and read.  Can anyone help?

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


[Flashcoders] Tween AS3 issue with Firefox

2009-03-25 Thread Reina Lyn Ben
has anyone had the same problem. I have a website up..
http://kozonline.com/epk the animation is created in AS3, when I use
firefox, the animation/transition freezes, I've found solutions online like
creating a variable and store the tween there instead of being dependent on
the garbage Collector feature that tween have. When I test the site on IE,
it animates fine and finishes the tween..

-- 
Reina Lyn Ben
Interactive Web Devsigner
www.ReinaLynBen.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.

2009-03-05 Thread Reina Lyn Ben
I'm trying to play more than one song in a music player. the music player is
in an exported movieclip and the links are in another movieclip.. but I kept
getting this error.. i did my research and found scripts online but no step
by step esplanation.. here is my code:

THIS IS MY CODE TO THE MUSIC PLAYER:
//var song:Sound = new Sound;
var sndChan:SoundChannel = new SoundChannel;
//var songReq:URLRequest;
var songPlaying:Boolean = false;
var pos:Number;
aPlayBtn.addEventListener(MouseEvent.CLICK, playSong);
aPlayBtn.buttonMode = true;
aStopBtn.addEventListener(MouseEvent.CLICK, stopSong);
aStopBtn.buttonMode = true;
aPauseBtn.addEventListener(MouseEvent.CLICK, pauseSong);
function playSong(e:Event):void {
 if (songPlaying == false) {
  songPlaying = true;
  sndChan = MovieClip(root).audio.song.play(pos);
  aPlayBtn.removeEventListener(MouseEvent.CLICK, playSong);
  aPlayBtn.buttonMode = false;
 }
}
function playSongI():void {
 if (songPlaying == false) {
  songPlaying = true;
  sndChan = MovieClip(root).audio.song.play(pos);
  aPlayBtn.removeEventListener(MouseEvent.CLICK, playSong);
  aPlayBtn.buttonMode = false;
 }
}

function stopSong(e:Event):void {
 sndChan.stop();
 songPlaying = false;
 aPlayBtn.addEventListener(MouseEvent.CLICK, playSong);
 aPlayBtn.buttonMode = true;
 pos = 0;
}
function stopSongI():void {
 sndChan.stop();
 songPlaying = false;
 aPlayBtn.addEventListener(MouseEvent.CLICK, playSong);
 aPlayBtn.buttonMode = true;
 pos = 0;
}
function pauseSong(e:Event):void {
 pos = sndChan.position;
 sndChan.stop();
 songPlaying = false;
 aPlayBtn.addEventListener(MouseEvent.CLICK, playSong);
}



AND THIS IS MY CODE TO THE MUSIC LIST:
var audioPlayer:aPlayer = new aPlayer();
audioPlayer.x = 50;
audioPlayer.y = 20;
var song:Sound = new Sound;
var songReq:URLRequest;
//BUTTONS HOLDING LOCATION OF SONGS--
btnStream01.addEventListener(MouseEvent.CLICK, onClick);
btnStream01.songURL = "audio/01 An Offer You Can't Refuse.mp3";
btnStream02.addEventListener(MouseEvent.CLICK, onClick);
btnStream03.songURL = "audio/02 Cruise.mp3";
btnStream03.addEventListener(MouseEvent.CLICK, onClick);
btnStream03.songURL = "audio/03 So Many Girlz featuring P. Murray.mp3";
btnStream04.addEventListener(MouseEvent.CLICK, onClick);
btnStream04.songURL = "audio/04 Damn I'm Cooo.mp3";
//---
function onClick(e:Event):void {
 addChild(audioPlayer);
 songReq = new URLRequest(e.currentTarget.songURL);
 song.load(songReq);
 this.audioPlayer.playSongI();

 audioPlayer.aClosePlayer.addEventListener(MouseEvent.CLICK,
closePlayerFunction);
 audioPlayer.aClosePlayer.buttonMode = true;
}
function closePlayerFunction(e:Event):void {
 removeChild(audioPlayer);
 this.audioPlayer.stopSongI();
}

-- 
____

Reina Lyn Ben
Flash Web Devsigner

Web Portfolio:  www.ReinaLynBen.com <http://www.reinalynben.com/>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] accessing a function from a movieclip

2009-03-02 Thread Reina Lyn Ben
can any one help me with this code:
MovieClip(root).con_video.AVplayer.startVideo();
I am trying to access a function from a movieclip. This code is not located
on the stage or root, it is located at con_video.  (^^,)

Thanks,
Rein

-- 


Reina Lyn Ben
Flash Web Devsigner

Web Portfolio:  www.ReinaLynBen.com <http://www.reinalynben.com/>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] baffled by fullscreen

2008-11-07 Thread ben gomez farrell
Hey guys, so OK, I'm researching fullscreen mode today to try to 
identify a bug in our project.  Basically, its the same old story that 
going to full screen triggers a security error (only in IE).


Doing some research, I discover that its probably due to wmode=opaque in 
our object/embed tag.  But then I see that supposedly they fixed this in 
the MovieStar build last year.


Anyway I'm using Flash 10 at this point - and IE still won't allow me to 
go full screen using opaque wmode.


I was ready to call it a day - but I simplified the project some and 
produced a test case with two pages.  One using opaque, the other with a 
default wmode of window.  Testing this morning confirmed my suspicions 
that IE didn't like opaque.


But then my boss, saw my test in the afternoon and saw that fullscreen 
using opaque worked just fine!  I was stumped.  So I tried it out, and 
fullscreen worked even though it didn't before, and I was really confused.


Then I copied out all the code into another pagetest.html.  
Fullscreen still worked.  I changed opaque to transparent.  Fullscreen 
STOPPED working.  Then I changed transparent on the same file to opaque 
again - and it STILL didn't go full screen.  I even viewed the source to 
make sure my HTML was current.


Anyway, I'm stumped.  Is it just that wmode+fullscreen is incredibly 
flaky in IE regardless of player?  Like it'll work one minute and not 
the next?  Its almost like it the flash player is caching the wmode from 
previous sessions and making security decisions based on that.


I'll be testing more thoroughly tomorrow, but if anybody could save me 
some time, I'd appreciate it!


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


Re: [Flashcoders] What is the ActionScript equiv. to HTML ?

2008-11-01 Thread ben gomez farrell
i don't know if there's a simple solution like setting loop to true or 
false or anything, but it can be done reasonably easily.  Just check the 
total number of frames vs the current frame and stop if they are equal.


So like...
if ( myClip.totalFrames == myClip.currentFrame ) { myClip.stop(); }

i actually haven't used this functionality in particular since AS2, but 
I don't think anything changed in AS3.


William Adams wrote:
I'm loading a Flash file in a MovieClip and I want it to play once and 
then stop, but it keeps looping. Endlessly. How can it be set to play 
once and then stop / not loop?


Thanks!

William


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


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

2008-10-30 Thread Schmidtke, Ben
Regarding using a try/catch for this, in your catch you can check the
errorID, if it's 1006, it's a method not found. You can catch all the
run-time errors listed in the appendixes of the flash help. Not knowing
everything going on in your code, you might want to check it in case
something else throws a error during run-time.


catch (m_e:Error)
{
switch(m_e.errorID)
{
case 1006:
// Function/Method not
found
trace(" -- METHOD NOT
FOUND -- ");
        break;



Ben 



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian
Thomas
Sent: Thursday, October 30, 2008 3:28 AM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 - Checking if a Function Exists

Hi Steven,
   Thanks for the explanation.

   If you mean Moock's Essential Actionscript, I've had a read of that
section and AFAICS it doesn't mention a bug.

   The only real issue I know of in try/catch do with return is that
you shouldn't put a return in a finally clause, because finally gets
executed when processing completes and exits any try/catch block but
before (potentially) the function returns. It leads to a return path
that you might not expect.

  I completely agree that you should try to avoid using try/catch
instead of an 'if' statement - however the ReferenceError solution I
posted above is several magnitudes faster than generating then parsing
then searching through the XML result from describeType, and I felt it
worth the sacrifice. Sometimes you've got to throw elegance to the
wind and adopt practicality. However, in the end
Object.hasOwnProperty() was the solution, I was being stupid, and the
ReferenceError solution isn't needed; so it's academic. :-)

Ian

On Thu, Oct 30, 2008 at 2:21 AM, Steven Sacks <[EMAIL PROTECTED]>
wrote:
> There's a bug if you return in a try or catch (maybe it's just catch).
>  Colin Moock mentions it in his AS3 book.  I personally think it's
cleaner
> to return after a try catch because try catch is not an if else and
really
> shouldn't be treated as such, but that might be because I have avoided
> returning inside them since I first started using them because of the
bug.
> ___
> Flashcoders mailing list
> Flashcoders@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] Is it possible to create duplicate event listeners?

2008-09-30 Thread ben gomez farrell

Hi all,
I'm curious if I need to clean up my event listeners before adding a 
duplicate one.

For example if I have an initialization routine

function init():void {
   addEventListener( Event.SomeEvent, $somehandler, false, 0, true );
   // some other stuff that builds the app/game
}

If I finish up what I'm doing and want to re-initialize my game or 
application, should I clean up my event listener before I add the exact 
same one?


So another way to ask this is if I do:

addEventListener( Event.SomeEvent, $somehandler, false, 0, true );
addEventListener( Event.SomeEvent, $somehandler, false, 0, true );

Do I have 2 event listeners at this point, or just one?  Is it smart 
enough to not add an identical one?


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


[Flashcoders] Using Matrices?

2008-09-25 Thread ben gomez farrell
Hey, just wondering if matrices make more sense in this situation and 
how you would apply them.


So I'm just making a simple tic tac toe game - nothing major.  I'm 
storing each x or o as a -1 or 1 in a grid like data structure.  Of 
course, I could use a 2 dimensional array no problem - but wouldn't a 
matrix be more appropriate?  Not only would I not have to dimension my 
nested arrays in a for/while loop - but I would assume that I could use 
some kind of matrix property to add up each column or row (again without 
a for/while loop).


I haven't used (or can really find any information on matrices) for 
anything other than using them to transform bitmap data through the 
transformational methods.


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


[Flashcoders] Trying to encapsulate stuff for Box2DAS3

2008-09-04 Thread ben gomez farrell
Hey guys, I'm placing my bets on Box2DAS3 for my physics after trying 
out a few engines.  It seems like its a little more work - but worth it.
Of course, I'd rather it be more like the whole DisplayObject hierarchy, 
so I'm trying to make an object that extends the b2Body and just have to 
pass a few params when calling new to create both a body, shape, and its 
sprite representation all in the same object. 

I'm having trouble actually creating the body.  My positional settings 
are a bit off compared to debug output, but I'll get to that later.
Basically - I'm assuming that world.CreateBody would do the same thing 
as super( bodydef, world) - but my shapes don't actually move.  I can 
only get gravitational movement when I create a body from a shape 
outside of this class and run CreateBody there.


Also, as you can see I was trying out something else where I wanted to 
set the super class to the created body, but that doesn't fly when 
compiling.
Anybody have any hints how I can make this work?  I'm close - I had it 
working as Block extends b2BodyDef before - but if I'm going to access 
my update handler from my m_bodylist array, I need this class to be a 
b2Body.


Thanks!
ben

var b:Block = new Block( world, 10, 10 );
 b.x = c*5;
 b.y = c*15;

   public class Block extends b2Body implements IObject
   {   
   public function Block( world:b2World, w:Number, h:Number, 
density:Number = 1.0, friction:Number = .5, restitution:Number = 0.2  ) 
{   
   _bodydef = new b2BodyDef();

   _bodydef.userData = new Sprite();
   _bodydef.userData.graphics.lineStyle(.5,0x00);
   _bodydef.userData.graphics.beginFill(0x00);
   _bodydef.userData.graphics.drawRect(0,0,w,h);
   _bodydef.userData.graphics.endFill();
  
   _poly.SetAsBox(w/60, h/60);

   _poly.density = density;
   _poly.friction = friction;
   _poly.restitution = restitution;
  
   super( _bodydef, world );

   //super = world.CreateBody(_bodydef as b2BodyDef);
   super.CreateShape(this.shape);
   super.SetMassFromShapes();
   }
  
   public function update():void {} // empty, but I'm accessing 
b2Body properties outside of this class for now


   public function get display():Sprite { return _bodydef.userData; }
   public function get shape():b2ShapeDef { return _poly; }
   public function get bodydef():b2BodyDef { return _bodydef; }
  
   public function set x( val:int ):void { _bodydef.position.x = 
val/60; display.x = val; }
   public function set y( val:int ):void { _bodydef.position.y = 
val/30; display.y = val; }
  
   public function get x():int { return _bodydef.position.x*60; }

   public function get y():int { return _bodydef.position.y*60; }
  
   private var _poly:b2PolygonDef = new b2PolygonDef();

   private var _bodydef:b2BodyDef;
  
   }

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


[Flashcoders] Whatever happened to C++ conversion?

2008-08-31 Thread ben gomez farrell
Hey, I'm on the papervision3D list, and was just discussing what physics 
engines to use.  A guy named Andy on there was talking about how 
Box2DAS3 is great, and orginally started out as a  C++ project.  Box2D 
then went on to becoming Bullet, a 3D engine, and Box2DAS3 hasn't 
followed yet.


Then I thought back to Scott Petersens C++ to AS3 conversion utility 
they were demoing at MAX last year.  If I remember right, they took the 
Quake code and ported it over to AS3.  Does anybody know the status on 
that?  Can you and I use this conversion stuff today?


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


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

2008-08-25 Thread ben gomez farrell
u I just don't know how else to explain!  If using multiple 
similar classes it can tie them together in a way that:


1.  Helps autocomplete
2.  Helps the compiler catch errors in its tracks, so you don't get 
runtime errors


I can't explain any better than what I've done!  Sorry I can't be more help
ben

Omar Fouad wrote:

Ok, but how does an Interface help in this case?

On Tue, Aug 26, 2008 at 4:10 AM, ben gomez farrell <[EMAIL PROTECTED]>wrote:

  

H, not sure what you're stumbling on - of course all this stuff is a
mouthful, so my point is I could've been unclear in ANYTHING!

Anyway - so typecasting variables -
Lets say you have a variable...in AS3 the compiler needs to know what type
of variable it is.

so var x = 4 will just throw a compiler error if I recall correctly.
What you need to to is: var x:Number = 4;

This way the compiler knows what you're type casting your variable as.

Now - say you don't know what type of object to cast your variable as
This may come up if you are throwing a bunch of different types of objects
or classes into a variable with the same code.

So you could do var x:Object = whatever or var x:* = whatever.

The problem here is when you assume do really generic things like that, IF
there is a bug, you'll only find out about it at runtime.

Like lets say you had two classes MObjectA.as  and MyObjectB.as.   Let's
also say I'm somewhere in my code, where I need to throw them into the same
variable one after another (it can happen, in like a for loop when you have
a bunch of different objects in an array, and you're looping through)

Anyway, I want to do:

var x = new MyObjectA();
x.doSomething();
x.doSomethingElse();

x = new MyObjectB();
x.doSomething();
x.doSomethingElse();

But that's not quite rightYou need to typecast x - but if it's the same
class, you COULD either generically type it with an object: var x:Object or
a wildcard var x:*

But lets say you call a method that isn't there (or you mispelled your
method name).  With such generic typecasting, it'll just compile, and you
won't catch this error until runtime. The compiler will just say "Well, it's
generic, it could be anything - so I'll just compile it, and hope the
programmer knows what they're doing!".

But, if MyObjectA and MyObjectB have a common set of methods, like
doSomething() and doSomethingElse(), I could create and interface with these
two methods, and make MyObject A and B implement these two methods.

Then I can type x as:
var x:IMyObject = new MyObjectA or B()

Now if I'm using something like Flex builder, I'll get full autocomplete
when i start using my variable.  If I misspell a method, or try to use one
that isn't there my COMPILER will complain before I even run it.

So typecasting is just a little more organized and lets you know whats
going on, and interfaces help if you have the above situation.

And I don't know if i'd call it MORE OOP - i'd say it makes use of more
spiffy things that OOP has to offer, but I don't think there really needs to
be a contest on who's programming is more OOP, whatever works for the
situation works for the situation.   It's like saying my backyard is more
outdoors than your because you have a tree, but I have a tree and a bush and
a flower garden.  We both have backyards, but I have more things in mine.
 That's my opinion anyway!

good luck!
ben



Omar Fouad wrote:



Wow... Thanks!
Ben, would you please explain the last part that talks about type casting?
Another Question: I've also read that using interface is more OOP. How?

Cordially

On Tue, Aug 26, 2008 at 2:23 AM, ben gomez farrell <[EMAIL PROTECTED]
  

wrote:



  

Hey I don't know what kind of development teams your working with, but
I've
found that on small one off projects done with a small team, they aren't
that important.  It's more of a big team, long term project, lotsa code
type
thing.

You can absolutely go with never using them, but it's a nice thing to
learn, and starts to get useful with AS3 type checking.

So, an interface file is like a contract you are setting up with your
code.
 An interface (and you can see the syntax in your books), consists of
public
variables and functions and their return types.  These functions don't do
anything in the interface itself, that is they don't run.

Where your interfaces get used is when you have a class that "implements"
one of your interfaces.  So lets say you have MyClass extends
MySuperClass
implements IMyInterface. (by convention interface files start with
Ietc,
but of course you don't have to)

So, for your project to even compile (when you implement an interface),
you'd better be damn sure that your "MyClass" has all the functions and
variables YOU defined

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

2008-08-25 Thread ben gomez farrell
Yah, maybe the word isn't "contract" but a "contract with loopholes".  
Anyway, it does a good job of getting intention across, regardless, 
across a broad set of code.  But yah, i can see the value in it, and I 
can see that its a little extra effort that might not be worth it.  I'm 
still more in the stage where I try to apply it to things to see if it's 
useful.  I'm not sure if it's helped so far, but it hasn't hurt.


Juan Pablo Califano wrote:

Focusing on the "contract" part always seemed to me a bit misleading about
what interfaces are, from a developer point of view. I mean, I understand
that using an interface will make the compiler force you to "implement" some
method, with some given signature, and I see the value in it, especially
force larger projects, with various developers. Nevertheless, what always
bugged me about this "it will force you to implement this method" approach
is that, well, it does but it depends on how you define "implemeting". One
can arguably claim that this is not a real implementation:

public function doSomeStuff(someArg:int):SomeType {
return null;
}

An still, it's perfectly legal, will compile without a hitch, and will of
course bomb out at runtime if you happent to use that return value for
anything useful.

In think being sure that a method will exist at runtime is a problem that
should concern the people who write a compiler and a runtime, but hardly the
coder who develops using that compiler and targeting that runtime. I mean,
following the "contract" approach, I agreee interfaces are a good language
feature, but I feel like they're often presented as a silver bullet.

On the other hand, interfaces are very useful to make some object to be an
instance of multiple types in a language that doesn't allows multiple
inheritance. And that could be powerful in certain sitautions.

Maybe one example will make the point more clear than some abstract
rambling.

Some time ago, I had to build a kind of "engine" for some simple, 2D games.
Basically, a main character, some enemies with a rather modest IA, some
generic collision detection, the ability to shoot and being shot, and so
on.

I had some managers to handle different aspects like collisions, moving
objects, "chasing" some other objects, etc. The thing was, some kind of
enemy could have the ability to move and get shot, but maybe not shooting.
Some other enemy would just move; another one would just shot but not move;
a wall had to be "hitable", but wouldn't move or shoot, etc, etc. And the
main character could have its own set of "features".

So, the problem was that an object had to be passed to different methods and
I wanted to keep things typed (i.e. not using Object everywhere): the
checkCollision() method would receive two "hitable" objects, for instance,
or the move() method would be called on a "movable" object. My first
approach was using inheritance but it looked ugly and smelled bad. It was
clear that it would be a mess having some enemy class arbitrarily descending
from a Shooter class, which in turn descended from a Movable class, which in
turn inherited from a Hitable class, ad nauseam.

I asked some advice from a co-worker and while discusing it, it ocurred to
us that we could use interfaces to make an object  hitable, movable, a
shooter, and so forth. Of course we would lack the specific
"implementation", but the overall result was much more clean, flexible and
mantainable than forcing some weird inheritance relationship. Perhaps having
"real" multiple would have saved some duplicated code, since much of the
code to move some objects was identical and we weren't extending base
classes but implementing interfaces in each movable object. But reading
about it, I found that some more knowleadgeble people than me argue that
having "real" multiple inheritance would add not only a perhaps useful
feature, but a whole new set of problems, so interfaces are a way to keeping
things simpler. So probably not having it is not a bad desing decision -- I
also tend to favour shallower hierarchies whenever possible, so keeping
things as simple as you can is an approach that easily fits my mindset.

So, hopefuly, this could be a modest example of how using interfaces relate
to having an object share a number of different types -- which, admitedly,
is not necessarily and technically the same thing as multiple inheritance,
but I think is conceptually close.

Cheers
Juan Pablo Califano


2008/8/25, Merrill, Jason <[EMAIL PROTECTED]>:
  

Interfaces have nothing to do with inheritance (at least not directly)
as I understand them.  Interfaces are special classes that simply define
what other classes must define.  A class that implements an interface
has to define the methods and properties defined in an 

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

2008-08-25 Thread ben gomez farrell
H, not sure what you're stumbling on - of course all this stuff is a 
mouthful, so my point is I could've been unclear in ANYTHING!


Anyway - so typecasting variables -
Lets say you have a variable...in AS3 the compiler needs to know what 
type of variable it is.


so var x = 4 will just throw a compiler error if I recall correctly.
What you need to to is: var x:Number = 4;

This way the compiler knows what you're type casting your variable as.

Now - say you don't know what type of object to cast your variable as
This may come up if you are throwing a bunch of different types of 
objects or classes into a variable with the same code.


So you could do var x:Object = whatever or var x:* = whatever.

The problem here is when you assume do really generic things like that, 
IF there is a bug, you'll only find out about it at runtime.


Like lets say you had two classes MObjectA.as  and MyObjectB.as.   Let's 
also say I'm somewhere in my code, where I need to throw them into the 
same variable one after another (it can happen, in like a for loop when 
you have a bunch of different objects in an array, and you're looping 
through)


Anyway, I want to do:

var x = new MyObjectA();
x.doSomething();
x.doSomethingElse();

x = new MyObjectB();
x.doSomething();
x.doSomethingElse();

But that's not quite rightYou need to typecast x - but if it's the 
same class, you COULD either generically type it with an object: var 
x:Object or a wildcard var x:*


But lets say you call a method that isn't there (or you mispelled your 
method name).  With such generic typecasting, it'll just compile, and 
you won't catch this error until runtime. The compiler will just say 
"Well, it's generic, it could be anything - so I'll just compile it, and 
hope the programmer knows what they're doing!".


But, if MyObjectA and MyObjectB have a common set of methods, like 
doSomething() and doSomethingElse(), I could create and interface with 
these two methods, and make MyObject A and B implement these two methods.


Then I can type x as:
var x:IMyObject = new MyObjectA or B()

Now if I'm using something like Flex builder, I'll get full autocomplete 
when i start using my variable.  If I misspell a method, or try to use 
one that isn't there my COMPILER will complain before I even run it.


So typecasting is just a little more organized and lets you know whats 
going on, and interfaces help if you have the above situation.


And I don't know if i'd call it MORE OOP - i'd say it makes use of more 
spiffy things that OOP has to offer, but I don't think there really 
needs to be a contest on who's programming is more OOP, whatever works 
for the situation works for the situation.   It's like saying my 
backyard is more outdoors than your because you have a tree, but I have 
a tree and a bush and a flower garden.  We both have backyards, but I 
have more things in mine.  
That's my opinion anyway!


good luck!
ben


Omar Fouad wrote:

Wow... Thanks!
Ben, would you please explain the last part that talks about type casting?
Another Question: I've also read that using interface is more OOP. How?

Cordially

On Tue, Aug 26, 2008 at 2:23 AM, ben gomez farrell <[EMAIL PROTECTED]>wrote:

  

Hey I don't know what kind of development teams your working with, but I've
found that on small one off projects done with a small team, they aren't
that important.  It's more of a big team, long term project, lotsa code type
thing.

You can absolutely go with never using them, but it's a nice thing to
learn, and starts to get useful with AS3 type checking.

So, an interface file is like a contract you are setting up with your code.
 An interface (and you can see the syntax in your books), consists of public
variables and functions and their return types.  These functions don't do
anything in the interface itself, that is they don't run.

Where your interfaces get used is when you have a class that "implements"
one of your interfaces.  So lets say you have MyClass extends MySuperClass
implements IMyInterface. (by convention interface files start with Ietc,
but of course you don't have to)

So, for your project to even compile (when you implement an interface),
you'd better be damn sure that your "MyClass" has all the functions and
variables YOU defined in IMyInterface
It seems limiting, but, on a large team, you might have a dozen developers
creating a hundred or so classes that are all supposed to plugin somewhere
in your main project.  If you create an interface, and make it known that
all developers must implement your interface, you can be sure that your
dozen developers and your hundred classes are going to have the methods that
YOU need to work in your project.

And then if you make a large scale change to your project - you c

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

2008-08-25 Thread ben gomez farrell
Hey I don't know what kind of development teams your working with, but 
I've found that on small one off projects done with a small team, they 
aren't that important.  It's more of a big team, long term project, 
lotsa code type thing.


You can absolutely go with never using them, but it's a nice thing to 
learn, and starts to get useful with AS3 type checking.


So, an interface file is like a contract you are setting up with your 
code.  An interface (and you can see the syntax in your books), consists 
of public variables and functions and their return types.  These 
functions don't do anything in the interface itself, that is they don't run.


Where your interfaces get used is when you have a class that 
"implements" one of your interfaces.  So lets say you have MyClass 
extends MySuperClass implements IMyInterface. (by convention interface 
files start with Ietc, but of course you don't have to)


So, for your project to even compile (when you implement an interface), 
you'd better be damn sure that your "MyClass" has all the functions and 
variables YOU defined in IMyInterface
It seems limiting, but, on a large team, you might have a dozen 
developers creating a hundred or so classes that are all supposed to 
plugin somewhere in your main project.  If you create an interface, and 
make it known that all developers must implement your interface, you can 
be sure that your dozen developers and your hundred classes are going to 
have the methods that YOU need to work in your project.


And then if you make a large scale change to your project - you can just 
change the interface - maybe add another method to it that you need for 
additional functionality.  If your dozen developers update to the new 
interface file, all their code won't compile anymore - and they'll have 
to update to your new methods before they get a compile!


So it's handy on large teams.

I've also found it handy for typecasting in AS3.  Sometimes I might have 
2 classes that do sort of the same thing, but not quite. Maybe I have a 
mix of several similar (but not identical) objects in an array, and I 
want to loop through.


So for example: list = [ myClassA, myClassB, myClassC, myClassA, 
myClassB, myClassC, myClassA, myClassB, myClassC ];
Now I loop through my objects, and I want to assign them to like a 
temporary variable and perform an action on them.


So var temp = list[c];
But what do you type temp...you could do
var temp:* = list[c]

And you could put anything you wanted in the variable.  But we have type 
casting in AS3 for a reason!


You could create an interface full of the common methods and variables 
uses by myClass A,B and C, make those classes implement your interface, 
and then do your typecasting as this:


var temp:IMyClasss = list[c];

Then you aren't using the wildcard to type your object AND you'll get 
auto-complete for code, and compile time checking of anything you're 
trying to do to your class that isn't supported.


Hope this helps!
ben



Omar Fouad wrote:

This could seem weird...
But what the hell is an interface!!! I've read lots of books and
posts without getting the answer. I bought "Essential AS3" to read about
interfaces and he says that helps for multi inheritance. In other places I
read that it is a "deal" to ensure that a class has some methods and so on.
But what is the real benefit that I can come out with using interfaces

Maybe that is stupidity or I am not smart enough to get the concept but
believe me... its is been two years now!!

Please Help!!!

  

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


Re: [Flashcoders] Sounds loaded - but is silent

2008-07-07 Thread ben gomez farrell
Looks like your bases are covered - its looking more like an issue with 
google, and I'm not familiar in this area, so good luck!


Martin Klasson wrote:

Hello their Ben,
I sent this email to the sales-contact we have at google for this
project - but as you can see below - we can not duplicate this
problem on our own servers - it only happens at google gadget ad editor
preview.

I have already tried out loading policyFiles, but they dont do much,
the swf's that are loaded are accessible and being able to alter the
playhead in those loaded swf's - but the mp3's wont have any sound.

down below is the email, in which you can find out a little more:


I am ready to say that we are done with the IKEA Pax2 Gadget,
but there is one big issue still.

When loading the xml file in your GGAE-editor, the preview does not play
sound when you are tapping the keyboard. Which is the one thing that is
confusing us - as well as being the big problem.

I thought this was a case of the cross-domain loading of the mp3 files
which made it not to work. But, I set up an own test between two domains,
but that worked! - but when previewing the gadget ad at your place - it does
not work.

So I am wondering if,
http://qstream-down.qbrick.com/1005/googlegadget/gadget.xml,
that would be published - would the same problem as in the preview but the
Google Gadget Ad Editor
still exist - or is it only in the Google Gadget Ad Editor this happens?

Would the solution might be to host the gadget at your place and not on own
servers?
-or what do you think.

My test, which did work is here:
http://download.kokokaka.com/ikea/crosser.html

It loads the mp3's from the qbrick-server,
this works - but not when Google Gadget Ad Editor is loading from the
qbrick-server.

So I am hoping you might know the solution.

/ Martin


2008/7/7 ben gomez farrell <[EMAIL PROTECTED]>:

  

Well, looks like you're getting an runtime sandbox error trying to run a
javascript function (an alert), but that's all I see.
I forget if you need to do this with sound, but have you tried a cross
domain XML file on the site your sound is coming from?
If you don't know what that is:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14213

Good luck!


Martin Klasson wrote:



Hi Ben,

nothing seems to be crazy, but maybe there is anyway - since the sound
isnt
being played - yet it is loaded.

I set up this:
http://download.kokokaka.com/ikea/crosser.html

Which also accesses all the swf/mp3 on the qbrick-server.

But as you notice, here you can play the sounds with the keyboard.
So it does work very well - but not when it is in your system.

So do you know of any solutons yet?
I thought I could find the solution if I could have the same problem to
test
on
my servers but the kokokaka.com server has no trouble to play the mp3's
loaded from the qbrick server.

Dear regards,
Martin





2008/7/4 ben gomez farrell <[EMAIL PROTECTED]>:



  

Maybe it is a cross domain issue - but also consider that there was an
error uploading to whatever domain you're using.  Grab the file and make
sure it plays - one quirk with the sound player (in Flash 9 at lease), is
that it'll say its loading and playing anything.  It's easily fooled -
pass
it a JPG, it'll load and say its playing as a sound.  So just make sure
nothing crazy happened in your upload to the other domain and the sound
isn't broken.

Martin Klasson wrote:





This is a dilemma that is a tough case.

I am having cross-domain loading issue. I am having an loadPolicyFile
which makes my swf to LOAD the mp3's from the other server.
-without the policyFIle it wouldnt load the mp3's at all.

but, now they are being loaded. But they are not played. no sound.
and the same default.swf being played at the same domainboth loads
and PLAYS the music.

but from another domain - it is being loaded but not played.

WHy, and how?
___
Flashcoders mailing list
Flashcoders@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] Sounds loaded - but is silent

2008-07-07 Thread ben gomez farrell
Well, looks like you're getting an runtime sandbox error trying to run a 
javascript function (an alert), but that's all I see.
I forget if you need to do this with sound, but have you tried a cross 
domain XML file on the site your sound is coming from?

If you don't know what that is:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14213

Good luck!

Martin Klasson wrote:

Hi Ben,

nothing seems to be crazy, but maybe there is anyway - since the sound isnt
being played - yet it is loaded.

I set up this:
http://download.kokokaka.com/ikea/crosser.html

Which also accesses all the swf/mp3 on the qbrick-server.

But as you notice, here you can play the sounds with the keyboard.
So it does work very well - but not when it is in your system.

So do you know of any solutons yet?
I thought I could find the solution if I could have the same problem to test
on
my servers but the kokokaka.com server has no trouble to play the mp3's
loaded from the qbrick server.

Dear regards,
Martin





2008/7/4 ben gomez farrell <[EMAIL PROTECTED]>:

  

Maybe it is a cross domain issue - but also consider that there was an
error uploading to whatever domain you're using.  Grab the file and make
sure it plays - one quirk with the sound player (in Flash 9 at lease), is
that it'll say its loading and playing anything.  It's easily fooled - pass
it a JPG, it'll load and say its playing as a sound.  So just make sure
nothing crazy happened in your upload to the other domain and the sound
isn't broken.

Martin Klasson wrote:



This is a dilemma that is a tough case.

I am having cross-domain loading issue. I am having an loadPolicyFile
which makes my swf to LOAD the mp3's from the other server.
-without the policyFIle it wouldnt load the mp3's at all.

but, now they are being loaded. But they are not played. no sound.
and the same default.swf being played at the same domainboth loads
and PLAYS the music.

but from another domain - it is being loaded but not played.

WHy, and how?
___
Flashcoders mailing list
Flashcoders@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] Sounds loaded - but is silent

2008-07-04 Thread ben gomez farrell
Maybe it is a cross domain issue - but also consider that there was an 
error uploading to whatever domain you're using.  Grab the file and make 
sure it plays - one quirk with the sound player (in Flash 9 at lease), 
is that it'll say its loading and playing anything.  It's easily fooled 
- pass it a JPG, it'll load and say its playing as a sound.  So just 
make sure nothing crazy happened in your upload to the other domain and 
the sound isn't broken.


Martin Klasson wrote:

This is a dilemma that is a tough case.

I am having cross-domain loading issue. I am having an loadPolicyFile
which makes my swf to LOAD the mp3's from the other server.
-without the policyFIle it wouldnt load the mp3's at all.

but, now they are being loaded. But they are not played. no sound.
and the same default.swf being played at the same domainboth loads
and PLAYS the music.

but from another domain - it is being loaded but not played.

WHy, and how?
___
Flashcoders mailing list
Flashcoders@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] adding value of radiobutton to number in resultTxt.text field.. help please

2008-05-19 Thread rlyn ben
how can i add a radiobutton value from the number at resultTxt.text... here is 
my code.. it wont do the math.. all it does is puts the value right beside the 
numbers at resultTxt.text.. help.. 

stop();

var gRB:RadioButtonGroup = RadioButtonGroup.getGroup("genderGroup");
gRB.addEventListener(MouseEvent.CLICK, genderHandler);

function genderHandler(event:MouseEvent):void {
trace("event.target.selection.name", event.target.selection.name);
trace("event.target.selection.value", event.target.selection.value);
trace("resultTxt.text", resultTxt.text);

switch(event.target.selection.name) {
case "maleRB":
maleRB.value = 1;
break;
case "femaleRB":
femaleRB.value = 0;
break;
}
resultTxt.text = parseInt(resultTxt.text) + 
(event.target.selection.value).toString();
}



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


[Flashcoders] what do you guys think about www.plotdev.com website?..

2008-05-19 Thread rlyn ben
this is one of the flash websites that get me interested in scripting in flash? 
i wanna do sites like theirs.. what do you guys think? is their sites hard to 
do?.. http://plotdev.com (^_^)



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


Re: [Flashcoders] getting value from a radiobutton & adding to converted textfield to numbe

2008-05-18 Thread rlyn ben
thid is the error.. "Warning: 3551: Appending text to a TextField using += is 
many times slower than using the TextField.appendText() method."
i've been trying to get the value (which is a number) from the radiobutton and 
add it with the age thats been converted..




- Original Message 
From: Eduardo Omine <[EMAIL PROTECTED]>
To: Flash Coders List 
Sent: Sunday, May 18, 2008 6:52:25 AM
Subject: Re: [Flashcoders] getting value from a radiobutton & adding to 
converted textfield to numbe

Have you tried one of the following?

event.currentTarget.selection.name
or
RadioButtonGroup(event.currentTarget).selection.name


What error message (not warning message) do you get when compiling?

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


[Flashcoders] Re: getting value from a radiobutton & adding to converted textfield to number part2

2008-05-17 Thread rlyn ben
here is my converted textfield to number script.. credits to Juan Pablo 
Califano and Steven Sacks.. much thanks for ur help.. (^_^)



stop();

ageField.addEventListener(TextEvent.TEXT_INPUT, convertAge);

function convertAge(event:TextEvent):void {

trace("ageField.text.length:"+ageField.text.length);

var resultTxt:TextField = new TextField();
resultTxt.border = true;
addChild(resultTxt);

var inputChar:String = event.text;

if(ageField.text.length > 0) {
  resultTxt.text = (parseInt(ageField.text) + inputChar).toString();
} else {
  resultTxt.text = inputChar;
}
}


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


[Flashcoders] getting value from a radiobutton & adding to converted textfield to number

2008-05-17 Thread rlyn ben
ok.. so again, its gave me this compiler error.. "Warning: 3551: Appending text 
to a TextField using += is many times slower than using the 
TextField.appendText() method.".. i've been trying to get a value from a 
radiobutton (depends on the users choice).. in a switch case statement.. this 
is my code.. i also tried this one "resultTxt.text += 
event.target.selection.value;" replacing "resultTxt.text += maleRB.value;".. 
but its giving me the same error.. help pls.. :(



import flash.events.Event;
import fl.events.ComponentEvent;
import fl.controls.RadioButtonGroup;

stop();

var gRB:RadioButtonGroup = RadioButtonGroup.getGroup("genderGroup");
gRB.addEventListener(MouseEvent.CLICK, genderHandler);

function genderHandler(event:MouseEvent):void {
switch(event.target.selection.name) {
case "maleRB":
maleRB.value = 1;
break;
case "femaleRB":
femaleRB.value = 0;
break;
}
resultTxt.text += maleRB.value;
}



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


Re: [Flashcoders] help again.. NaN

2008-05-17 Thread rlyn ben
yes.. thank you so much.. this helps alot.. (^_^).. i do need to convert the 
string to number coz i have to add it up with values from radiobuttons.. and oh 
yea.. i got one more problem then im done.. sorry if i ask novice questions.. 
im just new to as3.. and willing to learn more.. enhance what i started now..


- Original Message 
From: Juan Pablo Califano <[EMAIL PROTECTED]>
To: Flash Coders List 
Sent: Saturday, May 17, 2008 3:14:48 PM
Subject: Re: [Flashcoders] help again.. NaN

It seems like the TEXT_INPUT event is fired before the .text property is set
with the user's input. So, when you try to read the value from the text
input, it returns an empty string; which, parsed as an integer, returns NaN.

So, you have get the current input char from the event.text field, and check
if the input text has a lenght > 0.

You can try something like this:

stop();

ageField.addEventListener(TextEvent.TEXT_INPUT, convertAge);

function convertAge(event:TextEvent):void {

trace("ageField.text.length:"+ageField.text.length);

var resultTxt:TextField = new TextField();
resultTxt.border = true;
addChild(resultTxt);

var inputChar:String = event.text;

if(ageField.text.length > 0) {
  resultTxt.text = (parseInt(ageField.text) + inputChar).toString();
} else {
  resultTxt.text = inputChar;
}
}
Cheers
Juan Pablo Califano


2008/5/17, Steven Sacks <[EMAIL PROTECTED]>:
>
> Your textfield is probably set to multiline or something like that.
>  Anything like a carriage return will cause parseInt to break.
>
> rlyn ben wrote:
>
>> need to display number to the resultTxt but when i press the first number
>> it displays NaN.. when i enter the second number.. it display the number but
>> with the NaN.. :(
>> stop();
>> ageField.addEventListener(TextEvent.TEXT_INPUT, convertAge);
>> function convertAge (event:TextEvent):Number {
>>  var resultTxt:TextField = new TextField();
>>  resultTxt.border = true;
>>  addChild(resultTxt);
>>
>>  var userAge:Number;
>>  var ageStr:String;
>>  ageStr = ageField.text;
>>   userAge = parseInt(ageStr);
>>  userAge.toString();
>>  resultTxt.text = String(userAge);
>>  return userAge;
>> }
>>
>>
>>  ___
>> Flashcoders mailing list
>> Flashcoders@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] help again.. NaN

2008-05-17 Thread rlyn ben
need to display number to the resultTxt but when i press the first number it 
displays NaN.. when i enter the second number.. it display the number but with 
the NaN.. :(
stop();
ageField.addEventListener(TextEvent.TEXT_INPUT, convertAge);
function convertAge (event:TextEvent):Number {
 var resultTxt:TextField = new TextField();
 resultTxt.border = true;
 addChild(resultTxt);

 var userAge:Number;
 var ageStr:String;
 ageStr = ageField.text;
 
 userAge = parseInt(ageStr);
 userAge.toString();
 resultTxt.text = String(userAge);
 return userAge;
}



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


[Flashcoders] need help.. switch statement parameters

2008-05-17 Thread rlyn ben
its giving me 1120 error on switch statement parameters.. 
"switch(event.target.selection.name) {" what am i missing on the code?... 



import flash.events.Event;
import fl.events.ComponentEvent;
import fl.controls.RadioButtonGroup;

stop();

var gRB:RadioButtonGroup = RadioButtonGroup.getGroup("genderGroup");
gRB.addEventListener(MouseEvent.CLICK, genderHandler);

function genderHandler(e:MouseEvent):void {
switch(event.target.selection.name) {
case "maleRB":
maleRB.value = 1;
break;
case "femaleRB":
femaleRB.value = 0;
break;
//action
}
}



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


[Flashcoders] how do you get the value from radiobutton

2008-05-15 Thread rlyn ben
radiobutton's value contains number data type..i need to get the value to add 
it to another number value..

sorry hehe.. i'm a newbie here.. (^_^)



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


[Flashcoders] hi.. need help asap.. newbie here.. hehe

2008-05-14 Thread rlyn ben
need to capture the input in textfield which is restricted to numbers only... 
and convert the string to number...

this is my code but it wont work.. when i trace it.. it displays.. object 
[textfield].. or 0.. or NaN..

//stores age
var userAge:Number = Number(age);
var newAge:String = String(age.text);

//age field
age.type = TextFieldType.INPUT;
age.border = true;
age.restrict = "0-9";

thanks guys..


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


Re: [Flashcoders] Determining sound sample rate?

2008-04-22 Thread ben gomez farrell
Thanks!  That should get me on my way.  This, in combination with the 
last reply about getting raw ID3, should help me out.

So thanks to both of ya.
ben

Juan Pablo Califano wrote:

Hi, as far as I know, the info you're looking for is not in the ID3 tags
(which are not mandatory by the way).

An mp3 file is a formed by an arbitrary number of "frames", which carry
information about "chunks" of the sound stream; each one contains a header
and the actual audio data. There's no "global" file header, but if you're
looking for the sample rate, I think it's fair to assume that the sample
rate stored in the header of the first frame is the sample rate of the whole
file (that might not be true if you were looking for, say, the bitrate).

So, I think you can get that data if you read the file directly in binary
format, look for the first frame, and read the bits indicating the sample
rate.

A good reference for the format spec:
http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html

And this graphic may help to "visualize" the meaning of each bit in a frame
header:
http://upload.wikimedia.org/wikipedia/commons/0/01/Mp3filestructure.svg

By the way, if you want to inspect the raw file, you should use an
hexadecimal editor, you won't get far with a text editor. There are many
available, some of them are free, like Hexplorer, which is what I've been
using for a while.
( you can find it here: http://artemis.wszib.edu.pl/~mdudek/ )

I don't know much about the mp3 format specifically, but I have worked a bit
with raw files, so if you want to give it a try and need some help, maybe I
can lend you a hand.


Cheers
Juan Pablo Califano


2008/4/21, Steven Sacks <[EMAIL PROTECTED]>:
  

Ben has an open source project on Google code that is the evolution of his
old classes called Metaphile.

http://code.google.com/p/metaphile/

___
Flashcoders mailing list
Flashcoders@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] Determining sound sample rate?

2008-04-21 Thread ben gomez farrell
Thanks!  This crossed my mind - and I even popped open an MP3 in word 
pad to see if anything was written in plan text.  High hopes I know, but 
no luck.
I guess thats what I'll have to resort to. 
thanks again

ben

Glen Pike wrote:
You are probably best off finding some code that reads the file 
headers from an MP3 file and do this manually as the Sound API's are 
not upto this.


Not quite what you want, but here is a starter for 10 that reads ID3 
tags:


http://blog.benstucki.net/?id=24

ben gomez farrell wrote:
OK, I totally don't mean to rehash the debate on the sound player bug 
- but like a week after you all had that conversation, I'm actually 
running into something that's related.


My problem is using Sound.play(), and passing in the milliseconds.  
As you might be aware, the milliseconds is only accurate if you use 
44.1khz sound.  But, fortunately, it's a simple equation to run on 
your time to get the time parameter with the desired effect.


So now, as long as I know the sampling rate, I can pause and play to 
my heart's content.


I wanted to take it one step further though.is there any way to 
get the sampling rate through code?  I imagine if you got the 
bytestotal and the length of the sound it would related, but that 
might be thrown off by the fact that it was mono or stereo.


Has anybody come up with a good way of determining this?
thanks!
ben
___
Flashcoders mailing list
Flashcoders@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] Determining sound sample rate?

2008-04-21 Thread ben gomez farrell
OK, I totally don't mean to rehash the debate on the sound player bug - 
but like a week after you all had that conversation, I'm actually 
running into something that's related.


My problem is using Sound.play(), and passing in the milliseconds.  As 
you might be aware, the milliseconds is only accurate if you use 44.1khz 
sound.  But, fortunately, it's a simple equation to run on your time to 
get the time parameter with the desired effect.


So now, as long as I know the sampling rate, I can pause and play to my 
heart's content.


I wanted to take it one step further though.is there any way to get 
the sampling rate through code?  I imagine if you got the bytestotal and 
the length of the sound it would related, but that might be thrown off 
by the fact that it was mono or stereo.


Has anybody come up with a good way of determining this?
thanks!
ben
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] any basic examples of recording voice in Flash AS3..???

2008-03-10 Thread ben gomez farrell
This isn't possible without the Flash media server (or something like 
it), so I'd start there and check out some techdocs on the adobe 
website.  I haven't looked myself, but I think this is a fairly basic 
thing, so it should be easy to find examples as long as you know you're 
looking at the media server.

ben

BOYD SPEER wrote:
I am hoping to find basic examples of recording and playback of voice in Flash AS3. 
any links or suggestions greatly appreciated...

Thanks,
-
Boyd
___
Flashcoders mailing list
Flashcoders@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] saving image locally

2008-02-21 Thread ben gomez farrell
Yes, basically you need to send the bits up to a server side script as 
POST data.  Instead of having your server side script save it to the 
server, you'd have the server side script pop up a "Save as:" dialog - 
which you could then use the dialog to save the file.


The details are a bit tricky when you first try it, but I've done it 
with PHP.  The only drawback is that it needs to go up to the server and 
come back down again - you can't just do everything client side as far 
as I know.


Cary Ho wrote:

Hi everyone,

I have a bitmapData object that is storing some image info. I want the 
user to be able to save it locally as a jpeg/bitmap/etc. Is there a 
way to do this? This is a web application, running through a browser. 
Anyone know if this is even possible? I tried storing it locally as a 
sharedobject, but I need a usable format for the user. TIA




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

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


Re: [Flashcoders] getBytesLoaded() and actions execution

2008-02-09 Thread ben gomez farrell
I've occasionally seen my getBytesTotal script get fired at just the 
right time when the file header info hasn't quite been read in yet and 
it thinks that the getBytesTotal and getBytesLoaded are both 10. 
So I usually have loaded.getBytesLoaded() == loaded.getBytesTotal() && 
loaded.getBytesTotal >100


Muzak wrote:

Is it safe to assume that as soon as
loaded.getBytesLoaded() == loaded.getBytesTotal()
actions in first frame of the loaded 'loaded' movieclip
were executed ?



calculate and use percentage:

var l:Number = loaded.getBytesLoaded();
var t:Number = loaded.getBytesTotal();
var p:Number = Math.floor((l/t)*100);

if(p == 100) {
   // loading is done
   // but loaded clip might not be ready yet
}

Best is to use MovieClipLoader and its onLoadInit event though.
http://livedocs.adobe.com/flash/9.0/main/2001.html

regards,
Muzak

___
Flashcoders mailing list
Flashcoders@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] Zinc port hell

2008-01-07 Thread ben gomez farrell
I've found that Zinc has been pretty stable for what I've used it for in 
Flash 8 so far (unfortunately the product had some blue screen of death 
effect that I'm not sure if we can chalk that up to DirectX in Zinc or 
the DRM system we used).


Anyway, using Zinc wasn't hell for me.  LEARNING to use Zinc was hell 
for me.  I came across so many inaccuracies in the documentation - like 
differences in the types of objects you get returned from methods or 
what types of objects you send in a parameter were just plain marked up 
in the documentation wrong.  So a lot of times, I had to figure this 
stuff out on my own, or look for use cases in the Multidmedia forums.


So if all you're doing is looking at the docs, you may want to get some 
demos, or look at the forums, because you may be doing something wrong 
and not know it.


Orwho knows, it's not so stable for AS3.
ben

August Gresens wrote:

Hello

Sorry for the dramatic title. I've got a finished game that was developed in
AS3 for the standalone Flash 9 Player. The publisher now wants to migrate
the game to run under to a C++ wrapper product to get rid of the right mouse
contextual menu on Windows.

Since the only commercial product that seems to do this for Mac and PC is
Zinc, I gave this a try and was surprised at the disparity between the way
the game runs in Zinc vs. the standalone Flash player.

Mostly the issues seem to revolve around how external swfs are loaded and
handled. After converting the game to use absolute paths, the external swf
files fail to load in some cases and in others they load but show up black
with a bizarre echo in the audio.

Even if I'm able to work around those issues, I'm afraid of what may lay
beyond these initial problems.  A few questions for those with zinc
experience:

* Is this a stable/reliable product for AS3 yet?

* How much does the actionscipt code need to be tailored to work around zinc
idiosyncrasies? (meaning the actionscript itself and not the mdm commands).

* To develop for both mac and pc, what is the additional effort here to make
it run on the mac? Does the Mac version of zinc have it's own idiosyncrasies
that will have to be dealt with?

Thanks,

August

  

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


[Flashcoders] Framework suggestions for games

2008-01-06 Thread ben gomez farrell
Hello, I'm currently working on a Flex project.  I'm really enjoying 
working with it, and since I'm basically doing a rich internet 
application it's saving tons of time.


Typically though, I do simple kids games.  Sometimes they aren't so 
simple.  Either way I'm wondering if there's one framework anyone can 
highly recommend for doing games (taking care of tasks like background 
scrolling, character movement, collision, collision resolving).


I can find plenty of physics and game frameworks, but I've come across 
too many to sort through, and was wondering if anybody had the magic bullet.


Oh I guess I'm primarily looking for AS3.  Thanks!
ben
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AVM1 loadMovie problems

2007-12-17 Thread ben gomez farrell

That's an interesting twist on what I found.
I had a Flash 9 SWF.  The Flash 9 SWF loaded a Flash 8 SWF.  The F8 SWF 
had a movieclip instance that would grab several different animation 
SWFs that would get loaded into the movieclip.


So, first it would load animation1.swf into the MC instance, and then 
when it was done, it would unload and load up animation2.swf.  Of course 
it worked fine in just Flash 8, but inside the Flash 9 SWF - I could 
never load that second animation into the same movieclip instance.  I 
could only get around it by loading it into a different movieclip instance.


I wonder if you're experiencing sort of the same thing.  Even though you 
have 2 different loaders, maybe they somehow talk about the same 
movieclip instance in memory.


Not that its a reasonable problem.  It's pretty ridiculous if you can't 
do it.  But thats what I've found, and I've found that I just have to 
work around it.


ben

Dave Segal wrote:

I am  having some problems loading multiple Flash 8 movies into Flash 9. I
understand that this not recommended and that is preferred to work with
all Flash 9/AS 3 content. 

 


Here is the situation. I have 2 Flash 8 swfs, let's call these
"f8loader1.swf" and "f8loader2.swf". Both of these swfs instantiate the
same class, "F8AssestClass",  which loads another Flash 8 swf,
"f8asset.swf".   In my Flash 9 application I am loading "f8loader1.swf"
which instantiates "F8AssetClass" which loads "f8asset.swf" just as
planned.  However, when I then load "f8loader2.swf", it starts up and
instantiates "F8AssetClass" but "f8asset.swf" never loads. I have tried to
load "f8asset.swf" with both loadMovie and with the MovieClipLoader. It
never loads the second time.

 


I have a project where the above scenario is going to be in play multiple
times and I don't have much flexibility to adjust the Flash 8 content. I'm
hoping someone can help me understand what is happening here and let me
know if whether it is possible to achieve this. 

 

I have example files I can send if anyone is interested. 


___
Flashcoders mailing list
Flashcoders@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] Another sort of Off Topic Flex question

2007-12-17 Thread ben gomez farrell

First of all, I'll ask this
Where is that flexcoders list you all talk about?  I don't see anything 
under figleaf, and the only Flex coders list I found on google is a 
yahoo groups one, and I haven't gotten a single email from them yet - so 
I'm thinking there's some kind of SECRET one.


Anyway, my question that I will post once I find the flexcoders list 
ties into the Flash 9 player, and I guess is really both a Flex AND 
Flash question, so I'll ask you guys first.


I'm working with an application in Flex, and using states to switch back 
and forth between components.  You can kind of think of each component 
as a "page" of my Flex application, and each "page" is a state that I go 
back and forth to from a main navigation.


It first occurred to me that my states don't really go away when I had 
an enter frame event attached to one of my component pages.  Of course 
it's easy and good practice to clean those kinds of things up when I'm 
not using them - but even then - when I go back to my component page, 
it's in exactly the same state as I left it.  Anything I interacted with 
on screen is there in the exact same state and position.


So this stuff is not going away when I switch states.  I guess, when I 
think about it, it makes sense.  But I'm wondering if I should be 
worried as my application picks up complexity?  Essentially, it's a 
question of when I remove children from the stage - should I worry they 
still exist?


I guess its a question of best practices in Flex.  Do you folks author 
applications in this way - using states to navigate between several 
large component pieces?  Or do you get smarter and break it out into 
smaller SWFs using an AS3 only shell to do all the garbage collecting 
yourself of the SWFs?


Thanks!  Things seem to work pretty well right now, but I'd just hate at 
the end of this project when we have all our graphics in that it runs 
all sluggishly because everything's running at once.


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


Re: [Flashcoders] XML confusion

2007-09-10 Thread ben gomez farrell
I don't think you're doing anything wrong, its just that the trace 
function only accepts strings as parameters.  So when you pass in your 
XML variable it would throw an error if you were using a more strict 
language like Actionscript 3 (at least I assume it throws an error in 
AS3, maybe it actually does the same thing).
However, if you're using AS2, which is less strict, the trace function 
expects a string, so it'll try to convert your XML to a string, and it 
looks like its successful. It probably runs the XML.toString() method 
when it gets to the trace method.
So you're not going to get anything from trace except for a converted 
string.  And it'll do the same thing in your scriptPath string, because 
its going to convert that XML variable to a string.
If you want more control, you might try looping through your XML to 
create a more custom string, and then use that.

ben

Paul Steven wrote:

I am trying to convert a string to xml but for some reason when I convert to
xml it only displays the "encoded string". See below the code snippet for
what is traced. Any idea what I am doing wrong?

Here is my test file

var encodedString:String = "encoded string";

var XMLString:String;   
XMLString = "";
XMLString += "";
XMLString += "";
XMLString += "";

trace ("XMLString = " + XMLString); // Trace 1

var dataToSend:XML = new XML(XMLString);

trace ("dataToSend = " + dataToSend); // Trace 2  

var scriptPath:String = uploadUrl + "?xml=" +  dataToSend + "&key=" + _key +
"&session=" + _sessionId; 

-
Trace Results
-
1.
XMLString = 
2.
encoded string



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

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

  

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

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


Re: [Flashcoders] Flex - How to get button ID name?

2007-09-08 Thread ben gomez farrell
OK I'm still new to Flex, but as I've been playing with it all day, I 
think I can answer this.
Your click function is coded in such a way that you've ignored the event 
coming coming in.  Yah, "getHandler" gets called on click, but there's 
some more details you could get when it gets clicked.


Here's how I'd do it:
click="getHandler(event.target.id)" />


private function getHandler( id:String ):void {
trace(id);
}

Or you could pass in the whole target: click="getHandler(event.target)"

and get it in the getHandler(target:Button) by doing trace(target.id);

That help?
ben

macromedia flash wrote:

Hi there,

I am working on Flex and need to get the button ID in function, do you have
any ideas?




http://www.adobe.com/2006/mxml";>













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

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

  

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

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


Re: [Flashcoders] Uploading different types files to a PHP script

2007-09-05 Thread ben gomez farrell

Hi Glen,
I posted this yesterday, and didn't get any flashcoder emails 
yesterdayso I was hoping I was ignored!
I figured out my problem, and really it was me being an idiot.  I 
actually got text and images working, but when I went to the URL where 
my text file was at, it just spit out the URL of where my browser was 
pointing.  I guess I should have actually checked the content of the 
file through FTP, because it was working just fine all alongI guess 
my browser doesn't understand the file I uploaded to be text...or something.


Anyway, yes, I'm aware of the security risk, and this is for my personal 
websitewhich barely even registers in google, so I doubt there will 
be any attacks.  Once I get my test working and my website online, I'll 
probably have some sort of password protection and file filter type of 
thing only letting you put up certain types of files.


Thanks!
ben

Glen Pike wrote:

Hi,

   I have not worked with RAW_POST data - just the $_FILES array in 
PHP, but allowing people to set the path that a file is uploaded to is 
a huge security risk - imagine someone uploaded a dodgy PHP script 
that was inside your webroot and then called that script???  File 
upload is a dodgy game and I would recommend posting text in a request 
variable, along with a relative path, then saving that to a known file 
outside your http root - you can always have an admin script to 
approve images and stuff like this later.


   Glen

ben gomez farrell wrote:
Hi, sorry if this is a PHP questionI'm trying to work with this 
more on the Flash side, so I hope its a Flash question.


I have a PHP script online that serves to write binary image data 
from my Flex/AIR app:

$f = fopen($path,"w");   fwrite($f, $GLOBALS[ 'HTTP_RAW_POST_DATA' ] );
fclose($f);


On the Flash side:

   var jpgtosave:JPGEncoder = new JPGEncoder();
   var rawdata:ByteArray =  jpgtosave.encode(bitmap);
 var header:URLRequestHeader = new URLRequestHeader 
("Content-type", "application/octet-stream");

   var myRequest:URLRequest = new URLRequest (path);
   myRequest.requestHeaders.push (header);
   myRequest.method = URLRequestMethod.POST;
   myRequest.data = rawdata;

   var loader:URLLoader = new URLLoader();
   loader.dataFormat = URLLoaderDataFormat.BINARY;
   loader.load(myRequest);

This works great, but now I want to use that same PHP script to 
upload a text file.  The reason I want to keep the PHP script the 
same is because the end user actually sets the upload location, and I 
think it would be overly complicated to have them choose two 
different upload script locations.


Anyway, no matter what I try, the text file that's written to the 
server is done correctly, except the contents of it are always the 
file's URL instead of the text that I wanted.  I realize there are 
better ways to upload text through PHP, but as I said, I'd like to 
use the same script as my JPG uploads.


Here's some things I tried:
1. Changing the request header to "Content-type", "text/plain"
2. Changing the URLLoaderDataFormat to TEXT
3. Writing out my text's string to binary through ByteArray.writeObj
4. Taking my binary data directly from a FileStream

So, as you guys can see I'm stabbing in the dark!  I assume that I'm 
somehow encoding the data wrong to get to the server.  Maybe I need a 
file header as the com.adobe JPGEncoder gives the JPG a header, 
likewise I should give my text file a header.  Does it have to be 
binary data to use with my PHP script?


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

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



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

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


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

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


[Flashcoders] Uploading different types files to a PHP script

2007-09-04 Thread ben gomez farrell
Hi, sorry if this is a PHP questionI'm trying to work with this more 
on the Flash side, so I hope its a Flash question.


I have a PHP script online that serves to write binary image data from 
my Flex/AIR app:
$f = fopen($path,"w");   
fwrite($f, $GLOBALS[ 'HTTP_RAW_POST_DATA' ] );

fclose($f);


On the Flash side:

   var jpgtosave:JPGEncoder = new JPGEncoder();
   var rawdata:ByteArray =  jpgtosave.encode(bitmap);
  
   var header:URLRequestHeader = new URLRequestHeader ("Content-type", 
"application/octet-stream");

   var myRequest:URLRequest = new URLRequest (path);
   myRequest.requestHeaders.push (header);
   myRequest.method = URLRequestMethod.POST;
   myRequest.data = rawdata;

   var loader:URLLoader = new URLLoader();
   loader.dataFormat = URLLoaderDataFormat.BINARY;
   loader.load(myRequest);

This works great, but now I want to use that same PHP script to upload a 
text file.  The reason I want to keep the PHP script the same is because 
the end user actually sets the upload location, and I think it would be 
overly complicated to have them choose two different upload script 
locations.


Anyway, no matter what I try, the text file that's written to the server 
is done correctly, except the contents of it are always the file's URL 
instead of the text that I wanted.  I realize there are better ways to 
upload text through PHP, but as I said, I'd like to use the same script 
as my JPG uploads.


Here's some things I tried:
1. Changing the request header to "Content-type", "text/plain"
2. Changing the URLLoaderDataFormat to TEXT
3. Writing out my text's string to binary through ByteArray.writeObj
4. Taking my binary data directly from a FileStream

So, as you guys can see I'm stabbing in the dark!  I assume that I'm 
somehow encoding the data wrong to get to the server.  Maybe I need a 
file header as the com.adobe JPGEncoder gives the JPG a header, likewise 
I should give my text file a header.  Does it have to be binary data to 
use with my PHP script?


Thanks!
ben
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] ExternalInterface & .Net Question

2007-08-29 Thread Schmidtke, Ben
I'm working with .Net client app wrapping a swf calling functions back
and forth on a project. Does anyone have any suggestions on how to get
.Net passing parameters into your callback function? I've done it
successfully with JavaScript in the browser on other projects, but we
have run into a hang-up on this outside the browser with parameters.

In the little documentation available on such a process everything I've
tried should work but no parameters are being passed back in, arguments
array is undefined when doing a cross check. I read a something about a
bug where you can not do this with projects built in VS2005, although
I'm not sure if that is true or not. Everything on the .Net side looks
ok, same on the flash side. The callbacks work fine, but the parameters
are mia.
 
.Net call :
axShockwaveFlash.CallFunction("somestring_uri.png");
 
AS 
 
ExternalInterface.addCallback("onImportConversionSuccess", this,
this.onImportConversionSuccess); 
 
function onImportConversionSuccess(uri:String):Void
{
trace("Conversion uri: " + uri);
trace("arguments len : " + arguments.length);
}
 
A decent reference :
http://www.codeproject.com/cs/media/flashexternalapi.asp?df=100&forumid=
226349&exp=0&select=1518421
 
Any suggestions?
 
Thanks,
 
Ben Schmidtke
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Should Flash CS3 Pro result in larger SWF and EXE files than Flash 8?

2007-08-22 Thread ben gomez farrell
I think there might be something you're overlooking.  I didn't do this 
the most scientific waybut I published a huge file I'm working with 
in Flash 8 and the SWF file size came out at 4.71MB.  I tried it in CS3 
and it came out at 4.68MB.  So there does seem to be a difference, 
albeit just a tiny one for me.  Maybe different compression settings are 
handled differently (audio or bitmaps) in 9 and you just happened to 
choose the worst possible case!


I will say this though..these files I'm working with are huge.  One 
of the many huge files in 8  for some reason nobody at my company could 
remove frames on this file without Flash 8 hanging and crashing.I 
brought it into CS3, and could edit it just fine.


So something seems to be working in CS3!
ben

matt stuehler wrote:

All,

I recently switched from Flash 8 Pro to Flash CS3 Pro.

I just noticed today that my published SWFs and EXEs are considerably
larger when I publish them with CS3 than they were when published from
F8, even though the FLAs are the same.

In other words, I took an FLA that was saved as a CS3 file. When
published, the SWF was 980kb, and the EXE was 3,423kb.

I saved the FLA as a Flash 8 file (since it doesn't us AS3 or any CS3
functions), republished, and the SWF was 879kb and the EXE was only
2,434kb.

That's a pretty big difference (~30% for the EXE), for exactly the
same functionality.

I can live with the Adobe bloat in the CS3 IDE, but I didn't think
that it was going to cost me in terms of the resulting SWF filesize.

Has anyone else noticed this? Am I making a mistake, or missing a
publish option?

Many thanks in advance for your advice and insight.

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

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

  

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

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


Re: [Flashcoders] Flash CS3: Full, Lite, Portable. Differences?

2007-08-16 Thread ben gomez farrell
You only have 2 options for buying Flash CS3.  If you qualify for an 
upgrade you get the upgrade version of Flash CS3 Professional, if not, 
you get the full version Flash CS3 Professional.  Oh I suppose you could 
get the academic version if you qualify for that as well.


There's no Flash Lite CS3.  Theres a Flash lite player for mobile 
devices.  If you have Flash CS3 you should just be able to publish to 
Flash lite, and test on the included Device Central.


I have no idea what you would mean by portable though.
ben

Gregory N wrote:

Hi all,

I've started exploring what ways exist for upgrading to CS3.
Can someone clarify what's the differences between Full, Lite and Portable
versions?

I've already read a lot of horror stories about full version here, but
(strange) nothing about, say, Lite.
Or am I missing something?

  

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

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


Re: [Flashcoders] 3StudioMax to Flash CS3

2007-08-07 Thread ben gomez farrell
I haven't used the software yet, but you may want to look into Swift 3D 
and its 3DSMax plugin.

http://www.erain.com/products/Plug-ins/

Also, you probably don't want them as bitmaps, but if you did, you could 
probably render each file out as a sequence of images, and I'm pretty 
sure if Flash sees sequential numbered files it will ask if you want to 
bring them in as a sequence on the timeline.  You could probably write 
some JSFL to import, and save each sequence as a SWF, then import the 
SWFs back into the library as movieclips.


ben

Ashwan Wadhwa wrote:

Hello!

Here is what I am trying to do, maybe someone can point me to some resources 
that will help me !

I have 3D model in 3DStudio Max and I need to import some 400+ unique 3D 
objects into Flash and convert them to movie clips . Each 3D object is 
individually named, and I need to make sure the naming convention follows 
through into Flash. I need to do this process multiple times while using 
different camera angles. I don't need to preserve the 3D functionality in Flash 
- so I don't need to use PaperVision, Sandy etc.  Are there any reference 
scripts, commercial plug-ins etc??

I am assuming : Writing a Script in Max -> AI File or something -> Import into Max 
-> Some kind of a JSFL script to convert the objects.

Thanks!!
Ashwan.

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

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

  

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

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


RE: [Flashcoders] Q:Papervision 3D for 'simple' rotating cube effect

2007-08-03 Thread Smeets, Ben
Something like this?
http://www.alex-uhlmann.de/flash/adobe/blog/distortionEffects/effectCube
/ The demo is in Flex though :( 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: maandag 30 juli 2007 17:32
To: flashcoders
Subject: [Flashcoders] Q:Papervision 3D for 'simple' rotating cube
effect

I am trying to achieve an effect similar to the 3D User switching effect
in OSX.

Would implementing Papervision 3D be overkill for something like this?

Or is there an 'open source' solution available somewhere that uses
matrix transformations, etc.

My concerns for implementing this in order of priority are:
1) Must be AS2 compatible (but ideally easilly upgraded to AS3)
2) File size, don't want to add 80k in code to achieve this!
3) Learning curve, I need to implement within 2 days!!


Thanks for any advice!


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

"...all improvisation is life in search of a style."
 - Bruce Mau,'LifeStyle'
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] Loading xml in AS 2

2007-08-03 Thread Smeets, Ben
True The question being?

It's a scope issue in combination with understanding event handling etc.

Try: http://www.google.nl/search?q=Loading+xml+in+AS2
Or: http://www.gskinner.com/blog/archives/69.html

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Omar
Fouad
Sent: maandag 30 juli 2007 19:27
To: Flashcoders mailing list
Subject: [Flashcoders] Loading xml in AS 2

class LoadXML {

function LoadXML() {
var xmlData:XML = new XML();

xmlData.ignoreWhite= true;
xmlData.onLoad = function (success) {
if(success) {
trace("loaded");
}
}
xmlData.load("data.xml");
trace(xmlData);
}
}
this is not working

--
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

+2010 - 2346633 - +2012 - 261
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] (OT) fscommand and air

2007-07-26 Thread ben gomez farrell

Ya know what would be great for the next release of Director.
If Lingo would have some native support for those classes and features 
that AIR supports.  So, you make an AIR app, but realize that you need 
some if this extra functionality that only Director can give you.  Just 
take your AIR project and make a projector in Director.  And give Flash 
direct access to Xtras without having to go through some kind of 
Director proxy.

Would be nice I think!
ben

Troy Rollins wrote:


On Jul 26, 2007, at 4:19 AM, Zárate wrote:


If you need to creating PDFs from Flash itself, check out Alive PDF:

http://www.bytearray.org/?p=104


Personally, I was more interested in display of PDF content in a 
manner which is consistent with the rest of my applications. For this, 
*nothing* currently beats Director with the Impressario xtra.


--
Troy
RPSystems, Ltd.
http://www.rpsystems.net


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

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


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

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


[Flashcoders] OT: Adobe onAIR bus making a pit stop in North Carolina

2007-07-23 Thread ben gomez farrell
Hey everyone, I apologize if this is off topic, cause I'm basically 
advertising something, but I thought there would be some folks on here 
definitely interested in this.


I know there's at least a couple folks on this list from North Carolina, 
as I've talked to ya briefly.  I'm the Raleigh Durham Adobe User group 
manager, and even though the onair.adobe.com bus is not currently listed 
as stopping in NC, I can assure you it is.  It will be stopping in RTP 
(Durham).  It's not a full day event like DC, or NY, but we do get a 
Saturday evening user group meeting out of it with Mike Chambers and 
possibly others.


We're also holding a contest for the best AIR application.  The winner 
(who must be present at the meeting) receives a copy of Flex 2.

Details are at http://www.rdaug.org/airshow

Again apologies for those that consider this spam, but I thought there 
would be a bunch of folks on this list that aren't normally interested 
in the local NC user group scene, but would like to know this is happening.


Thanks!
ben


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

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


Re: [Flashcoders] Incredible Crashing Flash

2007-07-20 Thread ben gomez farrell
I haven't played around with my copy of CS3 so much yet, but one thing 
i've noticed on 8 is that if you have a large file and go overboard on 
using weird paintbrush strokes for your art (as in, when you select the 
stroke size for your shape you can select a bunch of different styles 
for the stroke), Flash can realllly hang.

ben

Cedric Muller wrote:

Are there any server queries in that FLA ?

I noticed that, on a Mac, when you close a Flash IDE SWF Preview that 
is doing a query (PHP at least), Flash crashes (OS X crash report 
dialog appears).

This has been a feature since Flash MX 2004.
I hope this is something else as you are describing other conditions

Cedric


Hi guys,

I have one FLA file that crashes Flash about one in 3 or 4 publishes. 
The FLA was created by someone on a Mac. It appears to be very clean. 
It is Flash CS3, AS3. This issue is not happening with any of my 
other projects.


Needless to say this is driving me crazy. Any ideas at all?

ps - I'm on Vista Ultimate. And by 'crash' I mean Flash stops 
responding and eventually I'm told by Windows that it needs to be 
closed forcefully.


Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 252-627-8026
mobile: 919-609-0408
fax: 919-882-1121

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

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


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

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


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

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


RE: [Flashcoders] Simplify point collection

2007-07-13 Thread Smeets, Ben
Cool Jim, tnx. Diving into it. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jim
Armstrong
Sent: donderdag 12 juli 2007 15:40
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Simplify point collection

Not sure if this is what you want, but check out the JTS Topology Suite.


Here is the user's guide - The Polygonizer class may be in the ballpark
of what you desire

http://www.vividsolutions.com/jts/bin/JTS%20Developer%20Guide.pdf

This is not a Flash library (it's Java), but it is available for
download.  Might be possible to convert to AS.  Yes, it's much easier
said than done :)

good luck!

- jim
www.algorithmist.net
http://algorithmist.wordpress.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Smeets,
Ben
Sent: Wednesday, July 11, 2007 4:13 PM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Simplify point collection

I might be pushing my luck here, but is there some similar magic piece
of code which can transform a collection of lines to a single polygon
line? (So i can use the linegeneralization code below) I have a large
collection of random lines which have a lot of overlappig start/end
points. The only dinkytoy way I can think of to combine these into
polygons is to take point 1, look through the whole collection for
matching points, take point 2..etc. 
 
The way too global searchterms i can think of to use for googling brings
up everything but related stuff.



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

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] Simplify point collection

2007-07-11 Thread Smeets, Ben
I might be pushing my luck here, but is there some similar magic piece of code 
which can transform a collection of lines to a single polygon line? (So i can 
use the linegeneralization code below) I have a large collection of random 
lines which have a lot of overlappig start/end points. The only dinkytoy way I 
can think of to combine these into polygons is to take point 1, look through 
the whole collection for matching points, take point 2..etc. 
 
The way too global searchterms i can think of to use for googling brings up 
everything but related stuff.



Van: [EMAIL PROTECTED] namens Smeets, Ben
Verzonden: wo 11-7-2007 17:26
Aan: flashcoders@chattyfig.figleaf.com
Onderwerp: RE: [Flashcoders] Simplify point collection



Jim (and Ben also!) Thank you very much. The link below is as far as I
can tell by using the demo *exactly* what I was looking for. You guys
helped me get some sleep tonight ;)

Cheers,

Ben

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jim
Armstrong
Sent: woensdag 11 juli 2007 16:37
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Simplify point collection

Is this what you're after?

http://motiondraw.com/md/as_samples/t/LineGeneralization/demo.html


regards,

- jim armstrong
www.algorithmist.net
http://algorithmist.wordpress.com <http://algorithmist.wordpress.com/> 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Smeets,
Ben
Sent: Wednesday, July 11, 2007 9:16 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Simplify point collection

I have a huge collection of point (x,y). Those points make up line
(x1,y1 to x2,y2). Is there
Some sort of well known function to smooth these points so that there is
less to draw?


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

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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

RE: [Flashcoders] Simplify point collection

2007-07-11 Thread Smeets, Ben
Jim (and Ben also!) Thank you very much. The link below is as far as I
can tell by using the demo *exactly* what I was looking for. You guys
helped me get some sleep tonight ;)

Cheers,

Ben

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jim
Armstrong
Sent: woensdag 11 juli 2007 16:37
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Simplify point collection

Is this what you're after?

http://motiondraw.com/md/as_samples/t/LineGeneralization/demo.html


regards,

- jim armstrong
www.algorithmist.net
http://algorithmist.wordpress.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Smeets,
Ben
Sent: Wednesday, July 11, 2007 9:16 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Simplify point collection

I have a huge collection of point (x,y). Those points make up line
(x1,y1 to x2,y2). Is there
Some sort of well known function to smooth these points so that there is
less to draw?


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

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Simplify point collection

2007-07-11 Thread ben gomez farrell
I haven't tried this myself, but I think one of the major ways to smooth 
lines is to do so by checking angles.


So look at point 1 and point 3.  These points create the hypotenuse of a 
triangle, and points 1, 2 and 2, 3 create the legs of the triangle.  If 
you use some basic trig you can find the angle that is created by the 
two legs of the triangle.  If the angle is insignificant like less than 
2 degrees or 5 degrees or something, then you can drop point 2 from your 
list.


does that help?
ben

Smeets, Ben wrote:

Hi All,

The subject might not cover it, but I didn't have a clue what this is
called in real life :)

I have a huge collection of point (x,y). Those points make up line
(x1,y1 to x2,y2). Is there
Some sort of well known function to smooth these points so that there is
less to draw?

E.g. take these lines

1:  100,100 to  101,101
2:  101,101 to  103,102
3:  103,102 to  110,112

I now have to say, moveTo startPoint, then lineTo endPoint for each
line. A smart function might be able to make this a moveTo once and then
2 lineTo's.
That saves 2 moveTo's. Another optimisation which would be great is, if
there are a lot (tens) of lines within a couple of pixels, if it would
be possible
To filter out a lot of lines and only draw the ones that are needed for
the visual. (something like the smooth line function inside the flash
IDE).

Anybody came across something like this? I remember Grant Skinner (I
thought he was the one) making a text recognition engine in flash once.
He also
Used some algorythm to simplify the lines and points.

Tx

Ben Smeets


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

  

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

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


[Flashcoders] Simplify point collection

2007-07-11 Thread Smeets, Ben
Hi All,

The subject might not cover it, but I didn't have a clue what this is
called in real life :)

I have a huge collection of point (x,y). Those points make up line
(x1,y1 to x2,y2). Is there
Some sort of well known function to smooth these points so that there is
less to draw?

E.g. take these lines

1:  100,100 to  101,101
2:  101,101 to  103,102
3:  103,102 to  110,112

I now have to say, moveTo startPoint, then lineTo endPoint for each
line. A smart function might be able to make this a moveTo once and then
2 lineTo's.
That saves 2 moveTo's. Another optimisation which would be great is, if
there are a lot (tens) of lines within a couple of pixels, if it would
be possible
To filter out a lot of lines and only draw the ones that are needed for
the visual. (something like the smooth line function inside the flash
IDE).

Anybody came across something like this? I remember Grant Skinner (I
thought he was the one) making a text recognition engine in flash once.
He also
Used some algorythm to simplify the lines and points.

Tx

Ben Smeets


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] breaking up long actions

2007-07-06 Thread Smeets, Ben
It doesn't break things in pieces for you but (I might get the problem
the wrong way ;) ) that's the easy part isn't it? The interval does let
you create/parse/edit large datasets without distorting the flow of the
swf (the animation isn't distorted). 




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hans
Wichman
Sent: vrijdag 6 juli 2007 16:21
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] breaking up long actions

Hi Ben,
tnx for the example, too bad setInterval in itself does not make content
run in the background or my life would be a lot easier:). The problem is
in the breaking up, but I think I got it figured now.
thanks again
JC



On 7/6/07, Smeets, Ben <[EMAIL PROTECTED]> wrote:
>
> Hi Hans,
>
> The way I used to fix it, was indeed by using some sort of interval 
> solution. Only to break up the loop in more parts so the animations 
> won't get bothered with it. I have an example online at 
> http://www.bensmeets.com/2007/04/09/using-threads-inside-flash/
> (download the zip, it contains an animated example and source also).
>
> HTH,
>
> Ben
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Hans 
> Wichman
> Sent: vrijdag 6 juli 2007 14:10
> To: Flashcoders mailing list
> Subject: [Flashcoders] breaking up long actions
>
> Hi list,
>
> I'm running a process on a tree of objects that require lots of 
> objects to be created.
> This takes somewhere around 300ms on my pc, and will usually be run as

> the swf starts or as all classes have been loaded.
>
> 300ms is enough for a stutter let alone when its run on slower pc's so

> I want to break down the task in subtasks to have it more processor 
> friendly.
>
> I know this has been discussed a few times but cant seem to find any 
> resources on it.
>
> At the moment I'm thinking of using a stack of nodes to process, and 
> using the stack and an alloted time, to complete the whole process, eg

> in pseudo:
>
> onInterval() {
>   if (process.isDone()) {
>   clearInterval and send done event
>   } else {
>   process.continue();
>   }
> }
>
> The problem is old but I was wondering if anyone has come up with good

> solution to this. Usually by the time we find out a process is slow, 
> the way we built it doesnt really allow us to break it up in chunks 
> easily, especially with recursive structures etc.
>
> regards,
> JC
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training 
> http://www.figleaf.com http://training.figleaf.com
>
>
> 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@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training 
> http://www.figleaf.com http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] breaking up long actions

2007-07-06 Thread Smeets, Ben
Hi Hans,

The way I used to fix it, was indeed by using some sort of interval
solution. Only to break up the loop in more parts so the animations
won't get bothered with it. I have an example online at
http://www.bensmeets.com/2007/04/09/using-threads-inside-flash/
(download the zip, it contains an animated example and source also).

HTH,

Ben

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hans
Wichman
Sent: vrijdag 6 juli 2007 14:10
To: Flashcoders mailing list
Subject: [Flashcoders] breaking up long actions

Hi list,

I'm running a process on a tree of objects that require lots of objects
to be created.
This takes somewhere around 300ms on my pc, and will usually be run as
the swf starts or as all classes have been loaded.

300ms is enough for a stutter let alone when its run on slower pc's so I
want to break down the task in subtasks to have it more processor
friendly.

I know this has been discussed a few times but cant seem to find any
resources on it.

At the moment I'm thinking of using a stack of nodes to process, and
using the stack and an alloted time, to complete the whole process, eg
in pseudo:

onInterval() {
   if (process.isDone()) {
   clearInterval and send done event
   } else {
   process.continue();
   }
}

The problem is old but I was wondering if anyone has come up with good
solution to this. Usually by the time we find out a process is slow, the
way we built it doesnt really allow us to break it up in chunks easily,
especially with recursive structures etc.

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

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] AVM1 in an AVM2 shell problems

2007-07-02 Thread ben gomez farrell

Hi,
I'm probably gonna spend all day debugging this and figure out whats 
going on, so I was hoping that somebody has already been through this 
and can tell me what's happening.


So I have a Flex based shell.  It loads AVM1 movies and then passes it a 
couple parameters with FlashInterface.  I've had a few troubles with 
these old Flash games I'm loading in (no loading with levels, no testing 
does _root==this, etc).


But now its almost working perfectly, and I have one thing that's 
stumping me.  I can load the movie perfectly, and it plays perfectly.  I 
can click our "load game" button to load the same game and it works 
great.  I can also use different parameters and have the game run an 
alternate way.  This ALSO works perfectly.


However, if I load the movie one way with one set of parameters, if I 
try to load the game again with a different set of parameters through 
FlashInterface (the changed parameter is an object with a property 
marked true or false), the external clips that I'm loading won't load.  
The totalbytes property of these movieclips show 10 bytes, and won't go 
beyond that.  But then if I go back to loading it with the parameters I 
passed it the first time, it works flawlessly. 

The file path is one of the parameters that gets passed in, and I'm 
tracing that to a text field, and I know thats the same between the two 
different times.  I've tried dynamically creating empty movieclips AND 
putting the empty clips on the timeline, and both have the same result.


I know this is vague to you guys, since its my project, but I'm half 
expecting some AVM1 vs AVM2 limitation that I'm not aware of.


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

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


Re: [Flashcoders] Stopping a Movie Clip animation

2007-06-24 Thread ben gomez farrell
Can you elaborate on your question?  Not that I'll be able to answer, 
but I'm confused by what you said.  I haven't really tried much in the 
way of timeline stuff in AS3 as I just got Flash CS3 last week.  If I 
read you right, you're saying that I can't add a stop action to the end 
of an AS3 Flash 9 published SWF.  WellI did, and it worked.  I 
made a little motion tween and put a stop action at the end, and it 
stopped, as expected.  I did the same for the first frame and it didn't 
move.
I must be misunderstanding what you're getting at, but would really like 
to know if there are any unexpected things to watch out for!

fill me in?
Thanks!
ben

Mark Badger wrote:

Hi,
I'm re-writing a beginning Flash class for designers. I used Movie 
Clips so that they would just adjust to using movie clips for 
interactivity as they move on to more complex topics. Graphic symbols 
vs. Movie Clips would just confuse students and added a layer of 
confusion that made life harder.


Now in AS 3 I can't add stops to the first frame of the movie clip. No 
big deal, but then I can't add stops to the last frame of a Movie Clip 
either. Is the only way to stop a Movie Clip from looping is to check 
if  the last frame been reached and then stop it? This seems like an 
overwhelming amount of thought for a newbie to grasp. And certainly 
puts this poor teacher in tears trying to explain a conditional in the 
second class of Flash.


Mark Badger


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

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


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

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


Re: [Flashcoders] Masks and components

2007-06-18 Thread ben gomez farrell

Thank you!
That's exactly what I was looking for.  I guess I didn't get to the 
point quick enough that I assumed that components were made with device 
fonts which wasn't adequate if I wanted to use it behind a mask.


Since I was assuming that (and apparently I was right), I wanted to know 
if and how I could change it.  I'm not familiar with the Flex component 
framework or the CS3 component framework well enough to know if Adobe 
gave us access to any methods to actually change the properties of the 
text field(s) in the components.  Furthermore, I wouldn't have really 
known where to look since this component architecture is new to me.


So excellent!  I'll check these methods out to see if they can 
accomplish what I want.  Thanks very much.



Rákos Attila wrote:

bgf> I think if it's set to device it still won't work
bgf> whether the font is embedded or not (if I put my mask in a layer).

Device fonts are not embedded fonts - if a font is embedded, then it
cannot be a device font. Components use device (not embedded) fonts by
default, but you can change font settings by using Button.setStyle(),
StyleManager.setComponentStyle() or StyleManager.setStyle(). Font
settings are controlled by the "textFormat" style and using embedded
fonts by "embedFonts" (the fonts should be not only referred as an
embedded, but be really embedded into the swf). See docs for details.

  Attila

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

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

  

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

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


Re: [Flashcoders] Masks and components

2007-06-18 Thread ben gomez farrell
Interesting.  I'll have to do some playing.  I had no idea that mask 
layers were bad in this regard while setting a mask with code was OK.  
I'll also have to crack open a component to see what setting the text 
field property has.  I think if it's set to device it still won't work 
whether the font is embedded or not (if I put my mask in a layer).

Thanks!
ben

Rákos Attila wrote:

I don't think that this is a bug, rather a simple lack of a feature.
You can mask device fonts with masks created by script (instead of
mask layers), or embed the font and it will be maskable by mask
layers.

  Attila

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

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

  

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

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


[Flashcoders] Masks and components

2007-06-18 Thread ben gomez farrell

Hey everyone,
So this is especially because I want to try Flex out (always been doing 
Flash).  I recently had some Flash CS3 training and got to play for a 
bit with the button component in Flash.  Unfortunately, in the tutorial, 
I put the button component behind a mask in the demo.  Of course, the 
text for the button label didn't show up - because of the Flash player 
bug that device fonts behind a mask are a no-no.


Is this something that can be solved anyway?  I don't know the methods 
and properties behind the CS3 components or ESPECIALLY the Flex 
component framework well enough to know if I can access any text fields 
inside the components to be able to embed the fonts properly and shut 
off device text on the fields.


Anybody with any experience with this?  Are components behind a mask a 
no-go, or is it do-able?

Thanks!
ben
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Firefox bug? external jpg's not loading in Firefox, are loading in IE7

2007-06-09 Thread ben deroo

http://www.citogrid.com/ankematheve/testfolder/index.html

view in Firefox, then view in IE7.

is there a fix for this problem, or am I doing something wrong, i've cut and
pasted the actionscript code for the .fla on the page.

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


Re: [Flashcoders] another stupid XML question

2007-06-09 Thread ben deroo

let me rephrase the question then:
when I click a button, i want xml1.xml to be loaded
when I click another button, i want xml1.xml to be replaced with xml2.xml

thx
Ben

On 6/9/07, Rákos Attila <[EMAIL PROTECTED]> wrote:



You are the only one who may know how to remove the thumbnails from
the stage, since you are the only one who knows how did you created
them, stored their references, etc. Your question is totally
independent of XML, it's a matter of basic scripting and movieclip
handling.

  Attila

bd> hi,
bd> small sample:
bd>  
bd> 
bd>  "thumbnails/a1.jpg" thumbwidth="56" thumbheight="75">
bd>  "thumbnails/vue.jpg" thumbwidth="56" thumbheight="75">
bd> 
bd> 
bd>  "thumbnails/a1.jpg" thumbwidth="56" thumbheight="75">
bd>  "thumbnails/a2.jpg" thumbwidth="56" thumbheight="75">
bd> 
bd> 
bd>
bd>
bd>
bd> I'd like to be able to load and /or replace sections of this xml file.
bd>
bd> meaning:
bd> when I click a button on stage, i'd like thumbnails(that code has
allready
bd> been done) to appear from the  node.
bd> when I click another button on stage, i'd like that content to be
removed
bd> (deleted from the stage, but not from the xml file ofcourse) and be
replaced
bd> by content from the  node.
bd>
bd> yup, I feel stupid, but that's ok!
bd>
bd> Ben


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

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


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

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


[Flashcoders] another stupid XML question

2007-06-09 Thread ben deroo

hi,
small sample:

   
   
   
   
   
   
   
   




I'd like to be able to load and /or replace sections of this xml file.

meaning:
when I click a button on stage, i'd like thumbnails(that code has allready
been done) to appear from the  node.
when I click another button on stage, i'd like that content to be removed
(deleted from the stage, but not from the xml file ofcourse) and be replaced
by content from the  node.

yup, I feel stupid, but that's ok!

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

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


Re: [Flashcoders] examples of scripting the Flash application?

2007-06-07 Thread ben gomez farrell
Hey, sorry, haven't been paying attention to flashcoders much as things 
have been busy the past couple days.so I'm picking this thread up at 
the end, and don't really know what's going on.  But I'm hearing you 
want JSFL examples, and specifically external XML file to animation.   
Among a few examples on my webpage, I have a Director executable which 
contains a ball which you drag around.  It creates a text file, which 
then when you run the JSFL script it will prompt you to open the text 
file containing your animation and then writes the motion to the timeline.

If this is what you're after feel free to look!
http://www.yellow5labs.com/demos/

ben

Muzak wrote:

You're not gonna find much JSFL examples out there I'm afraid.
Not that many people really use it (extensively).
There used to be a jsfl mailing list..
Ah, found it:
http://www.flashguru.co.uk/extending-flash-mailing-list/

I used to be on it, but there wasn't much activity and I left a while ago.
Might be worth looking into.. In any case, people there will be able to help 
you out (as it's all about jsfl).

The things you mentioned all are possible through jsfl AFAIK.

For instance, the following will show a 'browse for file' dialog and then read 
it and display the contents in the Output panel:

var fileURL = fl.browseForFileURL("open", "Select file");
fl.trace(fileURL);
var str = FLfile.read( fileURL);
fl.trace(str);

Note that file content is returned as a String.

regards,
Muzak

- Original Message - 
From: "Roy Pardi" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, June 07, 2007 4:42 PM
Subject: Re: [Flashcoders] examples of scripting the Flash application?


  

At 11:53 AM +0200 6/7/07, Muzak wrote:


And wich part are you having problems with?
  

Well, I've been digging around for examples (for instance, of opening a
file picker) so I can see JSFL in action along with info on any dead ends
or other issues that would indicate that what I want to do isn't possible.



Guess I was too vague about what I want to try to do- basically, within the
Flash app:

1. user opens a template movie that contains a Library of movieClips
2. user selects my command from the menu
3. the command opens a file picker dialog box where they can select a
previously created XML file
4. my command parses the XML file and instances the appropriate movieClip
from the librbary, setting name & text props from the XML data
5. my command opens a "save as" dialog so the file can be saved
6. user can adjust/tweak positions of added MCs and then publish the swf.

(just thinking out loud here)





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

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

  

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

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


Re: [Flashcoders] thumbnail panel

2007-06-05 Thread ben deroo

you're a STAR Jesse.
absolutely perfectly clean and simple!!

thnks a million, I had spent a lot of time trying to find a solution based
on knowledge I already had, but i simply did not know enough.

Again, thanks,

Ben

On 6/5/07, Jesse Graupmann <[EMAIL PROTECTED]> wrote:


//
//
//  VERSION 1
//
//


var xspace = 20;
var yspace = 20;
var xmax = 400;
var row = 0;
var col = 0;
var len = 10;

for ( var i = 0; i < len; i ++ )
{
var depth = this.getNextHighestDepth();
var t = this.attachMovie ( "box", "box_" + i, depth );

var nx = ( t._width + xspace ) * col;
if ( nx > xmax )
{
col = 0;
++row;
nx = ( t._width + xspace ) * col;
}

var ny = ( t._height + yspace ) * row;
++col;

t._x = nx;
t._y = ny;
}



//
//
//  VERSION 2
//
//


var xspace = 20;
var yspace = 20;
var width = xspace + 30;
var height = yspace + 30;
var rows = 5;
var len = 10;

for ( var i = 0; i < len; i ++ )
{
var depth = this.getNextHighestDepth();
var t = this.attachMovie (  "box", "box_" + i, depth );
var col = (i % rows);
var row = (Math.floor( i/rows ));
t._x = width * col;
t._y = height * row;
}


_

Jesse Graupmann
www.jessegraupmann.com
www.justgooddesign.com/blog/
_




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ben deroo
Sent: Monday, June 04, 2007 5:39 PM
To: Flashcoders mailing list
Subject: [Flashcoders] thumbnail panel

hi,
I'm trying to create a simple sample thumbnail panel with movieclips,
which
i'll later modify, but there seems to be something wrong in the code


code:
//
for (var i:Number = 0; i<10; i++) {
var t = attachMovie("box", "box"+i, i+1);
var Xspacing:Number = 20;
var Xreset:Number = 0;
var Yspacing:Number = 20;
var counter:Number = 1;

t._x += (t._width+Xspacing)*i;

if (t._x>400) {
//counter++;
t._y = (t._height+Yspacing);
t._x = Xreset;
t._x += (t._width+Xspacing)*(counter);
} else {
//counter++;
}
}


//end code

I'm trying to create several rows, but seem to be failing to do so, is
this
a conditional logic error?

thanks for any help


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

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


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

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


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

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


[Flashcoders] thumbnail panel

2007-06-04 Thread ben deroo

hi,
I'm trying to create a simple sample thumbnail panel with movieclips, which
i'll later modify, but there seems to be something wrong in the code


code:
//
for (var i:Number = 0; i<10; i++) {
   var t = attachMovie("box", "box"+i, i+1);
   var Xspacing:Number = 20;
   var Xreset:Number = 0;
   var Yspacing:Number = 20;
   var counter:Number = 1;

   t._x += (t._width+Xspacing)*i;

   if (t._x>400) {
   //counter++;
   t._y = (t._height+Yspacing);
   t._x = Xreset;
   t._x += (t._width+Xspacing)*(counter);
   } else {
   //counter++;
   }
}


//end code

I'm trying to create several rows, but seem to be failing to do so, is this
a conditional logic error?

thanks for any help


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

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


Re: [Flashcoders] commercial flash multi-touch projects?

2007-06-04 Thread ben gomez farrell
I'm answering despite not knowing really anything about how the 
technology works - but as the Microsoft Surface links got passed around 
a few days ago, one of the links was a DIY multi touch table.  I only 
skimmed the forum link really, but it had some screen shots of the 
fingers being pressed on the glass and the area where the fingers were 
looked like blobs (hence they were talking about blob detection 
algorithms).  I think they were using some kind of camera to point up at 
the table to detect where the finger blobs were.


If some kind of video camera that can work with flash can do whatever 
optically it needs to do, and AS3 is fast enough to perform whatever 
blob detection algorithms they need, then it's very much possible in 
flash.  But you know, those are big ifs. aren't they?

ben

Merrill, Jason wrote:

Curious, how are multi-touch events handled with Flash?  Currently isn't
even remotely possible is it?  Or maybe with an ActiveX wrapper of some
kind?

Jason Merrill
Bank of America  
GT&O Learning & Leadership Development

eTools & Multimedia Team


 

  

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Josh Santangelo

Sent: Monday, June 04, 2007 1:17 PM
To: Flashcoders mailing list
Subject: [Flashcoders] commercial flash multi-touch projects?

Hello list -- this may be OT or rule-breaking, but please 
don't kill me over it. I did a bit of work on the MS Surface 
project on a temporary basis and had a great time with it 
(see endquote.com for some info). Unfortunately due to some 
technology decisions in the group, Flash devs are not really 
needed anymore. I'd love to do more multi-touch work, but am 
not sure who's doing work in this area combined with Flash.


If anyone is involved in or aware of projects in this area in 
need of dev help, I'd love to hear about it.


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

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


  

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

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

  

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

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


[Flashcoders] Are there any classes available for MP3 encoding?

2007-05-30 Thread ben gomez farrell
I've used some of the com.adobe classes for PNG and JPG encoding, and 
was wondering if there were any similar classes available for MP3 
encoding.  I should add my disclaimer that I might not understand the 
make up of a sound file, but I'm assuming that I can go from a byteArray 
generated by computeSpectrum to an MP3 fileand my only hurdle is 
knowing how an MP3 file is made. 
If not MP3, anything else like WAV?

Thanks!
ben
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/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] Looking up property linked to an arraycollection item

2007-05-16 Thread Smeets, Ben
Hard to give this 'problem' a good subject. It's not really a 'problem',
but more something I wanted to pass by people to find out how they solve
this i.r.l. There are many ways to fix this, just looking for the best
:)

E.g. I have an object Person with a Property BirthCountry.

Public class Person {
public var BirthCountry:Number;
public function Person() {
}
}

The BirthCountry is an ID of a Country, stored in a ModelClass in an
ArrayCollection. The ArrayCollection is filled with id/value pairs.

How would everybody do this? Is the seperation of the Country Collection
a good thing? Would you create some sort of CountryVO objects, and give
that as a property to the Person? E.g.

Public class Person {
public var BirthCountry:BirthCountryVO;
public function Person() {
}
}

Or any other great ideas?

Tx in advance,

Ben


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] Can I read XML before it is loaded?

2007-05-15 Thread Smeets, Ben
Try the onData event handler of the XML object. Needs some extra magic I
think though. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alistair
Colling
Sent: dinsdag 15 mei 2007 16:07
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Can I read XML before it is loaded?

Hi there, I am sure I remember coming across a way of reading an XML
file before it is fully loaded though I can't find it. What I would like
to do is load all the information from an XML file but only if an
attribute in the first node has changed (this is like an ID that the
Flash app can use to decide whether or not to load all of the XML unless
it is a new version). Has anyone else heard of this of or is this
wishful thinking?
Thanks :)
Ali



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

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] tracking or receiving

2007-05-15 Thread Smeets, Ben
Hi, I think you are trying to load some sort of tracking gif of an
outside provider right? In that case, just load the gif through the
exact url you have been given. So if the url mentioned said
"bla.asp?a=5&b=7&c=8" etc, use that in your load function. The external
provider will make sure it is a gif being returned. 

Ben

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dr.ache
Sent: dinsdag 15 mei 2007 10:15
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] tracking or receiving

hello.

can you explain more detailed what that means: "i was asked to load a
1x1 pixel
... so i figured i would receive the following ... " !?

when someone asked you to load the gif bye applying the mentioned url
excactly the same person has to make sure, that you will get a gif in
return.

maybe he meant you should send the name of the gif you want to load via
variables like:
loadMovie("http://www.server.com/page.asp?var1=1x1.gif";);

?

For other informations ask the person you get that info from :)

greets,
dr.ache

Helmut Granda schrieb:
> Thanks,
>
> My other idea is to send the variables necessary with a regular 
> sendandload method. my only concern is that the server might not 
> recognize the variables since I'm not sending the headers along with 
> it and I'm not sure if they are necessary. I have been reading in 
> different places trying to determine exactly what variables are 
> neccesary and it looks to me like just sending the variables through 
> an object would suffice.
>
> Anyone has experience with this kind of tracking? I'm surprissed no 
> none yet has blogged about this specific item. at least not that I 
> have found between flash and asp/.net/php and such.
>
>
> On 5/14/07, dr.ache <[EMAIL PROTECTED]> wrote:
>>
>> hi.
>>
>> depends on what that server returns on that request. the asp file 
>> must return a gif in the response, otherwise the loadClip method 
>> fails.
>>
>> greets,
>> dr.ache
>>
>>
>> Helmut Granda schrieb:
>> > I was asked to load a 1x1 pixel gif to one of my movies so I 
>> > figured I would receive the following:
>> >
>> > http://www.server.com/thepixel.gif
>> >
>> > but I received this:
>> >
>> > http://www.server.com/page.asp?var1=a&var2=b&var3=c...
>> >
>> > to me it looks more like I need to send some variables to the 
>> > server rather than loading a gif.
>> >
>> >
>> > If i do the regular:
>> >
>> > var theHolder = this.createEmptyMovieClip("holder",
>> > this.getNextHighestDepth()
>> > );
>> > theHolder.loadMovie("
>> http://www.server.com/page.asp?var1=a&var2=b&var3=c...
>> >
>> > ");
>> >
>> > Would it still be able to track the gif?
>> >
>> > TIA
>> > ___
>> > Flashcoders@chattyfig.figleaf.com
>> > To change your subscription options or search the archive:
>> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> >
>> > Brought to you by Fig Leaf Software Premier Authorized Adobe 
>> > Consulting and Training http://www.figleaf.com 
>> > http://training.figleaf.com
>> >
>>
>> ___
>> Flashcoders@chattyfig.figleaf.com
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>

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

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] Motion to combine coders and newbies.

2007-05-14 Thread Smeets, Ben
Flashnewbies?? There is a list called flashnewbies?? Never knew that.
Subscribing as we speak. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: maandag 14 mei 2007 16:16
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Motion to combine coders and newbies.

I appreciate the arguments and kind words, but I vote to keep them
separate.  Here's why:

1) Flashnewbies does have some rather advanced topics from time to time,
but we need to help those people graduate to flashcoders, or if they
don't get an answer, encourage them to ask on Flashcoders.  
2) Flashnewbies is low-traffic (but not REAL low, I still see a dozen or
more messages a day), but that's a good thing in some ways.  
3) Flashnewbies is a good place to ask non-coding Flash questions, like
questions about the IDE or general strategy.
4) Flashbnewbies is (sorry to say), so much more polite, personal, and
friendly than Flashcoders.  Mixing the two, we'd lose that.  Flashcoders
is a huge 2000-unit townhome development in the city.  Flashnewbies is a
small 10 home neighborhood in the country.
5) People who don't get the help they need on Flashnewbies should ask on
Flashcoders anyway.
6) Flashcoders don't want to see a bunch of newbie questions on this
list, especially when the same questions get asked over and over. It
will add traffic they don't want to have to sort or mentally ignore.
7) More Flashcoders should consider subscribing to Flashnewbies just to
help people out.  Think of it as community service.  You might even
learn some things (I do). :)
8) If this proposal  requires further consideration, we should at least
open the same thread on Flashnewbies to get input from people over
there.  

Anyway, nice ideas, but personally, I don't think it would be the best
thing to combine the lists, no offense.

Jason Merrill
Bank of America
GT&O Learning & Leadership Development
eTools & Multimedia Team


 

>>-Original Message-
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] On Behalf Of Count 
>>Schemula
>>Sent: Sunday, May 13, 2007 8:54 PM
>>To: flashcoders list
>>Subject: [Flashcoders] Motion to combine coders and newbies.
>>
>>Hear me out before freaking out.
>>
>>1. Half of the posts in Coders are more or less Newbie posts anyhow.
>>
>>2. There is just not a lot of traffic in Newbies. So, it's hard to 
>>pick Coders brains and honestly, most Newbie questions can be answered

>>by a Coder in less than a minute. I post in Newbies, but answers can 
>>take days. Seems like Jason Merrill is one of the few Coders dedicated

>>to helping out those less fortunate.
>>
>>3. Making Newbies stronger benefits all. After a while, a typical 
>>dedicated Newbie will be able to field a lot of the other Newbie 
>>questions and the situation will level out.
>>
>>4. But oh, the increased traffic! Please. I have a dedicated gmail 
>>account for this list. It threads the posts together and has 
>>practically unlimited storage and very good search.
>>
>>5. Pound home the idea that Newbies need to title their posts as such
>>"No0b: How do I make a movie clip?" Coders don't have to do anything.
>>
>>6. What's good for Flash developers is good for  the Flash Platform.
>>Getting more Newbies to an intermediate level benefits the Flash 
>>Platform as a whole with better apps, better people in jobs to lobby 
>>for Flash, etc, etc.
>>
>>Ok, now you can freak out.
>>
>>--
>>count_schemula
>>___
>>Flashcoders@chattyfig.figleaf.com
>>To change your subscription options or search the archive:
>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>Brought to you by Fig Leaf Software
>>Premier Authorized Adobe Consulting and Training 
>>http://www.figleaf.com http://training.figleaf.com
>>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] Customized shape of flash player

2007-05-14 Thread Smeets, Ben
Nice!

But I don't get what the added value actually is? Must be missing it.
What does this make possible that flash and maybe some jscript hacks
cannot do regarding freeform flash? (masks etc.) 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: vrijdag 11 mei 2007 16:55
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Customized shape of flash player

>>Isn't possible without any form of masking. Would be nice though :)

>>That can't be done.

Yes it can.  :)  It should be clarified it can't be done natively, but
you can do it if you wrap around the Flash player with the Ice Player:

http://www.flashants.com/root/iceplayer.shtml

Requires the user have both Flash player and Ice player (and you have
purchased a server license for the Ice player)

Jason Merrill
Bank of America
GT&O Learning & Leadership Development
eTools & Multimedia Team

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

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


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@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


  1   2   3   >