RE: [Flashcoders] Using Tab key as a game control

2009-05-23 Thread Paul Steven
Thanks Kerry - that is a very helpful reply.

I do have quite a few other keyboard shortcuts and mouse controls but I
understand the ease of using the Tab key to toggle between buttons. I
recently completed a game for a large organisation and the tab functionality
was a must for the accessibility requirements. I think it is probably safer
to remove the in game tab and shift tab controls or replace with alternative
key shortcuts.

Out of interest, do you think the user should be able to tab between each
square on the crossword?

A-Z: Enter the typed letter into the square 
Space bar: Change between Across and Down 
Del: Clear the selected square 
Backspace: Clear the selected square (or previous if square is empty) 
Arrow keys: Select the neighbouring square 
Tab: Select the next word 
Shift+Tab: Select the previous word 
Home: Select the 1st square in the selected word 
End: Select the last square in the selected word

Click on an unselected square: Select the square clicked on
Click on the selected square: Change between Across and Down
Click on a clue: Select the corresponding word

Thanks

Paul



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kerry
Thompson
Sent: 22 May 2009 16:47
To: 'Flash Coders List'
Subject: RE: [Flashcoders] Using Tab key as a game control

Paul Steven wrote:

 Is it a bad idea to use the Tab key as a game control. Basically in a
 crossword game I am creating, I was going to use TAB to move to the next
 word and SHIFT TAB to move to the previous word. I notice however that
 when I press the TAB key all the buttons on my game screen are appearing
 with yellow boxes around them. I assume this is some kind of accessibility
 thing?

Yes, it is an accessibility issue. People with compromised muscle control
use the tab key to navigate to buttons, URLs, etc. 

I've built accessible programs a lot in the past, and I've disabled the
auto-tab feature. The programs I've written have been tailored to work with
specific hardware tools like switches and programmable flat-panel keyboard
substitutes.

If you're not building alternate accessibility features, though, you might
be in a bind. Tab is the way most people navigate crosswords, but I've done
crossword games where you can click on the clue or in a blank space in the
puzzle.

On the other hand, you might be able to get away with disabling Tab. There
are other Web tools, like Shockwave, that don't implement Tab for
accessibility. However, I'm not an expert on current accessibility
requirements. I would recommend you find out more about what the law (and
your client) require. Others on this list, and on Flash Tiger, can probably
help you with that.

Cordially,

Kerry Thompson

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

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


Re: [Flashcoders] inserting object into swf

2009-05-23 Thread Hans Wichman
Hi,

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

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

hth
JC



On Sat, May 23, 2009 at 12:00 AM, Andrew Sinning and...@learningware.comwrote:

 A few days ago I made a post with the subject unexpected result with
 linked classes in embedded swf.  The lesson I learned from this is that an
 object is only imported into a movie player once, regardless of how many
 swfs it occurs in.

 Well, I'm dealing with a situation where I forgot to back up my source code
 following the most recent official release of a product.  I made about a
 month of changes as we were adding a bunch of features before I realized
 this.

 Anyway, we haven't had an official release in a while, but we've found a
 rather critical problem that is affecting a customer.

 I just need to add one line to one object to make the problem go away.

 So, is there a way to insert the corrected object into the last official
 release of the compiled swf?
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] inserting object into swf

2009-05-23 Thread Andrew Sinning

That's exactly what I was looking for Hans.  Thanks so much.

I didn't mention that this is AS2, but it is and it looks like you're 
assuming that, too. 

Will using loadMovie without specifying a target cause myOldSwf.swf to 
become _root, or will it become a child of _root?


Will myOldSwf.swf have access to flashVars?

Of course, I should figure this out for myself, but if you happen to 
know .


Hans Wichman wrote:

Hi,

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

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

hth
JC



On Sat, May 23, 2009 at 12:00 AM, Andrew Sinning and...@learningware.comwrote:

  

A few days ago I made a post with the subject unexpected result with
linked classes in embedded swf.  The lesson I learned from this is that an
object is only imported into a movie player once, regardless of how many
swfs it occurs in.

Well, I'm dealing with a situation where I forgot to back up my source code
following the most recent official release of a product.  I made about a
month of changes as we were adding a bunch of features before I realized
this.

Anyway, we haven't had an official release in a while, but we've found a
rather critical problem that is affecting a customer.

I just need to add one line to one object to make the problem go away.

So, is there a way to insert the corrected object into the last official
release of the compiled swf?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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

  


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


Re: [Flashcoders] inserting object into swf

2009-05-23 Thread Hans Wichman
Hi Andrew,

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

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

regards
JC

