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

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

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

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

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

[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

[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

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

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

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 { //