Re: [Flashcoders] fullscreen security issue?

2009-11-24 Thread Ian Thomas
Hi Michael,
   No, FULL_SCREEN doesn't prevent mouse clicks; it just prevents most
keypresses (but still allows cursor keys, space, enter etc.).

HTH,
   Ian

On Tue, Nov 24, 2009 at 8:56 PM, Mendelsohn, Michael
 wrote:
> Hi list...
>
> I'm trying to set my swf (in a web page) to StageDisplayState.FULL_SCREEN and 
> StageScaleMode.SHOW_ALL.  It works, but oddly, the clickable items are still 
> clickable.  I thought in full screen mode, mouse and keyboard events are 
> supposed to be prevented, right?  And, when I click these still clickable 
> items, the entire screen goes black.  Anyone know how to solve this?
>
> Thanks!
> - Michael M.
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] AS3 mouseUpOutside not working, yuck!

2009-11-19 Thread Ian Thomas
What? mouseChildren=false always works, whether the job is simple or
not. That's what it was designed for!

Ian

On Thu, Nov 19, 2009 at 9:19 PM, Henrik Andersson  wrote:
> Ian Thomas wrote:
>>
>> Henrik,
>>    Setting mouseChildren=false on an InteractiveObject/Sprite is much
>> easier. The children no longer react to or originate mouse events.
>
> Agreed, it is easier. But the loop always works. I don't use it for simple
> cases. The right tool for the right job.
>
> ___
> Flashcoders mailing list
> Flashcoders@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] Swfs not loading in FF on PC

2009-11-19 Thread Ian Thomas
Joe,
   wmode=transparent is notoriously bugged, particularly on Firefox.
Adobe themselves advise against using it.

Ian

On Thu, Nov 19, 2009 at 8:54 PM, Joe Minkiewicz  wrote:
> I run into this issue a lot (I may have even posted here before asking for
> help about it).
>
> Has anyone run into an issue with swfs randomly not loading correctly in
> FireFox on PC? I have one regular client and once in awhile they say the
> swfs don't load—it's always FF on PC, Mac and other browsers work fine. I've
> never been able to figure it out. It's not 100% reproducible and on my PC
> virtual machine everything's fine. The best I can come up with is to turn
> off wmode=transparent but sometimes they need that and I'm not sure it's a
> real fix.
>
> I'm wondering if it's something to do with how I code the swfs? Maybe
> something to do with the preloader code? But it could also be something with
> their computers since they're the ones that see it. Any ideas? I've tried
> google but everything I find is old (FF2) or the fixes don't apply to my
> situation.
>
> Thanks,
> Joe
> ___
> Flashcoders mailing list
> Flashcoders@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 mouseUpOutside not working, yuck!

2009-11-19 Thread Ian Thomas
Henrik,
   Setting mouseChildren=false on an InteractiveObject/Sprite is much
easier. The children no longer react to or originate mouse events.

HTH,
   Ian

On Thu, Nov 19, 2009 at 9:00 PM, Henrik Andersson  wrote:
> Whenever I need to work with a reference to a leaf node, I run a loop like
> this:
>
> for(var obj=target;obj!=stage;obj=obj.parent) {
>        if(target is Type) {
>                yay();
>                break;
>        }
> }
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] new AS Editor, few secret videos

2009-11-19 Thread Ian Thomas
Fantastic - I used JetBrains IntelliJ IDE about 7 years ago, and it
was the best Java IDE I've ever come across.

Ian

On Thu, Nov 19, 2009 at 2:13 PM, Ivan Dembicki  wrote:
> Hello Ian,
>
>> http://code.google.com/p/minibuilder/
>
> Realaxy Editor is an editor of fundamentally different level.
> This is a new level of code editing tools regardless of programming
> language. No one has such editor yet.
> This editor is based on JetBrains MPS and will support tons of
> refactorings, very smart errors highlight (I hope, ALL compile errors
> will be highlighted in the editor), possibility of creating language
> extentions (look at the example here: http://vimeo.com/7503735 - how
> do you like enums in AS?) and many other revolutionary features.
> It's not a toy. It's an editor for all AS/Flex programmers for next
> 3-4 and more years.
>
> --
> iv
> http://www.bezier.ru
> http://bezier.googlecode.com
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] new AS Editor, few secret videos

2009-11-19 Thread Ian Thomas
Thanks, Ivan - it'll be interesting to see the full version of this!

There's also:

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

:-)

Ian

On Thu, Nov 19, 2009 at 1:13 PM, Ivan Dembicki  wrote:
> Hello FlashCoders,
>
> http://www.cleoag.ru/2009/11/12/langenfew-secret-videos-langenlangru-langru/
>
>
> --
> iv
> http://www.bezier.ru
> http://bezier.googlecode.com
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Who uses Adobe Flex?

2009-11-19 Thread Ian Thomas
I suggest you look at the website:

http://www.adobe.com/products/flash/

On Thu, Nov 19, 2009 at 9:01 AM, Sid Ferreira  wrote:
> And Adobe Flash?
>
> On Thu, Nov 19, 2009 at 06:47, Ian Thomas  wrote:
>
>> The Flex SDK is free,
>>
>> Flex Builder 3 (the current version) is $249
>>
>> Ian
>>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Who uses Adobe Flex?

2009-11-19 Thread Ian Thomas
The Flex SDK is free,

Flex Builder 3 (the current version) is $249

Ian

On Thu, Nov 19, 2009 at 8:40 AM, Sid Ferreira  wrote:
> Does Flex costs all that?
>
> I think flash/flex is no option :s
>
> It's too expensive to brazillian market :p
>
> On Wed, Nov 18, 2009 at 23:09, Paul Andrews  wrote:
>
>> Sid Ferreira wrote:
>>
>>> How many time Flex/Flash took to pay it self?
>>>
>>>
>> I think a lot of people on the flash lists don't realise how much money
>> some corporates invest in software development. $15K would be a fraction of
>> the development costs in some projects. It's a completely different
>> situation to freelancers that are working with their own development tools.
>> Corporates are rationalising development costs across many customers while
>> often freelancers/small companies are rationalising their costs from one or
>> very few customers.
>>
>> Paul
>>
>>  On Wed, Nov 18, 2009 at 22:29, Dave Watts  wrote:
>>>
>>>
>>>
 I am still quite amazed that Macromedia ever developed Flex. I suspect
>
>
 that


> a few people on the list might not know that originally it would cost
> something like $6,000 for a Flex licence and some serious server power
>
>
 was


> also required.
>
>
 More than that - Flex 1.x was around $15k USD according to our
 pricelist. And, frankly, it kind of sucked. But Flex 2 changed all
 that!

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/

 Fig Leaf Software provides the highest caliber vendor-authorized
 instruction at our training centers in Washington DC, Atlanta,
 Chicago, Baltimore, Northern Virginia, or on-site at your location.
 Visit http://training.figleaf.com/ for more information!
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



>>>
>>>
>>>
>>>
>>>
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
>
> --
> Sidney G B Ferreira
> Desenvolvedor Web
> ___
> Flashcoders mailing list
> Flashcoders@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] Who uses Adobe Flex?

2009-11-18 Thread Ian Thomas
I'd just like to add:

- I use Flash for some projects.
- I use the Flex SDK + Flash for other projects.

It's simply about choosing the right tool for the job.

Getting back to the original poster's question, as Giro has
demonstrated with his samples, yes there are good sites written in
Flex, and there's nothing stopping Sid achieving the sort of site he
was asking about in Flex if he wanted to.

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


Re: [Flashcoders] Who uses Adobe Flex?

2009-11-18 Thread Ian Thomas
On Wed, Nov 18, 2009 at 3:32 PM, Henrik Andersson  wrote:

> You seem to ignore the components that Flash does ship with. We can fight
> about whose components are the best, but I am not interested in that.

Neither am I.

> I also never claimed that they where rivals, I see them as different tools
> designed for different tasks.

They are different, _complementary_ tools, that's the point. Both can
be used together to achieve a task.

> You seem to think that importing stuff already made in Flash is the same as
> having all the features of Flash. I disagree. You do not get the same swf
> structure in the end. I am not even sure if the flex compiler even retains
> framelabels.

It does.

> I know for sure that it does not retain the document class. Given that it
> has a tendency to be critical for proper execution when used, removing it
> makes the swf useless.

That's because if you are using the Flex compiler, you already have an
entrypoint class (usually derived from Application, but can be derived
from Sprite) which is the equivalent of the Document class. Yes, it's
a different structure to your project, but ends up with much the same
results.

The approach to a Flex SDK based app is simply slightly different -
you write code for the Flex compiler, and treat Flash assets as
graphics.

As Cedric says, the integration between the two is getting closer, but
I'd very strongly argue that there's nothing you can do in Flash alone
that you can't achieve with Flex + Flash. I'd love an example to
disprove that.

> Oh, and as previously discussed, you need to use Flash in addition to Flex
> in order to import Flash assets. That's one more license you have to pay
> for.
> Either you use only the Flex sdk, Flex builder and the sdk, only Flash or
> Flash, flex sdk and flex builder. Using only Flash costs less than using
> Flash and Flex builder. But using only Flex builder costs less than only
> using Flash.

No you don't. You missed my point - you can use the Flex SDK, which is
free. If you already have Flash and are using it, there's no
additional cost. Personally, I don't use Flex Builder, I use
FlashDevelop + Flash.

> Of course, there are other editors (like notepad and flash develop) that you
> can use. But I know of no editor that has a working debugger other than
> Flash and Flex builder.

The Flex SDK provides a free debugger, actually, called FDB.
Command-line driven, but it is there.

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


Re: [Flashcoders] Who uses Adobe Flex?

2009-11-18 Thread Ian Thomas
On Wed, Nov 18, 2009 at 2:40 PM, Henrik Andersson  wrote:

> My opinion:
> I think that Flash is better for anything that isn't strictly code only, and
> that is more or less all projects, since it's quite boring to design
> graphics using code.
> The upcoming code completion in Flash CS 5 seems to take care of most coding
> needs in my opinion. It's not going to give you any fancy class feature
> listing panels or profilers, but those are rarely needed.
>
> If I had to chose what to use, I would use Flash, because I want to use the
> full swf format. I do not think that Flex alone can do that.

We seem to be getting confused between Flex, Flex Builder and Flash here.

Flash - obviously - is a vector graphics editor and a cut-down code
editor. It leans towards the visual side.

Flex Builder/Flash Builder is simply a programming environment - a
code editor and component layout tool. It leans towards the coding
side.

Flex (or the Flex SDK) is _not_ Flex Builder. It is a component
framework (written in ActionScript - and MXML which is actually
compiled to ActionScript) and a compiler. It can make use of any
assets created by Flash. (And yes, it can use the whole SWF format, by
drawing in SWF assets and recompiling them.)

You don't have to design graphics using code in Flex Builder; you can
design graphics in Flash, and use them from code that you write in
Flex Builder.

The two products are _complementary_, not rivals. Flex Builder works
together with Flash.

The choices for creating a website (which started this discussion)
include (but are not limited to):
1) Use Flash to do the layout; don't use the Flex framework classes,
write your own classes to support the Flash assets that you've
created.
2) Use the Flex component framework, create visual assets to use
within the framework using Flash, extend the Flex code with your own
logic to support the site.

2) need not be more expensive, as you don't have to use Flex Builder,
you can simply use the free Flex SDK.

Flex is effectively just a series of useful components with a bit of
syntactic sugar on top.

Reasons you _might_ want to use Flex for your project:
- A lot of hard work done for you. Why write another scrollbar or
progress bar from scratch when that code already exists?
- Very easy to layout complex forms and tables.
- Very easy to skin/change global appearance (using CSS)

Reasons you might not want to use Flex for your project:
- Including the Flex framework in your application makes your SWF
significantly bigger.
- Your site simply might not suit Flex; if you don't have form
layouts, tables and buttons to deal with, Flex may be overkill.

Once again - the two are _complementary_. It's not a choice between
the two. It's a choice between using Flash as is, or using Flash + a
library of premade components.

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


Re: [Flashcoders] one class listening for another classes dispatchedevent

2009-11-17 Thread Ian Thomas
Sorry, we're way off topic here. :-D I'll shut up.

Ian

On Tue, Nov 17, 2009 at 9:05 PM, Mendelsohn, Michael
 wrote:
> Alright, since I asked the question, I'm piping in.  I just finished a 
> project that became immensely complicated precisely because I eventually had 
> everything tightly coupled.  Had I used custom events and done some other 
> things from the get go, I'm nearly certain it would have been easier to do my 
> updates.  With the tight coupling of that project, it would be difficult for 
> anyone else to go into it in the future.
>
> In smaller one-off projects, I don't think it's a big deal, but I'm trying to 
> force myself to get in the habit of loosely coupling everything, via custom 
> events.
>
> - MM
>
> ___
> Flashcoders mailing list
> Flashcoders@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] one class listening for another classes dispatchedevent

2009-11-17 Thread Ian Thomas
*blink*

But those two components should not be tightly coupled.

Bad example, I think.

The HTTP client doesn't depend on the image parser; it's used to
provide HTTP services to a number of different components of a
browser. You could use the HTTP client code in complete isolation from
knowing anything about images - it might not even be used for a visual
browser. Exchanging data via HTTP is all it should do and all it
should care about.

As for the image parser, it's likely you'd have more than one image
parser - one for PNG, one for GIF, one for JPEG and so on. They don't
care whether they're parsing data fetched from an HTTP client or from
a local file. They just parse data.

The browser itself connects up the pieces. As I've already pointed
out, think of a browser displaying a local JPEG image. The HTTP client
code isn't even involved in that process. Then think of a browser
fetching, say, a text file. The image parser isn't involved in that
process.

I'm not saying you _couldn't_ write a browser where the two were
inextricably connected, but that's just poor design, it really is, if
you ever want to reuse any of your code or extend your browser in any
way.

Perhaps you can give a better example :-)

Ian

On Tue, Nov 17, 2009 at 8:34 PM, Henrik Andersson  wrote:
> Ian Thomas wrote:
>>
>> In which case they're actually one component, conceptually - if the
>> dependencies are really that inextricable. :o)
>>
>
> Two sub modules in a webbrowser is a http client and an image parser. Yet,
> they need to cooperate for images to download while being displayed.
>
> When do you draw the line? How does submodules interact with this rule? In
> the end, you need to start focusing on the individual case.
> ___
> Flashcoders mailing list
> Flashcoders@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] one class listening for another classes dispatchedevent

2009-11-17 Thread Ian Thomas
On Tue, Nov 17, 2009 at 8:06 PM, Henrik Andersson  wrote:

> Tight coupling can be an issue, if the coupled components shouldn't be
> coupled. It is not an issue at all if they more or less couldn't work
> without something doing the job of the other and few if any replacement
> options.

In which case they're actually one component, conceptually - if the
dependencies are really that inextricable. :o)

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


Re: [Flashcoders] RegExp question

2009-11-05 Thread Ian Thomas
Hi Michael,
  Firstly, I'm not quite sure your expression is right - it says g
_or_ 1 or 2 or 3 as the first character, whereas your sample starts
with a g then a 1.

  But anyway - what you need to do is to test for the beginning and
end of the string. In regular expressions, you do this with the ^ and
the $ character.

  You can also collapse down your expression to something a bit tighter.

  This works (with the sample strings you gave):

^g(1|2|3)(e|w)\d{3}(-\d{2})?$

  Which basically says match if:
The first character in the string is a g.
That's followed by a 1, 2 or 3.
Then a lower-case e or w (you could use (e|w|E|W) if you want to
handle uppercase too).
Then 3 digits
Then, possibly, a dash followed by two more digits.
Then the end of the string.

If any of that is false, the match won't happen.

By the way, a really good way to put together and test Regular
Expressions is to use Grant Skinner's online tool RegExr:
http://www.gskinner.com/RegExr/

Hope that helps (and gives you the results you want!)
  Ian

On Thu, Nov 5, 2009 at 8:23 PM, Mendelsohn, Michael
 wrote:
> Hi list...
>
> I have some input text box with a go button that is enabled or disabled based 
> on an Event.CHANGE for the TextInput.  As someone types in a string, a go 
> button becomes enabled or disabled, but I want the *entire* text in the text 
> box to be considered, not just a matched substring.  Is this possible?
>
> ((TextField(e.target).text).match(/(((g|1|2|3)(E|W)\d{3})|((g|1|2|3)(E|W)\d{3}-?(\d{2})?))/i))?activateGoButton(true):activateGoButton(false);
> For instance, the above code would enable the go button when you type the 
> text: "g1e222-"  But, it shouldn't at that point, because it should be 
> expeciting two more numbers.  Any tips are appreciated.
>
> Thanks,
> - Michael M.
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Colorizing Vector Drawn Image

2009-10-30 Thread Ian Thomas
If you just want to change the colour of the entire T-shirt, take a
look at the class:

flash.geom.ColorTransform

(accessed via displayObject.transform.colorTransform)

or look at doing it via a filter:

flash.filters.ColorMatrixFilter

If you want to colour the individual segments of the shirt separately,
you need to split the image apart into different clips/layers first,
then use one of the two method above.

HTH,
   Ian

On Fri, Oct 30, 2009 at 1:01 PM, Dave Dev  wrote:
> What's a quick way to colorize an image drawn with vector shapes in various
> shades of gray. I have a character with a t-shirt and I want to be able to
> change the color of the t-shirt using code at runtime. The t-shirt was drawn
> in illustrator and uses various shades of gray to depict the details.
> ___
> Flashcoders mailing list
> Flashcoders@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] Recommended method for copying CDROM app to application folder on Mac