On Sat, May 23, 2009 at 4:35 PM, Andrew Sinning and...@learningware.comwrote:

 That's exactly what I was looking for Hans.  Thanks so much.

 I didn't mention that this is AS2, but it is and it looks like you're
 assuming that, too.
 Will using loadMovie without specifying a target cause myOldSwf.swf to
 become _root, or will it become a child of _root?

 Will myOldSwf.swf have access to flashVars?

 Of course, I should figure this out for myself, but if you happen to know
 .


 Hans Wichman wrote:

 Hi,

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

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

 hth
 JC



 On Sat, May 23, 2009 at 12:00 AM, Andrew Sinning and...@learningware.com
 wrote:



 A few days ago I made a post with the subject unexpected result with
 linked classes in embedded swf.  The lesson I learned from this is that
 an
 object is only imported into a movie player once, regardless of how many
 swfs it occurs in.

 Well, I'm dealing with a situation where I forgot to back up my source
 code
 following the most recent official release of a product.  I made about a
 month of changes as we were adding a bunch of features before I realized
 this.

 Anyway, we haven't had an official release in a while, but we've found a
 rather critical problem that is affecting a customer.

 I just need to add one line to one object to make the problem go away.

 So, is there a way to insert the corrected object into the last official
 release of the compiled swf?
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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




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

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


RE: [Flashcoders] Using Tab key as a game control

2009-05-23 Thread Kerry Thompson
Paul Steven wrote:

 Out of interest, do you think the user should be able to tab between each
 square on the crossword?

That's one way of doing it, and probably just fine. It's not the way I would
implement it--not that you're wrong, but here's what I have done, just to
throw out a few ideas.

I see that you recognize that you need to know whether you're in across or
down mode. My crosswords pretty much automatically decide that--you start,
by default, in across mode, with the cursor in the 1st square of 1 across.
Tab takes you to the first square of the next across. If you type in a
letter, the cursor automatically advances to the next square.

It helps if you do crosswords yourself, which I do (I'm not very good at
them, but I do them). I often have an idea for what a word should be, but
before I fill it in, I check the clues for the down words intersecting my
current across word. I'll often see a word I *know* is right, and fill
that out before going back to the across mode (my default mode, on paper or
on the computer).

So, I like your idea of using a key to change modes. I would use Clicking on
a cue to auto-select the mode, too, as well as you choice of selecting the
word.

Basically, as long as your interface is consistent and logical (yours looks
good), it's fine.  If you can do user testing, that will go a long ways
towards telling you how good your interface is. 

I would also have a pop-up help screen with all the options, or even have
them on-screen, depending on the real estate you have. You might, though
it's not mentioned in your interface summary.

 A-Z: Enter the typed letter into the square
 Space bar: Change between Across and Down
 Del: Clear the selected square
 Backspace: Clear the selected square (or previous if square is empty)
 Arrow keys: Select the neighbouring square
 Tab: Select the next word
 Shift+Tab: Select the previous word
 Home: Select the 1st square in the selected word
 End: Select the last square in the selected word
 
 Click on an unselected square: Select the square clicked on
 Click on the selected square: Change between Across and Down
 Click on a clue: Select the corresponding word

All in all, it looks good, Paul. You're on the right track.

Cordially,

Kerry Thompson

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


[Flashcoders] Papervision Help

2009-05-23 Thread Omar Fouad
Hi all,

I am working on a project where I need to create 6 circles (planes) with
different colors. the cirlces are placed one over the other and centered, so
when I move the mouse down those they rotate to show something like a
piramid. I could just use the native 3d in Flash but my boss needs each
circle to be clickable, have a shadow and be shaded (lighted).

I actually played around with papervision lately, using BasicView and some
kind of materials, but now I feel frustrated as I just can't figure out how
to do this work.

Any Ideas?

I also cannot find a decent papervision explanation on the net. What I am
looking for is a conceptual explanation about papervision not just how to
create some shapes and put them on the stage.


-- 
Omar M. Fouad -
www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: m...@omar-fouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] calling an event function with a parameter that is a number

2009-05-23 Thread Isaac Alves
Hello!
In my code there's a function that shows an image on the screen (or load the
image and show a progress bar) that is called by clicking on a thumbnail,
and uses a parameter [e.target.name] refering to the property name of the
thumbnail clicked, which is an integer. The thumbnails are placed inside the
cointaner_mc MovieClip.

container_mc.addEventListener(MouseEvent.CLICK, clickThumb);

