Re: [Flashcoders] IOS 8 and Air

2014-11-27 Thread Paul A.

On 19/09/2014 20:11, Paul A. wrote:

On 19/09/2014 14:01, Mike Duguid wrote:

I have some apps built with air 14 for ios8, initial testing seems to be
ok, the only glitch being they now pop up a message about allowing
notifications on the first launch (even though the apps don't use
notifications). What's broken in yours specifically?

Two just hang with a black screen, two hang on the opening screen.

I think that a rebuild with Flash CC and the current version of Air 
for IOS should sort it out.


Here's an update.

Flash CC did sort it out but caused a new problem - Flash CC no longer 
supports TLF text, so all of the TLF text was converted to classic flash 
text.


Unfortunately, it changed size and layout in the conversion and so I've 
had to revisit all TLF text.


The conversion goes to static text, all of the named TLF text then was 
dangling in code..


Bit of a pain all round.

Paul



Paul




On 19 September 2014 13:50, Paul A. p...@ipauland.com wrote:

Well, with IOS 8 released, I tried out those apps I built with CS6 
and Air

for IOS 3.4.

All broken..  :-(

Client informed that they better not upgrade to IOS8 and will they 
require

all the apps to be rebuilt for IOS8..

Paul


On 14/09/2014 21:31, Paul A. wrote:


Any Flash developers targetting Air on IOS, tested their apps on IOS8?

It seems some changes in IOS 8 have upset some native apps. Will I 
get a

stream of phone calls very soon or will everything I've made so far
continue to work?

I would try it myself but I'd rather wait until the official release.

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



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


Re: [Flashcoders] IOS 8 and Air

2014-09-19 Thread Paul A.
Well, with IOS 8 released, I tried out those apps I built with CS6 and 
Air for IOS 3.4.


All broken..  :-(

Client informed that they better not upgrade to IOS8 and will they 
require all the apps to be rebuilt for IOS8..


Paul

On 14/09/2014 21:31, Paul A. wrote:

Any Flash developers targetting Air on IOS, tested their apps on IOS8?

It seems some changes in IOS 8 have upset some native apps. Will I get 
a stream of phone calls very soon or will everything I've made so far 
continue to work?


I would try it myself but I'd rather wait until the official release.

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] IOS 8 and Air

2014-09-19 Thread Paul A.

On 19/09/2014 14:01, Mike Duguid wrote:

I have some apps built with air 14 for ios8, initial testing seems to be
ok, the only glitch being they now pop up a message about allowing
notifications on the first launch (even though the apps don't use
notifications). What's broken in yours specifically?

Two just hang with a black screen, two hang on the opening screen.

I think that a rebuild with Flash CC and the current version of Air for 
IOS should sort it out.


Paul




On 19 September 2014 13:50, Paul A. p...@ipauland.com wrote:


Well, with IOS 8 released, I tried out those apps I built with CS6 and Air
for IOS 3.4.

All broken..  :-(

Client informed that they better not upgrade to IOS8 and will they require
all the apps to be rebuilt for IOS8..

Paul


On 14/09/2014 21:31, Paul A. wrote:


Any Flash developers targetting Air on IOS, tested their apps on IOS8?

It seems some changes in IOS 8 have upset some native apps. Will I get a
stream of phone calls very soon or will everything I've made so far
continue to work?

I would try it myself but I'd rather wait until the official release.

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


[Flashcoders] IOS 8 and Air

2014-09-14 Thread Paul A.

Any Flash developers targetting Air on IOS, tested their apps on IOS8?

It seems some changes in IOS 8 have upset some native apps. Will I get a 
stream of phone calls very soon or will everything I've made so far 
continue to work?


I would try it myself but I'd rather wait until the official release.

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


Re: [Flashcoders] 1086 syntax error expecting semicolon before leftbrace

2014-09-13 Thread Paul A.
I managed to isolate a small part of the project and copied it to a new 
project - just to experiment.


Running as AS2 lost the problematic error completely.

Running again as AS3 saw it restored. Despite the compiler saying that 
it ignores actionscript attached to symbols, that seems to be the 
problem. Removing an on (release) handler in the AS2 code sees the error 
go away when building as an AS3 project.


Paul


On 12/09/2014 15:00, Paul A. wrote:

On 12/09/2014 14:30, Mike Duguid wrote:
Saving as .xfl might allow you to search (and possibly replace) 
through the
associated xml files more efficiently than working through a complex 
.fla

Good suggestion.

I've currently managed to extract all of the actionscript using the 
MovieExplorer, but gosh it's a needle in a haystack!


Thanks,

Paul


On 12 September 2014 12:10, Paul A. p...@ipauland.com wrote:


On the face of it this is a simple thing to solve, but it's driving me
nuts.

I am trying to update an AS2 project for a client to AS3. The code
naturally contains code all over the place, attached to buttons and 
on the

timeline.

The problem for me is that there is a LOT of code disributed over 
loads of

frames, inside movieclips and on the timeline.

I'm using Flash CS6. For the most part the compiler is helpful, but on
this occasion finding the source of the problem is very hard, and by 
source

I mean the actual source code where the error is, not just a solution.

Generally the error is along the lines of

*frame 1, line 1 **1086 syntax error expecting semicolon before 
leftbrace*


..repeated  LOADS of times.

If the problem really was on frame 1, line 1 of the main timeline, it
would be great, but it's not. SOmetimes as I experiment with removing
frames, etc, the frame number changes.

By temporarily removing frames from the main timeline, and making 
layers
into guides, I can narrow the generation of the errors to specific 
symbols.
Unfortunately it's slow to do this and there's loads of nested 
sympols and

a lot of animation frames.

It's a nightmare.

Any ideas for finding where these are originating from without 
searching

painfully through the source?

I should say that other errors are correctly identified and their 
location

shown. No issues with those and now I only have these 1086 errors left.

I have taken the AS2 fla, copied all of the frames and layers into 
an AS3

project and the errors are there.

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


[Flashcoders] 1086 syntax error expecting semicolon before leftbrace

2014-09-12 Thread Paul A.

On the face of it this is a simple thing to solve, but it's driving me nuts.

I am trying to update an AS2 project for a client to AS3. The code 
naturally contains code all over the place, attached to buttons and on 
the timeline.


The problem for me is that there is a LOT of code disributed over loads 
of frames, inside movieclips and on the timeline.


I'm using Flash CS6. For the most part the compiler is helpful, but on 
this occasion finding the source of the problem is very hard, and by 
source I mean the actual source code where the error is, not just a 
solution.


Generally the error is along the lines of

*frame 1, line 1 **1086 syntax error expecting semicolon before leftbrace*

..repeated  LOADS of times.

If the problem really was on frame 1, line 1 of the main timeline, it 
would be great, but it's not. SOmetimes as I experiment with removing 
frames, etc, the frame number changes.


By temporarily removing frames from the main timeline, and making layers 
into guides, I can narrow the generation of the errors to specific 
symbols. Unfortunately it's slow to do this and there's loads of nested 
sympols and a lot of animation frames.


It's a nightmare.

Any ideas for finding where these are originating from without searching 
painfully through the source?


I should say that other errors are correctly identified and their 
location shown. No issues with those and now I only have these 1086 
errors left.


I have taken the AS2 fla, copied all of the frames and layers into an 
AS3 project and the errors are there.


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


Re: [Flashcoders] 1086 syntax error expecting semicolon before leftbrace

2014-09-12 Thread Paul A.

On 12/09/2014 14:30, Mike Duguid wrote:

Saving as .xfl might allow you to search (and possibly replace) through the
associated xml files more efficiently than working through a complex .fla

Good suggestion.

I've currently managed to extract all of the actionscript using the 
MovieExplorer, but gosh it's a needle in a haystack!


Thanks,

Paul


On 12 September 2014 12:10, Paul A. p...@ipauland.com wrote:


On the face of it this is a simple thing to solve, but it's driving me
nuts.

I am trying to update an AS2 project for a client to AS3. The code
naturally contains code all over the place, attached to buttons and on the
timeline.

The problem for me is that there is a LOT of code disributed over loads of
frames, inside movieclips and on the timeline.

I'm using Flash CS6. For the most part the compiler is helpful, but on
this occasion finding the source of the problem is very hard, and by source
I mean the actual source code where the error is, not just a solution.

Generally the error is along the lines of

*frame 1, line 1 **1086 syntax error expecting semicolon before leftbrace*

..repeated  LOADS of times.

If the problem really was on frame 1, line 1 of the main timeline, it
would be great, but it's not. SOmetimes as I experiment with removing
frames, etc, the frame number changes.

By temporarily removing frames from the main timeline, and making layers
into guides, I can narrow the generation of the errors to specific symbols.
Unfortunately it's slow to do this and there's loads of nested sympols and
a lot of animation frames.

It's a nightmare.

Any ideas for finding where these are originating from without searching
painfully through the source?

I should say that other errors are correctly identified and their location
shown. No issues with those and now I only have these 1086 errors left.

I have taken the AS2 fla, copied all of the frames and layers into an AS3
project and the errors are there.

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


Re: [Flashcoders] Flash to HTML

2014-06-19 Thread Paul A.
It's wishful thinking that there is a magic button anywhere that is 
going to convert any flash app of any real complexity into a fully 
functional HTML app.


I think Adobe are making strides in this area, but it's nowhere near 
what you need. If it was, Adobe would be blasting it from the rooftops.


I have seen a simple game built in Flash CC and generating 
HTML/Javascript but not a conversion from an existing codebase.


You may find this informative:

http://alesys.net/site/2013/12/15/postmortem-making-an-html5-game-with-flash-cc-html5-canvas-document-for-a-game-jam/

Paul

On 19/06/2014 21:31, John R. Sweeney Jr. wrote:

Has anyone played with this? Everything I’ve read, timeline animations can get 
converted and simple code. I have a 5 frame app that has 50 layers, 1000+ 
library elements and thousands of lines of code that the client now wants to go 
online for all platforms. What a surprise. ;)

I’ll look into the latest update more closely, but was just wondering of things 
like Google Swiffy had gotten better or something else had come along. I’ll 
glad do the research, just wonder if anyone could point me in a direction.

Thanks,
John

John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On Jun 19, 2014, at 3:19 PM, Merrill, Jason jason.merr...@bankofamerica.com 
wrote:


New version of Flash just came out that claims to export to HTML5 Canvas and do 
Actionscript to Javascript translations. Worth checking out?


___
Flashcoders mailing list
Flashcoders@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] Expandable Flash Banners

2014-03-16 Thread Paul A.
If you don't have control of the html page where the ad is being hosted, 
there will be a flash API supplied with whatever ad system is being used 
to support such ads, so a generic approach won't be suitable in such cases.


Essentially you make a Flash design for the larger size, but mask it to 
fit the smaller add display. When you wish to expand the ad you can 
expand the mask to cover the larger area after calling the advertising 
API to tell it to expand the HTML element that encloses the flash area.


I did this last year and it worked via a series of callbacks, but will 
vary according to the ad system being used.


Paul

On 16/03/2014 05:25, Karl DeSaulniers wrote:

Oh!? I am not sure if they are being hosted with those systems. I will need to 
check with the client. Thanks for the heads up. Do you happen to have a link to 
these specs? If not I'm sure I can google it up. Thanks again.

Best,
Karl

Sent from losPhone


On Mar 15, 2014, at 11:43 PM, Roger Persson ro...@radiergum.com wrote:

Hi Karl,

Don't know if this is the case for you but if your banner is to be hosted by a 
network like Google Ads or AdForm they will have some specific code you need to 
use for the expanding to work.

Best regards
/roger



Karl DeSaulniers skrev 2014-03-15 23:39:

Can anyone point me in the right direction for expandable banners? To be honest 
I am looking for an example or some script I can just use, but would take tut 
or doc links as well.  Expandable banners with inset video to be exact. Also, 
correct me if I am wrong, but doesn't Javascript handle the expansion part?

TIA.
Best,

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] Video on IOS

2014-03-13 Thread Paul A.
I have made a few IOS projects using video and not really found much of 
an issue, though encoding of the video has been critical (to avoid 
skipping frames)- originally targeting iPad 1's.


The video does play over background graphics and it seems to play flvs.

Rendering options are set to auto, resolution standard.

Unfortunately I don't remember the encoding settings that I used to 
generate the flvs.


Not sure if that is helpful or not.

Paul

On 13/03/2014 04:20, John R. Sweeney Jr. wrote:

Ironically, that is what I tried about an hour ago. No other video approach was 
working, so I cut a hole in the background graphic and made it a .png. Then I 
saw the video. Though that would be a work around.

Does anyone else have an suggestion. Is that the ONLY this the only way to play 
video now on the iPad in a Flash app?

It seems a bit absurd…

Thanks,
John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On Mar 12, 2014, at 9:44 PM, Rick rickhas...@hotmail.com wrote:


Yup, video plays behind the display list only, under the stage, because that is where the 
gpu can process it rather than the cpu. So, I think the workaround is to have the 
background graphic as a frame, which is in actuality above the video with a 
transparent center, but at least preserves the appearance of background graphic 
consistent with the style of your app.
Take what I say here with a grain of salt as I've only really dealt with video 
in an AIR app in the real world for android, so perhaps someone else can weigh 
in with more hands on knowledge and iOS experience. I read up on it a while 
back for an iOS AIR app that ended up not including the video component.


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



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


Re: [Flashcoders] Video on IOS

2014-03-13 Thread Paul A.

I just re-encoded the MP4s supplied to me.

All I know is that I'm using the 'standard' video player and playing 
video over background content with the display list hierarchy respected.



On 13/03/2014 14:33, John R. Sweeney Jr. wrote:

I know that FLV's work, but these are all MP4's and the play as a standalone 
and using StageVideo, but I cannot find a way to play them with normal video 
playback over graphics in the display list.

Thanks,

John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On Mar 13, 2014, at 3:32 AM, Paul A. p...@ipauland.com wrote:


The video does play over background graphics and it seems to play flvs.


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



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


Re: [Flashcoders] Video on IOS

2014-03-13 Thread Paul A.

On 13/03/2014 14:59, John R. Sweeney Jr. wrote:

But they are FLV's , right?
Yes, but they started life as MP4s. I found some video wouldn't work 
without recoding.




John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On Mar 13, 2014, at 9:44 AM, Paul A. p...@ipauland.com wrote:


I just re-encoded the MP4s supplied to me.

All I know is that I'm using the 'standard' video player and playing video over 
background content with the display list hierarchy respected.

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



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


Re: [Flashcoders] Video question

2014-01-31 Thread Paul A.

On 31/01/2014 23:46, John R. Sweeney Jr. wrote:

Hello again,

Has anyone used Youtube or Vimeo videos in their Flash app? My client will 
produce the video's and post them, then want a Flash based game that will play 
those videos on demand from within the game.

I've always had the videos either next to the .swfs or on another server, using 
a crossdomain.xml. Can a YouTube or Vimeo be embedded into my app to look like 
part of the game or do you end up with pop-up video windows?
I did some work using youtube video a couple of years back and it was as 
good as being embedded - certainly no pop-up windows.


It's easy to check this out - there are examples on the youtube site 
https://developers.google.com/youtube/flash_api_reference.


Paul



Thanks,


John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169



___
Flashcoders mailing list
Flashcoders@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] CS6 and OSX 10.9

2014-01-03 Thread Paul A.
Not noticed anything specific.. ..so far. Or if I have I've forgotten 
about it!


I have had some absolute weirdness with a client using an ad 
distribution network ( I don't wish to identify it - they were extremely 
helpful ) where the mouse pointer position was in the wrong place when 
using FF on a Mac, but fine with other browsers and FF on Windows. This 
issue only appeared after deployment via the ad network.


On 03/01/2014 04:01, John R. Sweeney Jr. wrote:

Howdy,

Has anyone had any issues with Flash CS6 and the new OSX 10.9? I've heard some 
issues, but nothing specific.

Thanks,

John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




___
Flashcoders mailing list
Flashcoders@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] Colour rendition of imported assets

2013-11-05 Thread Paul A.
I'm working on a project that includes a number of panels upon which are 
images.


These images have been imported from photoshop.

The images are basically cut out from a solid background and have a 
crude border around them.


The panel background is a solid colour.

If you are looking well enough, the edges of the images can be seen.

Looking in the photoshop document, the edges of the images cannot be 
seen against the background (which is on a seperate layer).


Colour sampling in photoshop of the solid panel background shows a solid 
colour. Doing the same around the edges of the images shows that the 
colour does vary.


Because of the variation in colour I would expect a bit of an edge to be 
visible, but I can't detect it in photoshop.


It's possible that some of these assets were loaded into flash with some 
compression - I'll need to investigate, but I'm wondering if I'm on a 
hiding to nothing trying to eradicate this faint edge around the assets.


Anyone else come up against this? First time for it to be an issue for me.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Colour rendition of imported assets

2013-11-05 Thread Paul A.

On 05/11/2013 19:13, David Cohn wrote:

The solid color may be because you're sampling the color of the layer in 
photoshop, rather than the anti-aliased image as in Flash.
Could you try exporting from photoshop as a jpeg-- that way you would at least 
see what's happening in the compression?
I had a chat with the designer and an alternative solution was proposed 
( it's only possible because elements that sit on top of each other on 
the panels can cover up the background without creating artifacts).


The solution is to create a single image of the panel with images in 
situ. The items on the panel are dragged off, so a MC with a small 
alpha, can be dragged and a covering graphic shown that hides the 
original image.


So problem solved, but quite a bit of work redoing the app.

Paul



I'm working on a project that includes a number of panels upon which are
images.

These images have been imported from photoshop.

The images are basically cut out from a solid background and have a
crude border around them.

The panel background is a solid colour.

If you are looking well enough, the edges of the images can be seen.

Looking in the photoshop document, the edges of the images cannot be
seen against the background (which is on a seperate layer).

Colour sampling in photoshop of the solid panel background shows a solid
colour. Doing the same around the edges of the images shows that the
colour does vary.

Because of the variation in colour I would expect a bit of an edge to be
visible, but I can't detect it in photoshop.

It's possible that some of these assets were loaded into flash with some
compression - I'll need to investigate, but I'm wondering if I'm on a
hiding to nothing trying to eradicate this faint edge around the assets.

Anyone else come up against this? First time for it to be an issue for me.


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



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


Re: [Flashcoders] static const singleton GC?

2013-09-20 Thread Paul A.

What if you make the const a var?

I don't build my singletons with an initialiser, but whether that makes 
any difference, who knows?


I always make my singleton references explicit, ClassName.getInstance() 
and instantiate the instance in getInstance().


On 20/09/2013 14:18, ktu wrote:

anybody have any ideas?
this is still shaking my boots.

thanks :)


On Mon, Sep 16, 2013 at 5:53 PM, ktu ktu_fl...@cataclysmicrewind.comwrote:


hey all!

I'm faced with an interesting question.

in my codebase, we made the decision to use a few singletons. to implement
those singletons we used the static const trick:

package com.example {
 public static const API:AppAPI = new AppAPI();
}

package com.example {
 public class AppAPI {
 public function AppAPI () {
 if (API) throw new Error();
 }
}

this works fine in the normal environment we run in. that is, we run in a
scheduler system that loads the flash player, runs our swf, then shuts down
the flash player, doing that over and over again based off the schedule of
content. the problem now is that a new client uses a scheduler that is
built on AIR, so the flash player instance never shuts down. whenever our
app comes up in the scheduler, memory jumps and never goes down causing the
AIR app to crash every couple of hours. If, they load my application only
once, and leave it running, it lasts for days without any major memory
leaks.

any idea how i could test whether GC does pick this up or could? or any
known issues with this trick and GC? maybe you just have tricks in general
to finding out what GC isn't getting?

thanks!!!

--
Ktu;

The information contained in this message may or may not be privileged
and/or confidential. If you are NOT the intended recipient,
congratulations, you got mail!






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


Re: [Flashcoders] static const singleton GC?

2013-09-20 Thread Paul A.

It's not exactly the greatest programming sin and they work fine in AS3.

If the OP has a project in place using them, he should continue to do so 
once the issue is solved.


Singletons are hardly a maverick technique.


On 20/09/2013 15:04, Ross P. Sclafani wrote:

Singletons are a horrible design pattern and the fact that they're poorly 
implemented in as3 should steer you away from using them there.

Sent from my iPhone

On Sep 20, 2013, at 9:48 AM, Paul A. p...@ipauland.com wrote:


What if you make the const a var?

I don't build my singletons with an initialiser, but whether that makes any 
difference, who knows?

I always make my singleton references explicit, ClassName.getInstance() and 
instantiate the instance in getInstance().

On 20/09/2013 14:18, ktu wrote:

anybody have any ideas?
this is still shaking my boots.

thanks :)