2009-10-30 Thread Ian Thomas
Paul,

The 'traditional' Mac way of doing this is to make the user drag the
files into their Application folder for a simple, self-contained app.

(Assuming you're using a projector) ideally, your additional four .swf
files should be bundled inside your .app folder i.e. all your user
sees when he opens the disk is the MyProjector.app (put them inside
MyProjector.app/Content/Resources). If you can't do this, create a
folder to contain all your app files, call it MyProjector, and replace
my references to the .app file in the following text...

Then the standard way to do things is:
- Put MyProjector.app at the root of the CD-ROM
- Put a _shortcut_ link to your Applications folder at the root of the
CD-ROM (this'll work no matter whose machine the disk opens on)
- Put a custom background on the CD-ROM folder with instructions like
'drag *this* (arrow to MyProjector.app) to *this* (arrow to
Applications link) to install'. And position the icons appropriately.

Hope that's helpful.

Ian


On Fri, Oct 30, 2009 at 12:34 PM, Paul Steven
 wrote:
> I am creating a cross platform CDROM using Flash CS3 and Toast 10. My client
> would like the app to be copied to the users hard drive rather than the user
> just playing it directly off the CDROM. I have therefore created an
> installer for the PC side of things using Inno installer. There does not
> appear to be any free or reasonably priced Mac installer maker software so I
> am seeking advice on the alternatives.
>
> My app contains a main application file plus 4 swf files (one for each of
> the 4 games) and a readme file.
>
> Any advice appreciated on what the best way to do this is. I am not very Mac
> savvy.
>
> Thanks
>
> Paul
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] as3 to iphone app

2009-10-29 Thread Ian Thomas
On Thu, Oct 29, 2009 at 3:48 AM, Kerry Thompson  wrote:

>> don't swfs compiled from c run faster in the plugin than ones compiled
>> in actionscript? i thought i read that
>
> I don't know of a way to compile a swf from C, or any machine-language
> compiler. I'm not quite sure about iPhone apps developed in Flash--they may
> compile to native code, but there isn't a way to compile a swf to machine
> language that I know of.
>
> If there was, yes, it would run faster than Flash or Flex swf's. Anything
> that compiles to machine code will run faster than something that compiles
> to a token and runs on a virtual machine.

Alchemy compiles C++ to Actionscript bytecode.

Some of the generated bytecode _is_ faster than bytecode compiled from
AS3, partially because Alchemy uses a bunch of new bytecode
instructions for directly manipulating blocks of memory --
instructions that are not used by the current AS3 compiler.

However, some things aren't faster; they're identical.

As far as the iPhone goes, the AS3 is being compiled directly into
iPhone native code, not bytecode; in the same way as Objective C is
compiled to native code.

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


Re: [Flashcoders] mac projector

2009-10-28 Thread Ian Thomas
Latcho, Glen,

It's the 'Contents/Resources' folder.

So if you main movie does (for example):

loader.load(new URLRequest("movie2.swf"), new LoaderContext(false,
ApplicationDomain.currentDomain));

It will load the movie at:

myApp.app/Contents/Resources/movie2.swf

(I've just checked our Mac projector sourcecode... that's what's
working for us!)

HTH,
   Ian

On Tue, Oct 27, 2009 at 11:17 PM, Glen Pike  wrote:
> Hi,
>
>   I think it's relative to the project.app - the mac treats that as an
> "executable" - although this was on CS3 published cross-platform projector.
>  I had my project.app and projector.exe in the root of the CD and loading a
> swf file with the main application in, which in turn loaded files from a
> data dir:
>
>   project.app
>   projector.exe
>   main.swf
>   data/
>   --blah.xml
>
>   Hope this helps.
>
>   Glen
>
> Latcho wrote:
>>
>> Hello,
>>
>> Trying to publish a flash8 mac projector in CS4 turns out to be a tad
>> changed.
>> I published years ago in flash 8 on PC to a mac .HQX file and could put my
>> additional loadable swf files next to it.
>> Now in CS4 I'm forced to publish a mac .APP folder.
>> So this stuff will be used on a hybrid cdrom and loads several additional
>> swf's.
>> Anybody knows what the relative root is of the project when you load in
>> additional swf files ?
>> Am I supposed to add the additional loadable swf files next to the
>> project.app
>> or do I have to put them in the Resources folder on the level of movie.swf
>> and Flash Player.rsrc
>> CD:.
>> └───project.app
>> └───Contents
>> │ Info.plist
>> │ PkgInfo
>> │
>> ├───MacOS
>> │ Flash Player
>> │
>> └───Resources
>> │ document.icns
>> │ Flash Player.rsrc
>> │ icon.icns
>> │ mflv.icns
>> │ movie.swf
>> │
>> ├───cs.lproj
>> │ Localized.rsrc
>> │
>> ├───de.lproj
>> │ Localized.rsrc
>> ...
>>
>> Thanks,
>> Latcho.
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk 
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Website in an application

2009-10-27 Thread Ian Thomas
Hi John,
   I'd take a look at AIR. It allows you to drop in real HTML
components (using the WebKit engine, the same thing that Safari uses)
controlled from a Flash application.

HTH,
   Ian

On Tue, Oct 27, 2009 at 7:27 PM, John R. Sweeney Jr
 wrote:
> Howdy List,
>
> My client wants a touchscreen application. I've done several on 50" plasma
> screens before for them using a Flash projector on a PC, but the kink in
> this one is the client wants to be able to view the corporate website in the
> Flash app. They don't want a browser popping up over the app, but to appear
> inside the program. And of course they only want the user to navigate around
> the corporate site, not go to other sites, so no access to a url window
> either. :)
>
> Suggestion or a place of a reference for a similar project would be GREATLY
> appreciated.
>
> Thanks in advance for any advise or help,
> John
>
>
> John R. Sweeney Jr.
> Interactive Multimedia Developer
>
>
> OnDemand Interactive Inc
> 945 Washington Blvd.
> Hoffman Estates, IL 60169
> Office/Fax: 847.310.5959
> Cellular: 847.651.4469
> www.ondemandinteractive.com
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Printing Canvas

2009-10-23 Thread Ian Thomas
Karl,
  It'll work in either AS2 or AS3.

Ian

On Fri, Oct 23, 2009 at 9:41 PM, Karl DeSaulniers  wrote:
> Hi Ian,
> Is this an AS3 examlpe, or can that be done in AS2?
>
> Karl
>
> Sent from losPhone
>
> On Oct 23, 2009, at 11:33 AM, Ian Thomas  wrote:
>
>> Hi Kevin,
>>  To set what's going to the printer to fit:
>>
>>  Get the print pageWidth/pageHeight from the PrintJob object (after
>> calling start()).
>>
>>  Use the scaleX, scaleY of the clip you are printing to make it fit
>> within that pageWidth/pageHeight.
>>
>>  Call addPage(), passing the clip.
>>
>>  Call send().
>>
>> HTH,
>>  Ian
>>
>> On Tue, Oct 20, 2009 at 8:45 PM, Kevin Holleran  wrote:
>>>
>>> Good afternoon,
>>>
>>> I wrote a little flash app that loads coupons from an XML file and
>>> formats them to display on a webpage.  When going to print these, I
>>> simply sent the canvas to the printer.  However, the side of the
>>> coupons are cut off.  Is there a way to shrink what is sent to the
>>> printer (without getting too complex) or a way to export the entire
>>> canvas as a JPG and resize that prior to being sent to the printer?
>>>
>>> Thanks for any suggestions.
>>>
>>> Kevin
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.com
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> ___
> Flashcoders mailing list
> Flashcoders@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] Printing Canvas

2009-10-23 Thread Ian Thomas
Try copying using BitmapData, not ByteArray. Take a visual snapshot,
not an object snapshot.

Ian

On Fri, Oct 23, 2009 at 6:03 PM, Kevin Holleran  wrote:
> On Fri, Oct 23, 2009 at 12:48 PM, Kevin Holleran  wrote:
>> How can a copy the display object into another so that I can
>> manipulate the coped object but not the original?  I want to copy the
>> object, not the reference.
>>
>> Thanks.
>>
>> Kevin
>>
>
> Okay I have the following code:
>
>        public class Coupons extends Sprite {
>                public var mainMovieClip:MovieClip;
>                public var printMovieClip:MovieClip = new MovieClip();
>                var bytes:ByteArray = new ByteArray();
>
> .
>
>                public function printCoupons(ev:Event) {
>                        // we set the zoom to 100%
>                        myPDF.setDisplayMode ( Display.REAL );
>                        bytes.writeObject(mainMovieClip);
>                        bytes.position = 0;
>                        printMovieClip = bytes.readObject();
>                        printMovieClip.removeChild(printBtn);
>                        printMovieClip.scaleX = .9;
>                        printMovieClip.scaleY = .9;
>                        // we add a page
>                        myPDF.addPage();
>                        myPDF.addImage(printMovieClip);
>
> When I click the print button, I am receiving an error:
>
> TypeError: Error #1009: Cannot access a property or method of a null
> object reference.
>        at Coupons/printCoupons()
>
> I don't understand what the null object is.  When I remove the
> attempted clone of the object, the export to PDF works great, but I
> don't want the scale to effect the actual canvas.
>
> Thanks for any help.
>
> Kevin
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Printing Canvas

2009-10-23 Thread Ian Thomas
You could take a bitmap copy (BitmapData.draw()).

Alternatively, you could just rescale the original, print, then scale
back again...

Ian

On Fri, Oct 23, 2009 at 5:48 PM, Kevin Holleran  wrote:
> How can a copy the display object into another so that I can
> manipulate the coped object but not the original?  I want to copy the
> object, not the reference.
>
> Thanks.
>
> Kevin
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Printing Canvas

2009-10-23 Thread Ian Thomas
Hi Kevin,
   To set what's going to the printer to fit:

   Get the print pageWidth/pageHeight from the PrintJob object (after
calling start()).

   Use the scaleX, scaleY of the clip you are printing to make it fit
within that pageWidth/pageHeight.

   Call addPage(), passing the clip.

   Call send().

HTH,
   Ian

On Tue, Oct 20, 2009 at 8:45 PM, Kevin Holleran  wrote:
> Good afternoon,
>
> I wrote a little flash app that loads coupons from an XML file and
> formats them to display on a webpage.  When going to print these, I
> simply sent the canvas to the printer.  However, the side of the
> coupons are cut off.  Is there a way to shrink what is sent to the
> printer (without getting too complex) or a way to export the entire
> canvas as a JPG and resize that prior to being sent to the printer?
>
> Thanks for any suggestions.
>
> Kevin
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Any issues to be concerned about with Snow Leopard

2009-10-23 Thread Ian Thomas
Hi Paul,
   It's always worth a test!

   Snow Leopard has some significant differences from Leopard under
the hood, but Apple are very good at backwards compatibility. If
you're not doing anything unusual, you should be okay.

   But if you're prepared to put the app up on an FTP site or
something, I'll happily double-check it runs on Snow Leopard for you
here - I have a couple of different Snow Leopard machines. The fact
it's not on CD-ROM shouldn't make any difference.

  HTH,
 Ian

On Fri, Oct 23, 2009 at 10:39 AM, Paul Steven
 wrote:
> Just creating a cross platform CDROM and wondered if it is necessary to get
> a copy of Snow Leopard to test it on? I don't currently have this OS for my
> Mac Mini and would like to know if there are likely to be any issues when
> playing the CDROM on this new OS that I would not experience on the previous
> OS?
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating Cross-Platform CDROM

2009-10-22 Thread Ian Thomas
Karl - but what I'm saying is that both will be _visible_ on both platforms.

If that's acceptable to Paul/his client, then great! If not, he needs
to look at the hybrid CD option.

Ian

On Thu, Oct 22, 2009 at 9:22 AM, Karl DeSaulniers  wrote:
> Sorry to interject, but you have to export an "EXE" for PC and a "Projector"
> for MAC
> and then you can burn those to a CD and both platforms will be able to run
> from the cd.
> I thought you were just talking about having the disk read.
>
> Karl
>
>
> On Oct 22, 2009, at 3:09 AM, Paul Steven wrote:
>
>> Ian, assuming there is a different executable file for both mac and pc,
>> does
>> this mean that both would be visible on both platforms?
>>
>> Will look at the hybrid kit in the meantime.
>>
>> Thanks
>>
>> Paul
>>
>> -Original Message-
>> From: flashcoders-boun...@chattyfig.figleaf.com
>> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian Thomas
>> Sent: 22 October 2009 08:36
>> To: Flash Coders List
>> Subject: Re: [Flashcoders] Creating Cross-Platform CDROM
>>
>> I may have misunderstood Paul's requirements.
>>
>> Paul - if you want to make all files on the disk visible to both
>> platforms, just normally burning a disk on Windows or Mac should be
>> fine (as Karl suggests).
>>
>> If you want _different_ files to appear to each platform, look at
>> something like the Hybrid CD kit I suggested.
>>
>> HTH,
>>   Ian
>>
>> On Thu, Oct 22, 2009 at 8:29 AM, Karl DeSaulniers 
>> wrote:
>>>
>>> What are you using to burn your CD if your not using Toast?
>>> Are you on a PC or can you use a MAC?
>>> If your on a MAC using 10 or greater, you can just put in a CD and it
>>
>> should
>>>
>>> ask you what to do.
>>> Choose "Open Finder" (I believe is the option) it will load your cd to
>>> the
>>> desktop
>>> and you can open it and load it up with files like a thumbdrive or any
>>
>> other
>>>
>>> device.
>>> Make sure you dont just move your files, make sure their copying. Hold
>>> the
>>> option key when moving them to the folder.
>>> When your done copying the files to the "burn folder" (the image of your
>>
>> CD
>>>
>>> on the desktop),
>>> up in the right corner, there should be a "burn cd" button on the edge of
>>> the window.
>>> Click it and sit back.
>>>
>>> If you burn your cd this way, MAC automatically sets it to a cross
>>
>> platform
>>>
>>> format (I believe)
>>> HTH
>>>
>>> Karl
>>>
>>>
>>> On Oct 22, 2009, at 1:52 AM, Paul Steven wrote:
>>>
>>>> Been a long time since I have had to make a cross platform CDROM, or
>>>> even
>>>> a
>>>> CDROM at all to be honest. Anyway I have developed a series of
>>
>> educational
>>>>
>>>> games with Flash CS3, with the main packaged file packaged with MDM Zinc
>>>> (to
>>>> enable me to have a coloured background outside the stage area).
>>>>
>>>> I would appreciate any advice on the best way to create a cross platform
>>>> CDROM. Can I create this on the PC or do I need to purchase Toast for
>>>> the
>>>> Mac to do this?
>>>>
>>>> Thanks in advance
>>>>
>>>> Paul
>>>>
>>>> ___
>>>> Flashcoders mailing list
>>>> Flashcoders@chattyfig.figleaf.com
>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>> Karl DeSaulniers
>>> Design Drumm
>>> http://designdrumm.com
>>>
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.com
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Creating Cross-Platform CDROM

2009-10-22 Thread Ian Thomas
On Thu, Oct 22, 2009 at 9:09 AM, Paul Steven  wrote:
> Ian, assuming there is a different executable file for both mac and pc, does
> this mean that both would be visible on both platforms?

Just using standard burning options, yes. Which isn't necessarily a
problem, as long as your users are fairly savvy, but is at the least
untidy!

The important thing about Hybrid CDs is that some files are hidden
from one platform, and some from another (although some can be shared
across both).

Typically, for example, we include Windows autorun.exe and Setup.exe
visible only to Windows, an AIR file visible to both platforms, and
the Mac AIR installer visible only to the Mac.

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


Re: [Flashcoders] Creating Cross-Platform CDROM

2009-10-22 Thread Ian Thomas
Not that I've found yet...

But to be honest, however much of the build/disk creation process I've
managed to automate on the PC (and on Ubuntu), I've always found it's
necessary to go to the Mac for some of the process (notably DMG
creation - can't find a decent tool for that on PC - and application
of background images etc. to a Mac disk image). If you're serious
about distributing for a Mac, then you need a Mac.

(For testing, if nothing else!)

Ian

On Thu, Oct 22, 2009 at 8:35 AM, Cor  wrote:
> Is there an Hybrid CD Construction Kit version for the PC?
>
> Regards
> Cor
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian Thomas
> Sent: donderdag 22 oktober 2009 9:29
> To: Flash Coders List
> Subject: Re: [Flashcoders] Creating Cross-Platform CDROM
>
> We use James Walker's Hybrid CD Construction Kit on the Mac:
>
> http://www.jwwalker.com/pages/hybrid-cd.html
>
> HTH,
>   Ian
>
> On Thu, Oct 22, 2009 at 7:52 AM, Paul Steven 
> wrote:
>> Been a long time since I have had to make a cross platform CDROM, or even
> a
>> CDROM at all to be honest. Anyway I have developed a series of educational
>> games with Flash CS3, with the main packaged file packaged with MDM Zinc
> (to
>> enable me to have a coloured background outside the stage area).
>>
>> I would appreciate any advice on the best way to create a cross platform
>> CDROM. Can I create this on the PC or do I need to purchase Toast for the
>> Mac to do this?
>>
>> Thanks in advance
>>
>> Paul
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Creating Cross-Platform CDROM

2009-10-22 Thread Ian Thomas
I may have misunderstood Paul's requirements.

Paul - if you want to make all files on the disk visible to both
platforms, just normally burning a disk on Windows or Mac should be
fine (as Karl suggests).

If you want _different_ files to appear to each platform, look at
something like the Hybrid CD kit I suggested.

HTH,
   Ian

On Thu, Oct 22, 2009 at 8:29 AM, Karl DeSaulniers  wrote:
> What are you using to burn your CD if your not using Toast?
> Are you on a PC or can you use a MAC?
> If your on a MAC using 10 or greater, you can just put in a CD and it should
> ask you what to do.
> Choose "Open Finder" (I believe is the option) it will load your cd to the
> desktop
> and you can open it and load it up with files like a thumbdrive or any other
> device.
> Make sure you dont just move your files, make sure their copying. Hold the
> option key when moving them to the folder.
> When your done copying the files to the "burn folder" (the image of your CD
> on the desktop),
> up in the right corner, there should be a "burn cd" button on the edge of
> the window.
> Click it and sit back.
>
> If you burn your cd this way, MAC automatically sets it to a cross platform
> format (I believe)
> HTH
>
> Karl
>
>
> On Oct 22, 2009, at 1:52 AM, Paul Steven wrote:
>
>> Been a long time since I have had to make a cross platform CDROM, or even
>> a
>> CDROM at all to be honest. Anyway I have developed a series of educational
>> games with Flash CS3, with the main packaged file packaged with MDM Zinc
>> (to
>> enable me to have a coloured background outside the stage area).
>>
>> I would appreciate any advice on the best way to create a cross platform
>> CDROM. Can I create this on the PC or do I need to purchase Toast for the
>> Mac to do this?
>>
>> Thanks in advance
>>
>> Paul
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating Cross-Platform CDROM

2009-10-22 Thread Ian Thomas
We use James Walker's Hybrid CD Construction Kit on the Mac:

http://www.jwwalker.com/pages/hybrid-cd.html

HTH,
   Ian

On Thu, Oct 22, 2009 at 7:52 AM, Paul Steven  wrote:
> Been a long time since I have had to make a cross platform CDROM, or even a
> CDROM at all to be honest. Anyway I have developed a series of educational
> games with Flash CS3, with the main packaged file packaged with MDM Zinc (to
> enable me to have a coloured background outside the stage area).
>
> I would appreciate any advice on the best way to create a cross platform
> CDROM. Can I create this on the PC or do I need to purchase Toast for the
> Mac to do this?
>
> Thanks in advance
>
> Paul
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] [MEMORY LEAK]

2009-10-01 Thread Ian Thomas
Just out of interest - why are you recreating the Loader() and
re-adding the listeners each time? It should work if you just create
the Loader once, add the listeners once - then every time you call
load() with a new URLRequest, you'll get new progress and complete
events.

Might help with your leaks.

HTH,
   Ian

On Thu, Oct 1, 2009 at 2:28 AM, TS  wrote:
> Thanks for the info. Still reading it but, fme, it seems silly there's not
> an ExitRestart() method or something.
>
> Thanks, T
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Chris Foster
> Sent: Wednesday, September 30, 2009 7:08 PM
> To: Flash Coders List
> Subject: RE: [Flashcoders] [MEMORY LEAK]
>
> Hi T,
>
> No solution here, but this might relate to your current problem:
> http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html
>
>
> C:
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of TS
> Sent: Thursday, 1 October 2009 10:53 AM
> To: 'Flash Coders List'
> Subject: [Flashcoders] [MEMORY LEAK]
>
> Hello, this issue is killing me. I had a swf that loaded an xml file
> then loaded images from the xml file and then killed the display list,
> xml, images etc... then restarted based on a timer. Every time it
> reloads however, I watch firefox take away memory consistently and when
> I refresh that page memory use drops back to normal. So, I said screw
> this, I'm going to create an empty swf and load the swf with all the
> magic in it and add it to the empty swf. I figured if I add the swf to
> the main stage and kill that one reference to the swf when I was done
> with it, I should have fixed my problem. Here's my code. Can someone
> please tell me what is going on?
>
>
> stop();
>
> var mLoader:Loader = new Loader();
> function startLoad()
> {
>        var mRequest:URLRequest = new
> URLRequest("hasch_flash/currently_watched_videos.swf");
>        //var mRequest:URLRequest = new
> URLRequest("currently_watched_videos.swf");
>        mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
> onCompleteHandler, false, 0, true);
>
> mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
> onProgressHandler, false, 0, true);
>        mLoader.load(mRequest);
> }
>
> function onCompleteHandler(loadEvent:Event)
> {
>        trace("load " + loadEvent.currentTarget.content);
>        trace("loadTarget " + loadEvent.target);
>        addChild(loadEvent.currentTarget.content);
> }
> function onProgressHandler(mProgress:ProgressEvent)
> {
>        var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
>        trace(percent);
> }
> startLoad();
>
>
> TimerExample();
>
> // Set off timer to kill carousel and restart movie function
> TimerExample() {
>        var myTimer:Timer = new Timer(3, 0);
>        myTimer.addEventListener("timer", timerHandler);
>        myTimer.start();
> }
>
> function timerHandler(event:TimerEvent):void {
>        trace(this.removeChildAt(0)); // remove from display list
>        mLoader = null;
>        mLoader =  new Loader(); // clear from memory
>        startLoad();
>        trace("timerHandler: " + event);
> }
>
>
> Thanks for any advice. T
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> This e-mail, including any attached files, may contain confidential and
> privileged information for the sole use of the intended recipient.  Any
> review, use, distribution, or disclosure by others is strictly prohibited.
> If you are not the intended recipient (or authorized to receive information
> for the intended recipient), please contact the sender by reply e-mail and
> delete all copies of this message.
>
> ___
> Flashcoders mailing list
> Flashcoders@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] FOTB