function clickThumb(e:MouseEvent):void{
if (my_full_images[e.target.name] == undefined){
var full_url = my_images[e.target.nam...@full;

etc...

but I want to call this function by clicking on a button, which would need
to pass another type of parameter, in this case, a variable which refers to
the number of the image displayed on the screen plus one.

I tried this:

clickThumb(image_num + 1)

But it doesn't work, I get the following error:

1067: Implicit coercion of a value of type Number to an unrelated type
flash.events:MouseEvent.

How could I call the function clickThumb and make it use image_num + 1
instead of e.target.name ?

Could I dispatch the event (MouseEvent.CLICK, clickThumb), passing this
value  image_num + 1 ?

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


Re: [Flashcoders] calling an event function with a parameter that is a number

2009-05-23 Thread Manish Jethani
On Sun, May 24, 2009 at 2:00 AM, Isaac Alves isaacal...@gmail.com wrote:

 1067: Implicit coercion of a value of type Number to an unrelated type
 flash.events:MouseEvent.

 How could I call the function clickThumb and make it use image_num + 1
 instead of e.target.name ?

Do you have the value of image_num already? Why not change the
signature of the clickThumb function so it accepts the number instead
of the event object?

  private function clickThumb(image_num:Number):void
  {
...
  }

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


Re: [Flashcoders] calling an event function with a parameter that is a number

2009-05-23 Thread Juan Pablo Califano
You have a couple of options:

You could add an optional parameter to the function that handles the click,
like this:

function clickThumb(e:MouseEvent,index:int = 0):void{

}

Setting a default value for the index parameter allows the function to be
called without passing it. That's what will happen when a thumb is clicked.

When you want to call the function directly, you'd do:

clickThumb(null,image_num + 1);

In clickThumb, check whether the event object is null or not. If it's not,
do what you're currently doing. If it's null, use the index parameter as the
index into my_images.


Another thing you could do is a bit of refactoring.

Have the click handler only resolve the index and calling another function
to actually load the image.

function clickThumb(e:MouseEvent):void {
 loadImage(e.target.name);
}

function loadImage(index:int):void {
if (my_full_images[index] == undefined){
   var full_url = my_images[inde...@full;
   ... etc ...
}

Then, from your other button's handler, call loadImage(image_num + 1);


Cheers
Juan Pablo Califano

2009/5/23 Isaac Alves isaacal...@gmail.com

 Hello!
 In my code there's a function that shows an image on the screen (or load
 the
 image and show a progress bar) that is called by clicking on a thumbnail,
 and uses a parameter [e.target.name] refering to the property name of
 the
 thumbnail clicked, which is an integer. The thumbnails are placed inside
 the
 cointaner_mc MovieClip.

 container_mc.addEventListener(MouseEvent.CLICK, clickThumb);

 function clickThumb(e:MouseEvent):void{
 if (my_full_images[e.target.name] == undefined){
 var full_url = my_images[e.target.nam...@full;

 etc...

 but I want to call this function by clicking on a button, which would need
 to pass another type of parameter, in this case, a variable which refers to
 the number of the image displayed on the screen plus one.

 I tried this:

 clickThumb(image_num + 1)

 But it doesn't work, I get the following error:

 1067: Implicit coercion of a value of type Number to an unrelated type
 flash.events:MouseEvent.

 How could I call the function clickThumb and make it use image_num + 1
 instead of e.target.name ?

 Could I dispatch the event (MouseEvent.CLICK, clickThumb), passing this
 value  image_num + 1 ?

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

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


Re: [Flashcoders] calling an event function with a parameter that is a number

2009-05-23 Thread Steven Sacks

The latter is cleaner and better, IMO.

Write a function that your event handler calls.  Then, you can call it from 
elsewhere and from your button click handler.


function onThumbClick(event:MouseEvent):void
{
loadImage(event.target.name);
}
function loadImage(num:int):void
{
   // loadImage(num);
}

Juan Pablo Califano wrote:

You have a couple of options:

You could add an optional parameter to the function that handles the click,
like this:

function clickThumb(e:MouseEvent,index:int = 0):void{

}

Setting a default value for the index parameter allows the function to be
called without passing it. That's what will happen when a thumb is clicked.

When you want to call the function directly, you'd do:

clickThumb(null,image_num + 1);

In clickThumb, check whether the event object is null or not. If it's not,
do what you're currently doing. If it's null, use the index parameter as the
index into my_images.


Another thing you could do is a bit of refactoring.

Have the click handler only resolve the index and calling another function
to actually load the image.

function clickThumb(e:MouseEvent):void {
 loadImage(e.target.name);
}

function loadImage(index:int):void {
if (my_full_images[index] == undefined){
   var full_url = my_images[inde...@full;
   ... etc ...
}

Then, from your other button's handler, call loadImage(image_num + 1);


Cheers
Juan Pablo Califano

2009/5/23 Isaac Alves isaacal...@gmail.com


Hello!
In my code there's a function that shows an image on the screen (or load
the
image and show a progress bar) that is called by clicking on a thumbnail,
and uses a parameter [e.target.name] refering to the property name of
the
thumbnail clicked, which is an integer. The thumbnails are placed inside
the
cointaner_mc MovieClip.

container_mc.addEventListener(MouseEvent.CLICK, clickThumb);

function clickThumb(e:MouseEvent):void{
if (my_full_images[e.target.name] == undefined){
var full_url = my_images[e.target.nam...@full;

etc...

but I want to call this function by clicking on a button, which would need
to pass another type of parameter, in this case, a variable which refers to
the number of the image displayed on the screen plus one.

I tried this:

clickThumb(image_num + 1)

But it doesn't work, I get the following error:

1067: Implicit coercion of a value of type Number to an unrelated type
flash.events:MouseEvent.

How could I call the function clickThumb and make it use image_num + 1
instead of e.target.name ?

Could I dispatch the event (MouseEvent.CLICK, clickThumb), passing this
value  image_num + 1 ?

Thanks in advance !!
Isaac
___
Flashcoders mailing list
Flashcoders@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