On Mon, Sep 16, 2013 at 5:53 PM, ktu ktu_fl...@cataclysmicrewind.comwrote:


hey all!

I'm faced with an interesting question.

in my codebase, we made the decision to use a few singletons. to implement
those singletons we used the static const trick:

package com.example {
 public static const API:AppAPI = new AppAPI();
}

package com.example {
 public class AppAPI {
 public function AppAPI () {
 if (API) throw new Error();
 }
}

this works fine in the normal environment we run in. that is, we run in a
scheduler system that loads the flash player, runs our swf, then shuts down
the flash player, doing that over and over again based off the schedule of
content. the problem now is that a new client uses a scheduler that is
built on AIR, so the flash player instance never shuts down. whenever our
app comes up in the scheduler, memory jumps and never goes down causing the
AIR app to crash every couple of hours. If, they load my application only
once, and leave it running, it lasts for days without any major memory
leaks.

any idea how i could test whether GC does pick this up or could? or any
known issues with this trick and GC? maybe you just have tricks in general
to finding out what GC isn't getting?

thanks!!!

--
Ktu;

The information contained in this message may or may not be privileged
and/or confidential. If you are NOT the intended recipient,
congratulations, you got mail!

___
Flashcoders mailing list
Flashcoders@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] DoubleClick Studio

2013-09-13 Thread Paul A.
Just been discussing some flash work and have been told I'd need to use 
DoubleClick Studio.


Anyone have any experience of this compared to Flash?

Paul

(Yes, I know it's almost Off-topic )
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] DoubleClick Studio

2013-09-13 Thread Paul A.
OK, I see it uses flash in conjunction with Google tools and components 
- so on topic for sure!


On 13/09/2013 13:21, Paul A. wrote:
Just been discussing some flash work and have been told I'd need to 
use DoubleClick Studio.


Anyone have any experience of this compared to Flash?

Paul

(Yes, I know it's almost Off-topic )
___
Flashcoders mailing list
Flashcoders@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] IOS Flash question

2013-05-28 Thread Paul A.

Maybe someone has a suggestion.

A client has some iPads without 3G.

The client wants to be able to email PDF files directly to a customer 
from the iPad (A bit difficult without a connection) and I've never 
really found a way to get flash to initiate an email with content 
already in place, or as an attachment.


Normally to display a PDF via flash I'd use a link to a web-hosted PDF, 
or a local file. Any ideas about how I do this from an IOS App written 
in flash?


Thanks,

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


Re: [Flashcoders] IOS Flash question

2013-05-28 Thread Paul A.

On 28/05/2013 10:59, Karl DeSaulniers wrote:

I have emailed with attachments, but it involved a PHP file that put the email 
together and attached the file as base64 then sent it on its way. Might be a 
good approach for you as well. Then you can just have your iOS app send just a 
form request. PDF attachments can get tricky though. Sometimes the encryption 
messes with the layout of the PDF. As long as it wasn't a really complex PDF it 
sent no problem, but mine were custom layouts with graphics and tables, etc. I 
did get it to work finally though. Once emailed, the customer could view the 
PDF in their email automatically with the built in PDF viewer in the iOS.

Thanks Karl.

Unfortunately the client wants the PDF to be viewable offline.

On the PHP front - good solution but I don't want to be messing with the 
client server-side if I can avoid it.


Paul


Best,
Karl

Sent from losPhone

On May 28, 2013, at 4:10 AM, Paul A. p...@ipauland.com wrote:


Maybe someone has a suggestion.

A client has some iPads without 3G.

The client wants to be able to email PDF files directly to a customer from the 
iPad (A bit difficult without a connection) and I've never really found a way 
to get flash to initiate an email with content already in place, or as an 
attachment.

Normally to display a PDF via flash I'd use a link to a web-hosted PDF, or a 
local file. Any ideas about how I do this from an IOS App written in flash?

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



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


Re: [Flashcoders] IOS Flash question

2013-05-28 Thread Paul A.

On 28/05/2013 13:42, Hans Wichman wrote:

maybe this might help?
http://flashsimulations.com/2011/11/30/ios-native-extension-for-adobe-air-in-app-mail-composer/ 



That's ideal. Thank you.

I'm still hesitant to do it - the client also requested the ability to 
queue the emails until an internet connection was available. This has 
come out of the blue on a project where it was never specced to include 
any such functionality.


I guess they'll just have to pony up a chunk of cash before I attempt it.

Thanks again,

Paul









On 28-5-2013 14:36, Paul A. wrote:

On 28/05/2013 10:59, Karl DeSaulniers wrote:
I have emailed with attachments, but it involved a PHP file that put 
the email together and attached the file as base64 then sent it on 
its way. Might be a good approach for you as well. Then you can just 
have your iOS app send just a form request. PDF attachments can get 
tricky though. Sometimes the encryption messes with the layout of 
the PDF. As long as it wasn't a really complex PDF it sent no 
problem, but mine were custom layouts with graphics and tables, etc. 
I did get it to work finally though. Once emailed, the customer 
could view the PDF in their email automatically with the built in 
PDF viewer in the iOS.

Thanks Karl.

Unfortunately the client wants the PDF to be viewable offline.

On the PHP front - good solution but I don't want to be messing with 
the client server-side if I can avoid it.


Paul


Best,
Karl

Sent from losPhone

On May 28, 2013, at 4:10 AM, Paul A. p...@ipauland.com wrote:


Maybe someone has a suggestion.

A client has some iPads without 3G.

The client wants to be able to email PDF files directly to a 
customer from the iPad (A bit difficult without a connection) and 
I've never really found a way to get flash to initiate an email 
with content already in place, or as an attachment.


Normally to display a PDF via flash I'd use a link to a web-hosted 
PDF, or a local file. Any ideas about how I do this from an IOS App 
written in flash?


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



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


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



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


Re: [Flashcoders] AS3 finally..

2013-05-27 Thread Paul A.
Out of curiosity, has anyone on the list actually used private classes 
for anything other than enforcing singleton creation?


If you have, please tell us and say why it was the best solution.


On 27/05/2013 06:50, Cor wrote:

I think they can be usefull to create objects with a lot of its own
functionality.
In fact the same as you use a public classes: create objects, and you can
polymorphism the objects to your needs.
I also think this will keep your code more readable and clean.
HTH
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: maandag 27 mei 2013 1:22
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 finally..

Thanks Ktu. That actually makes sense. I was not looking for a reason
necessarily to use a private class, but more so, saw this example and had
the though this must be a private class and wanted to verify for my own
understanding. Which you have provided. I see and understand what you mean
by it is not the most necessary thing to create a private namespace class
and that I will more then likely be able to accomplish what i need through
regular classes and never need to set a private class up. Thank you for the
clarification.

Well. Finished Perkins, on to Moock.
Actually getting excited... LoL

Thanks again,

Best,
Karl

Sent from losPhone

On May 26, 2013, at 10:40 AM, ktu ktu_fl...@cataclysmicrewind.com wrote:


yes. this is an example of a private class. but as someone earlier
mentioned, you shouldn't ever _need_ to use them. and it would be more
appropriate not to use them in production code. using the internal
namespace gives you some restriction, and you could even use your own
namespace for restriction but that's quite uncommon as well.

for reference..
- you cannot add a namespace to this 'private' class and should result
in a compile error if you do. (ex. public class CustomClient)
therefore, it must always be defined as 'class ClassName' with no

namespace.

- any classes that you need within this 'private' class must be
imported outside the package package com {
   // code
}
import flash.display.Sprite
class MySprite {
   // code
}
- and if some outside object gets a reference to it, you should be
able to access public functions and properties so long as you do not
try to cast the object as anything other than Object.

in my experience, i have yet to feel the need for a pseudo 'private'

class.

the internal namespace serves me well most and in a few occasions a
custom namespace was required.

good luck :)


On Sun, May 26, 2013 at 6:58 AM, Karl DeSaulniers

k...@designdrumm.comwrote:

Ok, I am understanding things a little better I believe. Quick
question to solidify some knowledge. In reference to my question
about a private class, is the class CustomClient at the bottom an
example of a private class? It was mentioned that even if you don't
have the word private there and don't put public, flash automatically
will interpret it as a private class. It is inside the class file but
outside the package for the main class (which was also mentioned), it
does not have public on it so you can't call it outside this file. This

is what a private class is, correct?

package {
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.events.SecurityErrorEvent;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.events.Event;

public class NetConnectionExample extends Sprite {
private var videoURL:String = 
http://www.helpexamples.com/flash/video/cuepoints.flv;;
private var connection:NetConnection;
private var stream:NetStream;
private var video:Video = new Video();

public function NetConnectionExample() {
connection = new NetConnection();
connection.addEventListener(NetStatusEvent.NET_STATUS,
netStatusHandler);

connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR,

securityErrorHandler);
connection.connect(null);
}

private function netStatusHandler(event:NetStatusEvent):void {
switch (event.info.code) {
case NetConnection.Connect.Success:
connectStream();
break;
case NetStream.Play.StreamNotFound:
trace(Stream not found:  + videoURL);
break;
}
}

private function
securityErrorHandler(event:SecurityErrorEvent):void {
trace(securityErrorHandler:  + event);
}

private function connectStream():void {
addChild(video);
var stream:NetStream = new NetStream(connection);
stream.addEventListener(NetStatusEvent.NET_STATUS,
netStatusHandler);
stream.client = new CustomClient();
video.attachNetStream(stream);

Re: [Flashcoders] AS3 finally..

2013-05-27 Thread Paul A.

On 27/05/2013 11:37, tom rhodes wrote:

i generally use them for something teeny tiny that is only needed in the
scope of the main class and doesn't feel right in it's own file as it's
never used anywhere but the main class.
Why wouldn't you just incorporate that functionality as part of the 
class? Helper methods that aren't necessarily intended for external use?


On 27 May 2013 12:24, Paul A. p...@ipauland.com wrote:


Out of curiosity, has anyone on the list actually used private classes for
anything other than enforcing singleton creation?

If you have, please tell us and say why it was the best solution.




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


Re: [Flashcoders] AS3 finally..

2013-05-27 Thread Paul A.
I have written a lot of AS3 code with classes and before that was mostly 
a Java developer and I have yet to have written an AS3 project that has 
used private classes for anything at all but  singleton enforcement.


I'm trying to get a handle on whether I've been missing out or people 
are using private classes where they weren't needed.


Does it really matter that much? perhaps not. For me, private classes 
are some secret coding hidden from the world and segregated from the 
main class. If a class is important, it's probably important enough to 
be a public class. If it's not that important I suspect it could have 
it's functionality coded as a helper function for the main class.


I have never really been a fan of private classes because IMHO they 
introduce added complication, quietly, where it's probably not needed - 
hence my search for an example to change my mind about this.


Anyone have a concrete example where a private class suits perfectly 
(and doesn't involve singletons)?


This is your chance to educate me.

On 27/05/2013 11:47, Cor wrote:

I use this for objects only needed in the scope of that particular class.
I don't know if this is the best solution...
I guess this depends on what you are trying to achieve.
It works for me.

Regards
Cor

On 27 May 2013 12:24, Paul A. p...@ipauland.com wrote:


Out of curiosity, has anyone on the list actually used private classes
for anything other than enforcing singleton creation?

If you have, please tell us and say why it was the best solution.




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


Re: [Flashcoders] AS3 finally..

2013-05-27 Thread Paul A.

On 27/05/2013 18:03, Rick Hassen wrote:

Thats a good question and well phrased. And I wish I could give you as good an answer, 
however, Collin Moocks Lost Weekend videos, which can be accessed through Safari 
Books, goes into why and when you'd use them, quite nicely with examples and a qa.
Sadly, I'm not a subscriber, so I'll have to pass. I might sign up for a 
trial sometime and check out what he has to say.


  


Date: Mon, 27 May 2013 12:05:44 +0100
From: p...@ipauland.com
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] AS3 finally..

I have written a lot of AS3 code with classes and before that was mostly
a Java developer and I have yet to have written an AS3 project that has
used private classes for anything at all but  singleton enforcement.

I'm trying to get a handle on whether I've been missing out or people
are using private classes where they weren't needed.

Does it really matter that much? perhaps not. For me, private classes
are some secret coding hidden from the world and segregated from the
main class. If a class is important, it's probably important enough to
be a public class. If it's not that important I suspect it could have
it's functionality coded as a helper function for the main class.

I have never really been a fan of private classes because IMHO they
introduce added complication, quietly, where it's probably not needed -
hence my search for an example to change my mind about this.

Anyone have a concrete example where a private class suits perfectly
(and doesn't involve singletons)?

This is your chance to educate me.

On 27/05/2013 11:47, Cor wrote:

I use this for objects only needed in the scope of that particular class.
I don't know if this is the best solution...
I guess this depends on what you are trying to achieve.
It works for me.

Regards
Cor

On 27 May 2013 12:24, Paul A. p...@ipauland.com wrote:


Out of curiosity, has anyone on the list actually used private classes
for anything other than enforcing singleton creation?

If you have, please tell us and say why it was the best solution.



___
Flashcoders mailing list
Flashcoders@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] Projectors...

2013-05-24 Thread Paul A.
Mac projector is an option on the publish settings for CS6, or have I 
misunderstood the question?


On 23/05/2013 17:54, Eric E. Dolecki wrote:

Has anyone been able to generate a more current AS3 file as a projector?
I'm not talking about AIR or captive runtime, talking about the
old-fashioned projector for Mac? It's just gone from the IDE and the later
players have this greyed out.



   Google Voice: (508) 656-0622
   Twitter: eric_dolecki  XBoxLive: edolecki  PSN: eric_dolecki
   Imagineric http://imagineric.ericd.net
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


Re: [Flashcoders] AS3 finally..

2013-05-21 Thread Paul A.

On 21/05/2013 05:04, Karl DeSaulniers wrote:

Thank you Ktu.
That is what I was looking for.
I'd say the problem with asking questions like this is that you're 
getting answers to questions you shouldn't be asking at this stage of 
your AS3 experience. While you may get a technical answer, you miss 
out completely on the real question - in what circumstances would using 
a private class be of benefit (and why), and when should you not use a 
private class?


A book will teach you more than the technicalities.

To put this into context, about the only time I have ever used private 
classes is to enforce the creation of singleton classes. They are hardly 
an essential and I have written a ton of AS3 code over the years.


You also need to get a good grasp of design patterns - particularly MVC.

You can't get an overall view of best practice by asking these very 
particular questions when you don't have a bigger context to understand 
where a language feature fits well and where it doesn't.


The Moock book is popular and very detailed. I have it. Personally I 
think it's a bit heavy for a beginner to AS3 and I'd recommend (again) 
learning actionscript 3 as a gentler start before tackling the Moock book.


This list can give you specific answers, but you really need the bigger 
picture.


Paul



Much thanks,

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com



On May 20, 2013, at 10:58 PM, Ktu wrote:


you can have public class, internal class (limited to package), and you can
make pseudo private classes by declaring a class in the same file as
another class, but outside the package.

the main reason you write 'public class' is because the _default_ is
internal. if you simply say   class MyClass {}it is treated as internal.


On Mon, May 20, 2013 at 11:57 PM, Karl DeSaulniers k...@designdrumm.comwrote:


Thank you John. Yes, I have already watched some really good tuts on
gotoandlearn and plan to watch more when I start working on my project.
My book is from lynda.com too. Going to invest in Moocks book as
suggested earlier as well. Just need to gen some funds. :)

Karl DeSaulniers
Design Drumm
http://designdrumm.com



On May 20, 2013, at 10:30 PM, John R. Sweeney Jr. wrote:


Or subscribe to http://www.lynda.com

Excellent training tutorials on tons of software. Very in-depth, but you

do pay for it.

If you know AS2,  check out www.gotoandlearn.com. Many free tutorials

on specific tasks, but you'll see them working and their AS3 code, so you
can start making the correlation between what is different in 2 versus 3.



John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On May 20, 2013, at 9:25 PM, Rick Hassen wrote:


but you may want to consider getting a good AS3 book.


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


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




--
Ktu;

The information contained in this message may or may not be privileged
and/or confidential. If you are NOT the intended recipient,
congratulations, you got mail!
___
Flashcoders mailing list
Flashcoders@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] AIR

2013-05-20 Thread Paul Steven
I am also using it and can highly recommend it. I have developed 6 apps
using Flash and Air, all of which are in the Apple app store and some on the
Android market place too.

Paul Steven
www.mediakitchen.co.uk



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
Sent: 20 May 2013 09:42
To: Flash Coders List
Subject: Re: [Flashcoders] AIR

I'm still using it, and always get good feedback from clients. I'd recommend
it, although I hadn't considered whether adobe might stop supporting it.

David Hunter

www.davidhunterdesign.com
+44 (0) 7869 104 906
@DHDPIC


On 19 May 2013 15:08, Hans Wichman hans.wich...@gmail.com wrote:

 Hi John,

 content created today will still run in the future, independent of 
 where air itself is going. I wouldnt worry too much bout it, but that 
 might be just me :)

 best
 h

 Sent from my iPad

 On 19 mei 2013, at 14:39, John McCormack j...@easypeasy.co.uk wrote:

  Hi there.
 
  I would like to produce some educational material using AIR but am
 feeling very insecure about its future.
 
  Could you possibly let me know how active you are in producing 
  content
 deliverable through AIR.
 
  Thanks
 
  John
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

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


Re: [Flashcoders] AS3 finally..

2013-05-19 Thread Paul A.

On 19/05/2013 09:18, Hans Wichman wrote:

Karl,

no harm intended, but do yourself and us a favor and get something 
like Essential Actionscript 3 from Moock, it will save you lots and 
lots of unnecessary self inflicted punishment :).




Excellent advice. Don't try and get to grips with the language via the 
forum.


This is a gentler introduction:

http://shop.oreilly.com/product/0636920010401.do

Also

http://www.adobe.com/devnet/actionscript/learning.html

Good luck

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


Re: [Flashcoders] flickering buttons

2013-05-18 Thread Paul A.

On 18/05/2013 15:19, [p e r c e p t i c o n] wrote:

Hi Gang,

really stupid question.

I have a movieclip that animates on.  in it are several movieclips
representing buttons.
When the the containing movieclip animates on...the clips it contains
flicker even thought they have instance names.  Does anyone have any ideas
on why this is happening?

thanks,

p


The fact they have instance names has no relevance.

I suspect that they aren't on every frame of your animation.

We can only guess.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flickering buttons

2013-05-18 Thread Paul A.

I guess they're still playing.

They won't stop just because the parent has stopped.

If they are movieclip acting as buttons, at some stage you've told them 
to play.


You do have a stop() in them to stop then cycling, don't you?

On 18/05/2013 17:16, [ p e r c e p t i c o n ] wrote:

I guess what I mean is after the containing clip is finished animating the 
clips within it are cycling through their rollover states
Thanks

On May 18, 2013, at 10:29 AM, Paul A. p...@ipauland.com wrote:


On 18/05/2013 15:19, [p e r c e p t i c o n] wrote:

Hi Gang,

really stupid question.

I have a movieclip that animates on.  in it are several movieclips
representing buttons.
When the the containing movieclip animates on...the clips it contains
flicker even thought they have instance names.  Does anyone have any ideas
on why this is happening?

thanks,

p

The fact they have instance names has no relevance.

I suspect that they aren't on every frame of your animation.

We can only guess.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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



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


RE: [Flashcoders] Re: OT: Interactive conferences (Merrill, Jason)

2013-01-25 Thread Paul Steven
This is a really interesting thread. I have been creating Flash content for
about 10 years, mainly online small games for clients. Recently I have
noticed a real decline in the amount of work in this area no doubt as a
result of such games not working on IOS devices.

However I have not had any enquiries asking for HTML5 games.

I am keen to get up to speed with HTML5 but wonder if there will be
sufficient demand especially for HTML5 games. Any freelancers out there who
previously made a living making Flash games now getting most of their work
in HTML5? If so what type of content are you creating in HTML5? Is it
websites, games, apps?

It all seems quite a backward step especially in relation to the games.
Fortunately I am loving creating games for the IOS and Android with Flash
CS6 and AIR though I am making these for myself currently.