2009-09-25 Thread Ian Thomas
Most interesting, to me, was the new features in AIR 2.0.

More specifically:
- Being able to package native code
- Being able to create .DMG and .EXE files
- Being able to detect when pluggable storage devices (USB sticks
etc.) are plugged into the system

Ian

On Thu, Sep 24, 2009 at 3:51 PM, matt  wrote:
> Hey, did anyone attend/pay attention to Flash on the Beach?
> Seems like some great content this year, was wondering what the list
> thought.
> Some cool stuff like Joa Ebert's Apparat & Andre Michelle's
> sound/PixelBender stuff, but since this list generally runs toward the less
> esoteric aspects of AS3, I was wondering if any content grabbed ya.
>
> --Matt
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Loading local files with query strings

2009-09-14 Thread Ian Thomas
Don't use query strings?

Seriously - local file names on files systems don't take query
strings. You don't have any files called C:\windows\test.exe?id=33, do
you?

To make a query string work, you need to route the call through an HTTP server.

Sounds like you're trying to avoid caching? But I'm not clear why
you'd want to avoid caching a local, non-dynamic file...

Ian

On Mon, Sep 14, 2009 at 7:16 PM, Álvaro Saraiva  wrote:
> Hi everyone,
> I have a strange problem loading external assets from local files with
> Loader() Class in AS3.
> If i use query string in the file name, the asset don't loads.
>
> This code doesnt load the swf file inside a class
> this.mySWFLoader = new Loader();
> this.mySWFLoader.contentLoaderInfo.addEventListener(Event.INIT,
> displaySwfContainer );
> this.mySWFLoader.load(new URLRequest("my_swf.swf?id=33"));
>
> if i dont use the '?id=33' it works.
>
> Any suggestions?
> Thanxs in advance,
> Álvaro
>
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@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] letter spacing changes when animating text fields

2009-09-13 Thread Ian Thomas
Firstly make sure that the text is an embedded font.

Secondly make sure that the antialias type is set to 'for animation'
rather than 'for readability'.

HTH,
   Ian

On Sun, Sep 13, 2009 at 6:29 PM, Tom Huynen  wrote:
> Hi,
>
> I'm trying to animate a sprite containing several sprites with a text field
> in each of them. The animation is far from fluid though. The letter spacing
> of the text field seems to change.
> I had this problem before already. I tried different tween engines and hand
> written animation using an onEnterFrame event but still no good luck.
>
> Does anybody know a workaround?
>
> The problem can be seen over here when you click the plus and minus sign:
> http://www.10pix.nl/Steiner/#/0_0_0
>
> Thanks!
>
> Tom
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] RE: Rather urgent advice on how to track the cause of a crash

2009-09-06 Thread Ian Thomas
Sounds like a good idea. Sometimes movies just corrupt - copying and
pasting is a good answer. (Save and Compact can sometimes sort out
those sort of bugs too...)

Ian

On Sun, Sep 6, 2009 at 9:29 PM, Paul Steven wrote:
> Got rid of font problem by cutting and pasting all frames into a new movie.
>
> I am hoping this will also result in a bug free game.
>
> Thanks again to everyone for their help in my time of need. I have my
> fingers and toes crossed that the game will not crash anymore.
>
> Cheers
>
> Paul
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Steven
> Sent: 06 September 2009 20:36
> To: 'Flash Coders List'; 'Alan Watts'
> Subject: RE: [Flashcoders] RE: Rather urgent advice on how to track the
> cause of a crash
>
> Still plugging away at this and have just tried opening the file in Flash
> CS4. Couple of strange things.
>
> It brought up a font mapping dialog box saying a font "HelveticaCE" is
> contained in my movie and not on my system. I do not recall this font being
> added and if I do a "Generate Size Report", it is not detailed here. I have
> mapped it to Helvetica but this seems strange that I cannot find it - anyone
> suggest a way to find it? I tried using Movie Explorer too.
>
> Also another weird thing after I closed this dialog box, I got an error
> saying a script in your movie is causing the movie to This was before I
> had even tried to publish or test the movie. Strange thing too is that if I
> close Flash CS4 and reopen I do not get this error again. So perhaps it was
> just a one off - very strange!
>
> Anyway I have published the game using CS4 with same publish settings and
> haven't got the crash again yet but that doesn't mean it won't re-appear.
>
> Is it worth rewriting the code in AS3? There isn't really much code in this
> game - it is simply a plane controlled by mouse that flies over a terrain.
> Main code as follows just in case anyone spots anything that is likely to
> cause a problem. This code is called onEnterFrame
>
> function faceMouse(obj:MovieClip)
> {
>
>         var r2d = 180 / Math.PI;
>
>     var dx:Number = _xmouse - obj._x;
>     var dy:Number = _ymouse - obj._y;
>
>
>     var rads = Math.atan2(dy, dx);
>
>
>     obj._rotation = rads * r2d;
>
>        _level0.planeShadowMC._rotation = obj._rotation;
> }
>
>
> function moveToMouse( obj:MovieClip, distance:Number)
> {
>        var dx:Number = _xmouse - obj._x;
>    var dy:Number = _ymouse - obj._y;
>
>    var rads:Number = Math.atan2( dy, dx);
>
>        var numNewMapX = gameMap.mapAll._x - Math.cos( rads) * distance;
>        var numNewMapY = gameMap.mapAll._y - Math.sin( rads) * distance;
>
>        if (dx > 0) {
>
>                if (numNewMapX >= objGame.numMinX) {
>
>                        gameMap.mapAll._x = numNewMapX;
>
>                }
>
>        } else {
>
>                if (numNewMapX <= objGame.numMaxX) {
>
>                        gameMap.mapAll._x = numNewMapX;
>
>                }
>
>
>        }
>
>
>        if (dy > 0) {
>
>                if (numNewMapY >= objGame.numMinY) {
>
>                        gameMap.mapAll._y = numNewMapY;
>
>                }
>
>        } else {
>
>                if (numNewMapY <= objGame.numMaxY) {
>
>                        gameMap.mapAll._y = numNewMapY;
>
>                }
>
>
>        }
>
>        radar.radarMap._x = (gameMap.mapAll._x/10) + 70;
>        radar.radarMap._y = (gameMap.mapAll._y/10) + 46;
>
> }
>
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Steven
> Sent: 06 September 2009 16:17
> To: 'Alan Watts'; flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] RE: Rather urgent advice on how to track the cause of
> a crash
>
> Out of interest, Alan, what information will the fdb give me if I can
> replicate the crash?
>
>
>
> Thanks
>
>
>
> Paul
>
>
>
> From: Alan Watts [mailto:a...@datax.com]
> Sent: 05 September 2009 18:47
> To: flashcoders@chattyfig.figleaf.com
> Cc: Paul Steven
> Subject: RE: Rather urgent advice on how to track the cause of a crash
>
>
>
> fdb?
>
>
>
> http://livedocs.adobe.com/flex/3/html/help.html?content=debugging_03.html
>
>
>
> It's a good way to trackdown elusive bugs.  Hopefully you can recreate the
> error though, because you'd be the only one who can do the inspection.
>
>
>
> Alan
>
>
>
>
>
>
>
> On Sep 5, 2009, at 11:00 AM, flashcoders-requ...@chattyfig.figleaf.com
> wrote:
>
>
>
>
>
> I have created a game in Flash CS3 which is being published for Flash 8 AS2.
> My client is reporting it crashing periodically on his XP PC. I have also
> managed replicate this on my Vista Ultimate PC with the following error:
>
> "A problem caused the program to stop working correctly. Windows will close
> the program and notify you if a solution is available"
>
>
>
> ___

Re: [Flashcoders] Rather urgent advice on how to track the cause of a crash

2009-09-05 Thread Ian Thomas
Don't see why not, as long as you don't have any effects or
cacheAsBitmap being applied to the entire MovieClip.

Re your mouse show/hide thing - don't think it should cause a problem,
but if it _does_: you are calling mouse show() or hide() every frame,
but you could simply set a flag - is the mouse already invisible? If
so, don't call Mouse.hide() again... is the mouse already visible? If
so, don't call Mouse.show() again.

(typed quickly on way out of house so may not make sense!)

Hope you get somewhere with it.

Cheers,
   Ian

On Sat, Sep 5, 2009 at 5:25 PM, Paul Steven wrote:
> Quick question.
>
> Can I simply break up the jpb into 4 chunks and position them inside one
> movie clip rather than have to move 4 separate movie clips? If this is the
> case then it is a really simple fix.
>
> Cheers
>
> Paul
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian Thomas
> Sent: 05 September 2009 16:49
> To: Flash Coders List
> Subject: Re: [Flashcoders] Rather urgent advice on how to track the cause of
> a crash
>
> You may not be using Bitmap functions - but any filters etc. will use
> them under-the-hood, and will have the 2880x2880 limits.
>
> I'd be tempted to suggest that you break up your large background JPG
> into four chunks; see if that clears the crash.
>
> HTH,
>   Ian
>
> On Sat, Sep 5, 2009 at 4:41 PM, Paul Steven
> wrote:
>> Thanks Ian
>>
>> I am not using any bitmap functions. I literally just have the jpg inside
> a
>> movie clip and move it based on the mouse position in relation to the
> plane
>> (the plane is centred on the screen). The only other game element really
> is
>> 20 clouds that randomly move across the screen.
>>
>> I am doing as you suggest and commenting out each potential game element
> and
>> trying to isolate the problem.
>>
>> I was hoping there was some way of using a debugger version of the flash
>> player to get more information on the problem but this does not seem to be
>> possible.
>>
>> Cheers
>>
>> Paul
>>
>> -Original Message-
>> From: flashcoders-boun...@chattyfig.figleaf.com
>> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian Thomas
>> Sent: 04 September 2009 19:22
>> To: Flash Coders List
>> Subject: Re: [Flashcoders] Rather urgent advice on how to track the cause
> of
>> a crash
>>
>> On Fri, Sep 4, 2009 at 6:16 PM, Paul Steven
>> wrote:
>>
>>> The game is basically a top down flying game with a scrolling background
>>> (JPG 5120 X 4320). The flash movie is published at 1600 x 1200 30 FPS. It
>>> includes an embedded FLV video on the Splash screen which is apparently
>>> 639kb of video data. There are no audio files in the game.
>>
>> Only immediate thing in that is that bitmaps in Flash Player 8 and 9
>> need to be less than 2880 x 2880 pixels or bitmap functions will
>> simply fail. (Doesn't apply to Flash 8/9 content being run in Flash
>> Player 10, afaik).
>>
>> Other than that - my normal approach to such things is to find a way
>> to replicate the error if possible, comment out potentially offending
>> code in large chunks until the crashing stops, uncomment code
>> gradually until it starts crashing again. Judiciously combined with
>> trace statements which show you how far along execution has got. That
>> should narrow down the routines causing the problem. Can't think of
>> any immediate solutions other than that, sorry!
>>
>> HTH,
>>   Ian
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
> ___
> Flashcoders mailing list
> Flashcoders@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] Rather urgent advice on how to track the cause of a crash

2009-09-05 Thread Ian Thomas
You may not be using Bitmap functions - but any filters etc. will use
them under-the-hood, and will have the 2880x2880 limits.

I'd be tempted to suggest that you break up your large background JPG
into four chunks; see if that clears the crash.

HTH,
   Ian