Thanks

Paul

Mediakitchen Limited
http://www.mediakitchen.co.uk



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ima
Newsletta
Sent: 25 January 2013 15:36
To: Flash Coders List
Subject: Re: [Flashcoders] Re: OT: Interactive conferences (Merrill, Jason)

Hello mates,
I think that the list is missing one of the most important js library for
flashist of of there, that is the createjs http://www.createjs.com/ As you
all, I'm a flashist (10 years of experience) that had to (re)learn html and
javascript.
When I began to use createjs, in particular easeljs I was really pleased
because it seemed to me to program (quite) exactly as in Flash.

A demo is worth 1000 words so here it is 2 demos I made in html/js by using
that library (obviously I use also a lot jquery as support and the greensock
libs for tweening):

Monkey Island - Insult Swordfighting Game http://www.int33h.com/test/mi/

Dungeon Master Social Demo
http://www.int33h.com/test/dm/

I'm really pleased by the results.
I stronlgy suggest that if you want to learn html/js then you have to begin
with createjs.



Il 25/01/2013 16:15, John McCormack ha scritto:
 Some great resources throughout these posts.
 Thank you so much.

 Personally, I hope Adobe come storming back with some new tools next 
 iteration.

 John

 On 25/01/2013 13:03, Marco Terrinoni wrote:
 Not too sure about conferences. We have UX in London but not sure how 
 much
 focus is on JS.

 On the forum / educational side I have found the following resources
 invaluable:

 CSS
 www.css-tricks.com
 Chris Coyier's screencasts and blog posts are awesome for learning 
 simple
 and advanced css authoring and keeping up-to-date with best practices.

 Experts Exchange
 http://www.experts-exchange.com/
 This is a subscription based service but the quality of programming 
 advice
 for every language including JS is well worth it

 For IDE's it's difficult and for me, the single biggest barrier to entry
 because of the huge number of development options. The key is to find a
 workflow that works best for you but the following resources I cannot
 recommend highly enough:
 - Sublime Text 2
 - Wordpress (Bones HTML5 Development Theme)
 - CSS using SASS (Compass.App)
 - Greensock Animation Library

 Sublime Text 2 - Text Editor
 http://www.sublimetext.com/2
 There are thousands of extensions and packages I don't know where to 
 begin

 If you're learning HTML5 then learning responsive design techniques is a
 must - this involves using CSS media queries so once you have grasped 
 the
 basics of CSS, be sure to move to using pre-processing language like 
 SASS or
 LESS - there's a great article on css tricks about the benefits and 
 merits
 of each method. I use SASS and it's sped up my whole development  
 process 10
 fold!). To do this on Windows I use compass.app

 http://compass.handlino.com/
 If you're using Mac, then Codekit includes libraries for compass.

 I do a lot of web development in Wordpress, there are a lot of great
 resources out there but if you're really looking to learn best 
 practices for
 Responsive Web Design then you cannot go wrong with the Bones HTML5 
 Theme,
 amazingly well commented
 http://themble.com/bones/


 Animation:
 jQuery is obviously ubiquitous but if you're a flasher then you've 
 probably
 used Tweenmax in AS3 and if you loved using that as much as I did 
 then you
 should definitely try the new Greensock for JavaScript library.
 http://www.greensock.com/
 It provides a nice, familiar syntax and a ton of plugins that make 
 animation
 in html5 a lot easier than using jQuery plugins which seem to have a 
 short
 shelve life due to continual updates of the jQuery library (Can also 
 be used
 on conjunction with jQuery).

 I haven't tried Sencha yet but look forward to dipping my toe soon.

 If you're looking to develop purely in Javascript using MVC design 
 patterns
 then a framework like backbone.js , dojo or node.js get a lot of 
 mentions
 though I haven't looked into any of this seriously yet.


 Cheers


 Marco Terrinoni - Director

Re: [Flashcoders] making as3 movie scorm compliant

2013-01-15 Thread Paul A.
I'm curious about this too. Scorm seems to be some magic fairy dust 
sprinkled upon software - I have yet to come across a definitive guide 
(though I haven't tried that hard).


On 15/01/2013 11:03, Hans Wichman wrote:

Hi list,

assuming I have a flash movie which communicates with a custom CMS, 
what would need to be done to make it scorm compliant?


As far as I can tell, I'll need some scorm as classes to communicatie 
with the wrapper, but how can I test whether everything works, etc, I 
have absolutely no experience with LMSes etc and to me it's kind of 
hazy how everything fits together, which in turn makes it hard to know 
where to start/look. Is there a definite scorm specs, which will work 
with any LMS, so that I can simply pick a free open source LMS 
somewhere to test my development progress?


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



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


Re: [Flashcoders] making as3 movie scorm compliant

2013-01-15 Thread Paul A.

On 15/01/2013 17:51, Hans Wichman wrote:

Ok tnx all for the links/insights, I'll look into it!


+1

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


Re: [Flashcoders] Re: Exhibition type kiosks

2012-12-01 Thread Paul A.
Thanks for all the input guys, I'm going to have to consider this very 
carefully.


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


[Flashcoders] Exhibition type kiosks

2012-11-30 Thread Paul A.
Following on from the tablet question earlier, I've been asked to quote 
on a kiosk app and suggest some hardware.


What kinds of hardware are people using for kiosks these day?

It'll be used by kids and in use all day.

A tablet may be a bit on the small side and a full-blown PC might be a 
bit too big.


I've been wondering if anyone has tried this with a laptop with a swivel 
touch screen?


Any thoughts?

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


[Flashcoders] Long running tablet apps

2012-11-23 Thread Paul A.
I've been asked about making a long-running app for a Samsung android 
tablet.


In the past, I made one for a windows tablet but there was clearly a 
memory leak (not that I could find it in my code) and after being active 
for many, many hours it would hit a problem.


We looked at automating a restart of the app to get around this.

If I encounter the same issue on the Samsung, would I be able to restart 
the app before it happens?


Or does anyone who has developed similar have any advice?

Thanks,

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


Re: [Flashcoders] Long running tablet apps

2012-11-23 Thread Paul A.

On 23/11/2012 11:27, David Hunter wrote:

h, how long are you talking it being used for?


Client described it as a couple of weeks!

Essentially the client pulled the power at the end of the day but the 
battery kept the tablets alive overnight until power was restored.


I have made apps for samsung galaxy tabs that have run all day and don't
seem to have had too many problems (well not ones they've told me about!)
and I think sometimes they were left on for days and still worked.

But we do include functionality so the user can quit the app within the app
if necessary.

David


On 23 November 2012 10:27, Paul A. p...@ipauland.com wrote:


I've been asked about making a long-running app for a Samsung android
tablet.

In the past, I made one for a windows tablet but there was clearly a
memory leak (not that I could find it in my code) and after being active
for many, many hours it would hit a problem.

We looked at automating a restart of the app to get around this.

If I encounter the same issue on the Samsung, would I be able to restart
the app before it happens?

Or does anyone who has developed similar have any advice?

Thanks,

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






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


Re: [Flashcoders] Long running tablet apps

2012-11-23 Thread Paul A.

On 23/11/2012 12:23, Hans Wichman wrote:

Hi,

I wouldn't put too much time into it, noone realistically expects 
windows to run for a couple of weeks, let alone your app on a samsung 
tablet ;)).


That said, the demand being unrealistic, I'd at least opt to get an 
unrealistic price for it as well.


The sane thing would be in my opinion to say that you are doing 
everything you can to manage and release memory correctly (as you 
should), but that you have no influence over the underlying software 
and hardware platform and that autorebooting has no added benefit 
whatsoever. Save the state and restore it on the next launch, easy and 
cheap.


Well yes. The app has no real state to worry about. The question was 
about whether anyone had managed to operate an app in these 
circumstances - on the windows tablet there was a possibility of 
restarting the app automatically via an external job.


It's not a normal use-case for the technology, that's for sure. The 
problem wouldn't exist if the tablets could be shut-off on loss of power 
and automatically start again on power being re-applied and run the app.




My 2 cnts,
JC

ps this is true anyway, the underlying os might opt to kill your app 
anytime it wishes without specifying why, as may the user.


On 23-11-2012 13:14, Paul A. wrote:

On 23/11/2012 11:27, David Hunter wrote:

h, how long are you talking it being used for?


Client described it as a couple of weeks!

Essentially the client pulled the power at the end of the day but the 
battery kept the tablets alive overnight until power was restored.


I have made apps for samsung galaxy tabs that have run all day and 
don't
seem to have had too many problems (well not ones they've told me 
about!)

and I think sometimes they were left on for days and still worked.

But we do include functionality so the user can quit the app within 
the app

if necessary.

David


On 23 November 2012 10:27, Paul A. p...@ipauland.com wrote:


I've been asked about making a long-running app for a Samsung android
tablet.

In the past, I made one for a windows tablet but there was clearly a
memory leak (not that I could find it in my code) and after being 
active

for many, many hours it would hit a problem.

We looked at automating a restart of the app to get around this.

If I encounter the same issue on the Samsung, would I be able to 
restart

the app before it happens?

Or does anyone who has developed similar have any advice?

Thanks,

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








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


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



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


Re: [Flashcoders] AS3

2012-10-25 Thread Paul A.

No worries - we've all been there.

On 25/10/2012 09:08, Karl DeSaulniers wrote:

Well, got an update on the progress.
First off, thank you all for your participation in helping me with my 
problem.

Unfortunately this was a case of epic fail on my part.
movieClipOverButtonitis was the disease.

Seems the frame MC I had over the scene was blocking my button,
so the code I wrote originally, now works. Instead I took the hole the 
frame made for the scene to show through.
Filled it with red, deleted the frame and used the red box to mask the 
scene.

Same effect, just no movieClip in the way... _

So if I wasted anyones time with this question, I deeply apologize.

Thanks again people... YOU ROCK!

Best
Karl


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


Re: [Flashcoders] AS3

2012-10-24 Thread Paul A.

Try removing:

button1_btn.mouseChildren = false;
button2_btn.mouseChildren = false;

Your code is a bit convoluted!

divers_btn.addEventListener(MouseEvent.CLICK, function() { 
gotoAndStop(divinedivers); });
scuba_btn.addEventListener(MouseEvent.CLICK, function() { 
gotoAndStop(scubadudes); });


divers_btn.addEventListener(MouseEvent.ROLL_OVER, function() { 
divers_btn.gotoAndStop(OVER);});

..

Paul

On 24/10/2012 12:39, Karl DeSaulniers wrote:

Hello All,
Long time. If your available at the moment, I could use your help with 
some AS3.
I finally got an AS3 job! Yay! But I am stuck on the most simple of 
things.

All I am trying to do is make some buttons work... lol
Here is my code.

button1_btn.buttonMode = true;
button2_btn.buttonMode = true;
button1_btn.useHandCursor = true;
button2_btn.useHandCursor = true;
button1_btn.mouseChildren = false;
button2_btn.mouseChildren = false;

button1_btn.addEventListener(MouseEvent.CLICK, function() { 
changeSelect(1); });
button2_btn.addEventListener(MouseEvent.CLICK, function() { 
changeSelect(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OVER, function() { 
toggleB1(2); });
button2_btn.addEventListener(MouseEvent.ROLL_OVER, function() { 
toggleB2(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OUT, function() { 
toggleB1(1); });
button2_btn.addEventListener(MouseEvent.ROLL_OUT, function() { 
toggleB2(1); });


function changeSelect(p):void {
switch (p) {
case 1:
this.gotoAndStop(divinedivers); //goto frame 
divinedivers in this MC

break;
case 2:
this.gotoAndStop(scubadudes); //got frame scubadudes in 
this MC

break;
}
}

function toggleB1(f):void {
button1_btn.gotoAndStop(f); //toggle this button MC frame
}

function toggleB2(f):void {
button2_btn.gotoAndStop(f); //toggle this button MC frame
}

Why does AS3 have to make things so difficult for something so simple??
What the heck am I doing wrong???

Also, how do you use just a button instead of a mc?
I tried using just a button and it wouldn't even switch to the over 
state that is inside the button!!?


AS2 is just so much more simple... sigh*

TIA,

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] AS3

2012-10-24 Thread Paul A.

On 24/10/2012 14:43, Merrill, Jason wrote:

function() { gotoAndStop(divinedivers); });

Yeah, this is weird and unnecessary. Anonymous functions are recommended 
against in AS3.


Really?

I used to be of the same opinion, but certainly not as a blanket rule. 
It all depends.




  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning
  703.302.9265 (w/h)





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul A.
Sent: Wednesday, October 24, 2012 8:33 AM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3

Try removing:

button1_btn.mouseChildren = false;
button2_btn.mouseChildren = false;

Your code is a bit convoluted!

divers_btn.addEventListener(MouseEvent.CLICK, function() { gotoAndStop(divinedivers); 
}); scuba_btn.addEventListener(MouseEvent.CLICK, function() { gotoAndStop(scubadudes); 
});

divers_btn.addEventListener(MouseEvent.ROLL_OVER, function() { 
divers_btn.gotoAndStop(OVER);});
..

Paul

On 24/10/2012 12:39, Karl DeSaulniers wrote:

Hello All,
Long time. If your available at the moment, I could use your help with
some AS3.
I finally got an AS3 job! Yay! But I am stuck on the most simple of
things.
All I am trying to do is make some buttons work... lol Here is my
code.

button1_btn.buttonMode = true;
button2_btn.buttonMode = true;
button1_btn.useHandCursor = true;
button2_btn.useHandCursor = true;
button1_btn.mouseChildren = false;
button2_btn.mouseChildren = false;

button1_btn.addEventListener(MouseEvent.CLICK, function() {
changeSelect(1); }); button2_btn.addEventListener(MouseEvent.CLICK,
function() { changeSelect(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OVER, function() {
toggleB1(2); }); button2_btn.addEventListener(MouseEvent.ROLL_OVER,
function() { toggleB2(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OUT, function() {
toggleB1(1); }); button2_btn.addEventListener(MouseEvent.ROLL_OUT,
function() { toggleB2(1); });

function changeSelect(p):void {
 switch (p) {
 case 1:
 this.gotoAndStop(divinedivers); //goto frame
divinedivers in this MC
 break;
 case 2:
 this.gotoAndStop(scubadudes); //got frame scubadudes in
this MC
 break;
 }
}

function toggleB1(f):void {
 button1_btn.gotoAndStop(f); //toggle this button MC frame }

function toggleB2(f):void {
 button2_btn.gotoAndStop(f); //toggle this button MC frame }

Why does AS3 have to make things so difficult for something so simple??
What the heck am I doing wrong???

Also, how do you use just a button instead of a mc?
I tried using just a button and it wouldn't even switch to the over
state that is inside the button!!?

AS2 is just so much more simple... sigh*

TIA,

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

--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited.
Unless specifically indicated, this message is not an offer to sell or a 
solicitation of any investment products or other financial product or service, 
an official confirmation of any transaction, or an official statement of 
Sender. Subject to applicable law, Sender may intercept, monitor, review and 
retain e-communications (EC) traveling through its networks/systems and may 
produce any such EC to regulators, law enforcement, in litigation and as 
required by law.
The laws of the country of each sender/recipient may impact the handling of EC, 
and EC may be archived, supervised and produced in countries other than the 
country in which you are located. This message cannot be guaranteed to be 
secure or free of errors or viruses.

References to Sender are references to any subsidiary of Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank 
Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking 
Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that 
are part of this EC may have additional important disclosures and disclaimers, which you 
should read. This message

Re: [Flashcoders] AS3

2012-10-24 Thread Paul A.

On 24/10/2012 15:08, Merrill, Jason wrote:

Ok, what's a good case to use them?  Just curious, I have never found a 
situation where they were warranted.
Sometimes (depending on what your buttons do), it seems rather 
artificial to have to fabricate a stand-alone function to handle an 
event when the action required is very simple.


I used to always create named event handler functions and realised I was 
adopting some fixed pattern that was actually obfuscating my code 
unnecessarily in some situations.


The OP was using an event handler simply to control the timeline and 
manufacturing a named function to do this very specific thing seems 
unnecessary. With an inline function you can see straight off what 
happens when the event is handled, without looking up the handler 
function to see what it does.


  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning
  703.302.9265 (w/h)





___


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul A.
Sent: Wednesday, October 24, 2012 10:07 AM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3

On 24/10/2012 14:43, Merrill, Jason wrote:

function() { gotoAndStop(divinedivers); });

Yeah, this is weird and unnecessary. Anonymous functions are recommended 
against in AS3.

Really?

I used to be of the same opinion, but certainly not as a blanket rule.
It all depends.


   Jason Merrill
   Instructional Technology Architect II
   Bank of America  Global Learning
   703.302.9265 (w/h)





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul A.
Sent: Wednesday, October 24, 2012 8:33 AM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3

Try removing:

button1_btn.mouseChildren = false;
button2_btn.mouseChildren = false;

Your code is a bit convoluted!

divers_btn.addEventListener(MouseEvent.CLICK, function() {
gotoAndStop(divinedivers); });
scuba_btn.addEventListener(MouseEvent.CLICK, function() {
gotoAndStop(scubadudes); });

divers_btn.addEventListener(MouseEvent.ROLL_OVER, function() {
divers_btn.gotoAndStop(OVER);});
..

Paul

On 24/10/2012 12:39, Karl DeSaulniers wrote:

Hello All,
Long time. If your available at the moment, I could use your help
with some AS3.
I finally got an AS3 job! Yay! But I am stuck on the most simple of
things.
All I am trying to do is make some buttons work... lol Here is my
code.

button1_btn.buttonMode = true;
button2_btn.buttonMode = true;
button1_btn.useHandCursor = true;
button2_btn.useHandCursor = true;
button1_btn.mouseChildren = false;
button2_btn.mouseChildren = false;

button1_btn.addEventListener(MouseEvent.CLICK, function() {
changeSelect(1); }); button2_btn.addEventListener(MouseEvent.CLICK,
function() { changeSelect(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OVER, function() {
toggleB1(2); }); button2_btn.addEventListener(MouseEvent.ROLL_OVER,
function() { toggleB2(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OUT, function() {
toggleB1(1); }); button2_btn.addEventListener(MouseEvent.ROLL_OUT,
function() { toggleB2(1); });

function changeSelect(p):void {
  switch (p) {
  case 1:
  this.gotoAndStop(divinedivers); //goto frame
divinedivers in this MC
  break;
  case 2:
  this.gotoAndStop(scubadudes); //got frame scubadudes
in this MC
  break;
  }
}

function toggleB1(f):void {
  button1_btn.gotoAndStop(f); //toggle this button MC frame }

function toggleB2(f):void {
  button2_btn.gotoAndStop(f); //toggle this button MC frame }

Why does AS3 have to make things so difficult for something so simple??
What the heck am I doing wrong???

Also, how do you use just a button instead of a mc?
I tried using just a button and it wouldn't even switch to the over
state that is inside the button!!?

AS2 is just so much more simple... sigh*

TIA,

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

--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message

Re: [Flashcoders] AS3

2012-10-24 Thread Paul A.
Jason, I wasn't arguing anything except that IMHO using them makes code 
more readable in some circumstances. It's not an either/or.


We can agree to differ.

On 24/10/2012 15:23, Merrill, Jason wrote:

That still isn't an argument to use them in my opinion, personally I think the 
code is much more convoluted that way. Your argument is essentially it's a 
preference in coding style, not that there are situations that specifically 
call for their use.

  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning
  703.302.9265 (w/h)





___


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul A.
Sent: Wednesday, October 24, 2012 10:19 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] AS3

On 24/10/2012 15:08, Merrill, Jason wrote:

Ok, what's a good case to use them?  Just curious, I have never found a 
situation where they were warranted.

Sometimes (depending on what your buttons do), it seems rather artificial to 
have to fabricate a stand-alone function to handle an event when the action 
required is very simple.

I used to always create named event handler functions and realised I was 
adopting some fixed pattern that was actually obfuscating my code unnecessarily 
in some situations.

The OP was using an event handler simply to control the timeline and 
manufacturing a named function to do this very specific thing seems 
unnecessary. With an inline function you can see straight off what happens when 
the event is handled, without looking up the handler function to see what it 
does.

   Jason Merrill
   Instructional Technology Architect II
   Bank of America  Global Learning
   703.302.9265 (w/h)





___


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul A.
Sent: Wednesday, October 24, 2012 10:07 AM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3

On 24/10/2012 14:43, Merrill, Jason wrote:

function() { gotoAndStop(divinedivers); });

Yeah, this is weird and unnecessary. Anonymous functions are recommended 
against in AS3.

Really?

I used to be of the same opinion, but certainly not as a blanket rule.
It all depends.


Jason Merrill
Instructional Technology Architect II
Bank of America  Global Learning
703.302.9265 (w/h)





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul A.
Sent: Wednesday, October 24, 2012 8:33 AM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3

Try removing:

button1_btn.mouseChildren = false;
button2_btn.mouseChildren = false;

Your code is a bit convoluted!

divers_btn.addEventListener(MouseEvent.CLICK, function() {
gotoAndStop(divinedivers); });
scuba_btn.addEventListener(MouseEvent.CLICK, function() {
gotoAndStop(scubadudes); });

divers_btn.addEventListener(MouseEvent.ROLL_OVER, function() {
divers_btn.gotoAndStop(OVER);});
..

Paul

On 24/10/2012 12:39, Karl DeSaulniers wrote:

Hello All,
Long time. If your available at the moment, I could use your help
with some AS3.
I finally got an AS3 job! Yay! But I am stuck on the most simple of
things.
All I am trying to do is make some buttons work... lol Here is my
code.

button1_btn.buttonMode = true;
button2_btn.buttonMode = true;
button1_btn.useHandCursor = true;
button2_btn.useHandCursor = true;
button1_btn.mouseChildren = false;
button2_btn.mouseChildren = false;

button1_btn.addEventListener(MouseEvent.CLICK, function() {
changeSelect(1); }); button2_btn.addEventListener(MouseEvent.CLICK,
function() { changeSelect(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OVER, function() {
toggleB1(2); }); button2_btn.addEventListener(MouseEvent.ROLL_OVER,
function() { toggleB2(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OUT, function() {
toggleB1(1); }); button2_btn.addEventListener(MouseEvent.ROLL_OUT,
function() { toggleB2(1); });

function changeSelect(p):void {
   switch (p) {
   case 1:
   this.gotoAndStop(divinedivers); //goto frame
divinedivers in this MC
   break;
   case 2:
   this.gotoAndStop(scubadudes); //got frame scubadudes
in this MC
   break;
   }
}

function toggleB1(f):void {
   button1_btn.gotoAndStop(f); //toggle this button MC frame
}

function toggleB2(f):void {
   button2_btn.gotoAndStop(f); //toggle this button MC frame
}

Why does AS3 have to make things so difficult for something so simple??
What the heck am I doing wrong???

Also, how do you use just a button instead of a mc?
I tried using just a button and it wouldn't even switch to the over
state that is inside the button!!?

AS2 is just so much more simple... sigh*

TIA,

Karl DeSaulniers
Design Drumm
http

Re: [Flashcoders] AS3

2012-10-24 Thread Paul A.

On 24/10/2012 21:13, Karl DeSaulniers wrote:

So will this work?

divers_btn.addEventListener(MouseEvent.ROLL_OVER, function() { 
this.gotoAndStop(OVER);});


I mean. Will this = divers_btn? or do I HAVE to specify 
divers_btn.gotoAndStop()?

My bad, you're right.

I put divers_btn because button1 means nothing, so use meaningful names 
- always. Use labels rather than fixed frame numbers.


divers_btn.addEventListener(MouseEvent.ROLL_OVER, function() { 
divers_btn.gotoAndStop(OVER);});


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


Re: [Flashcoders] Any experience developing with Flex on a Mac?

2012-10-02 Thread Paul A.

Bootcamp was suggested tongue-in-cheek, I think.

If you use parallels, you can run your PC development under a virtual 
machine on Mac.


On 02/10/2012 18:09, Joel Johnson wrote:

The solution involving Bootcamp appears to sound like it's similar to the
Flashdevelop Bridge solution, if it involves installing another OS on a
partition. I'd probably look at that as a last option - thanks anyway! :)

I'll look over IntelliJIDEA.
Having said that, were you guys able to do any runtime debugging using Flex
either using Eclipse or IntelliJ..?

On Tue, Oct 2, 2012 at 9:08 PM, Tom Gooding t...@quickthinkmedia.co.ukwrote:


IntelliJIDEA is the best AS3 IDE you can get - runs on Mac
Obviously this is just my opinion (but is based on evaluations across some
large teams in 2 separate businesses) - you gotta pay for it though
Tom

On 2 Oct 2012, at 15:35, Joel Johnson wrote:

Hey,

I was looking for a good FlashDevelop alternative on Mac, and can't seem to
find one. I've been reading that TextMate and Eclipse are possible options,
but wanted to know what you guys thought.
I'm looking to develop casual games for internet browsers, and ultimately
as AIR apps for mobiles. I'll be quite possibly be using the Starling2D
framework with Flex and AIR.

What would you suggest?

Regards,
Joel.
___
Flashcoders mailing list
Flashcoders@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] Flash IOS Enterprise distribution on a PC

2012-09-25 Thread Paul Andrews

Anyone know of a guide to making an enterprise distribution on a PC?

Thanks,

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


Re: [Flashcoders] Actionscript lives on.

2012-09-18 Thread Paul Andrews

On 18/09/2012 10:48, Cédric Muller wrote:

Jon Bradley wrote :

The problem of flash for mobile is as much about politics and protecting the 
Apple appstore than anything else -it seems to me that flash was a threat by 
allowing apps to be produced bypassing Apples appstore.

It is the problem of HTML5 too, since all these may happen in the browser, they 
all bypass and gracefully skip the appstore model.
I think the problem is the AppStore, and not the technology(ies). And you are 
right, it has much to do with politics and moneymaking.


A couple of months ago I worked on an iPad project and decided to give 
it a go using HTML5. Part of the project used sound and video, so it 
required use of the HTML5 cache to permit offline use of the web app.


It all worked wonderfully until there was no internet connection. No 
sound or video.


It turns out that the iPad won't cache those assets so I then went ahead 
and rebuilt the app using Flash with an IOS target.


So Apple seems to be protecting themselves from standalone HTML5 webapps 
too.


Paul


Cedric___
Flashcoders mailing list
Flashcoders@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] Actionscript lives on.

2012-09-18 Thread Paul Andrews
The web standards comittee already squashed Adobe's attempt to get 
ecmascript 2 adopted as a browser standard - making actionscript and 
javascript compatible.


Adobe is never going to try and make Flash compete with javascript as a 
DOM manipulator.


Adobe is going to concentrate on markets where flash has an advantage.

Paul

On 18/09/2012 11:35, Karl DeSaulniers wrote:
I personally think that if Flash wants to compete with the likes of 
HTML 5 and jQuery, it needs to step out of the plugin area.
Make it an EMCA viable script language. Like Actionscript becoming 
Javascripts competitor. Make it so Actionscript can control and 
manipulate DOM.

Just sayin..

Karl

PS: I don't think the original topic was vectors anyway, so your good. :)

On Sep 18, 2012, at 5:26 AM, Cédric Muller wrote:


Karl DeSaulniers wrote :

Flash is not dead. It's hibernating.
. With SOME of the fault in the way flash handles things.


Adobe was a little confusing on that one. It somehow proved it lacked 
of vision, and failed to capitalize the 'money grabbing' process that 
was needed for Mankind (sarcasm). And since then, it looks like Flash 
is living the Director's fate (and maybe the Director's Cut too ...). 
Flash is still very good, as a runtime. As are a lot of runtimes. 
What we observe is that browsers are runtimes, and that we can do 
many things with them that don't justify Flash use anymore (as it was 
always the case, take the usability gurus .. err darketers ). So all 
in all, Flash Player is still a strong runtime that lets developpers 
leverage some amazing things with it. Moreover, this AppStore storm 
got rid of a lot of bad Flash use (indirectly, a lot of bad 
applications with bad usability principles can be found on the iOS 
ecosystem from now on). Flash is now considered as a technology, and 
no more as a new paradigm (which is what the iOS AppStore is 
currently going through). 15 minutes of fame.


Cedric.

Sorry for the OT, as I don't really anything to add regarding vectors 
vs bitmaps ... though I 'plus' the view that it truly depends on the 
utilization: sometimes bitmaps are better, sometimes vectors are 
better: know your tech and make experiments in order to test in real 
situations. (Though I was amazingly amazed by the way Flash Player 
simply merges with Retina displays, for example. Vectors power!)

___
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] Actionscript lives on.

2012-09-18 Thread Paul Andrews

On 18/09/2012 18:49, Gustavo Duenas wrote:

what program did you use for creating apps for android and ios?


Btw I didn't left Flash, I use it for making Android and iOS apps and 
it works very well.




Gus
On Sep 18, 2012, at 11:02 AM, Ima Newsletta wrote:

Actionscript can manipulate DOM... because as1 is quite the same as 
js.
My personal experience: I'm a flash developer since 2002, I've begun 
with Flash 6 (before I was a classic programmer, c, clipper and so 
on).
I appreciated very much when As3 came out because I was freed by that 
nightmare of implementing class with prototype, by passing always the 
context and so on...
Now, because I have family, I was forced to learn html+js (and 
obviously jQuery) and I'm back into prototypes and context nightmare.
Ok let's say that I feel pretty strong and confortable with them, but 
it's a jump of at least 6 years in the past.
However, the REAL NIGHTMARE that I had forgottend since 2002 is that 
OBVIOUSLY html+js (also by using jQuery) differs from browser to 
browser.
jQuery helps a lot, however you have to test your webapp  on many 
browser and a lot of times what works on one, doesn't on another.
The real bad thing is that also on the language javascript there are 
important differences among the browser and you'll learn these only 
when they are in front of you.
For example, setTimeout(myFunction, 1000, myParam) won't work on 
explorer and you have to write it in this way:

setTimeout(function(){myFunction(myParam)} , 1000);
And this is just an example...

Btw I didn't left Flash, I use it for making Android and iOS apps and 
it works very well.
I made 4 apps, free on Android (with advertising banners by using an 
ANE) and with fee on Apple Store.


P.S. Sorry for my English, it's not my native tongue.


Il 18/09/2012 15:22, Merrill, Jason ha scritto:
Make it an EMCA viable script language. Like Actionscript becoming 
Javascripts competitor. Make it so Actionscript can control and 
manipulate DOM.

Just sayin..

THAT would be AWESOME and make me VERY HAPPY.

 Jason Merrill
 Instructional Technology Architect II
 Bank of America  Global Learning


--
This message w/attachments (message) is intended solely for the use 
of the intended recipient(s) and may contain information that is 
privileged, confidential or proprietary. If you are not an intended 
recipient, please notify the sender, and then please delete and 
destroy all copies and attachments, and be advised that any review 
or dissemination of, or the taking of any action in reliance on, the 
information contained in or attached to this message is prohibited.
Unless specifically indicated, this message is not an offer to sell 
or a solicitation of any investment products or other financial 
product or service, an official confirmation of any transaction, or 
an official statement of Sender. Subject to applicable law, Sender 
may intercept, monitor, review and retain e-communications (EC) 
traveling through its networks/systems and may produce any such EC 
to regulators, law enforcement, in litigation and as required by law.
The laws of the country of each sender/recipient may impact the 
handling of EC, and EC may be archived, supervised and produced in 
countries other than the country in which you are located. This 
message cannot be guaranteed to be secure or free of errors or viruses.


References to Sender are references to any subsidiary of Bank of 
America Corporation. Securities and Insurance Products: * Are Not 
FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a 
Bank Deposit * Are Not a Condition to Any Banking Service or 
Activity * Are Not Insured by Any Federal Government Agency. 
Attachments that are part of this EC may have additional important 
disclosures and disclaimers, which you should read. This message is 
subject to terms available at the following link:
http://www.bankofamerica.com/emaildisclaimer. By messaging with 
Sender you consent to the foregoing.

___
Flashcoders mailing list
Flashcoders@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] Actionscript lives on.

2012-09-17 Thread Paul Andrews

On 17/09/2012 22:10, Jon Bradley wrote:

Just look up the storage and memory needs of a vector point (plus it's 
animation) and compare that to an RGB triplet.

It's pretty easy to find what you are looking for.


I don't think it's easy at all. A complex image with a lot of irregular 
detail may require more vector data to represent than a bitmap. 
Similarly an animation over multiple frames may require a lot of bitmaps 
to represent it, but relatively few vectors, particularly with tweening.


There is no absolute answer to the efficiency of vector representation 
versus bitmaps - it depends on what is being represented.


In general, many images can be represented with vector data more 
concisely than bitmaps so vectors would be more compact.


The problem of flash for mobile is as much about politics and protecting 
the Apple appstore than anything else -it seems to me that flash was a 
threat by allowing apps to be produced bypassing Apples appstore.


Adobe has said for years that mobile platforms should use bitmaps to 
conserve processor utilisation. The other real problem with flash is 
that some developers use inefficient processing loops that eat up 
processing power - I can often see it on my laptop when the fan suddenly 
kicks in after I've launched a flash app.





-j

On Sep 17, 2012, at 4:57 PM, Henrik Andersson he...@henke37.cjb.net wrote:


Ross P. Sclafani skriver:

http://www.adobe.com/devnet/flash/articles/optimizing-mobile-performance.html


That discusses runtime performance, not how big the data is. And it does
not provide any concrete research results. Just unscientific individual
observations.

I want concrete numbers that discuss how vector graphics impact the size
of the animation.
___
Flashcoders mailing list
Flashcoders@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] elearing content using adobe air for ipad

2012-06-15 Thread Paul Steven
Thank you kindly Rob. That is really interesting to see how you have
implemented this and very clever indeed.

Much appreciated

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rob Romanek
Sent: 14 June 2012 18:24
To: Flash Coders List
Subject: Re: [Flashcoders] elearing content using adobe air for ipad

Hi Paul,

What we do is have a swf that has a library of animations or images, all
contained in movie clips. These movie clips are then dropped onto the stage
and each instance given a name.

Once the swf is loaded you can then reference the instance by using
getChildByName(instanceName). Once you have reference to that animation
you can throw it into any display object and it will show up in your app.

To get around with the stop limitation you can use some code to dynamically
add code to the animations after you have gotten access to them. We do
something like this to dynamically add stop code just before each frame
label of a movie clip. Then you 

for each (var fLabel:FrameLabel in _skin.currentLabels)
{
_frameLabels.push(fLabel.name);
var labelFrame:int = fLabel.frame
if (labelFrame  1)
{
//for addFrameScript the frame
numbers are 0 based
//to add a stop frame on the one
previous to the current frame label: -2
_skin.addFrameScript(labelFrame - 2,
function ():void{_skin.stop()});
}
}
//add a stop on the last frame of the skin
_skin.addFrameScript(_skin.totalFrames - 2, function
():void{_skin.stop()});

hth,

Rob



On 2012-06-14, at 9:06 AM, Paul Steven wrote:

 Rob
 
 Can you elaborate on this further please?
 
 I am working on an iPad only app using Flash CS5.5 and the client has 
 asked if the app could load in animated graphs. I initially thought 
 this would be easy loading in a swf but then discovered that not even 
 a stop action was possible.
 
 It sounds like you may have an alternative solution so would be 
 interested to know more.
 
 Thanks
 
 Paul
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rob 
 Romanek
 Sent: 14 June 2012 13:58
 To: Flash Coders List
 Subject: Re: [Flashcoders] elearing content using adobe air for ipad
 
 Hi,
 
 You can load swfs into the app BUT the swfs can not contain any action 
 script in them. This includes giving class names to items in your 
 library or even simple stop() commands.
 
 We use swfs as external libraries in our as3 built apps but our 
 approach has been to put items on the stage and name those instances 
 (which you can do with imported swfs). Then use getChildByName to 
 extract the instances we need.
 
 You definitely need to use Apple's philosophy and Think Different 
 but it does work.
 
 cheers,
 
 Rob
 
 
 On 2012-06-13, at 10:04 AM, Hans Wichman wrote:
 
 . *However* as far as I know you cannot load an swf with it. This 
 might
 require a different architectural setup than you had in mind.
 
 
 
 On 13-6-2012 15:35, Sumeet Kumar wrote:
 Thanks a lot for such a quick reply.
 
 I haven't googled  it much but you guessed it right,  I am bit 
 worried about some features like
 
 1.   Will urlloader/loader(inbuilt as3 class) classes work fine. I wish
 to load swf built in as3 in my main file.
 
 
 ___
 Flashcoders mailing list
 Flashcoders@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] elearing content using adobe air for ipad

2012-06-14 Thread Paul Steven
Rob

Can you elaborate on this further please?

I am working on an iPad only app using Flash CS5.5 and the client has asked
if the app could load in animated graphs. I initially thought this would be
easy loading in a swf but then discovered that not even a stop action was
possible.

It sounds like you may have an alternative solution so would be interested
to know more.

Thanks

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rob Romanek
Sent: 14 June 2012 13:58
To: Flash Coders List
Subject: Re: [Flashcoders] elearing content using adobe air for ipad

Hi,

You can load swfs into the app BUT the swfs can not contain any action
script in them. This includes giving class names to items in your library or
even simple stop() commands.

We use swfs as external libraries in our as3 built apps but our approach has
been to put items on the stage and name those instances (which you can do
with imported swfs). Then use getChildByName to extract the instances we
need.

You definitely need to use Apple's philosophy and Think Different but it
does work.

cheers,

Rob


On 2012-06-13, at 10:04 AM, Hans Wichman wrote:

 . *However* as far as I know you cannot load an swf with it. This might
require a different architectural setup than you had in mind.
 
 
 
 On 13-6-2012 15:35, Sumeet Kumar wrote:
 Thanks a lot for such a quick reply.
 
 I haven't googled  it much but you guessed it right,  I am bit 
 worried about some features like
 
 1.Will urlloader/loader(inbuilt as3 class) classes work fine. I wish
 to load swf built in as3 in my main file.


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

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


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

2012-05-31 Thread Paul Steven
Thanks for all the helpful replies.

I spent a good few hours last night trying to follow some tutorials on the
web without much success. I thought I would start with the real basics and
just try and add a hello world iFrame web page that literally just displayed
the words hello world.

From what I read it appeared I needed to use a SSL host to host the
index.html page so I signed up for Amazon Web Services. Unfortunately this
did not work as apparently the way Facebook accessed the page involves
sending data via post and this resulted in an error when using Amazon Web
Services hosted file.

Very surprised it is not more straightforward and also how bad the
documentation is considering how huge Facebook is. Possibly I am trying to
run before I am not really too familiar with how Facebook works.

In all honesty, I am not even sure where a game would appear on a facebook
page even if I did manage to figure it out:)

P

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis,
Erik (MIN-WSW)
Sent: 30 May 2012 20:45
To: Flash Coders List
Subject: Re: [Flashcoders] Converting a flash game to facebook app

If by dinosaur you mean you haven't done Facebook since the REST API was
retired, transitioning to Graph isn't a big deal if you're not rolling your
own but using one of the SDKs - https://developers.facebook.com/docs/sdks/
or the AS3 SDK Sydney pointed to.

If you mean you're completely new to Facebook development it can be a huge
pain, but you'll save at least a few days if you go into it ignoring all
documentation Facebook provides other than the reference:
https://developers.facebook.com/docs/reference/api/

Google will find blog posts by people who give step by step instructions for
registering your account as a developer, setting up an app, setting up a SDK
and giving you source code of a functioning app to look at.


On 5/30/12 1:43 PM, Hans Wichman hans.wich...@gmail.com wrote:

Hi Paul,

I faced the same problem a while ago and found the whole facebook mumbojumbo
pretty hard to wrap my head around, opengraphs, graph api etc. The project
was cancelled so I was off the hook, but I spent about a week reading
facebook's docs none the wiser, so I don't exactly share Sidney's
experience. I didn't have a specific goal they wanted me to complete so that
made it harder as well, but still.
I did find some very good books specifically on flash games on facebook at
amazon.

regards
H


On 30-5-2012 18:17, Paul Steven wrote:
 I am a bit of a dinosaur when it comes to facebook and have been asked 
 to turn a flash game into a facebook app.

 Before I make a decision on whether I can take on this job I wanted a 
 quick heads up on how complex a process is to do this?

 Thanks in advance.

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

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



_ _ _
Erik Mattheis | Weber Shandwick
P: (952) 346.6610
M: (612) 377.2272
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

2012-05-31 Thread Paul Steven
Thanks Rohit

I will look at the tutorials again tonight and give it a go avoiding SSL.

Many thanks

Paul

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rohit Sharma
Sent: 31 May 2012 10:40
To: Flash Coders List
Subject: Re: [Flashcoders] Converting a flash game to facebook app

Hi Paul,

Did you see the tutorial series by Adobe @
http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt1.html.

Also, to begin with, you can avoid SSL usage since its not mandatory to use
secure url currently. I dont remember the exact roll out date but there is
still some time until SSL is absolutely necessary. Once you integrate your
application successfully within facebook, you can then migrate to secure
connection.

Hope it helps.

Thanks,
Rohit

On Thu, May 31, 2012 at 2:42 PM, Paul Steven
paul_ste...@btinternet.comwrote:

 Thanks for all the helpful replies.

 I spent a good few hours last night trying to follow some tutorials on 
 the web without much success. I thought I would start with the real 
 basics and just try and add a hello world iFrame web page that 
 literally just displayed the words hello world.

 From what I read it appeared I needed to use a SSL host to host the
 index.html page so I signed up for Amazon Web Services. Unfortunately 
 this did not work as apparently the way Facebook accessed the page 
 involves sending data via post and this resulted in an error when 
 using Amazon Web Services hosted file.

 Very surprised it is not more straightforward and also how bad the 
 documentation is considering how huge Facebook is. Possibly I am 
 trying to run before I am not really too familiar with how Facebook works.

 In all honesty, I am not even sure where a game would appear on a 
 facebook page even if I did manage to figure it out:)

 P

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
 Mattheis, Erik (MIN-WSW)
 Sent: 30 May 2012 20:45
 To: Flash Coders List
 Subject: Re: [Flashcoders] Converting a flash game to facebook app

 If by dinosaur you mean you haven't done Facebook since the REST API 
 was retired, transitioning to Graph isn't a big deal if you're not 
 rolling your own but using one of the SDKs - 
 https://developers.facebook.com/docs/sdks/
 or the AS3 SDK Sydney pointed to.

 If you mean you're completely new to Facebook development it can be a 
 huge pain, but you'll save at least a few days if you go into it 
 ignoring all documentation Facebook provides other than the reference:
 https://developers.facebook.com/docs/reference/api/

 Google will find blog posts by people who give step by step 
 instructions for registering your account as a developer, setting up 
 an app, setting up a SDK and giving you source code of a functioning 
 app to look at.


 On 5/30/12 1:43 PM, Hans Wichman hans.wich...@gmail.com wrote:

 Hi Paul,

 I faced the same problem a while ago and found the whole facebook 
 mumbojumbo pretty hard to wrap my head around, opengraphs, graph api 
 etc. The project was cancelled so I was off the hook, but I spent 
 about a week reading facebook's docs none the wiser, so I don't 
 exactly share Sidney's experience. I didn't have a specific goal they 
 wanted me to complete so that made it harder as well, but still.
 I did find some very good books specifically on flash games on 
 facebook at amazon.

 regards
 H


 On 30-5-2012 18:17, Paul Steven wrote:
  I am a bit of a dinosaur when it comes to facebook and have been 
  asked to turn a flash game into a facebook app.
 
  Before I make a decision on whether I can take on this job I wanted 
  a quick heads up on how complex a process is to do this?
 
  Thanks in advance.
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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



 _ _ _
 Erik Mattheis | Weber Shandwick
 P: (952) 346.6610
 M: (612) 377.2272
 ___
 Flashcoders mailing list
 Flashcoders@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] Converting a flash game to facebook app

2012-05-30 Thread Paul Steven
I am a bit of a dinosaur when it comes to facebook and have been asked to
turn a flash game into a facebook app.

Before I make a decision on whether I can take on this job I wanted a quick
heads up on how complex a process is to do this?

Thanks in advance.

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


[Flashcoders] Catfish adverts

2012-05-24 Thread Paul Andrews
I have been asked to work on some flash catfish adverts. Does anyone 
know of any references about how they should behave? I can't find much 
online about them - specifically the close functionality.


Thanks,

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


Re: [Flashcoders] Catfish adverts

2012-05-24 Thread Paul Andrews

Thanks Guys!

Paul

On 24/05/2012 10:39, Karl DeSaulniers wrote:

Lol, didn't see this post.

Best,
Karl


On May 24, 2012, at 3:55 AM, David Hunter wrote:

maybe this might shed some light: 
http://www.matto1990.com/jquery/catfish/


presumably the close functionality is some kind of 
ExternalInterface.call();


Hope that helps.

On 24 May 2012 09:30, Paul Andrews p...@ipauland.com wrote:

I have been asked to work on some flash catfish adverts. Does anyone 
know
of any references about how they should behave? I can't find much 
online

about them - specifically the close functionality.

Thanks,

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







--
David Hunter

www.davidhunterdesign.com
+44 (0) 7869 104 906
___
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] Can Javascript Listen to Flash Events?

2012-05-22 Thread Paul Andrews

I think you're doomed if you don't have the fla.

On 22/05/2012 16:43, Ted Lehr wrote:

So I have a swf that needs to run locally and make an ExternalInterface.call 
... I am unable to make settings changes to the users Flash Players ... so as 
of now it seems unpossible!

My thoughts was to see if the javascript can listen for a flash event (the end 
of a flv in FLVPlayback to be specific)

Any thoughts?

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




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


Re: [Flashcoders] RE: Can Javascript Listen to Flash Events?

2012-05-22 Thread Paul Andrews

Just get a flash event handler to call a javascript function.

You probably don't have the security setting for the project set right - 
network access only.


Paul


On 22/05/2012 17:06, Ted Lehr wrote:

Oh - yes - I have the .fla... I just am running into issues when I try to have 
the swf call out to the javascript - I get the security warning from the player 
- so I am trying to figure out how to, instead of having the swf make a call 
out - maybe the javascript could just listen to the player...


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com on behalf of Merrill, Jason
Sent: Tue 5/22/2012 11:52 AM
To: Flash Coders List
Subject: [Flashcoders] RE: Can Javascript Listen to Flash Events?

You would have to add code to the .swf, but yes, Javascript can listen for 
Flash events and vice versa.

  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ted Lehr
Sent: Tuesday, May 22, 2012 11:44 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Can Javascript Listen to Flash Events?

So I have a swf that needs to run locally and make an ExternalInterface.call 
... I am unable to make settings changes to the users Flash Players ... so as 
of now it seems unpossible!

My thoughts was to see if the javascript can listen for a flash event (the end 
of a flv in FLVPlayback to be specific)

Any thoughts?

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

--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited.
Unless specifically indicated, this message is not an offer to sell or a 
solicitation of any investment products or other financial product or service, 
an official confirmation of any transaction, or an official statement of 
Sender. Subject to applicable law, Sender may intercept, monitor, review and 
retain e-communications (EC) traveling through its networks/systems and may 
produce any such EC to regulators, law enforcement, in litigation and as 
required by law.
The laws of the country of each sender/recipient may impact the handling of EC, 
and EC may be archived, supervised and produced in countries other than the 
country in which you are located. This message cannot be guaranteed to be 
secure or free of errors or viruses.

References to Sender are references to any subsidiary of Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank 
Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking 
Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that 
are part of this EC may have additional important disclosures and disclaimers, which you 
should read. This message is subject to terms available at the following link:
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you 
consent to the foregoing.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


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


Re: [Flashcoders] RE: Can Javascript Listen to Flash Events?

2012-05-22 Thread Paul Andrews

On 22/05/2012 17:36, Ted Lehr wrote:

I cannot change security settings for the player - this will be used by a lot 
of people and I cannot go to each work station and change that setting... 
unless you are talking about some other setting...


I was talking about the local playback settings in the publish tab in 
the IDE.




-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com on behalf of Paul Andrews
Sent: Tue 5/22/2012 12:15 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] RE: Can Javascript Listen to Flash Events?

Just get a flash event handler to call a javascript function.

You probably don't have the security setting for the project set right -
network access only.

Paul


On 22/05/2012 17:06, Ted Lehr wrote:

Oh - yes - I have the .fla... I just am running into issues when I try to have 
the swf call out to the javascript - I get the security warning from the player 
- so I am trying to figure out how to, instead of having the swf make a call 
out - maybe the javascript could just listen to the player...


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com on behalf of Merrill, Jason
Sent: Tue 5/22/2012 11:52 AM
To: Flash Coders List
Subject: [Flashcoders] RE: Can Javascript Listen to Flash Events?

You would have to add code to the .swf, but yes, Javascript can listen for 
Flash events and vice versa.

   Jason Merrill
   Instructional Technology Architect II
   Bank of America  Global Learning





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ted Lehr
Sent: Tuesday, May 22, 2012 11:44 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Can Javascript Listen to Flash Events?

So I have a swf that needs to run locally and make an ExternalInterface.call 
... I am unable to make settings changes to the users Flash Players ... so as 
of now it seems unpossible!

My thoughts was to see if the javascript can listen for a flash event (the end 
of a flv in FLVPlayback to be specific)

Any thoughts?

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

--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited.
Unless specifically indicated, this message is not an offer to sell or a 
solicitation of any investment products or other financial product or service, 
an official confirmation of any transaction, or an official statement of 
Sender. Subject to applicable law, Sender may intercept, monitor, review and 
retain e-communications (EC) traveling through its networks/systems and may 
produce any such EC to regulators, law enforcement, in litigation and as 
required by law.
The laws of the country of each sender/recipient may impact the handling of EC, 
and EC may be archived, supervised and produced in countries other than the 
country in which you are located. This message cannot be guaranteed to be 
secure or free of errors or viruses.

References to Sender are references to any subsidiary of Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank 
Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking 
Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that 
are part of this EC may have additional important disclosures and disclaimers, which you 
should read. This message is subject to terms available at the following link:
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you 
consent to the foregoing.
___
Flashcoders mailing list
Flashcoders@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

Re: [Flashcoders] MVC style Correction

2012-03-07 Thread Paul Andrews

On 07/03/2012 15:37, Ross Sclafani wrote:

yay me!


Indeed!

Your MVC introductory example was superb.

Paul


Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714




let go of even your longest held beliefs,
the only truth is in observation.

On Mar 7, 2012, at 10:27 AM, David Hunter wrote:


Hi all,

Really pleased that my original question has generated so much positive
discussion, debate and learning on MVC. For me it has certainly shed some
light on different ways to implement it and probably some improvements or
different approaches I could take in the future.

Currently I connect them all together exactly as Ross has his set up in his
first example. Although I may experiment with some slightly different
approaches or try out a framework.

Regards,

David


On 7 March 2012 07:25, Corc...@chello.nl  wrote:


+1

Best regards,
Cor van Dooren

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John
McCormack
Sent: dinsdag 6 maart 2012 21:30
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

Absolutely agree, so thank you everyone - very much.
Each day I look for more.

As a result of people talking about RobotLegs I bought and today received
Joel Hooks' ActionScript Developers Guide to RobotLegs.

A new direction - which I am thankful for.

John

On 06/03/2012 18:57, Kevin Newman wrote:

Also, this thread has helped to flesh out my understanding of MVC to a
substantial degree. I love that. :-)

Kevin N.


On 3/6/12 11:40 AM, Kevin Newman wrote:

That's how I understand MVC anyway.

___
Flashcoders mailing list
Flashcoders@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




--
David Hunter

www.davidhunterdesign.com
+44 (0) 7869 104 906
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


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


Re: [Flashcoders] MVC style Correction

2012-03-06 Thread Paul Andrews

On 06/03/2012 10:35, Karl DeSaulniers wrote:

I kind of like that.

I guess I am looking to the controller to do the event dispatching to 
the model
The controller manipulates the model, so it wouldn't really need to 
dispatch events to it.


the model to listening for the result. the view listening for changes 
to the model.
The model won't be listening for anything (though that is blurred as we 
progress to model persistence, which may be asynchronous - saving across 
a network, fetching data from a remote server, etc).