On Sat, Sep 5, 2009 at 4:41 PM, Paul Steven wrote:
> Thanks Ian
>
> I am not using any bitmap functions. I literally just have the jpg inside a
> movie clip and move it based on the mouse position in relation to the plane
> (the plane is centred on the screen). The only other game element really is
> 20 clouds that randomly move across the screen.
>
> I am doing as you suggest and commenting out each potential game element and
> trying to isolate the problem.
>
> I was hoping there was some way of using a debugger version of the flash
> player to get more information on the problem but this does not seem to be
> possible.
>
> Cheers
>
> Paul
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian Thomas
> Sent: 04 September 2009 19:22
> To: Flash Coders List
> Subject: Re: [Flashcoders] Rather urgent advice on how to track the cause of
> a crash
>
> On Fri, Sep 4, 2009 at 6:16 PM, Paul Steven
> wrote:
>
>> The game is basically a top down flying game with a scrolling background
>> (JPG 5120 X 4320). The flash movie is published at 1600 x 1200 30 FPS. It
>> includes an embedded FLV video on the Splash screen which is apparently
>> 639kb of video data. There are no audio files in the game.
>
> Only immediate thing in that is that bitmaps in Flash Player 8 and 9
> need to be less than 2880 x 2880 pixels or bitmap functions will
> simply fail. (Doesn't apply to Flash 8/9 content being run in Flash
> Player 10, afaik).
>
> Other than that - my normal approach to such things is to find a way
> to replicate the error if possible, comment out potentially offending
> code in large chunks until the crashing stops, uncomment code
> gradually until it starts crashing again. Judiciously combined with
> trace statements which show you how far along execution has got. That
> should narrow down the routines causing the problem. Can't think of
> any immediate solutions other than that, sorry!
>
> HTH,
>   Ian
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Rather urgent advice on how to track the cause of a crash

2009-09-04 Thread Ian Thomas
On Fri, Sep 4, 2009 at 6:16 PM, Paul Steven wrote:

> The game is basically a top down flying game with a scrolling background
> (JPG 5120 X 4320). The flash movie is published at 1600 x 1200 30 FPS. It
> includes an embedded FLV video on the Splash screen which is apparently
> 639kb of video data. There are no audio files in the game.

Only immediate thing in that is that bitmaps in Flash Player 8 and 9
need to be less than 2880 x 2880 pixels or bitmap functions will
simply fail. (Doesn't apply to Flash 8/9 content being run in Flash
Player 10, afaik).

Other than that - my normal approach to such things is to find a way
to replicate the error if possible, comment out potentially offending
code in large chunks until the crashing stops, uncomment code
gradually until it starts crashing again. Judiciously combined with
trace statements which show you how far along execution has got. That
should narrow down the routines causing the problem. Can't think of
any immediate solutions other than that, sorry!

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


Re: [Flashcoders] 1120: Access of undefined property

2009-09-03 Thread Ian Thomas
Because your function is static.

Either make your var static too:

public static var counter:int=0;

or make your function non-static.

I'm sure you can Google static/non-static class members, but in short,
anything that's non-static is only available from within a class
instance (i.e. someone needs to have called new StringUtils()).

HTH,
   Ian

On Thu, Sep 3, 2009 at 8:23 PM, Isaac Alves wrote:
> could someone please tell me why in the following script , the flash
> runtime doesn´t recognize the var counter?
> 1120: Access of undefined property counter.
>
> package
> {
>  public class StringUtils
>  {
>        public var counter:int = 0;
>
>    public static function generateRandomString(newLength:uint = 1,
> userAlphabet:String =
> "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"):String
>        {
>                trace (counter);
>
> ___
> Flashcoders mailing list
> Flashcoders@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 weirdness (solution)

2009-09-03 Thread Ian Thomas
On Thu, Sep 3, 2009 at 4:35 PM, Joe Cutting wrote:

> Ian reported problems with the Javascript version and Chrome. I'd be
> interested to hear if anyone else has problems with one or the other.

Both versions now work fine with latest Chrome, Firefox, Safari and
with IE7 - that seems to have solved it!

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


Re: [Flashcoders] fullscreen weirdness

2009-09-03 Thread Ian Thomas
Joe,
   What code are you using to do the fullscreen switch? Again, I'm
getting problems with the Chrome version - so if it's not your
embedding causing the problems, it must be somewhere in your AS
code...

Ian

On Wed, Sep 2, 2009 at 6:01 PM, Joe Cutting wrote:
>>>
> You're definitely doing something peculiar - in Chrome, after I click
> to go fullscreen on your movie, nothing is clickable at all! I have to
> press Esc to get out of full screen. In Firefox it seems to work okay.
>
> I'd switch to using SWFObject for embedding your movie in HTML; that's
> what I use, and I've had no problems with full-screen usage on any
> browser.
>>>
> Thanks for looking into this. The complex javascript I was using is the
> default which is generated by
> Flash CS4!
> I've had a go at making a SWFObject version and also tested in Internet
> Explorer 8.
> Here's the SwfObject version:
> http://www.joecutting.com/demos/MySpace/starLoaderSO.html
> and here's the CS4 javascript original
> http://www.joecutting.com/demos/MySpace/starLoader.html
>
> IE8 doesn't have a problem with either version. Firefox 3.52 has the same
> problem with both versions, except that sometimes
> the flash disappears completely with the SO version.
>
> Any more thoughts would be appreciated
>
> Cheers
>
> Joe
>
>
>
> Joe Cutting
> Computer exhibits and installations
> www.joecutting.com
> 35 Hospital Fields Road, York, YO10 4DZ
> 01904 624681
> ___
> Flashcoders mailing list
> Flashcoders@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 wierdness

2009-09-02 Thread Ian Thomas
You're definitely doing something peculiar - in Chrome, after I click
to go fullscreen on your movie, nothing is clickable at all! I have to
press Esc to get out of full screen. In Firefox it seems to work okay.

Looking at the HTML source, you've got some very complicated Flash and
browser detection wedged in there (which might be Dreamweaver
generated? not sure) which I think might well be an issue. Do you need
all of that?

I'd switch to using SWFObject for embedding your movie in HTML; that's
what I use, and I've had no problems with full-screen usage on any
browser.

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

Cheers,
   Ian

On Wed, Sep 2, 2009 at 11:55 AM, Joe Cutting wrote:
> Hello,
>  I'm having some problems with full screen mode. I've got a game which
> really needs to be played in fullscreen mode.
> So users have to press a button at the start which sets fullscreen mode.
> They can close it at any time by pressing a close button
> which makes it smaller again but redisplays the original fullscreen button.
>
> So what's happening is this:
>
> 1) User presses the fullscreen button - flash goes to fullscreen
> 2) User plays game, all the active areas work, no problem
> 3) User clicks the close button - flash stops going fullscreen
> 4) User presses the fullscreen button - flash goes fullscreen
> *** Weird unexpected behaviour here ***
> 5) User clicks on an active area - flash stops going fullscreen by itself -
> none of my "close" code is being called
> 6) User clicks the fullscreen button - flash goes into fullscreen mode
> 7) User plays game, active areas work normally, flash stays in fullscreen
> mode
>
> You can try this yourself at:
> http://www.joecutting.com/demos/MySpace/starLoader.html
>
> If anyone has any ideas why flash ends fullscreen mode, I'd be very
> grateful. As I said, I'm 99% certain that my code isn't explicitly ending
> the fullscreen
> mode although there maybe something else I'm doing which causes flash to
> revert.
>
> Any suggestions welcome
>
> Cheers
>
> Joe
>
>
>
>
> Joe Cutting
> Computer exhibits and installations
> www.joecutting.com
> 35 Hospital Fields Road, York, YO10 4DZ
> 01904 624681
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Problem understanding Class heirarchy issue

2009-09-02 Thread Ian Thomas
I'm sorry, Steven, that's just not true. Test out the following code:

package
{
public class A
{
public function A()
{
trace("A Constructor");
}
}
}

package
{
public class B extends A
{
public function B()
{
trace("B Constructor");
}
}
}

and create an instance of B, and you will see:

"A Constructor"
"B Constructor"

in the debug window.

You only explicitly need to specify the super() call to pass arguments
to your superclass's constructor.

(I've _never_ used empty super() calls, and all my code still works -
all my superclass constructors still get called...)

Ian

On Tue, Sep 1, 2009 at 11:56 PM, Steven Sacks wrote:
> In AS2, super() was called automatically (so to speak), so calling it was a
> matter of proper form more than anything else.  In AS3, you have to call it
> yourself or it doesn't get called.
> ___
> Flashcoders mailing list
> Flashcoders@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] Error when trying to embed a font

2009-08-31 Thread Ian Thomas
Sorry! My poor reading!

The normal reason for such errors is that the name of the font (when
using systemFont) does not exactly match the name your system thinks
it should be. This can be complicated by font variants - you say
you've already tried combinations of fontStyle, fontWeight etc. Have
you tried those variants within the name? Could it be something like
the name should be "Berthold Akzidenz Grotesk Bold" and you should
have fontWeight set to bold?

Have you tried Font.enumerateFonts() to list what fonts your Flash
Player thinks is available on your system, and what their names are?

Ian

On Mon, Aug 31, 2009 at 6:01 PM, Andrew Murphy wrote:
> Hi, Ian. :)
>
> Thanks, but I tried that already, I mentioned it in my first post.  It
> throws the same error.
>
>
> 
> Andrew Murphy
> Interactive Media Specialist
> amur...@delvinia.com
>
> Delvinia
> 214 King Street West, Suite 214
> Toronto Canada M5H 3S6
>
> P 416.364.1455 ext. 232  F 416.364.9830  W www.delvinia.com
>
> CONFIDENTIALITY NOTICE
> This email message may contain privileged or confidential information. If
> you are not the intended recipient or received this communication by error,
> please notify the sender and delete the message without copying or
> disclosing it.
>
> AVIS DE CONFIDENTIALITÉ
> Ce message peut contenir de l'information légalement privilégiée ou
> confidentielle. Si vous n'êtes pas le destinataire ou croyez avoir reçu par
> erreur ce message, nous vous saurions gré d'en aviser l'émetteur et d'en
> détruire le contenu sans le communiquer a d'autres ou le reproduire.
>
>
>
>> -Original Message-
>> From: flashcoders-boun...@chattyfig.figleaf.com
>> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf
>> Of Ian Thomas
>> Sent: Monday, August 31, 2009 12:35 PM
>> To: Flash Coders List
>> Subject: Re: [Flashcoders] Error when trying to embed a font
>>
>> You could try directly referencing the TTF or OTF file with
>> the 'source' argument instead of using the 'systemFont' argument:
>>
>> [Embed(
>> source="/Path/To/FontFile.TTF",
>>
>> HTH,
>>     Ian
>>
>> On Mon, Aug 31, 2009 at 1:31 PM, Andrew
>> Murphy wrote:
>> > Good morning.  (Well.. it's morning here anyway.)
>> >
>> > I'm having problems with creating a font .swf file, to use
>> for sharing
>> > a font between some Flash movies.  One of the fonts I want
>> to embed is
>> > Berthold Akzidenz Grotesk Medium.
>> >
>> > In the font .swf's FLA file I'm trying to embed it like this:
>> >
>> >
>> > [Embed(
>> >  systemFont="Berthold Akzidenz Grotesk",
>> >  fontName="AkzidenzMedOTF",
>> >  fontStyle="Medium",
>> >  mimeType="application/x-font",
>> >  unicodeRange="U+0021-U+00FF"
>> > )]
>> > var akzidenz_otf:Class;
>> > Font.registerFont(akzidenz_otf);
>> >
>> >
>> > And I keep getting the error:  exception during
>> transcoding: Font for
>> > alias 'AkzidenzOTF' with plain weight and style was not found by
>> > family name 'Berthold Akzidenz Grotesk'
>> >
>> > I'm working in WindowsXP, Flash CS4 and it's a Type1 font.
>> >
>> > I've tried various settings for the fontWeight and fontStyle and
>> > nothing seems to affect this error.
>> >
>> > I've also tried not using "systemFont" and instead setting the
>> > "source" path in the Embed to
>> C:/WINDOWS/Fonts/gfm_.pfm, which is
>> > this font's source file on my machine, and it throws the same error.
>> >
>> > Any ideas on what I'm dong wrong and how to fix it.. if it
>> can be fixed?
>> >
>> > Thank you. :)
>> >
>> >
>> >
>> > 
>> > Andrew Murphy
>> > Interactive Media Specialist
>> >  <mailto:amur...@delvinia.com> amur...@delvinia.com
>> >
>> > Delvinia
>> > 214 King Street West, Suite 214
>> > Toronto Canada M5H 3S6
>> >
>> > P 416.364.1455 ext. 232  F 416.364.9830  W www.delvinia.com
>> >
>> > CONFIDENTIALITY NOTICE
>> > This email message may contain privileged or confidential
>> information.
>> > If you are not the intended recipient or received this
>> communication
>> > by error, please notify the 

Re: [Flashcoders] Error when trying to embed a font

2009-08-31 Thread Ian Thomas
You could try directly referencing the TTF or OTF file with the
'source' argument instead of using the 'systemFont' argument:

[Embed(
source="/Path/To/FontFile.TTF",

HTH,
Ian

On Mon, Aug 31, 2009 at 1:31 PM, Andrew Murphy wrote:
> Good morning.  (Well.. it's morning here anyway.)
>
> I'm having problems with creating a font .swf file, to use for sharing a
> font between some Flash movies.  One of the fonts I want to embed is
> Berthold Akzidenz Grotesk Medium.
>
> In the font .swf's FLA file I'm trying to embed it like this:
>
>
> [Embed(
>  systemFont="Berthold Akzidenz Grotesk",
>  fontName="AkzidenzMedOTF",
>  fontStyle="Medium",
>  mimeType="application/x-font",
>  unicodeRange="U+0021-U+00FF"
> )]
> var akzidenz_otf:Class;
> Font.registerFont(akzidenz_otf);
>
>
> And I keep getting the error:  exception during transcoding: Font for alias
> 'AkzidenzOTF' with plain weight and style was not found by family name
> 'Berthold Akzidenz Grotesk'
>
> I'm working in WindowsXP, Flash CS4 and it's a Type1 font.
>
> I've tried various settings for the fontWeight and fontStyle and nothing
> seems to affect this error.
>
> I've also tried not using "systemFont" and instead setting the "source" path
> in the Embed to C:/WINDOWS/Fonts/gfm_.pfm, which is this font's source
> file on my machine, and it throws the same error.
>
> Any ideas on what I'm dong wrong and how to fix it.. if it can be fixed?
>
> Thank you. :)
>
>
>
> 
> Andrew Murphy
> Interactive Media Specialist
>   amur...@delvinia.com
>
> Delvinia
> 214 King Street West, Suite 214
> Toronto Canada M5H 3S6
>
> P 416.364.1455 ext. 232  F 416.364.9830  W www.delvinia.com
>
> CONFIDENTIALITY NOTICE
> This email message may contain privileged or confidential information. If
> you are not the intended recipient or received this communication by error,
> please notify the sender and delete the message without copying or
> disclosing it.
>
> AVIS DE CONFIDENTIALITÉ
> Ce message peut contenir de l'information légalement privilégiée ou
> confidentielle. Si vous n'êtes pas le destinataire ou croyez avoir reçu par
> erreur ce message, nous vous saurions gré d'en aviser l'émetteur et d'en
> détruire le contenu sans le communiquer a d'autres ou le reproduire.
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] XML element order

2009-08-27 Thread Ian Thomas
Glen,
   The backend shouldn't care about element order. :-)

   That'd be my take on it, if you're just using the XML to exchange a
simple set of properties rather than (say) using it to present a
structured document where the order is crucial to how it's read.

   If you _do_ care about the order (and I really don't think you
should have to), you need to store a sort order for each key. I've no
idea how you are generating the parameters or the order, but it might
be as simple as:

var keys:Array=["someParam","someOtherParam","someThirdParam"];
for each (var key:String in keys)
{
  var parXML:XML = <{key}>{params[key].toString()};
  cmd.command.parameters.appendChild(parXML);
}

But that sort of hard-coding feels totally wrong, and makes me think
that there is too much hardcoding going on at the C++ end.

Ian

On Thu, Aug 27, 2009 at 3:43 PM, Glen Pike wrote:
> Hi,
>
>   I have a project where we are passing XML via a socket to a C++ based
> server and there is an issue with the ordering of XML elements inside a
> packet.
>
>   In AS3, I am assembling a packet with a  element that contains
> 1 or more children with value type syntax.  Because the
> "params" are passed into a generic function, I am looping through an object
> as follows:
>
>   //if params, loop through params, create params.
>           if (null != params) {
>               cmd.command.appendChild();
>               for (var par:* in params) {
>                   //var val:String = ;
>                   var parXML:XML = <{par}>{params[par].toString()};
>                   cmd.command.parameters.appendChild(parXML);
>               }
>           }
>
>   The C++ guy is asking if I can send these parameters in a specific order,
> but I can't see any way to guarantee that order without hardcoding, or using
> an indexed array, which implies hardcoding somewhere else.
>
>   Does anyone know of a way to do this - I suppose I could loop through the
> object, get the property "keys", sort these, then loop through the result to
> read values, but guessing thats the only way.
>
>   I could also argue that the back end needs to use an XML parser that does
> not care about element order, so if anyone has any tips on that, it would be
> appreciated.
>
>   Ta
>
>   glen
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] empty XML Attributes..

2009-08-26 Thread Ian Thomas
On Wed, Aug 26, 2009 at 12:27 PM, Glen Pike wrote:
> Aha, I see now - bit of a waste of code too.

Yeah, I agree, it's overly verbose.

> And who's bright idea was it to use length for Strings and Arrays, but
> length() for XML / e4x?

It's because in E4X:

someNode.length

Means get this node:


   


:-)

The brackets () are the only way to work out what you mean...

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


Re: [Flashcoders] mac vs pc

2009-08-18 Thread Ian Thomas
One for which you shouldn't call the setter unless you're wearing a
lead apron and goggles. ;-)

Ian

On Tue, Aug 18, 2009 at 3:52 PM, Merrill,
Jason wrote:
>>> Document the classes and "atomic" properties.
>
> What's an "atomic" property?
>
>
> Jason Merrill
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-18 Thread Ian Thomas
On Tue, Aug 18, 2009 at 4:20 PM, Dave Watts wrote:

> Again, I'm not saying there's anything wrong with implicit Boolean
> evaluation, I just think it's a mistake to believe it's inherently
> superior to an explicit, slightly longer Boolean expression, to the
> point of telling people they should replace one with another.

Amen.

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


Re: [Flashcoders] actionscript 3 block rationale

2009-08-18 Thread Ian Thomas
JC,
   AS3 has no block scope.

   Whenever you write 'var x' inside a method, that declaration
(effectively) gets moved to the 'top' of the method.

So at a compiler level, this:

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

becomes this:

private function _demo():void
{
  var i:Number;
  var i:Number;  /// Second definition!
  for (i=0;i<10;i++)
  {
 // Evil stuff
  }
  for (i=0;i<10;i++)
  {
 // Evil stuff
  }
}

And this:

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

becomes this:

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

I find it totally counterintuitive. It's a language spec thing. It was
the same in AS2 - although, interestingly, Nicolas Cannasse's MTASC
compiler added block scope and made AS2 work 'properly' - so it's not
like it's an issue at bytecode level.

Ian


On Tue, Aug 18, 2009 at 9:28 AM, Hans
Wichman wrote:
> Hey list,
>
> does anyone know the cool rationale behind the fact that the compiler won't
> allow me to execute a completely sane piece of code such as:
>
> private function _demo():void {
> for (var i:Number = 0; i < 10;i++) {
>  //evil stuff here
> }
>  for (var i:Number = 0; i < 10;i++) {
>  //evil stuff here
> }
> }
>
> (getting a redefined blablah variable, to which there is no workaround but
> to rename the loop variables I think)
>
> But WILL allow me to do something stupid like:
>
>  private function _demo():void {
>   for (var i:int = 0; i < 10; i++)
>   {
>    trace (this[j]);
>   }
>   var j:Object = null;
>  }
>
>
> :)
>
> JC
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] CLICK event not getting fired

2009-08-18 Thread Ian Thomas
Anna,
   Whether it's MouseEvent or Event makes no difference - since the
MouseEvent class is derived from Event, either will do unless you
actually want to access properties/methods defined only in MouseEvent.

Sajid,
   As Latcho says, you need something graphical to click on. You could
use the .graphics member to draw a box on screen, using
beginFill/drawRect/endFill. This could be made invisible by setting
.alpha=0.

There are other options - depends really on what you're trying to do.
Adding a listener to the stage object would be one solution.

Incidentally, unless you need a timeline/multiple frames for your
clip, you can use a Sprite instead of a MovieClip as the parent
object. Sprite is just like MovieClip - just it doesn't have a
timeline. It's the generic use-for-everything visual class of AS3,
whereas MovieClip was the equivalent in AS2.

HTH,

Ian

On Tue, Aug 18, 2009 at 4:33 AM, Sajid Saiyed wrote:
> Hi Anna,
> Thanks.
> Forgot to mention that I tried MouseEvent as well and no luck :(
>
> Seems so strange
> I am sure I am missing something basic here.
>
> Sajid
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] > How to loop an ANT task(s)? >

2009-08-13 Thread Ian Thomas
Hi Matt,
   If Eclipse doesn't pick it up, you ought to be able to specify the
link to the Jar file directly:







HTH,
   Ian

On Thu, Aug 13, 2009 at 11:39 AM, Matt Muller wrote:
> Hi Ian, thanks for the info.
>
> I can get this working from the command line but it doesnt seem to run from
> eclipse.
>
> I put the .jar in the ant lib dir.
>
> I have this line in my build.xml
>
> 
>
> but get this error
>
> [taskdef] Could not load definitions from resource
> net/sf/antcontrib/antlib.xml. It could not be found.
>
> Any ideas?
>
> I'm running 1.7.x
>
> cheers,
>
> MaTT
>
> On Wed, Aug 12, 2009 at 10:45 PM, Ian Thomas  wrote:
>
>> Hi Matt,
>>   I use the Ant-contrib tasks for all that sort of thing.
>>
>>   Includes foreach, if, all sorts of handy extensions.
>>
>> http://ant-contrib.sourceforge.net/
>>
>> HTH,
>>   Ian
>>
>> On Wed, Aug 12, 2009 at 9:04 PM, Matt Muller
>> wrote:
>> > Hi, does anyone know how to loop an ANT task(s)?
>> >
>> > I want the create 10 dirs on my web server all with the same app but each
>> > with a unique flashvar.
>> >
>> > Ideally I could do this without creating 10 individual nodes for each
>> task.
>> >
>> > thanks,
>> >
>> > MaTT
>> > ___
>> > Flashcoders mailing list
>> > Flashcoders@chattyfig.figleaf.com
>> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> >
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] > How to loop an ANT task(s)? >

2009-08-12 Thread Ian Thomas
Hi Matt,
   I use the Ant-contrib tasks for all that sort of thing.

   Includes foreach, if, all sorts of handy extensions.

http://ant-contrib.sourceforge.net/

HTH,
   Ian

On Wed, Aug 12, 2009 at 9:04 PM, Matt Muller wrote:
> Hi, does anyone know how to loop an ANT task(s)?
>
> I want the create 10 dirs on my web server all with the same app but each
> with a unique flashvar.
>
> Ideally I could do this without creating 10 individual nodes for each task.
>
> thanks,
>
> MaTT
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] mac vs pc

2009-08-12 Thread Ian Thomas
On Wed, Aug 12, 2009 at 9:22 PM, Matt Gitchell wrote:
> Yeah but if you want to debug/profile anything, you gotta pay that 5 bones
> you mentioned earlier in this scenario, and I dunno, a coding environment
> without debugging now seems a little silly to me. I wish they'd do a
> standalone version of the profiler in Flex Builder, to be honest.

Just as a complete aside, in case people don't realise, there _is_ a
debugger included with the Flex SDK (i.e. the free downloadable SDK).
It's a command-line shell called fdb; it's a bit of a pain to use, but
it can be a godsend if you don't have a full Flex license and if
inserting trace() statements everywhere hasn't helped. :-D

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


Re: [Flashcoders] Runtime assets

2009-08-12 Thread Ian Thomas
Yes, it's absolutely possible.

You'll need to look into ApplicationDomains
(flash.system.ApplicationDomain) and getDefinition()/hasDefinition().

As long as the 3rd SWF has access to or shares the ApplicationDomain
that the library SWF is in, everything should be fine.

HTH,
Ian

On Wed, Aug 12, 2009 at 5:33 PM, Glen Pike wrote:
> Hi,
>
>   I am doing some experiments with CS3 & runtime assets.
>     Following the various tutorials & Moock's book, I can load a library and
> instantiate assets from a parent swf.
>
>   What I would like to do, if possible, is have the parent swf load the
> library and a 3rd external swf.  Hopefully the 3rd external swf will be able
> to instantiate clips from the library class...  Is this possible without
> loading the library swf inside the 3rd external swf too?
>
>   Does anyone have any pointers on how to set this up, hopefully using the
> "external-library-path" method of using swc's for the class references.
>   Thanks
>
>   Glen
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] what is the current 3D best-practice?

2009-08-10 Thread Ian Thomas
Hello Sebastien,
   Were it me, I'd go for either Papervision or Away3D.

   I absolutely wouldn't do it from scratch. There's already a lot of
time and effort been spent on these projects, so why reinvent the
wheel?

   Both certainly support 'skinning from images' (texturing).

   Morphing I am less sure about, but given they both handle
animation, I'd be surprised if they didn't. At the very least, you can
get hold of the mesh points and move them about programmatically
yourself.

  HTH,
 Ian

On Fri, Aug 7, 2009 at 8:01 PM, sebastian wrote:
> Hello everyone,
>
> Long time no speak! I've been out of the flash loop for about 9 months, and
> I'm about to work on a new flash project which requires some 3D animation.
>
> I need to make 3D polygons that spin and can morph from one shape to
> another. I also need to be able to "skin" each side of the polygon with a
> different image [loaded via XML form outside files]
>
> With my know-how form 9 months ago, I would either work this out in pure 3D
> code I would write from scratch or from a library, or I would try and look
> into something like papervision3D which I think does something like this
> already.
>
> I'm still on CS3
>
> My question is:
>
> Is there a new, better and more elegant / pre-made way for working in 3D?
> Is there now a better package than papervision?
> Does flash CS4 make this in anyway easier?
>
> Thanks for any guidance and general direction answers you can provide.
>
> Kindly,
>
> Sebastian.
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] OT - bizarre Adobe pricing

2009-08-10 Thread Ian Thomas
Good point. :-D

On Mon, Aug 10, 2009 at 11:28 AM, Glen Pike wrote:
>
>> product. A real incentive to reduce carbon emissions by saving on
>> transport and production, isn't it? :-D
>>
>>
>
> From what I have seen of Vista's random "high CPU usage", it might be more
> carbon-efficient to post the CD...
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] OT - bizarre Adobe pricing

2009-08-10 Thread Ian Thomas
Yeah - it's not an anomaly, always been the way.

It's crazy. :-) Costs more for download than to have shipped, boxed
product. A real incentive to reduce carbon emissions by saving on
transport and production, isn't it? :-D

Ian

On Mon, Aug 10, 2009 at 11:10 AM, Glen Pike wrote:
> It's been more expensive to download the software for a while - we had same
> problem with Contribute a couple of years ago - don't think it's an
> "anomaly" here...
>
> Paul Andrews wrote:
>>
>> Paul Andrews wrote:
>>>
>>> I thought I'd see what Adobe UK are charging for upgrading CS3 Web Design
>>> Premium to CS4 - to see if it's been reduced from an arm and a leg.
>>>
>>> Much to my surprise, Adobe is charging ?30 MORE for download delivery
>>> versus physical box shipment - seems the wrong way around to me!
>>
>> The reason may be a temporary anomaly - free shipping in the UK for orders
>> over £350, so I guess where there would have been similar if not the same
>> prices before, including shipping, the offer may have resulted in the
>> shipping price dropping below the download price.
>>
>> Interesting discussion - Ireland is even more expensive for Adobe software
>> than the UK (seems to be about 50% more than the US before taxes) and the US
>> is currently discounting the upgrade by $100 making us look even more
>> expensive.
>>>
>>> Paul

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


Re: [Flashcoders] OT - bizarre Adobe pricing

2009-08-09 Thread Ian Thomas
I've given up on trying to figure out Adobe pricing. The last time I
queried the ridiculous difference between US and UK prices the quotes
I had were:

- "It costs more to keep UK support staff": Well, I'm sorry about
that, but I never use your UK support staff - besides, I give other
people support on mailing lists. Can I have a discount?
- "It costs more to ship the boxes across": Really? For a download?

and then finally

- "We charge what the market will bear": Which sounds like the real
answer, but does not make me happy. Still, sending a developer over to
the US to buy copies in a shop there - because the cost of the flight
is much cheaper than the software - would make the developer happy.

Anyway, with regards to download vs. shipping, the reason given for
the odd pricing is because the download server is in Ireland, which
has a higher VAT rate than the UK.

Ian

On Sat, Aug 8, 2009 at 2:43 PM, Paul Andrews wrote:
> I thought I'd see what Adobe UK are charging for upgrading CS3 Web Design
> Premium to CS4 - to see if it's been reduced from an arm and a leg.
>
> Much to my surprise, Adobe is charging ?30 MORE for download delivery versus
> physical box shipment - seems the wrong way around to me!
>
> Paul
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] bookmarking a dynamic flash page

2009-08-06 Thread Ian Thomas
Andrew - check out SWFAddress:

http://www.asual.com/swfaddress/

HTH,
   Ian

On Thu, Aug 6, 2009 at 12:49 PM, Andrew Sinning wrote:
> How could I let the user bookmark the current state of a dynamic flash page?
>  I know how to save the current state of the movie and then just load that
> as the default, but what if the user should be able to bookmark multiple
> states, each with its own address?  Can javascript tell the browser to
> change the address in the address bar without actually loading a new page,
> so that if the user creates a bookmark there is a reliable address?
>
> Thanks!
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] MVC and Event Architecture

2009-08-04 Thread Ian Thomas
On Tue, Aug 4, 2009 at 4:24 PM, Dave Watts wrote:
>> The real point is that to call public methods, you have to know about the
>> object whose method you want to call and you need to know about the method
>> itself. When you broadcast an event, you don't need to know whose listening,
>> your just indicating that something meaningful has happenned and perhaps
>> also passing data that is meaningful.
>
> This is really the key. If you don't do this, you're baking
> dependencies into your application.

And also potentially compilation dependencies, if, for example, you
later decide to split your app into modules then you'd have to include
the target of the method call across both the relevant modules (or do
something with interfaces instead).

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


Re: [Flashcoders] other lists for compiler design, assembly, and machine code?

2009-08-03 Thread Ian Thomas
You could do worse than take a look at the sources for both MTASC and haXe.

MTASC is a compiler for AS2.
http://mtasc.org/

haXe is a compiler for... uh... haXe. But haXe is a very AS3-like
language (it has its roots in AS).
http://haxe.org/

Both are written by Nicolas Cannasse.

Both are written in the functional programming language OCAML and are
lightning fast. A lot of people swear by functional languages for
compiler-writing these days; BNF-style rule-based parsing maps on to
functional languages much more naturally than on to OOP/procedural
languages.

HTH,
   Ian

On Mon, Aug 3, 2009 at 4:37 PM, Kerry Thompson wrote:
> Anthony Pace wrote:
>
>> Can anyone recommend a good mailing list for compiler design for newbies?
>>
>> I have books on it, and I know the basics of how to perform tokenization
>> and lexical analysis; yet, even with study and practise, I am most
>> likely going to be considering myself a newbie in the compiler design
>> realm for at least a few years.  Keep in mind that my assembly is very
>> rudimentary, and my machine code is even worse
>
> I did some compiler work for Borland, but that was 15 years ago or more.
> Anybody remember Borland's Fortran compiler? No? I thought not.
>
> I don't know of compiler mailing lists, but I can tell you that you probably
> don't need assembly or machine code. We did the Fortran compiler in C (not
> C++), with very little inline assembly code. I don't know of anybody who has
> done machine code for 20 years or more. It is truly obsolete unless you're
> writing for some proprietary hardware.
>
> There is a school of thought that you ought to be able to write a compiler
> in its own language. I.e., if you're writing a C++ compiler, you would write
> it in C++. I don't know if that would apply so well to ActionScript, though,
> because of its speed. I would probably choose a language that compiles to
> machine code, like C++, rather than a tokenized language--you want that
> extra speed boost in your primary tool.
>
> Cordially,
>
> Kerry Thompson
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] swf not loading in Firefox on Windows

2009-08-03 Thread Ian Thomas
Adblockers?

We've had that problem in the past, where people have installed
3rdparty over-aggressive adblockers which mean that Flash will just
not load.

Ian

On Mon, Aug 3, 2009 at 4:02 PM, Joe Minkiewicz wrote:
> Hey Everyone,   Have any of you encountered a problem where swf content
> won't load properly in Firefox (2.x and/or 3.x) in WIndows? I've handed off
> a swf to a client but they come back and said it stays on the 'loading'
> screen for some people. I found this article:
> http://news.cnet.com/8301-17939_109-10027752.html but my swf doesn't contain
> any flvs. I can't think of a reason that it would act differently in
> different browsers. (Isn't that the point of using flash in the first
> place?) My only guess so far has been to check for errors in the embed code
> but nothing seems out of place. Any of suggestions?
> Thanks,
> Joe
> ___
> Flashcoders mailing list
> Flashcoders@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] Dancing characters...

2009-07-22 Thread Ian Thomas
Also - have you got those text fields set to "anti-alias for
animation"? If not, you should - "anti-alias for readability" can
cause odd effects for moving text.

HTH,
   Ian

On Wed, Jul 22, 2009 at 4:44 PM, Ruy Adorno wrote:
> Hello Sander,
>
> Nice to see you around here, I saw in twitter you're starting your own dock
> effect this morning.
> It's hard to know the reason for this strange behavior of the elements
> without see the code, but I have a guess that could be some problems with
> float numbers, I already have similar problems caused by this.
> You can try to round the elements positions at each enterFrame call, try
> using int() and Math.floor().
>
> Best,
>
> Ruy Adorno
> http://www.ruyadorno.com
>
>
> Sander Schuurman wrote:
>>
>> Hi list...
>>
>> I'm trying to make some kind of Dock...
>>
>> http://www.sentoplene.com/dock
>>
>> But sometimes when I stop with the mouse, some characters keep on moving
>> slightly... How can I get rid of that?
>>
>> I'm simply doing on Event .ENTER_FRAME: scaleIcons and then positionIcons.
>> I'v tried to trigger the 2 functions only on MouseMove, but the
>> responsiveness isn't accurate when you suddenly stop your mouse...
>>
>> So anyone any idea with this?
>>
>> thnx!
>>
>> Sander Schuurman
>> sentoplene.com
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] XML tranformation help

2009-06-24 Thread Ian Thomas
if(modulesList[0]..subsection.(@title==contentRowItem2.Subsection).topics.length()
< 1)

would have done it.

(It's worth pointing out that length() is a method rather than a
property - that bit my a few times when I started with e4x...)

Ian