View allows user interaction,
View messages controller,
controller updates model,
view updates according to model changes.



On Mar 6, 2012, at 4:26 AM, Cor wrote:


You could ofcourse take another approach:
In the view:
dispatchEvent(new Event(View.YOURVIEWEVENT));

and in the Contoller:

View.addEventListener(View.YOURVIEWEVENT, callback);

So there is a loose coupling as Paul wrote.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: dinsdag 6 maart 2012 11:08
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

Forgive me if I am wrong, but I watched that video and it confused me.
The gentleman started creating the view first then made the model and 
had
the interaction between the two then went and created the controller 
and in

creating the controller took away some code from the view that the model
handled and gave it to the controller. He also had the view having 
reference

to the model and controller.

var model:Model = new Model();
var controller:Controller = new Controller(model); var view:View = new
View(model, controller);

shouldn't it be..

var controller:Controller = new Controller(); var model:Model = new
Model(controller); var view:View = new View(model);

?

Trying to wrap my head around this.
Thanks for this video though Cor!
It helped me see a real example so far of how to implement a MVC.


Best,
Karl


On Mar 5, 2012, at 7:00 AM, Cor wrote:


Thanks Paul,

In the documentation I read there is mostly the View telling the
Controller an event has taken place.
The View holds e reference of the Model and the Controller.
Look at :
http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/a
ctions cript/pdfs/ora_as3_design_patterns_ch12.pdf

on page number 429 (is the 11th page of this file)

So I have create this in my Document class like this:

var model:Model = Model.getInstance(); //Singleton
var controller:Controller = new Controller(model);
var view:View = new View(model, controller,

this.stage);

addChild(view);


To check if I understand you correctly, you would do something like
this:

var model:Model = Model.getInstance(); //Singleton
var view:View = new View(model,  this.stage);
var controller:Controller = new Controller(model,
view);
addChild(view);

And in the view instance, instead of my way:

private function btn_clickHandler(e:MouseEvent):void {


controller.setValueInModel(arrayButtons.indexOf(e.target));
}

private function btn_clickHandler(e:MouseEvent):void {

myPublicVar = arrayButtons.indexOf(e.target);
dispatchEvent(new Event(View.MY_CUSTOM_EVENT));
}

Ofcourse the Controller would then have a listener :
view.addEventListener(
View.MY_CUSTOM_EVENT, callback_function);

Correct???

Regards
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul
Andrews
Sent: maandag 5 maart 2012 13:31
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

On 05/03/2012 10:26, Cor wrote:

@Karl,

I just created my first MVC and it is still in progress...
Lots of fun!

This video helped me a lot!
http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

Unfortuneatly the tutor mentions Controller can update View, but that
example is not included.
If anyone can give me a little example of how that is done in MVC,
don't hasitate. :-)


I don't think the controller should be updating the view. Period.
Nor do I
think that the view should be calling methods of the controller class.

One of the main benefits of MVC is separation of concerns. Views
shouldn't
care about controllers, controllers should care about views.

My views dispatch events about their changes and the controller
listens for
the events, not caring which view dispatched it.
The controller updates the model, and the view listens for changes
in the
model.

There are several ways to build the MVC pattern. The video shows one
way,
but really it shows a coupling that shouldn't be as tight as it is
and the
idea of a controller updating a view, is a no-no.

Sometimes people use a micro-mvc architecture within a view to
control it -
no problem about that, but we should keep our MVC components

Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Paul Andrews

On 05/03/2012 10:26, Cor wrote:

@Karl,

I just created my first MVC and it is still in progress...
Lots of fun!

This video helped me a lot!
http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

Unfortuneatly the tutor mentions Controller can update View, but that
example is not included.
If anyone can give me a little example of how that is done in MVC, don't
hasitate. :-)


I don't think the controller should be updating the view. Period. Nor do 
I think that the view should be calling methods of the controller class.


One of the main benefits of MVC is separation of concerns. Views 
shouldn't care about controllers, controllers should care about views.


My views dispatch events about their changes and the controller listens 
for the events, not caring which view dispatched it.
The controller updates the model, and the view listens for changes in 
the model.


There are several ways to build the MVC pattern. The video shows one 
way, but really it shows a coupling that shouldn't be as tight as it is 
and the idea of a controller updating a view, is a no-no.


Sometimes people use a micro-mvc architecture within a view to control 
it - no problem about that, but we should keep our MVC components as 
separate black boxes.


Paul

best regards
Cor van Dooren
The Netherlands

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: maandag 27 februari 2012 11:19
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

That actually makes a lot of sense to me and I haven't written one MVC yet.
Thanks for the break-down!
In relation to what Henrik said about using adaptors, I see the sub
controllers as the adaptors, but they are not actually adaptors, just sub
controllers with targets to the main controller.
Yes?

Best,
Karl


On Feb 27, 2012, at 1:16 AM, Ross Sclafani wrote:


thanks, its just how i do MVC

it really get interesting when you follow a mitosis development
pattern... You start with one model, controller, and view, add
features to each in parallel, and as each class gets too big, you
break them out into subcontrollers, submodels, and subviews. Then
sub-sub. My projects have a triple-tree structure branching out from
the core model, controller, and view classes

finer granularity as you reach further in, and always broken into M,
V, and C:

Models contain properties only. they dispatch a CHANGE Event every
time one of their properties change,.

Views display properties of the model. they listen for the CHANGE
Event, and update their appearance with the new values stored in the
model every time it changes.

Controllers manipulate properties of the model. Whether trigger by
event handlers in the views, or internal timers or network activity,
any command that sets any value of any property of the model is placed
in a controller. Controllers might use other controllers to trigger
changes in submodels outside its subdomain

the project starts off very compact, then grows with its functionality
as required, always growing out from the center so you never paint
yourself into a corner

then later to optimize, you can get specific about which submodel a
particular view is listening to, in turn limiting the number of change
events it receives to those actually represented in the view.

all subcontrollers hold a reference to the root controller, so it is
easy to target any node on the controller tree from anywhere inside of
it.

same with the model tree. some submodel properties can emit the CHANGE
Event only on a local level, and not send the event up the hierarchy,
isolating the scope of view updates

An MVC Example

FLVPlayback is an interesting MVC  component:

it holds a NetStream as a model of the video

it holds a Video as a view of the Video

It acts as controller to set the model in motion by connecting it to a
stream

the ui is also a view of the video: the percent elapsed is represented
n the scrub bar, ther is a play button while paused, a pause button
while playing, then there are the time readouts..

if the video its playing,
the user clicks pause in the view,
it tells the controller to pause the stream in the model, which
notifies the views, so the Video is paused, and  pause button becomes
a play button.

thats how i do MVC.
data is stored in mvc.models,
data is displayed in mvc.views, and
data is manipulated in mvc.controllers.


Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714

On Feb 26, 2012, at 11:09 PM, Karl DeSaulniers wrote:


BTW Ross, I thought your example was great.

Karl DeSaulniers
Design Drumm
http://designdrumm.com

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

Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Paul Andrews

That's a lot to follow.

As you show in your example, my views dispatch custom events *with 
payloads*, where required, so if a slider value is changed I might 
dispatch VOLUME_CHANGE with the changed value, or a reference to it.


Controllers need to pickup the events broadcast by the views. I use a 
central policeman controller, and the views dispatch events from that. 
Controllers aren't usually sitting on the display list, so dispatching 
the event from the view would be a problem.


My views dispatch the events off the controller, but have no idea of the 
internals of the controller. Generally my views find the controller and 
model via singletons, not the constructor.


So a view change would be:  Controller.getInstance().dispatchEvent(new 
PayloadEvent(View.VOLUME_CHANGE,{volume:5}));


PayloadEvent is just an event that takes an object payload -  a lazy way 
to do custom events.


The controller knows nothing about the view, really.

Your example has the controller knowing about the view, but my 
controller knows nothing about the views, so the controller listens to 
events being dispatched from itself.


There are so many ways to skin this cat.

Paul

On 05/03/2012 13:00, Cor wrote:

Thanks Paul,

In the documentation I read there is mostly the View telling the Controller
an event has taken place.
The View holds e reference of the Model and the Controller.
Look at :
http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/actions
cript/pdfs/ora_as3_design_patterns_ch12.pdf

on page number 429 (is the 11th page of this file)

So I have create this in my Document class like this:

var model:Model = Model.getInstance(); //Singleton
var controller:Controller = new Controller(model);
var view:View = new View(model, controller,
this.stage);
addChild(view);


To check if I understand you correctly, you would do something like this:

var model:Model = Model.getInstance(); //Singleton
var view:View = new View(model,  this.stage);
var controller:Controller = new Controller(model,
view);
addChild(view);

And in the view instance, instead of my way:

private function btn_clickHandler(e:MouseEvent):void {


controller.setValueInModel(arrayButtons.indexOf(e.target));
}

private function btn_clickHandler(e:MouseEvent):void {

myPublicVar = arrayButtons.indexOf(e.target);
dispatchEvent(new Event(View.MY_CUSTOM_EVENT));
}   

Ofcourse the Controller would then have a listener : view.addEventListener(
View.MY_CUSTOM_EVENT, callback_function);

Correct???

Regards
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: maandag 5 maart 2012 13:31
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

On 05/03/2012 10:26, Cor wrote:

@Karl,

I just created my first MVC and it is still in progress...
Lots of fun!

This video helped me a lot!
http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

Unfortuneatly the tutor mentions Controller can update View, but that
example is not included.
If anyone can give me a little example of how that is done in MVC,
don't hasitate. :-)

I don't think the controller should be updating the view. Period. Nor do I
think that the view should be calling methods of the controller class.

One of the main benefits of MVC is separation of concerns. Views shouldn't
care about controllers, controllers should care about views.

My views dispatch events about their changes and the controller listens for
the events, not caring which view dispatched it.
The controller updates the model, and the view listens for changes in the
model.

There are several ways to build the MVC pattern. The video shows one way,
but really it shows a coupling that shouldn't be as tight as it is and the
idea of a controller updating a view, is a no-no.

Sometimes people use a micro-mvc architecture within a view to control it -
no problem about that, but we should keep our MVC components as separate
black boxes.

Paul

best regards
Cor van Dooren
The Netherlands

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: maandag 27 februari 2012 11:19
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

That actually makes a lot of sense to me and I haven't written one MVC

yet.

Thanks for the break-down!
In relation to what Henrik said about using adaptors, I see the sub
controllers as the adaptors, but they are not actually adaptors, just
sub controllers with targets to the main controller.
Yes?

Best,
Karl


On Feb 27, 2012

Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Paul Andrews
The dependency with this is that any changes to the UI - additional 
views being added or removed, requires that the controller be changed 
too. Any change to a view could cause the controller to become broken.


For this reason, I would say it's bad practice.


On 05/03/2012 13:57, Merrill, Jason wrote:

tutor mentions Controller can update View, but that example is not included.
If anyone can give me a little example of how that is done in MVC, don't 
hasitate

In about the simplest form:


//In the controller:

onSomeEventHandler(event:SomeEvent):void
{
_someViewInstance.update();
}


//In the view:

public function update():void
{
//Do stuff to change the view
}

Hope that helps.


  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: Monday, March 05, 2012 5:27 AM
To: 'Flash Coders List'
Subject: RE: [Flashcoders] MVC style Correction

@Karl,

I just created my first MVC and it is still in progress...
Lots of fun!

This video helped me a lot!
http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

Unfortuneatly the tutor mentions Controller can update View, but that example 
is not included.
If anyone can give me a little example of how that is done in MVC, don't 
hasitate. :-)

best regards
Cor van Dooren
The Netherlands

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers
Sent: maandag 27 februari 2012 11:19
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

That actually makes a lot of sense to me and I haven't written one MVC yet.
Thanks for the break-down!
In relation to what Henrik said about using adaptors, I see the sub controllers 
as the adaptors, but they are not actually adaptors, just sub controllers with 
targets to the main controller.
Yes?

Best,
Karl


On Feb 27, 2012, at 1:16 AM, Ross Sclafani wrote:


thanks, its just how i do MVC

it really get interesting when you follow a mitosis development
pattern... You start with one model, controller, and view, add
features to each in parallel, and as each class gets too big, you
break them out into subcontrollers, submodels, and subviews. Then
sub-sub. My projects have a triple-tree structure branching out from
the core model, controller, and view classes

finer granularity as you reach further in, and always broken into M,
V, and C:

Models contain properties only. they dispatch a CHANGE Event every
time one of their properties change,.

Views display properties of the model. they listen for the CHANGE
Event, and update their appearance with the new values stored in the
model every time it changes.

Controllers manipulate properties of the model. Whether trigger by
event handlers in the views, or internal timers or network activity,
any command that sets any value of any property of the model is placed
in a controller. Controllers might use other controllers to trigger
changes in submodels outside its subdomain

the project starts off very compact, then grows with its functionality
as required, always growing out from the center so you never paint
yourself into a corner

then later to optimize, you can get specific about which submodel a
particular view is listening to, in turn limiting the number of change
events it receives to those actually represented in the view.

all subcontrollers hold a reference to the root controller, so it is
easy to target any node on the controller tree from anywhere inside of
it.

same with the model tree. some submodel properties can emit the CHANGE
Event only on a local level, and not send the event up the hierarchy,
isolating the scope of view updates

An MVC Example

FLVPlayback is an interesting MVC  component:

it holds a NetStream as a model of the video

it holds a Video as a view of the Video

It acts as controller to set the model in motion by connecting it to a
stream

the ui is also a view of the video: the percent elapsed is represented
n the scrub bar, ther is a play button while paused, a pause button
while playing, then there are the time readouts..

if the video its playing,
the user clicks pause in the view,
it tells the controller to pause the stream in the model, which
notifies the views, so the Video is paused, and  pause button becomes
a play button.

thats how i do MVC.
data is stored in mvc.models,
data is displayed in mvc.views, and
data is manipulated in mvc.controllers.


Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714

On Feb 26, 2012, at 11:09 PM, Karl DeSaulniers wrote:


BTW Ross, I thought your example was great.

Karl DeSaulniers
Design Drumm
http://designdrumm.com


Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Paul Andrews

On 05/03/2012 14:13, Merrill, Jason wrote:

It's the simplest form of MVC. I didn't say it was the best, I was just giving 
the man what he asked for. :)
Fair enough, but they do sell cigarettes with a health warning these 
days..  ;-)


  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning





___


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: Monday, March 05, 2012 9:11 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] MVC style Correction

The dependency with this is that any changes to the UI - additional views being 
added or removed, requires that the controller be changed too. Any change to a 
view could cause the controller to become broken.

For this reason, I would say it's bad practice.


On 05/03/2012 13:57, Merrill, Jason wrote:

tutor mentions Controller can update View, but that example is not included.
If anyone can give me a little example of how that is done in MVC,
don't hasitate

In about the simplest form:


//In the controller:

onSomeEventHandler(event:SomeEvent):void
{
_someViewInstance.update();
}


//In the view:

public function update():void
{
//Do stuff to change the view
}

Hope that helps.


   Jason Merrill
   Instructional Technology Architect II
   Bank of America  Global Learning





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: Monday, March 05, 2012 5:27 AM
To: 'Flash Coders List'
Subject: RE: [Flashcoders] MVC style Correction

@Karl,

I just created my first MVC and it is still in progress...
Lots of fun!

This video helped me a lot!
http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

Unfortuneatly the tutor mentions Controller can update View, but that example 
is not included.
If anyone can give me a little example of how that is done in MVC,
don't hasitate. :-)

best regards
Cor van Dooren
The Netherlands

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: maandag 27 februari 2012 11:19
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

That actually makes a lot of sense to me and I haven't written one MVC yet.
Thanks for the break-down!
In relation to what Henrik said about using adaptors, I see the sub controllers 
as the adaptors, but they are not actually adaptors, just sub controllers with 
targets to the main controller.
Yes?

Best,
Karl


On Feb 27, 2012, at 1:16 AM, Ross Sclafani wrote:


thanks, its just how i do MVC

it really get interesting when you follow a mitosis development
pattern... You start with one model, controller, and view, add
features to each in parallel, and as each class gets too big, you
break them out into subcontrollers, submodels, and subviews. Then
sub-sub. My projects have a triple-tree structure branching out from
the core model, controller, and view classes

finer granularity as you reach further in, and always broken into M,
V, and C:

Models contain properties only. they dispatch a CHANGE Event every
time one of their properties change,.

Views display properties of the model. they listen for the CHANGE
Event, and update their appearance with the new values stored in the
model every time it changes.

Controllers manipulate properties of the model. Whether trigger by
event handlers in the views, or internal timers or network activity,
any command that sets any value of any property of the model is
placed in a controller. Controllers might use other controllers to
trigger changes in submodels outside its subdomain

the project starts off very compact, then grows with its
functionality as required, always growing out from the center so you
never paint yourself into a corner

then later to optimize, you can get specific about which submodel a
particular view is listening to, in turn limiting the number of
change events it receives to those actually represented in the view.

all subcontrollers hold a reference to the root controller, so it is
easy to target any node on the controller tree from anywhere inside
of it.

same with the model tree. some submodel properties can emit the
CHANGE Event only on a local level, and not send the event up the
hierarchy, isolating the scope of view updates

An MVC Example

FLVPlayback is an interesting MVC  component:

it holds a NetStream as a model of the video

it holds a Video as a view of the Video

It acts as controller to set the model in motion by connecting it to
a stream

the ui is also a view of the video: the percent elapsed is
represented n the scrub bar, ther is a play button while paused, a
pause button while playing, then there are the time readouts..

if the video its playing,
the user clicks pause

Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Paul Andrews

I think a view can handle it's own rollover without concerning a controller.

A controller is only there to manipulate the model on behlaf of the 
view. It has no interest in visuals.


On 05/03/2012 14:36, Ross Sclafani wrote:

i prefer to have the model update the views.

preferably via event for loose coupling.


the situations that a controller would alter a view  in the versions of MVC i 
have studied are for things that are pure visual responses.

like say a rollover:

ROLL_OVER event on View --  calls onRollOver on controller --  sets highlight 
on View.

Because the Flash SDK provides such a rich display API, I personally avoid this 
and leave any pure view event handling to the View internals to limit the 
public properties of Views.

I could see a scenario where one such rollover needs to cause changes in 
multiple views, and this approach could be implemented, but i would normally 
rout these types updates through a submodel dedicated to UI.

again, I value encapsulation above most other benefits of allowing the 
controller access to view properties, so i follow a standard unidirectional 
triangular flow.


Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Paul Andrews

On 05/03/2012 14:43, Merrill, Jason wrote:

Fair enough, but they do sell cigarettes with a health warning these days..  ;-)

Trolling is so 2 years ago. :)


I don't know why you consider the comment trolling.

The OP wanted to know about how to do a technique and it's seems 
reasonable enough to suggest why it would also help them further by 
explaining why the technique is bad.



  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning





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


Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Paul Andrews

On 05/03/2012 14:36, Ross Sclafani wrote:

snip


I could see a scenario where one such rollover needs to cause changes in 
multiple views, and this approach could be implemented, but i would normally 
rout these types updates through a submodel dedicated to UI.



Do you have an example? I've always considered rollovers as direct 
feedback to the user on the element currently in focus. Any

such use across multiple views eludes me for the minute.


Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Paul Andrews
I'm guessing we're now into nuancing the model to hold view states and 
the presenter is controlling multiple views, or is that wrong?


On 05/03/2012 15:33, Peter Ginneberge wrote:
The dependency with this is that any changes to the UI - additional 
views being added or removed, requires that the controller be changed 
too. Any change to a view could cause the controller to become broken.


For this reason, I would say it's bad practice.


Not necessarily so.
But.. you'd use an interface, which the view implements.
In which case you'd probably be talking about a Presenter rather than 
a Controller :)


pseudo code:

// PRESENTER
private var view:IView;
public function ViewPresenter(v:IView) {
   view = v;
   // add listeners and whatnot..
}

onSomeEventHandler(event:SomeEvent):void {
   view.update();
}



// VIEW
public class MyView implements IView {
   public function update()(// do stuff);
}



// VIEW INTERFACE
public interface IView {
   public function update();
}

GWT uses this kind of architecture:
http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture.html
http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture.html#binding 



http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture-2.html 



http://www.google.com/intl/nl/events/io/2009/sessions/GoogleWebToolkitBestPractices.html 



So in GWT I usually have:

(only 1) AppController
(several) Presenter + View + Model triads

A view dispatches events to which the presenter listens.
Presenter talks to view via its interface.

View doesn't know the presenter, Presenter doesn't know the view, only 
its interface.


regards,
Muzak

- Original Message - From: Paul Andrews p...@ipauland.com
To: flashcoders@chattyfig.figleaf.com
Sent: Monday, March 05, 2012 3:11 PM
Subject: Re: [Flashcoders] MVC style Correction


The dependency with this is that any changes to the UI - additional 
views being added or removed, requires that the controller be changed 
too. Any change to a view could cause the controller to become broken.


For this reason, I would say it's bad practice.


On 05/03/2012 13:57, Merrill, Jason wrote:
tutor mentions Controller can update View, but that example is not 
included.
If anyone can give me a little example of how that is done in MVC, 
don't hasitate

In about the simplest form:


//In the controller:

onSomeEventHandler(event:SomeEvent):void
{
_someViewInstance.update();
}


//In the view:

public function update():void
{
//Do stuff to change the view
}

Hope that helps.


  Jason Merrill


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



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


Re: [Flashcoders] MVC style Correction

2012-03-05 Thread Paul Andrews

On 05/03/2012 16:44, Kevin Newman wrote:

If the model is updating the view,

Not my model. My views listen for model change events.

then it doesn't sound like you have a generic view at all. This can be 
appropriate in certain cases, but if you really want reusable View 
objects (like a generic scrolling text or image list view), they 
should be generic and abstracted from the underlying data sources (the 
model) - and have the data filtered through a data adapter, usually 
associated with the controller (or you can skip the adapter, and just 
bulk convert the entire model list data into generic view data, if 
it'll fit in memory or won't be updated in real time).

I think that you're referring to the OTT pattern, favoured by many.

I try and keep things simple.



In this version of MVC, to answer the original question - the 
controller sets up the view and wires the data source, but doesn't 
necessarily directly update the view (though that's who's job it is).


In iOS these kinds of controllers are actually called view 
controllers - for maybe obvious reasons. :-)


Kevin N.


On 3/5/12 7:31 AM, Paul Andrews wrote:
I don't think the controller should be updating the view. Period. Nor 
do I think that the view should be calling methods of the controller 
class.


One of the main benefits of MVC is separation of concerns. Views 
shouldn't care about controllers, controllers should care about views.


My views dispatch events about their changes and the controller 
listens for the events, not caring which view dispatched it.
The controller updates the model, and the view listens for changes in 
the model.


There are several ways to build the MVC pattern. The video shows one 
way, but really it shows a coupling that shouldn't be as tight as it 
is and the idea of a controller updating a view, is a no-no.


Sometimes people use a micro-mvc architecture within a view to 
control it - no problem about that, but we should keep our MVC 
components as separate black boxes. 


___
Flashcoders mailing list
Flashcoders@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] Algorithm ideas

2012-03-05 Thread Paul Andrews
Lets imagine I have 100 sprites scattered around the stage - no regular 
pattern, but generally spread evenly.


My task is to remove 40 of them. That's easy, but I want to remove them 
as evenly as possible, so the density thins but is reasonably consistent 
across the stage.


Any ideas? I don't know if there is a standard algorithm for this.

Paul


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


Re: [Flashcoders] Algorithm ideas

2012-03-05 Thread Paul Andrews

On 05/03/2012 23:12, Paul Andrews wrote:
Lets imagine I have 100 sprites scattered around the stage - no 
regular pattern, but generally spread evenly.


My task is to remove 40 of them. That's easy, but I want to remove 
them as evenly as possible, so the density thins but is reasonably 
consistent across the stage.


Any ideas? I don't know if there is a standard algorithm for this.


No worries - I worked it out. Should have had some thinking time before 
posting.


Paul


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] MVC style Correction

2012-02-27 Thread Paul Andrews
I don't think that it makes sense to categorise every class in terms of 
the MVC trinity.


Classes that implement the MVC pattern, sure, but not everything else.

There's no need to put a sound processing class within the view class 
hierachy, even if the view uses it to play audio from the model. It 
would make it harder to see the actual classes involved in implementing 
views. A given class could be used inside a view and also in a controller.



On 27/02/2012 21:19, Mattheis, Erik (MIN-WSW) wrote:

I've been putting all my class files in one of three folders, model, view, 
controller. I'm mostly concerned with making the code as easy to understand as 
possible.

Where would you expect transfer object class - a class that just defines a set 
of values to pass as a group?

Where would you expect a custom event class?

Where would you put a class that reads from and writes to the file system? 
Air.File has methods that produce UI elements. What are benefits/drawbacks to 
writing the extra code to get File.browseForOpen() somewhere in the View?

What about a class that holds string values to display ion dialog boxes, on 
buttons, etc? Is that part of the view or should it be defined in the model?



_ _ _
Erik Mattheis | Weber Shandwick
P: (952) 346.6610
M: (612) 377.2272
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


Re: [Flashcoders] MVC style Correction

2012-02-25 Thread Paul Andrews

On 24/02/2012 15:15, Merrill, Jason wrote:

Maybe I'm off, but I don't think the controller should manipulate data.

Who is then?


  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik 
(MIN-WSW)
Sent: Thursday, February 23, 2012 8:26 PM
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

Ross Sclafaniross.sclaf...@gmail.com  wrote:
It is very easy to locate any code in one of my projects by ascertaining the 
domain of the code in question and looking in the appropriate branch.
Does it store data? It's in the model. Does it interpret and display data? Try 
your views. Does it manipulate data? Look in the controller.

This thread has been useful, thanks all. I've a ton of questions regarding 
judgment calls and below I post a class illustrating a few I've struggled with. 
The comments are intended to be my questions/admissions of bafflement. I'm 
unsure where in a MVC this class should go as its main purpose is to work with 
the File class which itself has methods which retrieve 
(File.applicationDirectory), interpret (File.exists) and display 
(File.browseForOpen) data.

The class also is a dreaded example of allowing the view to listen directly to 
the model for events, perhaps only because I've misguidedly decided to make it 
part of the model as it has to do with copying and deleting a SQLite file used 
in the app.

package mvc.model {
  /* saveFileAs() saves a copy of a SQLite DB for the purposes of  transferring 
data to an instance of this app on another  computer.

closeDBAndReplace() = replaces the db file if the user  is importing data.
  */
  import flash.events.EventDispatcher;
  import flash.events.Event;
  import flash.filesystem.File;
  // class Data works with a SQLite DB
  import mvc.model.Data;
  // Where in a MVC should custom event classes  // be located? I wish to pass my own 
objects  // along with events, usually Transfer Objects
  // or a string to be displayed
  import mvc.controller.CustomDataEvent;

  public class ManipulateDBFile extends EventDispatcher {

   private var _data:Data;
   private var _sourceFile:File;
   private var _copyToDirectory:File;

   public function ManipulateDBFile(data:Data) {
_data = data;
   }

   public function saveFileAs() : void {
var docsDir:File = File.desktopDirectory;
// This creates a UI element. I would look for this code in the view!
docsDir.browseForDirectory('Save File in  ...');
// This is asking a UI elemt to inform the Model directly. Big bad no?
docsDir.addEventListener(Event.SELECT, copyFile);
   }

   private function copyFile(e:Event):void  {
_sourceFile = File.applicationStorageDirectory.resolvePath(msgDB.db);
_copyToDirectory = e.target.resolvePath(msgDB.db);
if (_copyToDirectory.exists) {
 // Passing this event through the Controller seems to create complexity,
 // or at least unnecessary lines of code. Is there an advantage gained by
 // communicating to the view through the controller here?
 var evt:CustomDataEvent = new 
CustomDataEvent(CustomDataEvent.FILE_ALREADY_EXISTS);
 dispatchEvent(evt);
}
else {
 replaceFile();
}
   }

   public function replaceFile() : void {
var evt:CustomDataEvent = new 
CustomDataEvent(CustomDataEvent.COPY_COMPLETE);
try {
 _sourceFile.copyTo(_copyToDirectory, true);
 dispatchEvent(evt);
}

catch (error:Error) {
 evt.param = error.message;
 dispatchEvent(evt);
}
_sourceFile = null;
_copyToDirectory = null;
   }

   public function closeDBAndReplace() : void {
// The file cannot be deleted if there is a SQLConnection to it.
// The class that is aware of a possible connection also does the
// deletion. But deleting the file seems to conceptually
// fit into this class better
_data.addEventListener(CustomDataEvent.DRILL_RESET, findFile, false, 0, 
true);
_data.deleteDBFile();

   }

   private function findFile(e:CustomDataEvent) : void {
_data.removeEventListener(CustomDataEvent.DRILL_RESET, findFile, false);
var docsDir:File = File.desktopDirectory;
docsDir.browseForOpen('Select msgDB.db file ...');
docsDir.addEventListener(Event.SELECT, replaceDBFile);
   }

   private function replaceDBFile(e:Event):void  {
var sourceFile:File = e.target as File;
var destination:File = 
File.applicationStorageDirectory.resolvePath(msgDB.db);
try {
 sourceFile.copyTo(destination, true);
 dispatchEvent(new CustomDataEvent(CustomDataEvent.RESTART_REQUIRED));
}
catch (error:Error) {
 trace(Error:, error.message);
}
   }
  }
}

On 2/17/12 6:07 PM, Ross Sclafaniross.sclaf...@gmail.com  wrote:
It is very easy to locate any code in one of my projects by ascertaining the 
domain of the code in 

Re: [Flashcoders] Fwd: MVC

2012-02-16 Thread Paul Andrews

Excellent job.

I have one small point, on a practical level.

For the views, in particular, I don't usually pass arguments to the 
constructor. It's not such a big deal for code-only examples, but in my 
flash world I mix my components between stuff created dynamically and 
things created in the IDE - sometimes I build components as assemblies 
on the stage using the IDE. The point is that passing arguments to the 
constructor then becomes an issue for a view.


Might I suggest an init() function to pass in Model and Controller?

Paul



On 16/02/2012 07:59, Ross Sclafani wrote:

From: Ross Sclafaniross.sclaf...@gmail.com
Date: February 16, 2012 2:39:34 AM EST
To: Corc...@chello.nl
Cc: Flash Coders Listflashcoders@chattyfig.figleaf.com, 
flashcoder...@googlegroups.com
Subject: Re: MVC

feel free to hit me up any time ill try to have time to respong

none the less, this should get you started:

/*
  * Model.as
  *
  * mvc.Model;
  */
package mvc {
import flash.events.EventDispatcher;
import flash.events.Event;
class Model extends EventDispatcher{
private var _count:int = 0;
public function get count():int{
return _count;
}
public function set count(value:int):void{
this._count= value;
update();
}
public function Model(){
super()
}
private function update():void{
this.dispatchEvent(new Event(Event.CHANGE));
}
}
}


/*
  * Controller.as
  *
  * mvc.Controller;
  */
package mvc {
public  class Controller {
private var model:Model;
public function Controller(model:Model){
super()
this.model = model;
}
public function countUp():void{
this.model.count++;
}
}
}

/*
  * View.as
  *
  * mvc.View;
  */
package mvc {
import flash.text.TextField;
import flash.events.Event;
import flash.display.Sprite;
public  class View extends Sprite(){
private var model:Model;
private var controller Controller;
private var textField:TextField = new TextField();
public function View(model:Model, controller:Controller){
model.addEventListener(Event.CHANGE, 
this.model_changeHandler);
super()
this.model = model;
this.controller = controller;
this.addChild(this.textField);
this.stage.addEventListener(MouseEvent.CLICK, 
this.stage_clickHandler)

}
private function stage_clickHandler(event:MouseEvent):void{
this.controller.countUp();
}
private function model_changeHandler(event:Event):void{
this.textField.text = this.model.count
}
}
}
/*
  * App.as
  *
  * MVC screen click counter.
  */
package{
import mvc.Model;
import mvc. View;
import mvc.Controller;
public class App{
private var model:Model = new Model();
private var controller:Controller = new Controller(this.model);
private var view:View = new View(model, controller);
public function App(){
this.addChild(this.view);
}
}
}

Now imagine a Model with more properties.
And tons of different Views of them that data.
Some of which provide a UI linked to Controller methods that manipulate it.

_ross


___
Flashcoders mailing list
Flashcoders@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] Fwd: MVC

2012-02-16 Thread Paul Andrews

On 16/02/2012 10:54, tom rhodes wrote:

traditional vanilla MVC tends to use composition like the example given,
check out robotlegs if you don't like it :) then you inject dependencies
instead of passing them around and everything gets a bit more loosely
coupled...


It's not a question of not liking it - your example is perfect for a 
coded-only solution, slightly less practical when working in a 
mixed-mode with the Flash IDE being involved in view instantiation.




On 16 February 2012 11:46, Paul Andrewsp...@ipauland.com  wrote:


Excellent job.

I have one small point, on a practical level.

For the views, in particular, I don't usually pass arguments to the
constructor. It's not such a big deal for code-only examples, but in my
flash world I mix my components between stuff created dynamically and
things created in the IDE - sometimes I build components as assemblies on
the stage using the IDE. The point is that passing arguments to the
constructor then becomes an issue for a view.

Might I suggest an init() function to pass in Model and Controller?

Paul




On 16/02/2012 07:59, Ross Sclafani wrote:


From: Ross Sclafaniross.sclafani@gmail.**comross.sclaf...@gmail.com
Date: February 16, 2012 2:39:34 AM EST
To: Corc...@chello.nl
Cc: Flash Coders 
Listflashcoders@chattyfig.**figleaf.comflashcoders@chattyfig.figleaf.com,
flashcoder...@googlegroups.com
Subject: Re: MVC

feel free to hit me up any time ill try to have time to respong

none the less, this should get you started:

/*
  * Model.as
  *
  * mvc.Model;
  */
package mvc {
import flash.events.EventDispatcher;
import flash.events.Event;
class Model extends EventDispatcher{
private var _count:int = 0;
public function get count():int{
return _count;
}
public function set count(value:int):void{
this._count= value;
update();
}
public function Model(){
super()
}
private function update():void{
this.dispatchEvent(new Event(Event.CHANGE));
}
}
}


/*
  * Controller.as
  *
  * mvc.Controller;
  */
package mvc {
public  class Controller {
private var model:Model;
public function Controller(model:Model){
super()
this.model = model;
}
public function countUp():void{
this.model.count++;
}
}
}

/*
  * View.as
  *
  * mvc.View;
  */
package mvc {
import flash.text.TextField;
import flash.events.Event;
import flash.display.Sprite;
public  class View extends Sprite(){
private var model:Model;
private var controller Controller;
private var textField:TextField = new TextField();
public function View(model:Model, controller:Controller){
model.addEventListener(Event.**CHANGE,
this.model_changeHandler);
super()
this.model = model;
this.controller = controller;
this.addChild(this.textField);
this.stage.addEventListener(**MouseEvent.CLICK,
this.stage_clickHandler)

}
private function stage_clickHandler(event:**
MouseEvent):void{
this.controller.countUp();
}
private function model_changeHandler(event:**Event):void{
this.textField.text = this.model.count
}
}
}
/*
  * App.as
  *
  * MVC screen click counter.
  */
package{
import mvc.Model;
import mvc. View;
import mvc.Controller;
public class App{
private var model:Model = new Model();
private var controller:Controller = new
Controller(this.model);
private var view:View = new View(model, controller);
public function App(){
this.addChild(this.view);
}
}
}

Now imagine a Model with more properties.
And tons of different Views of them that data.
Some of which provide a UI linked to Controller methods that manipulate
it.

_ross


__**_
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.**comFlashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/**mailman/listinfo/flashcodershttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders



__**_
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.**comFlashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/**mailman/listinfo/flashcodershttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Fwd: MVC

2012-02-16 Thread Paul Andrews

On 16/02/2012 11:11, Paul Andrews wrote:

On 16/02/2012 10:54, tom rhodes wrote:

traditional vanilla MVC tends to use composition like the example given,
check out robotlegs if you don't like it :) then you inject dependencies
instead of passing them around and everything gets a bit more loosely
coupled...


It's not a question of not liking it - your example is perfect for a 
coded-only solution, slightly less practical when working in a 
mixed-mode with the Flash IDE being involved in view instantiation.


I should say Tom's example..





On 16 February 2012 11:46, Paul Andrewsp...@ipauland.com  wrote:


Excellent job.

I have one small point, on a practical level.

For the views, in particular, I don't usually pass arguments to the
constructor. It's not such a big deal for code-only examples, but in my
flash world I mix my components between stuff created dynamically and
things created in the IDE - sometimes I build components as 
assemblies on

the stage using the IDE. The point is that passing arguments to the
constructor then becomes an issue for a view.

Might I suggest an init() function to pass in Model and Controller?

Paul




On 16/02/2012 07:59, Ross Sclafani wrote:

From: Ross 
Sclafaniross.sclafani@gmail.**comross.sclaf...@gmail.com

Date: February 16, 2012 2:39:34 AM EST
To: Corc...@chello.nl
Cc: Flash Coders 
Listflashcoders@chattyfig.**figleaf.comflashcoders@chattyfig.figleaf.com,

flashcoder...@googlegroups.com
Subject: Re: MVC

feel free to hit me up any time ill try to have time to respong

none the less, this should get you started:

/*
  * Model.as
  *
  * mvc.Model;
  */
package mvc {
import flash.events.EventDispatcher;
import flash.events.Event;
class Model extends EventDispatcher{
private var _count:int = 0;
public function get count():int{
return _count;
}
public function set count(value:int):void{
this._count= value;
update();
}
public function Model(){
super()
}
private function update():void{
this.dispatchEvent(new Event(Event.CHANGE));
}
}
}


/*
  * Controller.as
  *
  * mvc.Controller;
  */
package mvc {
public  class Controller {
private var model:Model;
public function Controller(model:Model){
super()
this.model = model;
}
public function countUp():void{
this.model.count++;
}
}
}

/*
  * View.as
  *
  * mvc.View;
  */
package mvc {
import flash.text.TextField;
import flash.events.Event;
import flash.display.Sprite;
public  class View extends Sprite(){
private var model:Model;
private var controller Controller;
private var textField:TextField = new TextField();
public function View(model:Model, 
controller:Controller){

model.addEventListener(Event.**CHANGE,
this.model_changeHandler);
super()
this.model = model;
this.controller = controller;
this.addChild(this.textField);

this.stage.addEventListener(**MouseEvent.CLICK,

this.stage_clickHandler)

}
private function stage_clickHandler(event:**
MouseEvent):void{
this.controller.countUp();
}
private function 
model_changeHandler(event:**Event):void{

this.textField.text = this.model.count
}
}
}
/*
  * App.as
  *
  * MVC screen click counter.
  */
package{
import mvc.Model;
import mvc. View;
import mvc.Controller;
public class App{
private var model:Model = new Model();
private var controller:Controller = new
Controller(this.model);
private var view:View = new View(model, controller);
public function App(){
this.addChild(this.view);
}
}
}

Now imagine a Model with more properties.
And tons of different Views of them that data.
Some of which provide a UI linked to Controller methods that 
manipulate

it.

_ross


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


Re: [Flashcoders] Fwd: MVC

2012-02-16 Thread Paul Andrews

On 16/02/2012 12:04, tom rhodes wrote:

um, Ross gave it i think dude.

Yes, I posted a correction..


i didn't give any code examples :)

maybe you missed the smiley after i said if you don't like it, perhaps
shoudl have been a ;). what problems do you have using assets mad ein the
IDE with mvc?
Ross' example passed the model and controller via the constructor. If 
you build a view using the IDE and leave things sitting inside a MC or 
the stage, you won't be calling the constructor, the IDE will write code 
to instantiate those components for you, so passing the arguments can be 
a problem.


There's also a school of thought that initialisation is best done in a 
separate function separately to the constructor, so that an instance can 
be re-initialised multiple times. That's more about OO than MVC.


Ross' example is superb. My small point is made for anyone coming new to 
OO programing and trying to marry the two worlds of the timeline/code 
development with MVC.


Ross' example for the view would be like this (allowing the IDE to 
instantiate and the user to hook up the model and controller):


public function View(model:Model=null, 
controller:Controller=null){
super();
if ( model != null){
init(model, controller);
}
}

public function init(model:Model, controller:Controller){
model.addEventListener(Event.CHANGE, 
this.model_changeHandler);
this.model = model;
this.controller = controller;
this.addChild(this.textField);
this.stage.addEventListener(MouseEvent.CLICK, 
this.stage_clickHandler)
}

I definitely agree that Ross' example is the most succinct MVC example I've 
ever seen.

Top job.




On 16 February 2012 12:21, Paul Andrewsp...@ipauland.com  wrote:


On 16/02/2012 11:11, Paul Andrews wrote:


On 16/02/2012 10:54, tom rhodes wrote:


traditional vanilla MVC tends to use composition like the example given,
check out robotlegs if you don't like it :) then you inject dependencies
instead of passing them around and everything gets a bit more loosely
coupled...


It's not a question of not liking it - your example is perfect for a
coded-only solution, slightly less practical when working in a mixed-mode
with the Flash IDE being involved in view instantiation.


I should say Tom's example..




On 16 February 2012 11:46, Paul Andrewsp...@ipauland.com   wrote:

  Excellent job.

I have one small point, on a practical level.

For the views, in particular, I don't usually pass arguments to the
constructor. It's not such a big deal for code-only examples, but in my
flash world I mix my components between stuff created dynamically and
things created in the IDE - sometimes I build components as assemblies
on
the stage using the IDE. The point is that passing arguments to the
constructor then becomes an issue for a view.

Might I suggest an init() function to pass in Model and Controller?

Paul




On 16/02/2012 07:59, Ross Sclafani wrote:

  From: Ross Sclafaniross.sclafani@gmail.com

ross.sclaf...@gmail.com
Date: February 16, 2012 2:39:34 AM EST
To: Corc...@chello.nl
Cc: Flash Coders Listflashcoders@chattyfig.**f**igleaf.comhttp://figleaf.com
flashcoders@**chattyfig.figleaf.comflashcoders@chattyfig.figleaf.com

,

flashcoder...@googlegroups.com
Subject: Re: MVC

feel free to hit me up any time ill try to have time to respong

none the less, this should get you started:

/*
  * Model.as
  *
  * mvc.Model;
  */
package mvc {
import flash.events.EventDispatcher;
import flash.events.Event;
class Model extends EventDispatcher{
private var _count:int = 0;
public function get count():int{
return _count;
}
public function set count(value:int):void{
this._count= value;
update();
}
public function Model(){
super()
}
private function update():void{
this.dispatchEvent(new Event(Event.CHANGE));
}
}
}


/*
  * Controller.as
  *
  * mvc.Controller;
  */
package mvc {
public  class Controller {
private var model:Model;
public function Controller(model:Model){
super()
this.model = model;
}
public function countUp():void{
this.model.count++;
}
}
}

/*
  * View.as
  *
  * mvc.View;
  */