On Wed, Jun 24, 2009 at 2:08 AM, Merrill,
Jason wrote:
> Disregard last post - instead of doing it in the same for each loop,  I
> decided to make two passes over it - two separate for each loops - one
> to create the  nodes where needed and the second one to append
> the  nodes to the existing  node.  Got it working now,
> thanks Ian!
>
>
> Jason Merrill
>
> Bank of  America   Global Learning
> Shared Services Solutions Development
>
> Monthly meetings on the Adobe Flash platform for rich media experiences
> - join the Bank of America Flash Platform Community
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] XML tranformation help

2009-06-23 Thread Ian Thomas
Hi Jason,
   Surely it's because you're creating a new  node each time?

With this line:

modulesList[0]..subsection.(@title==contentRowItem2.Subsection).topics
= new XML();

I suspect you should only create the new  node when there
isn't one there already...

HTH,
   Ian

(Wasn't part 1 of this on another list yesterday? :-))




On Tue, Jun 23, 2009 at 11:26 PM, Merrill,
Jason wrote:
> I am transforming some XML from a system that comes to me as a fairly
> "flat" format to a new XML in a more hierarchical form that I can use in
> my app. The hierarchy of the new XML is based on the values contained in
> the "flat" xml (as to which nodes things should go under).  I have it
> 90% done, except for the last little bit:
>
> (this is _contentXML)
>
> 
>  
>    
>      iBuild
>      Assumptions
>      Starting iRequire
>      To start iRequire, you will first need to do a few
> things, like create a user name and password.
>      Sanders, Larry
>      ...etc.
>    
>    
>     iDeliver
>    Technical Constraints
>        ...etc.
>
> And I need to get it to look like this:
>
> (this is finalXML)
>
> 
>      
>        
>          
>             modified="2009-05-01 13:44:29" animationFileName="hello.swf"
> created="2009-05-01 13:43:24" editor="Merrill, Jason">
>              Blah
>              1. This is the first step.2.This is the
> second step.
>            
>             author="Merrill, Jason" modified="2009-05-01 13:44:29"
> animationFileName="hello.swf" created="2009-05-01 13:43:24"
> editor="Merrill, Jason">
>              Blah
>              1. This is the first step.2.This is the
> second step.
>            
>             modified="2009-05-01 13:44:29" animationFileName="hello.swf"
> created="2009-05-01 13:43:24" editor="Merrill, Jason">
>              Blah
>              1. This is the first step.2.This is the
> second step.
>            
>          
>        
>        
>          
>            
>
> So I have all that working so far, except that it only inserts ONE topic
> (1) - the last one if finds that matches the proper module and
> subsection.
>
> Here is my code for creating, finding the right part of the XML and
> inserting topics (though as I mentioned, the problem is it only inserts
> one topic)
>
> for each (var contentRowItem2:XML in _contentXML..row)
> {
>        var moduleName:String =
> stripSharepointPoundTag(contentRowItem2.Module);
>        var topicXML:XML = new XML("");
>        topicx...@title = contentRowItem2.LinkTitle;
>        topicx...@author =
> stripSharepointPoundTag(contentRowItem2.Author);
>        //..etc
>        topicXML.overview = new XML();
>        topicXML.steps = new XML();
>        topicXML.overview = contentRowItem2.Overview;
>        //..etc
>
>        var modulesList:XMLList = finalXML..module.(@title ==
> moduleName);
>
> modulesList[0]..subsection.(@title==contentRowItem2.Subsection).topics =
> new XML();
>        if (modulesList.length()!= 1)
>        throw new Error("Can't find single module with
> title:"+moduleName);
>
>        var topicsList:XMLList =
> modulesList[0]..subsection.(@title==contentRowItem2.Subsection).topics;
>        if (topicsList.length()!=1)
>        throw new Error("Can't find single subsection with
> title:"+contentRowItem.Subsection);
>
>        topicsList[0].appendChild(topicXML);
> }
>
> This produces this:
>
> 
>  
>    
>      
>        
>          
>             author="Markley, Bill" modified="2009-05-01 13:44:29"
> animationFileName="hello.swf" created="2009-05-01 13:43:24"
> editor="Wade, Sandra">
>              Blah blah blah
>              1. This is the first
> step.2. This is the second
> step.
>            
>          
>        
>        
>          
>             author="Merrill, Jason" modified="2009-05-01 13:44:29"
> animationFileName="hello.swf" created="2009-05-01 13:43:24"
> editor="Merrill, Jason">
>              Blah blah blah and more blah and even more
> blah
>              1. This is the first step.2.This is the
> second step.
>            
>          
>        
>        ..etc.
>
> All great, except there are more topic nodes that should be under
> modules.subsections.topics., but there is only one per subtopic.  The
> last part of my script, topicsList[0].appendChild(topicXML),  is
> suspect- but I would think that appendChild would keep adding children,
> not overwrite them in topicsList[0].  Any ideas what is going on here
> and how to fix?  Thanks!
>
>
> Jason Merrill
>
> Bank of  America   Global Learning
> Shared Services Solutions Development
>
> Monthly meetings on the Adobe Flash platform for rich media experiences
> - join the Bank of America Flash Platform Community
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
ht

Re: [Flashcoders] wrapper recommendation

2009-06-15 Thread Ian Thomas
Northcode's SWFStudio consistently gets the best reviews.

HTH,
   Ian

On Mon, Jun 15, 2009 at 2:48 PM, Mendelsohn,
Michael wrote:
> Hi list...
>
> Can anyone recommend the best wrapper for a Flash projector?  All I need to 
> do is open pdfs in Acrobat (not a browser, like what navigatetourl would do). 
>  I found Jugglor (www.flashjester.com).  Anyone have experience with that?
>
> Thanks,
> - Michael M.
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Projector "Serial Number" protection

2009-06-06 Thread Ian Thomas
You could try Northcode's SWFStudio.

http://www.northcode.com/

Ian

On Sat, Jun 6, 2009 at 6:07 PM, Ktu wrote:
> I think the only other options are AIR, and Titanium
>
> On Sat, Jun 6, 2009 at 7:00 AM, Kevin Bath  wrote:
>
>> Shame - it has some great functionality.
>>
>> Is there a more stable alternative 'wrapper' that anyone can recommend?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Projector "Serial Number" protection

2009-05-27 Thread Ian Thomas
Likewise (I seem to keep saying this) I have had a number of serious
problems with Zinc over the years, and our company has had to migrate
away from it.

Ian

On Wed, May 27, 2009 at 1:07 AM, Muzak  wrote:
> Careful with buying Zinc if you don't already have a license.
> As of late, their support is non existing. They haven't responded in quite
> some time on their support forums.
> I've asked them (a month ago) about a (serious) bug that has been around
> since August 2008 and haven't heard anything.
>
> Just a friendly warning :)
>
> - Original Message - From: "Glen Pike" 
> To: "Flash Coders List" 
> Sent: Wednesday, May 27, 2009 12:22 AM
> Subject: Re: [Flashcoders] Projector "Serial Number" protection
>
>
>> Hi,
>>
>>   Cheers guys - Zinc looks quite sturdy and possibly a nice investment,
>> depending on whether the (humanoid) client wants to go for something
>> flexible.
>>
>>   Found a few other products that let you bundle in serial protection -
>> probably less flexible, but cheap - links for anyone interested.  Comments
>> welcome..
>>     http://www.increditools.com/flash_exe_builder/features.php
>>   http://www.chameleonflash.com/index.html
>>
>>   As for the robots - they can look after themselves - can't put serial
>> numbering on an OS Linux app, so we have to resort to making the robots walk
>> and fight their own battles :P
>>
>>   Later
>>
>>   Glen
>>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] anti-aliasing

2009-05-18 Thread Ian Thomas
Oh absolutely. :-) Just thought this might be a quick route to
achieving whatever you're currently trying to achieve. :-)

Ian

On Mon, May 18, 2009 at 10:53 AM, Anthony Pace  wrote:
> You are right, in most scenarios you would want to use built in
> functionality; however, outside of regular applications in as3, there are a
> lot of reasons to know this well, and graphics applications that would be
> impossible by relying on what is built in.
>
>
> Ian Thomas wrote:
>>
>> A quick thought, Anthony... why reinvent the wheel?
>>
>> Why not use Flash's built-in graphics.moveTo()/graphics.lineTo() etc.
>> to draw _vector_ lines into a Sprite (which will therefore be nicely
>> antialiased by Flash), then capture the results as a bitmap and paste
>> them into whatever BitmapData you are trying to create?
>>
>> It will be a lot faster at runtime than plotting a line pixel by
>> pixel. Unless you have a specific need to do that!
>>
>> Cheers,
>>   Ian
>>

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


Re: [Flashcoders] anti-aliasing

2009-05-18 Thread Ian Thomas
A quick thought, Anthony... why reinvent the wheel?

Why not use Flash's built-in graphics.moveTo()/graphics.lineTo() etc.
to draw _vector_ lines into a Sprite (which will therefore be nicely
antialiased by Flash), then capture the results as a bitmap and paste
them into whatever BitmapData you are trying to create?

It will be a lot faster at runtime than plotting a line pixel by
pixel. Unless you have a specific need to do that!

Cheers,
   Ian

On Mon, May 18, 2009 at 4:48 AM, Anthony Pace  wrote:
> I already know how to draw shapes using the built in tools. and the math for
> it is not a problem in the slightest; yet, it is the anti-aliasing of the
> lines, when trying to draw them with setPixel() or setPixel32, that I am new
> to.
>
> Ron Wheeler wrote:
>>
>> You are on the right list.
>>
>> To get some help, you will probably have to give more details.
>> - 2D or 3D
>> - vectors or rasters - images or drawings
>> - what kind of shapes
>> - dynamic or static
>> - data driven or algorithmic
>> - user interaction desired
>> - low-res icons or sprites for a game or beautifully rendered images
>> suitable for printing
>>
>> Google is also your friend.
>>
>> Ron
>>
>>
>> Anthony Pace wrote:
>>>
>>> Hello,
>>>
>>> I am trying to draw shapes using pixel manipulation, and I am pretty sure
>>> I understand most of the concepts; yet, as I am pretty new to this, I am
>>> unsure how to go about doing this most efficiently in code.
>>>
>>> Does anyone have any links, tutorials, commented code? Are there tried
>>> and true formulae I should be using that you may know of? or should I just
>>> look at converting a library from another language because there is no point
>>> reinventing the wheel because the best formulae have been found? should I be
>>> discussing this on a different list?
>>>
>>> Thanks,
>>> Anthony
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@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] Automated builds - your experiences?

2009-05-12 Thread Ian Thomas
Have you considered switching to MTASC instead of using the Flash IDE
to compile? It would make your life a lot easier...

Ian

On Tue, May 12, 2009 at 12:06 PM, Alias Cummins  wrote:
> Hi guys,
>
> I'm currently consulting on a project which involves setting up an
> automated build server, running a suite of unit tests, and then
> notifying the dev team of any failures/compiler errors, and
> consolidating this data in some form.
>
> However, the project is AS2/Flash IDE based. so we need to do some
> JSFL workarounds. I'd be interested in hearing about anyone's old JSFL
> automated build war stories - I know Johannes Nel has definitely done
> this - anyone else?
>
> Some questions to consider:
>
> - What's the best way to capture output from the flash IDE and feed it into
>
> Any info or insight much appreciated,
> Alias
> ___
> Flashcoders mailing list
> Flashcoders@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] Automated builds - your experiences?

2009-05-12 Thread Ian Thomas
Oh, ignore me, MTASC won't help for running unit tests.

Although you could use MTASC to compile, then run your unit tests in a
standalone Flash Player, I guess, and look at the output of the flash
log (Google mm.cfg for how to set up flash logging).

HTH,
   Ian


On Tue, May 12, 2009 at 12:35 PM, Ian Thomas  wrote:
> Have you considered switching to MTASC instead of using the Flash IDE
> to compile? It would make your life a lot easier...
>
> Ian
>
> On Tue, May 12, 2009 at 12:06 PM, Alias Cummins  wrote:
>> Hi guys,
>>
>> I'm currently consulting on a project which involves setting up an
>> automated build server, running a suite of unit tests, and then
>> notifying the dev team of any failures/compiler errors, and
>> consolidating this data in some form.
>>
>> However, the project is AS2/Flash IDE based. so we need to do some
>> JSFL workarounds. I'd be interested in hearing about anyone's old JSFL
>> automated build war stories - I know Johannes Nel has definitely done
>> this - anyone else?
>>
>> Some questions to consider:
>>
>> - What's the best way to capture output from the flash IDE and feed it into
>>
>> Any info or insight much appreciated,
>> Alias
>> ___
>> Flashcoders mailing list
>> Flashcoders@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] RegEx

2009-05-10 Thread Ian Thomas
Match and replace work fine for me outside of AIR.

Ian

On Sat, May 9, 2009 at 11:54 PM, Anthony Pace  wrote:
> I am reading the documentation, and it says that match and replace are only
> for air 1.0 and they have that nasty trilobal air logo.
>
> What the heck  If that is the case then why are they running in the
> flash player?
> ___
> Flashcoders mailing list
> Flashcoders@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] mxmlc include classes , possible???

2009-04-29 Thread Ian Thomas
-includes com.mycompany.MyClass com.mycompany.MyOtherClass

HTH,
   Ian

On Wed, Apr 29, 2009 at 3:40 PM, Jiri  wrote:
> Hello list,
>
> Is it possible to force the mxmlc compiler to include certain classes so
> they can be instantiated at runtime. So I dont have to put an explicit
> reference in the .as files, in order to include it.
>
> I thought there was a compiler flag called include-classes, but a google
> search yields nothing of any use.
>
> I tried putting this in my flex-config
>
>        
>        org.name.class
>        
>
> But I get an error.
>
> Doing a mxmlc -help advanced in the console also yields no such flag.
>
> So I wonder now, is it at all possible, or do i need to create a .swc and
> have that add to the librart tag?
>
> Jiri
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Conditional statement in [Embed(source="... tag

2009-04-28 Thread Ian Thomas
It does accept conditionals, sort of, using the mxmlc -define tag.

I blogged about it somewhere (hunts around).

Aha!

http://code.awenmedia.com/node/34

HTH,
   Ian


On Tue, Apr 28, 2009 at 8:41 PM, Merrill, Jason
 wrote:
> I don't believe you can do conditionals with [Embed] statements. Those
> are compile-time directives for the compiler, not runtime player logic
> like an if/else.  If the compiler accepts conditionals of some sort, I
> am not aware of it and don't think it's documented anywhere.  I could be
> wrong, but I doubt this is possible.
>
>
> Jason Merrill
>
> Bank of  America   Global Learning
> Shared Services Solutions Development
>
> Monthly meetings on the Adobe Flash platform for rich media experiences
> - join the Bank of America Flash Platform Community
> ___
> Flashcoders mailing list
> Flashcoders@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] Benefits of as3 - to the client

2009-04-22 Thread Ian Thomas
On Wed, Apr 22, 2009 at 4:17 PM, Kerry Thompson  wrote:
> Fabio Pinatti wrote:
>
>> A question I was wondering here. A client of mine has a website built with
>> as2. And I explained him I work now with as3, but he asked what the real
>> benefits for him, to convert his project to as3.
>>
>> I would like to have some good arguments, but I can find more benefits for
>> me, as developer, than for the client.
>
> I tend to agree with Ian. If his Web site is already in AS2, my inclination
> would be to leave it in AS2.

I think that was Paul, not me. (Or any other Ian, for that matter!) :-)

But as it happens, I agree with Paul, too. :-D If it ain't broke,
don't fix it. If it needs minor fixes, stick to AS2. If it needs a
complete rework, then consider AS3, but only if it's faster/easier to
do so than to rework the AS2.

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


Re: [Flashcoders] Feasibility of xml file for high score data storage

2009-04-22 Thread Ian Thomas
Go for a database. Access by multiple users is what they are designed
for. Don't make life hard for yourself. :-)

Ian

On Wed, Apr 22, 2009 at 11:57 AM, Paul Steven
 wrote:
> I was considering using an xml file to store high score data for a game. It
> is quite possible that this game will have a significant amount of traffic
> (certainly in the first few days after launch) and I am now wondering if an
> xml file would be suitable. I am not sure what happens in the scenario where
> multiple players want to update the highscore at the same time - they will
> all need to write to the file. I assume this is the same scenario with a
> database but think perhaps updating a database is more efficient.
>
> Anyone care to offer any insight into whether an xml file would be suitable
> or not?
>
> Thanks
>
> Paul
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Loading string data in a file from a server

2009-04-21 Thread Ian Thomas
Hi Sid,
   It might be worth using a web traffic proxy such as Charles to make
sure that your AIR app is issuing a sensible HTTP request to the web
server i.e. that the thing you have which works in the browser is
actually the same as the request issued by the AIR app. I'm not sure
this can be a security error if you're not getting a security error
thrown?

  It's not something like the web server issuing a redirect, is it? So
browsing to that URL works fine, but accessing via a request from AIR
fails? Again, Charles could tell you.

http://www.charlesproxy.com/

HTH,
   Ian

On Tue, Apr 21, 2009 at 2:41 PM, Sidney de Koning
 wrote:
> Anybody?
>
> I just want to know how to load an file from a server that holds string data
> (xml or txt file) without getting the 2032 error.
>
> Please help,
>
> Sid
>
>
> On Apr 20, 2009, at 4:14 PM, Sidney de Koning wrote:
>
>> Hi List,
>>
>> I want to load textfile from my own server from an AIR app but i keep
>> getting a 2032 Error, a Stream Error. Event though when i load this from the
>> browser it works.
>> The docs about this on the net are very limited. This is what i thought of
>> so far:
>>
>> - It could be a crossdomain error?
>> - I do handle all events?
>> - I tried a loading in a PHP file that uses fopen to serve me the file
>>
>> Do anyone have any ideas? I just want to read in this text file ( or any
>> other file with string data from my server ) or should i use FileStream to
>> read in the file? Eventually the contents of the file i load in will will
>> need to be a File Object ().
>>
>> Thanks in advance,
>>
>> Sidney
>>
>> Below is my code:
>>
>>
>> var xmlURL:String =
>> "http://www.funky-monkey.nl/air/stringtest/serveFile.php";;
>>
>> var xmlReq:URLRequest = new URLRequest( xmlURL );
>> var xmlLoader:URLLoader = new URLLoader( xmlReq );
>>
>> //listen for error events
>> xmlLoader.addEventListener( IOErrorEvent.IO_ERROR , onIOError );
>> xmlLoader.addEventListener( SecurityErrorEvent.SECURITY_ERROR ,
>> onSecurityError );
>> xmlLoader.addEventListener( Event.COMPLETE , xmlLoaded );
>>
>> function xmlLoaded(evt:Event):void {
>>        trace( evt.target.data)
>> }
>>
>> function onIOError(evt:IOErrorEvent):void {
>>        trace( evt.text)
>> }
>>
>> function onSecurityError(evt:SecurityErrorEvent):void {
>>        trace( evt.text )
>> }
>>
>>
>> Sidney de Koning - be a geek, in rockstar style!
>> Flash / AIR Developer @ www.funky-monkey.nl
>> Technical Writer @ www.insideria.com
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Sidney de Koning - be a geek, in rockstar style!
> Flash / AIR Developer @ www.funky-monkey.nl
> Technical Writer @ www.insideria.com
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Just a quick one

2009-04-17 Thread Ian Thomas
Karl,

   Some more information up front would have helped - I was assuming
you were using the Loader class in AS3, whereas it looks like you're
using a third-party ImageLoader class in AS2! Really difficult to
answer the question without knowing that!

Looking at Martijn's source-code, it looks a little like you're
loading the image into a MovieClip that you've already created with a
specific width and height, which is causing your problem. I'd try
loading the image into a blank MovieClip instead (e.g. via
createEmptyMovieClip(), or just into something on the timeline with no
content).

Ian

On Fri, Apr 17, 2009 at 5:11 PM, Karl DeSaulniers  wrote:
> I am using martijndevsser ImageLoader
>
> Sent from losPhone
>
> On Apr 17, 2009, at 4:41 AM, Ian Thomas  wrote:
>
>> Let's try that again - perhaps I wasn't clear.
>>
>> I'm assuming - from your first email - you're using a
>> flash.display.Loader?
>>
>> Look for the property called contentLoaderInfo on the instance of your
>> Loader class.
>>
>> Documentation here:
>>
>> http://livedocs.adobe.com/flex/3/langref/flash/display/Loader.html#contentLoaderInfo
>>
>> HTH,
>>  Ian
>>
>>
>> On Fri, Apr 17, 2009 at 10:26 AM, Karl DeSaulniers 
>> wrote:
>>>
>>> That looked like it was going to work.
>>> Thanks for your response.
>>> It just told me there was no property called contentLoaderInfo in my
>>> class
>>> file.
>>>
>>> Karl DeSaulniers
>>> Design Drumm
>>> http://designdrumm.com
>>>
>>> On Apr 17, 2009, at 3:21 AM, Ian Thomas wrote:
>>>
>>>> myLoader.contentLoaderInfo.width
>>>> myLoader.contentLoaderInfo.height
>>>>
>>>>
>>>> HTH,
>>>>  Ian
>>>>
>>>> On Fri, Apr 17, 2009 at 6:09 AM, Karl DeSaulniers 
>>>> wrote:
>>>>>
>>>>> Hello all,
>>>>> Quick question.
>>>>> I am using a loader class to load some preview images and I am trying
>>>>> to
>>>>> make a couple of variables eq the width and heigth of the preview once
>>>>> the
>>>>> class is done actually loading the image. I am running into a snag with
>>>>> the
>>>>> variables eq the holder MCs width and height after the image loads and
>>>>> not
>>>>> the loaded images w&h.
>>>>>
>>>>> What is the best way to get actual loaded images w&h and not the holder
>>>>> MCs
>>>>> w&h?
>>>>>
>>>>> Thanks for any help
>>>>>
>>>>> Karl
>>>>>
>>>>> Sent from losPhone
>>>>> ___
>>>>> Flashcoders mailing list
>>>>> Flashcoders@chattyfig.figleaf.com
>>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>>
>>>> ___
>>>> Flashcoders mailing list
>>>> Flashcoders@chattyfig.figleaf.com
>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.com
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Just a quick one

2009-04-17 Thread Ian Thomas
Let's try that again - perhaps I wasn't clear.

I'm assuming - from your first email - you're using a flash.display.Loader?

Look for the property called contentLoaderInfo on the instance of your
Loader class.

Documentation here:
http://livedocs.adobe.com/flex/3/langref/flash/display/Loader.html#contentLoaderInfo

HTH,
  Ian


On Fri, Apr 17, 2009 at 10:26 AM, Karl DeSaulniers  wrote:
> That looked like it was going to work.
> Thanks for your response.
> It just told me there was no property called contentLoaderInfo in my class
> file.
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>
> On Apr 17, 2009, at 3:21 AM, Ian Thomas wrote:
>
>> myLoader.contentLoaderInfo.width
>> myLoader.contentLoaderInfo.height
>>
>>
>> HTH,
>>   Ian
>>
>> On Fri, Apr 17, 2009 at 6:09 AM, Karl DeSaulniers 
>> wrote:
>>>
>>> Hello all,
>>> Quick question.
>>> I am using a loader class to load some preview images and I am trying to
>>> make a couple of variables eq the width and heigth of the preview once
>>> the
>>> class is done actually loading the image. I am running into a snag with
>>> the
>>> variables eq the holder MCs width and height after the image loads and
>>> not
>>> the loaded images w&h.
>>>
>>> What is the best way to get actual loaded images w&h and not the holder
>>> MCs
>>> w&h?
>>>
>>> Thanks for any help
>>>
>>> Karl
>>>
>>> Sent from losPhone
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@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] Just a quick one

2009-04-17 Thread Ian Thomas
myLoader.contentLoaderInfo.width
myLoader.contentLoaderInfo.height


HTH,
   Ian

On Fri, Apr 17, 2009 at 6:09 AM, Karl DeSaulniers  wrote:
> Hello all,
> Quick question.
> I am using a loader class to load some preview images and I am trying to
> make a couple of variables eq the width and heigth of the preview once the
> class is done actually loading the image. I am running into a snag with the
> variables eq the holder MCs width and height after the image loads and not
> the loaded images w&h.
>
> What is the best way to get actual loaded images w&h and not the holder MCs
> w&h?
>
> Thanks for any help
>
> Karl
>
> Sent from losPhone
> ___
> Flashcoders mailing list
> Flashcoders@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] Access objects in embedded swf

2009-04-15 Thread Ian Thomas
Hi Glen,
   If it's just on stage, you don't need to wait for an init() on an
embedded clip - it's available instantly (which is nice!). Unless
you're moving to another frame, in which case you need to wait (off
the top of my head for a FRAME_CONSTRUCTED, I think).

Ian

On Wed, Apr 15, 2009 at 2:15 PM, Glen Pike  wrote:
> Hi,
>
> This is a guess, but is it possible that the clip has not had chance to
> "init"? I don't know what happens when you instanciate a movieclip like this
> with children, but if you load a SWF you usually have to wait until the
> onLoadInit event is dispatched before you can access properties and methods
> on the movie - could be similar, but correct me if I am wrong.
>
> If you only need to access the a1 element of the Portfolio SWF, you could
> export the library symbol with a LinkageID, republish the swf, then change
> the [Embed] to only embed the Library symbol - something like
>
> [Embed(source = 'portfolio.swf', symbol="a1_symbol")]
>
> http://www.bit-101.com/blog/?p=853
>
> HTH
>
> Glen
>
>
> Ian Thomas wrote:
>>
>> In which case you're doing something wrong. :-)
>>
>> That's definitely how it works in AS3 - I use it all the time.
>>
>> To find the child of a DisplayObjectContainer (i.e. a Sprite or a
>> MovieClip) you use getChildByName(), pass in the instance name as set
>> in the timeline. That returns a DisplayObject. If it _doesn't_ return
>> a DisplayObject, you have no child object called that.
>>
>> Then when you have retrieved the child as a DisplayObject, you can
>> manipulate it as required.
>>
>> Are you sure you're on the right frame of Portfolio? Are you sure 'a1'
>> is the instance name on the timeline?
>>
>> Ian
>>
>> On Wed, Apr 15, 2009 at 1:49 PM, Dav  wrote:
>>
>>>
>>> No luck :(
>>>
>>> -Original Message-
>>> From: flashcoders-boun...@chattyfig.figleaf.com
>>> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian
>>> Thomas
>>> Sent: 15 April 2009 13:36
>>> To: Flash Coders List
>>> Subject: Re: [Flashcoders] Access objects in embedded swf
>>>
>>> Dave,
>>>  Try:
>>>
>>> portfolio.x = 0;
>>> portfolio.y = 0;
>>> var child:DisplayObject=portfolio.getChildByName("a1");
>>> child.x=150;
>>>
>>> HTH,
>>>  Ian
>>>
>>> On Wed, Apr 15, 2009 at 1:14 PM, Dav  wrote:
>>>
>>>>
>>>> Hi guys!
>>>>
>>>> I'm having a problem accessing movieclips within an embedded SWF.
>>>>
>>>> Here is some code:
>>>>
>>>> ...
>>>>       [Embed(source = 'portfolio.swf')]
>>>>       public var Portfolio:Class;
>>>>
>>>>       public function Main()
>>>>       {
>>>>               var portfolio:* = new Portfolio();
>>>>               addChild(portfolio);
>>>>               portfolio.x = 0;
>>>>               portfolio.y = 0;
>>>>               portfolio.a1.x = 150; // Fails
>>>>       }
>>>> ...
>>>>
>>>> portfolio.a1.x fails, even though there is a movieclip inside
>>>>
>>>
>>> portfolio.swf
>>>
>>>>
>>>> called a1.
>>>>
>>>> ReferenceError: Error #1069: Property a1 not found on Main_Portfolio and
>>>> there is no default value. at Main()[D:\Flash\NewProject\Main.as:19]
>>>>
>>>> Any ideas?
>>>>
>>>> Thanks in advance!
>>>> Dav
>>>>
>>>> ___
>>>> Flashcoders mailing list
>>>> Flashcoders@chattyfig.figleaf.com
>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>
>>>>
>>>
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.com
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>>
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@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] Access objects in embedded swf

2009-04-15 Thread Ian Thomas
In which case you're doing something wrong. :-)

That's definitely how it works in AS3 - I use it all the time.

To find the child of a DisplayObjectContainer (i.e. a Sprite or a
MovieClip) you use getChildByName(), pass in the instance name as set
in the timeline. That returns a DisplayObject. If it _doesn't_ return
a DisplayObject, you have no child object called that.

Then when you have retrieved the child as a DisplayObject, you can
manipulate it as required.

Are you sure you're on the right frame of Portfolio? Are you sure 'a1'
is the instance name on the timeline?

Ian

On Wed, Apr 15, 2009 at 1:49 PM, Dav  wrote:
> No luck :(
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ian Thomas
> Sent: 15 April 2009 13:36
> To: Flash Coders List
> Subject: Re: [Flashcoders] Access objects in embedded swf
>
> Dave,
>   Try:
>
> portfolio.x = 0;
> portfolio.y = 0;
> var child:DisplayObject=portfolio.getChildByName("a1");
> child.x=150;
>
> HTH,
>   Ian
>
> On Wed, Apr 15, 2009 at 1:14 PM, Dav  wrote:
>> Hi guys!
>>
>> I'm having a problem accessing movieclips within an embedded SWF.
>>
>> Here is some code:
>>
>> ...
>>        [Embed(source = 'portfolio.swf')]
>>        public var Portfolio:Class;
>>
>>        public function Main()
>>        {
>>                var portfolio:* = new Portfolio();
>>                addChild(portfolio);
>>                portfolio.x = 0;
>>                portfolio.y = 0;
>>                portfolio.a1.x = 150; // Fails
>>        }
>> ...
>>
>> portfolio.a1.x fails, even though there is a movieclip inside
> portfolio.swf
>> called a1.
>>
>> ReferenceError: Error #1069: Property a1 not found on Main_Portfolio and
>> there is no default value. at Main()[D:\Flash\NewProject\Main.as:19]
>>
>> Any ideas?
>>
>> Thanks in advance!
>> Dav
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
> ___
> Flashcoders mailing list
> Flashcoders@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] Access objects in embedded swf

2009-04-15 Thread Ian Thomas
Dave,
   Try:

portfolio.x = 0;
portfolio.y = 0;
var child:DisplayObject=portfolio.getChildByName("a1");
child.x=150;

HTH,
   Ian

On Wed, Apr 15, 2009 at 1:14 PM, Dav  wrote:
> Hi guys!
>
> I'm having a problem accessing movieclips within an embedded SWF.
>
> Here is some code:
>
> ...
>        [Embed(source = 'portfolio.swf')]
>        public var Portfolio:Class;
>
>        public function Main()
>        {
>                var portfolio:* = new Portfolio();
>                addChild(portfolio);
>                portfolio.x = 0;
>                portfolio.y = 0;
>                portfolio.a1.x = 150; // Fails
>        }
> ...
>
> portfolio.a1.x fails, even though there is a movieclip inside portfolio.swf
> called a1.
>
> ReferenceError: Error #1069: Property a1 not found on Main_Portfolio and
> there is no default value. at Main()[D:\Flash\NewProject\Main.as:19]
>
> Any ideas?
>
> Thanks in advance!
> Dav
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] How to smooth bitmap?

2009-04-13 Thread Ian Thomas
Alternatively, just copy the bitmap and smooth it:

http://code.awenmedia.com/node/27

HTH,
   Ian

On Sat, Apr 11, 2009 at 3:16 PM, Pavel Repkin  wrote:
> Hey!
>
> I have a bitmap image loaded from external site (Facebook user avatar).
> Its size is 50x50 pixels and it looks very pixelated when the Flash Stage
> size changes.
> The image would look much better if it was smoothed.
>
> But, smoothing does not work for images loaded from external domains.
> MovieClip.forceSmoothing = true just does not work.
> However if the image resides on the same server as the script, smoothing
> works like a charm.
>
> Do you know how can I smooth the bitmap?
> Is it possible?
>
> AS 2.0, FP 9.0
>
> Pasha.
> ___
> Flashcoders mailing list
> Flashcoders@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: if (urlvars.bids != null) trace(urlvars.bids); still prints null?

2009-04-09 Thread Ian Thomas
No, null==null in AS3.

I suspect that your url variable bids contains the string "null", sent
from the server-side.

HTH,
  Ian

On Thu, Apr 9, 2009 at 2:13 PM, Alexander Farber
 wrote:
> Hello,
>
> does anybody please have an idea, why would this code:
>
> private function handleComplete(event:Event):void {
>        var urlvars:URLVariables = event.target.data;
> ..
>        if (urlvars.bids != null && urlvars.bids != 0) {
>                trace(urlvars.bids);
>                .
>        }
> }
>
> still print out "null"? Is it maybe because null != null in AS3
> and I have to perform some other check similar to isNaN()?
>
> Thank you
> Alex
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Is it possible to embed Flash player inside C++ application on MacOS?

2009-04-08 Thread Ian Thomas
Yes.

I'd take a look at the open source code for Screenweaver HX - SWHX.
This embeds the Netscape Flash plugin.

There's a source code link on this page:
http://screenweaver.org/doku.php?id=download

HTH,
   Ian

On Wed, Apr 8, 2009 at 11:36 AM, Pavel Repkin  wrote:
> Hey!
>
> My Windows application embeds Flash player.
>
> Now I want to port the application to MacOS.
> But I was not able to find any tutorial or an article on the subject.
>
> Do you know how to embed Flash player inside MacOS application?
> ___
> Flashcoders mailing list
> Flashcoders@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] Duplicating a loaded SWF

2009-04-03 Thread Ian Thomas
Henry,
   As far as I'm aware, duplication of existing instances of objects
is still something sadly lacking in Flash. There are a number of
hacks,  but none of them seem to work for all cases (I've tried a
bunch!).

  In your case, I have two suggestions; both are a change of approach:

i) Use the loaded SWF simply as a container for a symbol definition
(in the loaded SWF's library) and create lots of new instances of that
symbol - that is perfectly normal and works fine.

or

ii) Actually load multiple instances of the SWF. This isn't anything
like as heavyweight/slow as you might expect (and was the way to do it
in AS2) as the SWF will be in the browser's cache.

HTH,
   Ian

On Fri, Apr 3, 2009 at 12:49 PM, Henry Cooke
 wrote:
> hej folks,
> I'm writing an assetloader class, with the intention of attaching a whole
> bunch of instances to the stage of a loaded asset. Because I want to attach
> more than one instance of the loaded SWF, I'm having to duplicate the asset
> instead of just using addChild, because you can only addChild one instance
> of an object to the stage at a time.
>
> So, I've written the following function in a class which extends Loader:
>
> public function get asset():DisplayObject{
>
> var cn:String = getQualifiedClassName( contentLoaderInfo.content );
>
> var c:Class = Class( contentLoaderInfo.applicationDomain.getDefinition( cn )
> );
>
> return( DisplayObject( new c() ) );
>
> //return( contentLoaderInfo.content );
>
> }
>
> However, when I try to use the duplicated asset, I can't control its
> timeline, and any sound on that timeline is heard whether it's attached to
> the stage or not. Basically, I suspect that duplicating the asset is
> mangling its timeline somehow. Uncommenting the commented return and
> commenting everything else out gives me a movieclip that behaves how I
> expect, but of course can only be attached to the stage once.
>
> Has anyone tried stuff like this before (duplicating a loaded SWF with
> timeline intact)?
>
> h.
> ___
> Flashcoders mailing list
> Flashcoders@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] Oops.. forgot to include the code. Proof of Concept - HTTPService

2009-04-02 Thread Ian Thomas
Johan - from memory, I'm not sure AIR needs the crossdomain file,
whereas browser-based Flash does.

That might explain the discrepancy.

(That is from memory, though - probably needs doublechecking...)

Cheers,
   Ian

On Thu, Apr 2, 2009 at 9:35 AM, Johan Nyberg
 wrote:
> Forgot to include the code as promised in my previous post. Here it is.
> Please set url to wathever favourite RSS or whatever you want to access:
>
>
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute" creationComplete="loadSettings()" width="200"
> height="300">
>        
>        
>    
>                
>                        
>                                 height="100%" />
>                        
>                
> 
>
>
> --
> Johan Nyberg
>
> Web Guide Partner
> Engelbrektsplan 1
> 114 34 Stockholm
> 08 - 50 00 24 30
> 070 - 407 83 00
> ___
> Flashcoders mailing list
> Flashcoders@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] Detecting if authoring mode (Flash 8 AS2)

2009-04-02 Thread Ian Thomas
Hi Paul,

   Take a look at System.capabilities.playerType.


   System.capabilities.playerType=="External" means you're running in the IDE.

   System.capabilities.playerType=="Plugin" means you're running in a browser.


HTH,
Ian


On Thu, Apr 2, 2009 at 8:19 AM, Paul Steven  wrote:
> Is there a property or function to detect if a Flash movie is being tested
> in authoring mode or live on the web?
>
> Basically I have added a random variable to my xml file when loading it to
> prevent caching.
>
> The following works in both authoring and when live
>
> myXML.load("xml/homeFlashContent.xml");
>
> Whereas the following including the cache busting code doesn't work when
> tested within Flash IDE.
>
> my_Date = new Date();
>
> myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());
>
> I would therefore like to have an if statement something like
>
> If (boolAuthoringMode == true) {
>
>        myXML.load("xml/homeFlashContent.xml");
>
> } else {
>
>        myXML.load("xml/homeFlashContent.xml?"+my_Date.getUTCSeconds());
>
> }
>
>
> If there are any better solutions please let me know.
>
> Thanks
>
> Paul
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] FPS question

2009-04-02 Thread Ian Thomas
Also = try to redraw as little of the screen as possible from frame to frame.

If your entire screen is constantly redrawing, that takes a lot of
processing power.

So alpha fades that affect the entire screen or moving/animating a
sprite which covers the entire screen are problems.

The Flash Debug Player has a right-click context menu option called
something like "Show Redraw Areas" (I forget).

HTH,
  Ian


P.S. There's a bug in FP9+ - possibly still in 10, I can't remember.
Calling setChildIndex() forces the entire display to be redrawn.

On Wed, Apr 1, 2009 at 11:49 PM, Karl DeSaulniers  wrote:
> Perfect thank you...
>
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Full screen mode and KeyboardEvents

2009-03-30 Thread Ian Thomas
As an addition - AIR lets you use FULL_SCREEN_INTERACTIVE mode,
because the assumption is that the users _knows_ that they have
started the AIR app (like starting a normal .exe/.app).

Ian

On Mon, Mar 30, 2009 at 1:27 AM, Carl Welch  wrote:
> sheesh. Instead of removing features, I wish they would have built in a
> warning message telling people to be aware of such activities.
>
> Oh well : /
>
> Thanks for the info!
> --
> Carl Welch
> http://www.carlwelch.com
> http://blog.jointjam.com
> carlwelchdes...@gmail.com
> 805.403.4819
>
>
>
>
>
> On Mar 29, 2009, at 4:40 PM, jonathan howe wrote:
>
>> The reasoning behind disabling all/most (9/10 respectively) keyboard input
>> in fullscreen is because someone could easily make a fake login screen
>> that
>> looks like the OS. Carl, I hope that you don't have too much riding on it
>> being able to do that because I don't know of a workaround (maybe use the
>> browser in fullscreen... ??). If it's not essential that it be web
>> deployed
>> consider AIR...
>>
>> -jonathan
>>
>>
>>
>> 2009/3/29 Fabio Pinatti 
>>
>>>
>>>
>>> http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_03.html#head5
>>>
>>> On Sun, Mar 29, 2009 at 6:25 PM, Carl Welch >>>
 wrote:
>>>
 Hi all,

 I've built an app uses KeyboardEvents. All works fine until I go into
 FULLSCREEN Mode, the KeyboardEvents seem to stop working... and, of
>>>
>>> course

 when I go back to normal mode the KeyboardEvents start working again. Is
 there a work around for this issue?

 Thanks!

 --
 Carl Welch
 http://www.carlwelch.com
 http://blog.jointjam.com
 carlwelchdes...@gmail.com
 805.403.4819





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

>>>
>>>
>>>
>>> --
>>> Fábio Pinatti
>>> :: web.developer
>>>  www.pinatti.com.br
>>> :: 19. 9184.3745 / 3342.1130
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.com
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>
>>
>>
>> --
>> -jonathan howe
>> ___
>> Flashcoders mailing list
>> Flashcoders@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] Pixel recognition?

2009-03-29 Thread Ian Thomas
Flash's smoothing may introduce irregularities, I guess.

But given that the original poster only wanted to know grey or white,
surely it's a good enough approximation for that purpose?

Ian

On Sun, Mar 29, 2009 at 9:08 PM, Juan Pablo Califano
 wrote:
> It's indeed much faster (five times faster than transforming to grey scale),
> though the results I'm getting are incorrect (the other 2 methods seems to
> return consistently similar results, though trasnforming to HLS takes about
> 3200 ms for a 1152 x 864 image, and transform to grey scale takes around 130
> ms).
>
> It could be the case that I'm doing it the wrong way, of course... This is
> the code I'm using.
>
>
> function getAverageFromScaledBitmap(src:DisplayObject):Number {
>    var dest:BitmapData = new BitmapData(1,1);
>    var mat:Matrix   = new Matrix();
>    var sx:Number   = 1 / src.width;
>    var sy:Number   = 1 / src.height;
>
>    mat.scale(sx,sy);
>    dest.draw(src,mat,null,null,null,true);
>    var hls:Object = ColorUtils.RGBtoHLS(dest.getPixel(0,0));
>
>    return hls.l;
> }
> Cheers
> Juan Pablo Califano
>
> 2009/3/29 Ian Thomas 
>
>> On Sun, Mar 29, 2009 at 8:14 PM, Juan Pablo Califano
>>  wrote:
>> > As it's been said already, you could try converting to HLS and the get
>> the
>> > average luminance (brigthness). Here's a handy class to convert from RGB
>> to
>> > HSL and viceversa.
>> >
>> > http://www.dreaminginflash.com/2007/11/19/hls-to-rgb-rgb-to-hls/
>> > Another approach, which might be faster (but you'd have to test it to see
>> if
>> > that's true), could be transforming to bitmap to a grey scale. You would
>> > then know how black / white each pixel is, so you could get the average
>> > value by adding the value of each pixel and dividing for the total number
>> of
>> > pixels. Instead of reading the whole pixel value, you can just read one
>> > channel, because since it' s a grey scale, the three color channels will
>> be
>> > equal.
>>
>> If you're going to test any kind of average pixel value, it'd be far
>> faster to take a bitmap copy of the frame scaled to 1 pixel x 1 pixel
>> (with smoothing on) - and just read the colour value of that pixel...
>>
>> HTH,
>>   Ian
>>  ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Pixel recognition?

2009-03-29 Thread Ian Thomas
On Sun, Mar 29, 2009 at 8:14 PM, Juan Pablo Califano
 wrote:
> As it's been said already, you could try converting to HLS and the get the
> average luminance (brigthness). Here's a handy class to convert from RGB to
> HSL and viceversa.
>
> http://www.dreaminginflash.com/2007/11/19/hls-to-rgb-rgb-to-hls/
> Another approach, which might be faster (but you'd have to test it to see if
> that's true), could be transforming to bitmap to a grey scale. You would
> then know how black / white each pixel is, so you could get the average
> value by adding the value of each pixel and dividing for the total number of
> pixels. Instead of reading the whole pixel value, you can just read one
> channel, because since it' s a grey scale, the three color channels will be
> equal.

If you're going to test any kind of average pixel value, it'd be far
faster to take a bitmap copy of the frame scaled to 1 pixel x 1 pixel
(with smoothing on) - and just read the colour value of that pixel...

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


Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread Ian Thomas
Try:
  textArea.textField.selectable=false;

HTH,
   Ian

On Fri, Mar 27, 2009 at 4:38 PM,   wrote:
>
> I'll have to prevent users to copy text from a TextArea. In Flex I saw you
> do that bij setting a selectable attribute of the mx.controls.TextArea to
> false.
>
> However, this seems not possible with the fl.controls.TextArea, which is
> used in Flash CS4 / AS3.
>
> Does someone has a tip or hint.
> Thanks.
>
> PS. setting editable of the TextArea to false doesn't help, and setting the
> enabled attribute of the TextArea to false gives a disabled look and is not
> the intention.
>
> Peter van der Post
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@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-HTML WYIWYG editor?

2009-03-25 Thread Ian Thomas
On Wed, Mar 25, 2009 at 9:30 PM, Mindshare Studios
 wrote:

> So, we need something like the open source editors TinyMCE or FCKEditor,
> that *only* allows users to format text using HTML tags that Flash can
> handle. There are tons of plug and play WYSIWYG editors out there but so far
> I can't find any geared towards Flash.

I may be misremembering - but I thought that one of the two (TinyMCE
or FCKEditor, I forget which one) allowed you to restrict which tags
were allowed somewhere in their config? It has been ages since I used
either, so I may be mistaken...

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


Re: [Flashcoders] A very simply question of XML toString()

2009-03-19 Thread Ian Thomas
No shortcut if you want them as an Array.

Something like the following is pretty short, though, and does the job:

var arr:Array=[];

for each(var book:XML in myXML.book)
   arr.push(bo...@title.tostring());

should do it. (Untested!).

Ian

On Thu, Mar 19, 2009 at 5:11 PM, ACE Flash  wrote:
> Hey there,
>
> I was trying to parse the XML to get all value of  and store them
> into array at once. Do I have to use loop to push them into an Array or
> there is a shortcut for doing this?
>
> I'd like to get something like this...
>
> var arr:Array = new Array();
>
> // to trace arr
> arr[0] = Dictionary 1
> arr[1] = Dictionary 2
>
> Thank you
>
>
>
>   1. var myXML:XML =
>   2.   
>   3.           
>   4.                   Dictionary 1
>   5.           
>   6.           
>   7.                   Dictionary 2
>   8.           
>   9.   ;
>   10. trace( myXML.book.title.toString() )
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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


Re: [Flashcoders] Advice on creating random grid of pairs for a game

2009-03-11 Thread Ian Thomas
Paul,

Maybe the problem is actually that difficult - there may be no easy
solutions to the calculation, and it might indeed take hours to find a
valid solution.

But anyway - here's a thought, in case it helps.

Have you considered, for each pair:

- putting the pair on adjacent empty squares.
- moving one (or both!) away from the other until it hits an obstacle
or a 'used' point (see next line). Therefore there's a clear path
between them.
- marking the 'clear' path between them as 'used'

Rinse and repeat.

Don't know if that's helpful, but you never know. That should
eliminate the 'pick all possible squares and pathfind' part of it, I
think.

Ian

On Wed, Mar 11, 2009 at 4:59 PM, Paul Steven  wrote:
> Thanks Anthony
>
> Perhaps I am overcomplicating things but I am under the impression I need to
> ensure there is a clear path between each pair as I add them.
>
> My current algorithm is as follows:
>
> Step 1. Choose a random tile position (Random Row, Random Column)
>
> Step 2. Create an array of all possible tiles that this random tile can be
> paired with. To create this array, I use a path finding function to check
> there is a clear path between the 2 tiles
>
> Step 3. Choose one of the possible tiles from the array (currently I am just
> choosing a random one) and update grid data to reflect the 2 paired tiles
> are not on the grid.
>
> Repeat from Step 1 again
>
> This works fine until around 26 pairs have been placed then it gets stuck as
> it cannot find any more tiles that have a clear path.
>
> I have even added code to ensure that no isolated empty tiles are created as
> a result of creating a pairing.
>
> I have tried putting several timed break points in my code to restart the
> entire process if it fails to complete the entire grid. However it just
> doesn't seem to ever be able to generate an entire grid.
>
> Perhaps this process is really time consuming and I need to leave it for
> hours to generate a grid but I wouldn't have thought so.
>
> Any advice much appreciated!
>
> Thanks
>
> Paul
>
>
> -Original Message-
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Anthony Pace
> Sent: 11 March 2009 16:31
> To: Flash Coders List
> Subject: Re: [Flashcoders] Advice on creating random grid of pairs for a
> game
>
> Sounds like one of my old high-school projects,
>
> I see several ways of doing what you want that make sense:
>
>    * -random population always of an array 81 units long (80 if you
>      want the last to always be blank)
>          o --you could create a function that loops 41(or 40 if last
>            always blank)times tracking the positions in a temp array
>            and then returning the completed array  (if 41st loop
>            choosing unfilled position with a 0 for blank card/wild card)
>          o --there are other ways of doing this; yet, they use more
>            loops and if statements.
>    * -random population of an array 81 units long and then shuffling
>      the "deck" sort of
>          o --shuffling by swapping only positions that have not been
>            swapped (you could even isolate left and right sides to
>            simulate a card deck getting shuffled by hand)
>          o --shuffling by swapping from 1 to 81 to ensure all positions
>            get swapped
>          o --there are most definitely more ways of doing this
>    * -static population and then shuffling the "deck" same as above.
>
> As well, although I think you may not need to be told this, when you
> want to display the positions, you need to know and track which row
> level of the grid you are on and what column position you are in, in
> order to properly find the x and y values; thus, in your case testing if
> the modulus of 9 equals 0 will be handy.
>
> I hope the concepts help,
> Anthony
>
>
> Paul Steven wrote:
>> I am trying to write the code to populate a 9 by 9 grid of tiles with 40
>> pairs of matching tiles.
>>
>> I have 4 different types of tiles and I want to create a grid that has 40
>> matching pairs and 1 blank tile.
>>
>> I do not want the pairs all to be next to each other but there needs to be
>> at least one solution that enables a player to match each and every pair.
> To
>> match a pair there needs to be a clear path between each member of the
> pair.
>>
>> 1,2,1
>> 2,0,3
>> 4,4,3
>>
>> In this simple example, a user could clear all tiles by matching in the
>> following order:
>>
>> 4 - 4
>> 3 - 3
>> 2 - 2
>> 1 - 1
>>
>> Note that until they have matched the pair of 2's they cannot match the
> 1's
>> as there would be no clear path between them.
>>
>> All my attempts so far to create this grid is resulting in script errors
> due
>> to my code being unable to find a solution. My code basically gets about
> 60%
>> of the board created then finds it cannot any more clear paths to create
> the
>> remainder of the grid.
>>
>> I would really appreciate any help cracking this function.

Re: [Flashcoders] Problem with export linkage definition in a loaded swf

2009-03-09 Thread Ian Thomas
I suspect this is a compile-time issue - your loading SWF has no idea
what 'Paris' means when trying to compile?

In which case you need to pick it up at runtime.

Try flash.system.ApplicationDomain.currentDomain.getDefinition()

e.g.

var myClass:Class=ApplicationDomain.currentDomain.getDefinition("Paris")
as Class;

var myObject:Object=new myClass();
addChild(myObject);

Alternatively, you might need to access the applicationDomain of the
Loader instead (I've no idea how you're loading the SWF). You could
try:

var 
myClass:Class=myLoader.contentLoaderInfo.applicationDomain.getDefinition("Paris")
as Class;

HTH,
   Ian

On Mon, Mar 9, 2009 at 1:01 PM, Eric E. Dolecki  wrote:
> Are you sure the swf is loaded before trying to instantiate the class?
>
> On Mon, Mar 9, 2009 at 8:47 AM, laurent  wrote:
>
>> Hi,
>>
>> I have a map.swf containing a linked movie clip named Paris as a exported
>> Class.
>>
>> I load this map from another swf. The problem that occure in different ways
>> is that the loading swf don't recognise the Paris definition:
>> 1046: Type was not found or was not a compile-time constant: Paris. // this
>> is for definition : public var view : Paris;
>> 1180: Call to a possibly undefined method Paris. // this is for
>> instantiation: view = new Paris();
>>
>> I don't know what to do, except putting that Paris map directly on stage to
>> avoid linkage.
>>
>> thx
>> Laurent
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
>
> --
> http://ericd.net
> Interactive design and development
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  1   2   3   4   5   6   7   8   9   >