package mvc {
import flash.text.TextField;
import flash.events.Event;
import flash.display.Sprite;
public  class View extends Sprite(){
private var

Re: [Flashcoders] Large Images with Alpha Channel

2012-02-14 Thread Paul Andrews

On 11/02/2012 05:43, Ben Sand wrote:

I'm working on a game with some large images (up to 4k x 4k)
I might look at paging images that size - I guess they're backgrounds of 
some sort?


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


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


Re: [Flashcoders] Large Images with Alpha Channel

2012-02-14 Thread Paul Andrews

On 14/02/2012 22:01, Ben Sand wrote:

On 14 February 2012 21:17, Paul Andrewsp...@ipauland.com  wrote:


On 11/02/2012 05:43, Ben Sand wrote:


I'm working on a game with some large images (up to 4k x 4k)


I might look at paging images that size - I guess they're backgrounds of
some sort?


Yes, backgrounds that will be panned and zoomed

What do you mean by paging them? breaking them into pieces? we are planning
on doing that so we can hide the portions that are off the stage and
improve performance.'
Instead of handling one big image, you can handle them in sections, so 
you only manipulate what can be seen - you could divide the  images 
into  strips, or squares - you only display what can be seen and you 
only fetch what is about to be seen.





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


what do you mean by MC?

MovieClip (or perhaps a Sprite)

will this allow for anti-aliased edges (ie. an alpha gradient)? If the
images are moving relative to one another, will there be much of a
performance overhead, or does the resulting masked image get processed just
once, rather than on every draw.
You can cache the clips as bitmaps. I think you need to do some 
experiments and google some techniques for dealing with large images and 
flash bitmap caching.







Paul

__**_
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.**comFlashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/**mailman/listinfo/flashcodershttp://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] PDF files in Flash

2012-02-12 Thread Paul Andrews

On 12/02/2012 15:02, Dave Watts wrote:

Has anyone heard of or has done this before?

I have a client that wants a Flash app and one of the requirements is to be 
able to pull PDF's into the interface. There
are some 80 different PDFs and he use to have a app built in Director using the 
PDF Xtra from Integration. I loves the
application and wants to make in Flash now, but can't find any info on the web 
about PDF's inside of Flash.

Any ideas or suggestions?

I don't remember exactly how this is done, but I know it's doable -
the LiveCycle Workspace is a Flex application that does exactly this.
It may open an HTML page to do it, though, I'm not sure.


Sounds like some javascript plus an iframe, perhaps.


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

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
___
Flashcoders mailing list
Flashcoders@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] Stability of flash debug plugin

2012-02-10 Thread Paul Andrews

Thanks for the tips. FF10 does seem better!

On 07/02/2012 17:55, Dennis Ernst wrote:
It's been pretty bad.  FF 10 seems to have improved the situation.   
To debug you have to think in short spurts or disable/lengthen the 
timeout on the plugin-container.   See 
https://developer.mozilla.org/en/Plugins/Out_of_process_plugins/The_plugin_hang_detector


Dennis


I'm running the flash debug player - 11.1.102.55, usually on FF.

It seems particularly prone to crashing when it comes across an error.

It often dies whilst remote debugging. Anyone else see this?


___
Flashcoders mailing list
Flashcoders@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] Updating to 10.3 or 11 External player in cs5.5?

2012-02-08 Thread Paul Andrews

On 08/02/2012 18:38, Steven Hargrove wrote:

Hi all,

I've configured my cs5.5 IDE to compile to FP 10.3  11. The problem is,
when I test movie and run my SWF in the External test player - its still
using 10.2. It compiles the SWF to the proper version, but it just makes it
more difficult to test.

Is there any way to fix this?

Have you installed the FP11 debug player?

If not, download and install it!



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



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


Re: [Flashcoders] Updating to 10.3 or 11 External player in cs5.5?

2012-02-08 Thread Paul Andrews

On 08/02/2012 22:44, Peter Ginneberge wrote:

Cos then you're not really debugging.
In order to get trace output you'd have to start a Remote Debug Session.

So instead of just doing CTRL+Enter you'd have to:

- Publish (ALT+SHIFT+F12)
- start Remote Debug Session (no shortcut)
- switch to browser and hit F5

It's certainly doable, but a real PITA if you're doing extensive 
testing/debugging.


It's not so bad. A lot of my stuff won't work any other way.



Might be easier switching to Flash Builder..

I just tested hooking up FlashBuilder to an fla and can debug in FP 11 :)

In FB:
   File  New Flash Professional Project.
   Point to the target Flash .fla file

In the Flash Builder preferences, under FlashBuilder - Debug, specify 
the path to the Standalone Debug player to be used for debugging.
In my case that is: C:\Program Files (x86)\Adobe\Adobe Flash Builder 
4.5\player\win\11.1\FlashPlayerDebugger.exe


I also had to add the playerglobal.swc to to project's classpath.
Once that's done, you're all set.. hit CTRL+SHIFT+ENTER and off you go.

Same fla as previous post now has this output (in Flash IDE):

Attempting to launch and connect to Player using URL 
C:\Users\Peter\Desktop\fp-test.swf

[SWF] C:\Users\Peter\Desktop\fp-test.swf - 2247 bytes after decompression
WIN 11,1,102,55

regards,
Peter

- Original Message - From: Chris Foster 
cfos...@catalystinteractive.com.au

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 08, 2012 10:36 PM
Subject: RE: [Flashcoders] Updating to 10.3 or 11 External player in 
cs5.5?




Maybe I'm missing something here - what is stopping you from keeping
your SWF open in a browser window (with the debug Player of your choice)
and simply hitting F5 after you've republished?

C:




___
Flashcoders mailing list
Flashcoders@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] Stability of flash debug plugin

2012-02-07 Thread Paul Andrews

I'm running the flash debug player - 11.1.102.55, usually on FF.

It seems particularly prone to crashing when it comes across an error.

It often dies whilst remote debugging. Anyone else see this?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] nextFrame doesn't work

2011-11-14 Thread Paul Andrews

On 14/11/2011 09:19, Karl DeSaulniers wrote:

Any luck with children?


Well currently I'm restructuring the game to reduce the nesting and that 
solves the problem. There are twelve drag and drop targets and I've done 
two of them and for those, problem solved.


I'm putting it down to being one of those things.



Try this code on your container MC. The first level (not the three 
deep). It may help you see the target it and possibly control it.


for (var i:uint = 0; i  target_mc.numChildren; i++){
trace ('\t|\t ' +i+'.\t name:' + target_mc.getChildAt(i).name + 
'\t type:' + typeof (target_mc.getChildAt(i))+ '\t' + 
target_mc.getChildAt(i));

}

grabbed it from here: 
http://www.matthijskamstra.nl/blog/index.php/2008/04/30/as2-to-as3-get-all-objects-in-a-movieclip/

Or is this something you've tried already?
Thanks for the suggestion Karl. The mc contained components on seperate 
frames - the code above would let me access all children, but only of 
the current frame. My problem was an inability to change frame.


Paul


HTH,

Best,
Karl


On Nov 14, 2011, at 3:08 AM, Paul Andrews wrote:


On 14/11/2011 09:00, Karl DeSaulniers wrote:

Hi Paul,
Can you tell it instead of nextFrame to advance currentFrame+1?

Yes, this was the original way of doing it.

I have used currentFrame+1, specific frame number, frame label, 
inside enterframe event, outside enterframe event.


The first drag and drop in the app and the code works.
The second drag and drop and the frame won't advance. Apart from the 
frame not advancing the traces are exactly the same. The MC is nested 
three deep.


I am currently changing this stuff to reduce the nesting.


Paul



IE:
My AS3 is very rusty, so I may be corrected..

targetMC.addEventListener(Event.ENTER_FRAME, frameNumber); // or 
Event.DRAG ?? (Guessing on that one)

function frameNumber(evt:Event):void {
   targetMC.gotoAndStop(this.currentFrame+1); // or gotoAndPlay(
}

Or, maybe throw in a targetMC.stop(); before calling 
targetMC.nextFrame(); as an alternate option.
Might create a pseudo reset that will allow the nextFrame() to 
function in the whole dynamics of your dilemma.


JAT

HTH,
Karl

On Nov 13, 2011, at 9:15 PM, Paul Andrews wrote:

Well, of course nextFrame works, but only the first time around in 
an app I've been asked to look at (not my app).


In this AS3 app targetting FP9, we have a bunch of nested 
movieclips. Interaction with the app involves dragging and dropping 
a movieclip to the right target then paging through a number of 
frames, one at a time,  in a nested movieclip using gotoAndStop().


Essentially it's a quiz kind of thing - drag the movieclip over the 
correct target selects the correct movieclip to display and then a 
button is used to page through the frames of the chosen movieclip.


It works beautifully for the first choice. After the next drag and 
drop, the chosen movieclip is left showing frame 1. Perfect. Click 
on the button, advance to frame 2, that's all that's required, but 
it won't move to frame 2.


I have investigated targeting the wrong MC in some way and using 
enterframe events to move the movieclip along, but it won't budge. 
totalFrames for the movieclip is greater than 1. There are no 
errors. Code works fine until the second drag and drop. As far as I 
can tell I'm just trying to tell a movieclip that has two frames to 
move to frame 2. Traces tell me it's on frame 1 and following a 
call to gotoAndStop(2) it reports being in frame 1, but never 
traces being in Frame 2.


It sounds absolutely crazy, I know. I can't share the code, nor 
make an example.


Any thoughts before I change the way this thing has been written to 
simplify what it's doing? changing the target to FP10 made no 
difference.

___
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


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] Tween

2011-11-07 Thread Paul Andrews
I'm just thinking about the best way to do this (OK, the laziest way to 
do this).


I have a MC at point A and want to tween it to point B. OK, no problem. 
But really, I don't want my MC to move in a straight line, I want it to 
oscillate - I guess as a damped (attenuated at both ends) sine curve 
along the path between A and B.


Before I start hurting my brain, any ready made solutions out there?

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


Re: [Flashcoders] animation memory leak ... please help

2011-10-18 Thread Paul Andrews

On 18/10/2011 21:46, Chris Foster wrote:

If you're already manually removing event listeners and deleting created 
objects, and you really wanna nail this and don't mind spending a few hours 
learning something new then I totally recommend the Temple Library for 
ActionScript 3 by MediaMonks


The OP is using AS2..



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

Extend all your MovieClips from 'CoreMovieClip', utilise the 'destruct' method, 
and view/test the results in the 'Memory' class.

It's saved my bacon, hope it's useful to you too.

C:

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of [p e r c e p t 
i c o n]
Sent: Wednesday, 19 October 2011 7:31 AM
To: Flash Coders List
Subject: Re: [Flashcoders] animation memory leak ... please help

yes, i delete it and mark it null..

thx all

On Tue, Oct 18, 2011 at 1:13 PM, Ross Sclafaniross.sclaf...@gmail.comwrote:


Are you disposing of the image after it is offscreen? Have you run the
profiler to see what's happening?

Ross P. Sclafani
Design | Technology | Creative
347.204.5714
http://ross.sclafani.net
http://www.twitter.com/rosssclafani

On Oct 18, 2011, at 4:00 PM, Adrian Zajączajac.adr...@gmail.com  wrote:


I think I had this problem once...
How many of images do you have? Maybe it will be better to make the same

number of movie clips, and download every jpg only once?


Adrian

W dniu 2011-10-18 20:39, [p e r c e p t i c o n] pisze:

Hi All,

I have an excrutiating memory leak.  Here's what i'm doing.

first some specs:

AS2, FP10+, Linux OS, ff browser

I load a jpg into one of two movie clips...once a specified amount of

time

has expired
i load the next image (download it using moviclip loader) and animate

the

visible movieclip off stage (slide it to the left or right) and at the

same

time i animate it
i also fade it (mc._alpha -= mc._alpha-someAmount).
i swap their depths and repeat this process.

what i'd like to know is why after so many hours (8-24) flash starts

slowing

down and ultimately throws up the abort script dialog when i'm not

really

doing anything all that intensive..
can someone explain how flash handles animations internally for

example...it

creates a copy of the image in memory..moves it then blits it the

screen.

can anyone give me some pointers as to where to begin looking for this

leak

or if you think this is flash player bug

all advise helpful

thanks

percy





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

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






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


Re: [Flashcoders] E4X XML manipulation

2011-10-16 Thread Paul Andrews

On 16/10/2011 10:06, Kenneth Kawamoto wrote:

Here's one way:

var xml:XML = my_xml
row id=a parent=a /
row id=b parent=a /
row id=c parent=a /

row id=d parent=d /
row id=e parent=d /
row id=f parent=d /
/my_xml;

var ids:Array = [a, d];
for each (var s:String in ids){
xml.row.(@id == s).children = xml.row.(@parent == s  @id != s);
while(xml.row.(@parent == s  @id != s).length()) delete 
xml.row.(@parent == s  @id != s)[0];

}

trace(xml);


Thanks Kenneth. That works very nicely. I appreciate you taking the time 
to do my little puzzle!


I made one change:

for each (var s:String in xml.row.(@id == @parent).@id){
xml.row.(@id == s).children = xml.row.(@parent == s  @id != s);
while(xml.row.(@parent == s  @id != s).length()) delete 
xml.row.(@parent == s  @id != s)[0];

}

Thank you!

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


Re: [Flashcoders] E4X XML manipulation

2011-10-16 Thread Paul Andrews

On 16/10/2011 13:01, Paul Andrews wrote:

On 16/10/2011 10:06, Kenneth Kawamoto wrote:

Here's one way:

var xml:XML = my_xml
row id=a parent=a /
row id=b parent=a /
row id=c parent=a /

row id=d parent=d /
row id=e parent=d /
row id=f parent=d /
/my_xml;

var ids:Array = [a, d];
for each (var s:String in ids){
xml.row.(@id == s).children = xml.row.(@parent == s  @id != s);
while(xml.row.(@parent == s  @id != s).length()) delete 
xml.row.(@parent == s  @id != s)[0];

}

trace(xml);


Thanks Kenneth. That works very nicely. I appreciate you taking the 
time to do my little puzzle!


I made one change:

for each (var s:String in xml.row.(@id == @parent).@id){
xml.row.(@id == s).children = xml.row.(@parent == s  @id != s);
while(xml.row.(@parent == s  @id != s).length()) delete 
xml.row.(@parent == s  @id != s)[0];

}

Thank you!


Ah, I went one stage further, which breaks the necessity for the parent 
to have @id == @parent:


var xml:XML = my_xml
row id=a parent=a /
row id=b parent=a /
row id=c parent=a /

row id=d parent=d /
row id=e parent=d /
row id=f parent=d /

row id=g parent=e /
row id=h parent=e /
row id=i parent=h /
/my_xml;

Scratching my head again..  !




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] E4X XML manipulation

2011-10-16 Thread Paul Andrews

On 16/10/2011 14:16, Kenneth Kawamoto wrote:

It's getting rather interesting :D

var xml:XML = my_xml
row id=a parent=a /
row id=b parent=a /
row id=c parent=a /

row id=d parent=d /
row id=e parent=d /
row id=f parent=d /

row id=g parent=e /
row id=h parent=e /
row id=i parent=h /
/my_xml;

for each (var row:XML in xml.row){
if(row.@id != row.@parent){
xml..row.(@id == row.@parent).appendChild(row.copy());
delete xml.row.(@id == row.@id)[0];
}
}

trace(xml);


Excellent Kenneth - thank you.

I managed to construct the tree, but couldn't remove the old rows. Good job.

I think that does it - no more complications!

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


Re: [Flashcoders] E4X XML manipulation

2011-10-14 Thread Paul Andrews

On 12/10/2011 21:49, Kenneth Kawamoto wrote:

Not sure if this is the best way but you can do:

var xml:XML = my_xml
row id=a /
row id=b /
row id=c /
/my_xml;

xml.row.(@id == a).children = xml.row.(@id != a);
xml.setChildren(xml.row.(@id == a));

trace(xml);

// trace
my_xml
row id=a
row id=b/
row id=c/
/row
/my_xml

Kenneth Kawamoto
http://www.materiaprima.co.uk/


Thanks - that works well and I hadn't considered using setChildren. It's 
a great solution that shows my simplification was too simple!


If I have

my_xml
row id=a parent=a /
row id=b parent=a /
row id=c parent=a /

row id=d parent=d /
row id=e parent=d /
row id=f parent=d /
/my_xml

but want

my_xml
row id=a parent=a
row id=b parent=a/
row id=c parent=a/
/row
row id=d parent=d
row id=e parent=d/
row id=f parent=d/
/row
/my_xml

then it's closer to the real-life scenario and a bit harder.

Thanks for the solution.

Paul







On 11/10/2011 14:53, Paul Andrews wrote:

What's the best way to turn

this:

myXMLNode =
my_xml
 row id=a /
 row id=b /
 row id=c /
/my_xml;

into:

my_xml
 row id=a
 row id=b /
 row id=c /
/row
/my_xml

Using some E4X?

It's not so much a case of adding b and c as children of a, but of
removing them so I don't end up with:

my_xml
 row id=a
 row id=b /
 row id=c /
/row
 row id=b /
 row id=c /
/my_xml

Paul




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


Re: [Flashcoders] E4X XML manipulation

2011-10-12 Thread Paul Andrews

On 11/10/2011 17:13, Glen Pike wrote:


Hi,

You would have to:

1 Create a new XML node,

myNewNode = my_xml/

2.  Select nodes from the existing XML where id != a

var nodes:XMLList = my_xml.child(row).attribute(id != a);

3.  Select nodes from existing XML where id = a

var parentNodes:XMLList = my_xml.child(row).attribute(id != 
a);


4.  Conditionally, Append result of 3 to your new node.

var parent:XML;
if(0 != parentNodes.length()) {
parent = myNewNode.appendChild(parentNodes[0]);
}

5.  Append result of 2 to your new node id=a

if(parent) {
for each(var node:XML in nodes) {
parent.appendChild(node);
}
}

This is untested, so please try and see how you get on.

There may be a neater way, but I found deleting nodes based on e4x 
results sometimes problematic...


Thanks Glenn. My example was really all about the problematic deleting 
bit! In real life I was manipulating some XML with 1500 nodes, 
incorrectly nested. I could copy the nodes into the correct place but 
not remove them from where they originally started from.


In the context of the example I started with:

myXMLNode =
my_xml
row id=a /
row id=b /
row id=c /
/my_xml;

ended up with:

my_xml
row id=a
row id=b /
row id=c /
/row
row id=b /
row id=c /
/my_xml

instead of :

my_xml
row id=a
row id=b /
row id=c /
/row
/my_xml

I couldn't figure an easy way to reference the tailing b and c rows 
that I had left behind in order to remove them from their parent.


What I really wanted to do was delete  row.(@id==b).

I should say that a better representation of what I wanted to do (just 
using e4X) is this:


Make

my_xml
row id=a parent=a /
row id=b parent=a /
row id=c parent=a /
/my_xml

into:

my_xml
row id=a parent=a
row id=b parent=a/
row id=c parent=a/
/row
/my_xml


as you say deletion was the problem.


Paul



Hope this helps.

Glen

On 11/10/2011 16:54, Paul Andrews wrote:

On 11/10/2011 16:33, Merrill, Jason wrote:

  row id=c /
/row

And

  row id=c /
/row


Are not valid XML.  Therefore, I'm not clear on what you want to do. :)

Hmm..

myXMLNode =
my_xml
row id=a /
row id=b /
row id=c /
/my_xml;

into:

my_xml
row id=a
row id=b /
row id=c /
/row
/my_xml

I didn't realise the space was there - not intended- too much going 
on at once!





  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul 
Andrews

Sent: Tuesday, October 11, 2011 9:53 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] E4X XML manipulation

What's the best way to turn

this:

myXMLNode =
my_xml
  row id=a /
  row id=b /
  row id=c /
/my_xml;

into:

my_xml
  row id=a
  row id=b /
  row id=c /
/row
/my_xml

Using some E4X?

It's not so much a case of adding b and c as children of a, but of 
removing them so I don't end up with:


my_xml
  row id=a
  row id=b /
  row id=c /
/row
  row id=b /
  row id=c /
/my_xml

Paul



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

--
This message w/attachments (message) is intended solely for the use 
of the intended recipient(s) and may contain information that is 
privileged, confidential or proprietary. If you are not an intended 
recipient, please notify the sender, and then please delete and 
destroy all copies and attachments, and be advised that any review 
or dissemination of, or the taking of any action in reliance on, the 
information contained in or attached to this message is prohibited.
Unless specifically indicated, this message is not an offer to sell 
or a solicitation of any investment products or other financial 
product or service, an official confirmation of any transaction, or 
an official statement of Sender. Subject to applicable law, Sender 
may intercept, monitor, review and retain e-communications (EC) 
traveling through its networks/systems and may produce any such EC 
to regulators, law enforcement, in litigation and as required by law.
The laws of the country of each sender/recipient may impact the 
handling of EC, and EC may be archived, supervised and produced in 
countries other than the country in which you are located. This 
message cannot be guaranteed to be secure or free of errors or viruses.


References to Sender are references to any subsidiary of Bank of 
America Corporation. Securities and Insurance Products: * Are Not 
FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a 
Bank Deposit * Are Not a Condition to Any Banking Service or 
Activity * Are Not Insured by Any Federal Government Agency. 
Attachments that are part of this EC may have additional

[Flashcoders] E4X XML manipulation

2011-10-11 Thread Paul Andrews

What's the best way to turn

this:

myXMLNode =
my_xml
 row id=a /
 row id=b /
 row id=c /
/my_xml;

into:

my_xml
 row id=a
 row id=b /
 row id=c /
/row
/my_xml

Using some E4X?

It's not so much a case of adding b and c as children of a, but of 
removing them so I don't end up with:


my_xml
 row id=a
 row id=b /
 row id=c /
/row
 row id=b /
 row id=c /
/my_xml

Paul



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


Re: [Flashcoders] E4X XML manipulation

2011-10-11 Thread Paul Andrews

On 11/10/2011 16:33, Merrill, Jason wrote:

  row id=c /
/row

And

  row id=c /
/row


Are not valid XML.  Therefore, I'm not clear on what you want to do. :)

Hmm..

myXMLNode =
my_xml
row id=a /
row id=b /
row id=c /
/my_xml;

into:

my_xml
row id=a
row id=b /
row id=c /
/row
/my_xml

I didn't realise the space was there - not intended- too much going on at once!




  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: Tuesday, October 11, 2011 9:53 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] E4X XML manipulation

What's the best way to turn

this:

myXMLNode =
my_xml
  row id=a /
  row id=b /
  row id=c /
/my_xml;

into:

my_xml
  row id=a
  row id=b /
  row id=c /
/row
/my_xml

Using some E4X?

It's not so much a case of adding b and c as children of a, but of removing 
them so I don't end up with:

my_xml
  row id=a
  row id=b /
  row id=c /
/row
  row id=b /
  row id=c /
/my_xml

Paul



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

--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited.
Unless specifically indicated, this message is not an offer to sell or a 
solicitation of any investment products or other financial product or service, 
an official confirmation of any transaction, or an official statement of 
Sender. Subject to applicable law, Sender may intercept, monitor, review and 
retain e-communications (EC) traveling through its networks/systems and may 
produce any such EC to regulators, law enforcement, in litigation and as 
required by law.
The laws of the country of each sender/recipient may impact the handling of EC, 
and EC may be archived, supervised and produced in countries other than the 
country in which you are located. This message cannot be guaranteed to be 
secure or free of errors or viruses.

References to Sender are references to any subsidiary of Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank 
Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking 
Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that 
are part of this EC may have additional important disclosures and disclaimers, which you 
should read. This message is subject to terms available at the following link:
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you 
consent to the foregoing.
___
Flashcoders mailing list
Flashcoders@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] E4X XML manipulation

2011-10-11 Thread Paul Andrews

On 11/10/2011 17:21, Merrill, Jason wrote:

This, what you are saying you want to turn it into:

row id=c /
/row

That actually is valid, sorry, but you just want to have any empty node in 
there?  Check out this thread:

http://www.kirupa.com/forum/showthread.php?318159-AS3-XML-How-to-add-element-nodes


Jason it's an example, not a real scenario. Thanks for the link. Adding 
nodes is easy, as is copying them, but removing them once they've been 
copied has defeated me.


Paul



  Jason Merrill
  Instructional Technology Architect II
  Bank of America  Global Learning





___


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: Tuesday, October 11, 2011 11:54 AM
To: Flash Coders List
Subject: Re: [Flashcoders] E4X XML manipulation

On 11/10/2011 16:33, Merrill, Jason wrote:

   row id=c /
/row

And

   row id=c /
/row


Are not valid XML.  Therefore, I'm not clear on what you want to do. :)

Hmm..

myXMLNode =
my_xml
row id=a /
row id=b /
row id=c /
/my_xml;

into:

my_xml
row id=a
row id=b /
row id=c /
/row
/my_xml

I didn't realise the space was there - not intended- too much going on at once!



   Jason Merrill
   Instructional Technology Architect II
   Bank of America  Global Learning





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: Tuesday, October 11, 2011 9:53 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] E4X XML manipulation

What's the best way to turn

this:

myXMLNode =
my_xml
   row id=a /
   row id=b /
   row id=c /
/my_xml;

into:

my_xml
   row id=a
   row id=b /
   row id=c /
/row
/my_xml

Using some E4X?

It's not so much a case of adding b and c as children of a, but of removing 
them so I don't end up with:

my_xml
   row id=a
   row id=b /
   row id=c /
/row
   row id=b /
   row id=c /
/my_xml

Paul



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

--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited.
Unless specifically indicated, this message is not an offer to sell or a 
solicitation of any investment products or other financial product or service, 
an official confirmation of any transaction, or an official statement of 
Sender. Subject to applicable law, Sender may intercept, monitor, review and 
retain e-communications (EC) traveling through its networks/systems and may 
produce any such EC to regulators, law enforcement, in litigation and as 
required by law.
The laws of the country of each sender/recipient may impact the handling of EC, 
and EC may be archived, supervised and produced in countries other than the 
country in which you are located. This message cannot be guaranteed to be 
secure or free of errors or viruses.

References to Sender are references to any subsidiary of Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank 
Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking 
Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that 
are part of this EC may have additional important disclosures and disclaimers, which you 
should read. This message is subject to terms available at the following link:
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you 
consent to the foregoing.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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

--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited

  1   2   3   4   5   6   7   8   9   10   >