[Flashcoders] Dragging a window component object drags movieclips under it

2006-07-15 Thread Alberto Florentin

How can I avoid it?
I notice that having the title bars of two Window class objects overlapping
does not produce this problem. I drag the topmost window without dragging
the one immediately below it.

However a movieclip with the usual drag code (onMouseDown, onMouseMove if
hitTest startDrag etc) gets dragged along when I drag a Window object above
it.

Solution?  Any way I can test if a Window is being dragged, to disable the
other drag code?

TIA

Albert


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

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


Re: [Flashcoders] jigsaw puzzle piece algorithm

2006-07-15 Thread Hans Wichman

Hi,
great nice to hear, it's all starting to work now. With respect to the
moving, are you moving the pieces to round _x, _y values, not sure, but this
might have something to do with it. I remember building a panorama with
hotspots area's that had to move along with the panorama, and I had the same
problem, the area's slowly moved away from where they should be. I rounded
all the delta x's and y's and the problem went away.

With respect to the other problem, I think (but I haven't yet so sorry if
this isnt the way to go!) I wouldn't use a ref and neighbour ref search, but
actually define groups.
After moving a piece, it can match on four sides. The matches could be
groups themselves or single pieces. You could take the first match, and
either join the new piece to an already existing group, or start a new group
between the matching piece on the moved piece.
You could make it more complex, for example, when the moved piece matches on
both the left and right side, that you combine all those matches into one
group, however that isn't strictly necessary, since if you use only the
first match, you simply need to move it after the first grouping and it will
group again.
This still leaves a lot of questions to be answered though, but still the
principle would be to update groups.
I'm not sure which solution would be better, they both have something to say
for them i think.

ANYWAYZ: with respect to A*, it would be something like:

- build a childlist for all children not already in the list

in pseudo:
var piecesToFind = new Array();
var piecesToIterate = [masterPiece];

while (piecesToIterate.length  0) {
  var currentNode = piecesToIterate.shift();
  piecesToFind.push (currentNode);
  for each matchingPiece in currentNode {
   if (piecesToFind.contains(matchingPiece) {
   piecesToIterate.push (matchingPiece);
   }
 }
}

Does that make any sense? (i hope its right:))


greetz
Hans





On 7/13/06, Guntur N. Sarwohadi [EMAIL PROTECTED] wrote:


Hello Hans,

I would like to thank you in advanced for helping me this far.. I
currently
have the jigsaw drawing algorithm in hand, yay! It's looks nicer now :D..
and it does 'blend' when it sticks to other pieces tightly. One good thing
is that I use the bevel filter and I thought it wont looked blended since
you have that filter around, but somehow it did otherwise and looked
pretty
nice.. some 'fake' blending effect hehehe..

I've modified the group movement code and now it's moving corresponding to
the relation to the 'master' piece (piece the user move).. moving with
distance (not piece relation) was pretty buggy coz it (pieces in the
group)
displaces as the mouse slightly moves away from the master piece. But
currently, with the new implementation, it still displaces.. the
displacements occur only to the master piece and it seems like because it
moves a little faster than the others which make it slightly not sticking
with the rest of the group. Very minor bug but still annoying.

Broadcast / dispatching isn't the right term for what I did in code, btw..
coz in pseudo all i did was:

piece.onMouseMove = function() {
for(i = 0; i  piece.group.length; i++) {
   piece.group[i].updatePosition(this);
}
}

group is an array located in each piece mc.. and since it's an array of
pieces, then this piece has the 'updatePosition' methode as well.. sumthin
like

piece.updatePosition = function(ref) {
//get the relation to ref, whether it's in the north, south, west or east
of it
//match the _x and _y property by ref by relation
//search for other pieces connected to ref if this piece isn't related
directly to ref
}

Now, this is where my latest problem spawns in.. searching for pieces
connected to ref is pretty damn hard.. it reminds me with A* algorithm,
which i'm not familiar of.. currently i iterate the methode if a piece
can't
find a hierarchy connection to ref / master piece, and it comes that only
2
layer 'descendants' follow the master movement..
For example, in a 3 x 3 puzzle, if i move the center (piece_2_2), i would
get all pieces move together. But for, say, the top left piece
(piece_1_1),
would only bring piece_1_2, piece_1_3, piece_2_1, piece_3_1 and piece_2_2.
the rest would be left behind..

any idea for this problem?

thx
Guntur N. Sarwohadi

On 7/11/06, Hans Wichman [EMAIL PROTECTED] wrote:

 Hi,
 does it displace until you stop moving, or displace and screws it up
 completely?
 It sounds like either one of the updates you broadcast are not coming
 through, or the updates are based on the wrong offsets. I assume that if
 you
 move a group of 3, the 2 that should be moved automatically ARE
displaced
 by
 the same amount?
 Just a shot in the dark here, but when you broadcast to the group, do
you
 skip the source of the event?
 For example, normally in a group of 2, when you move one, you could
 either:
 1) move the one you moved and dispatch an event to the other
 2) create an event and dispatch to the group
 3) move the one you moved and dispatch an event 

RE: [Flashcoders] Flash SQL

2006-07-15 Thread neo binedell
Well you can change it right there in the browser by
calling methods on the movie object and setting variables.

It is important to keep anything like that on the server
side, as you can see with a lot of online flash games
with high incredible hiscores, etc.

I did this a couple of times to test security on sub-contractors
code for clients and it was quite embarrassing for them, not
to mention a potential security and PR disaster that can sink
a company if it is a non-trivial environment.

The best way is to have a well defined server api and let the 
flash client speak to that using xml, etc. The api can implement
role based security and catch any attempts to subvert it by 
checking against known state or whatever.

An easy example would be having different asp pages (or one that
processes all commands) that accept query strings (or xml) and
return xml.

e.g.

instead of having select * from clients in your flash code,
you would call getClientList.asp?blah=blahetc which would
check that the (authenticated)client had permissions to get
a client list and then generate and return the xml from 
sql statements.

Hope that helps
~neo


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of mike cann
Sent: 13 July 2006 12:45 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Flash SQL

this doesnt sound like a good idea as anyone can download your .swf and
decompile it then change that SELECT * statement to a DROP statement with
ease.

On 12/07/06, Jose Maria Barros [EMAIL PROTECTED] wrote:

 Now im working on a project that involves SQL Server, ASP , XML and 
 flash..and i think its so difficult to work with this for me..
 Maybe tthis component whill help..but not much..

 Im not a good coder..so maybe this help

 On 7/12/06, jcarlos [EMAIL PROTECTED] wrote:
 
  it seems to be interesting
 
  But I didn´t see any Stored Procedure based example
 
  Isn´t  this SQL open way of dB query not very recommended since it
 exposes
  your persistence logic, tables and so on ???
 
  I´m not an n-layers app expert but I found this arguments very often
 
 
  João Carlos
 
  - Original Message -
  From: Tunç Atakan [EMAIL PROTECTED]
  To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com
  Sent: Wednesday, July 12, 2006 9:39 AM
  Subject: RE: [Flashcoders] Flash SQL
 
 
   http://www.netdrims.com/flashsql/
  
  
   Anybody use this component?
  
   I need comment?
  
   Thanx...
  
   Tunc
  
  
  
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
   Brought to you by Fig Leaf Software Premier Authorized Adobe 
   Consulting and Training http://www.figleaf.com 
   http://training.figleaf.com
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training 
  http://www.figleaf.com http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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

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

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

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

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


[Flashcoders] Book recommendations for AS2 and game development

2006-07-15 Thread Paul Steven
Anyone recommend a good book on game development that uses AS2 and classes
for development?

I have several flash game development books (Macromedia Flash MX 2004 Game
Development by Glen Rhodes, and Flash MX Game Design Demystified by Jobe
Makar) plus I have just got Essential Actionscript 2.0 by Colin Moock.

I am keen to learn the best way to structure a game using classes as I have
just started writing my first game using Flash 8 and AS2 and I am finding it
a lot different from how I previously done things in AS1 with prototypes. It
seems like I cannot just refer to movie clips in classes that easily.

Anyway any recommendations much appreciated.

Thanks

Paul

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

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


[Flashcoders] First attempts at wirting code in AS2

2006-07-15 Thread Paul Steven
Hi there

I am finally starting to write my code in AS2 thanks to my client asking me
to program the latest project in Flash 8.

Anyway I am up against the clock as always so do not have time to read my
Essential Actionscript 2.0 book in order to get the first game up and
running by Monday.

Previously I wrote a class to manage most of my game functionality 

e.g

// *
// Class Constructor
// *

GameObject=function(){

trace (class constructor);
this.Game_Number = 0;
}

// --
// End Of Class Constructor
// --
// **
// Game1_Demo_Initialise Function
// **

GameObject.prototype.Game1_Demo_Initialise=function(){  

this.Game_Number = 1;   
little_stars_mc.gotoAndStop(game + this.Game_Number); 

}

// --
// End Of Game1_Demo_Initialise function
// --


And the above worked just perfectly.

Anyway now I am trying to do it using AS2 here is what I am trying to do:

class classes.numberGame {

// ---
// Constructor
// ---

public function numberGame() {


trace (class constructor);
var Game_Number:Number = 0;

}




// --
// Initialise Game 1 Demo
// --


public function Initialise_Game1_Demo():Void {



Game_Number = 1;
little_stars_mc.gotoAndStop game + Game_Number);
}

}


I am getting the following error

There is no method with the name 'little_stars_mc'.

little_stars_mc.gotoAndStop(game + Game_Number);


I presume I am doing something fundamentally wrong here so would appreciate
any advice.

Many thanks

Paul

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

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


[Flashcoders] Netstream strangeness on stream failure

2006-07-15 Thread Vibol Hou

Has anyone encountered this behavior before:

If a NetStream object is in the middle of streaming video and the source 
mysteriously disconnects (server goes down, vpn connection dies), the 
NetStream object starts to spew out NetStream.Play.Stop events in an 
infinite loop.


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

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


[Flashcoders] jigsaw puzzle

2006-07-15 Thread natalia Vikhtinskaya

Hi to all

Can anybody give me advice for creating game like this?

http://www.magickeys.com/books/jigsaws/cheetah_1/e.html

  1. How can I create each time different pieces? I can only guess that
  there are some sets with different shapes and they attached as mask.
  2. When pieces are correct new pieces appear. How this is done? How
  they determinate that? This is not droptarget or hittest. How from two masks
  they create one mask?

Has anybody any code that can help to create this?

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

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


Re: [Flashcoders] jigsaw puzzle

2006-07-15 Thread Hans Wichman

Please refer to the archives, there is a thread about this going on as we
speak...

On 7/15/06, natalia Vikhtinskaya [EMAIL PROTECTED] wrote:


Hi to all

Can anybody give me advice for creating game like this?

http://www.magickeys.com/books/jigsaws/cheetah_1/e.html

  1. How can I create each time different pieces? I can only guess that
  there are some sets with different shapes and they attached as mask.
  2. When pieces are correct new pieces appear. How this is done? How
  they determinate that? This is not droptarget or hittest. How from two
masks
  they create one mask?

Has anybody any code that can help to create this?

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

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


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

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


[Flashcoders] as3: weird package problem

2006-07-15 Thread Meinte van't Kruis

Hellow,

I'm currently exploring as3 with the free compiler and keep running against
a seemingly strange problem.
Here's my class:

package nl.test{
   public class Test{
   public function Test(){
   }
   }
}

It's sitting in the directory c:\classes\nl\test. That directory is added in
the flex configuration file:

source-path
path-elementc:\classes\/path-element
/source-path

I get the following error when I try to compile the class:

C:\classes\nl\test\Test.as: Error: A file found in a source-path must have
the s
ame package structure '', as the definition's package, 'nl.test'.

This error also shows when I don't add the c:\classes to the source-path in
the flex-config.xml.

I'm really stuck, I can't figure out what I'm doing wrong, probably
overlooking something..
Does anyone know?

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

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


[Flashcoders] Re: as3: weird package problem

2006-07-15 Thread Meinte van't Kruis

On 7/15/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:


Hellow,

I'm currently exploring as3 with the free compiler and keep running
against a seemingly strange problem.
Here's my class:

package nl.test{
public class Test{
public function Test(){
}
}
}

It's sitting in the directory c:\classes\nl\test. That directory is added
in the flex configuration file:

 source-path
 path-elementc:\classes\/path-element
/source-path

I get the following error when I try to compile the class:

C:\classes\nl\test\Test.as: Error: A file found in a source-path must have
the s
ame package structure '', as the definition's package, ' nl.test'.

This error also shows when I don't add the c:\classes to the source-path
in the flex-config.xml.

I'm really stuck, I can't figure out what I'm doing wrong, probably
overlooking something..
Does anyone know?

regards,
Meinte


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

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


Re: [Flashcoders] jigsaw puzzle

2006-07-15 Thread natalia Vikhtinskaya

Yes, I checked before posting but found only questions without answers.

2006/7/15, Hans Wichman [EMAIL PROTECTED]:


Please refer to the archives, there is a thread about this going on as we
speak...

On 7/15/06, natalia Vikhtinskaya [EMAIL PROTECTED] wrote:

 Hi to all

 Can anybody give me advice for creating game like this?

 http://www.magickeys.com/books/jigsaws/cheetah_1/e.html

   1. How can I create each time different pieces? I can only guess that
   there are some sets with different shapes and they attached as mask.
   2. When pieces are correct new pieces appear. How this is done? How
   they determinate that? This is not droptarget or hittest. How from two
 masks
   they create one mask?

 Has anybody any code that can help to create this?

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

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

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

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


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

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


Re: [Flashcoders] as3: weird package problem

2006-07-15 Thread John Grden

it's a stab in the dark, but have you tried renaming your class to somehting
different than the folder/package it sits in?

package nl.test{
  public class MyClassTest{
  public function MyClassTest(){
  }
  }
}



On 7/15/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:


Hellow,

I'm currently exploring as3 with the free compiler and keep running
against
a seemingly strange problem.
Here's my class:

package nl.test{
public class Test{
public function Test(){
}
}
}

It's sitting in the directory c:\classes\nl\test. That directory is added
in
the flex configuration file:

source-path
 path-elementc:\classes\/path-element
/source-path

I get the following error when I try to compile the class:

C:\classes\nl\test\Test.as: Error: A file found in a source-path must have
the s
ame package structure '', as the definition's package, 'nl.test'.

This error also shows when I don't add the c:\classes to the source-path
in
the flex-config.xml.

I'm really stuck, I can't figure out what I'm doing wrong, probably
overlooking something..
Does anyone know?

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

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





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

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


Re: [Flashcoders] as3: weird package problem

2006-07-15 Thread Meinte van't Kruis

Thanks for your reply,

I just tried out what you suggested, but didn't make any difference :(

It works when I leave the package name empty (this seems obvious).
But that wouldnt be a solution, because a class sitting somewhere else
wouldn't be able to access it.

On 7/15/06, John Grden [EMAIL PROTECTED] wrote:


it's a stab in the dark, but have you tried renaming your class to
somehting
different than the folder/package it sits in?

package nl.test{
   public class MyClassTest{
   public function MyClassTest(){
   }
   }
}



On 7/15/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:

 Hellow,

 I'm currently exploring as3 with the free compiler and keep running
 against
 a seemingly strange problem.
 Here's my class:

 package nl.test{
 public class Test{
 public function Test(){
 }
 }
 }

 It's sitting in the directory c:\classes\nl\test. That directory is
added
 in
 the flex configuration file:

 source-path
  path-elementc:\classes\/path-element
 /source-path

 I get the following error when I try to compile the class:

 C:\classes\nl\test\Test.as: Error: A file found in a source-path must
have
 the s
 ame package structure '', as the definition's package, 'nl.test'.

 This error also shows when I don't add the c:\classes to the source-path
 in
 the flex-config.xml.

 I'm really stuck, I can't figure out what I'm doing wrong, probably
 overlooking something..
 Does anyone know?

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

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




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

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


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

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


[Flashcoders] External Interface Strange Behaviour

2006-07-15 Thread Sumeet Kumar
Hi All,

 

I have two flash objects in form in htmlPage .I am using
externalInterface API to call and receive values from javascript.At each
refresh of my web page I receive weird error which says: Out of memory
at line 56; I read a blog from deconcept but the solution given there
didn't worked

Have anyone of u experienced such problem? This is the code which I m
using 

 

html 

head

 

script language = Javascript

 

function leave(){

 

var objects = document.getElementsByTagName(OBJECT);

 

  for (var i=0; i  objects.length; i++) {

for (var x in objects[i]) {

  if (typeof objects[i][x] == 'function') {

objects[i][x] = null;

  }

}

  }

 

 

}

 

var count = 0 

var gBodyTextCount =1

function fnLoadingFinish()

 

{



if(count == gBodyTextCount)

{


ValueToInsert = I m
called



 
window.testObj.fnGetValue(ValueToInsert);

 
window.testObj1.fnGetValue(ValueToInsert);





}

else

{

 count++ ;


}

}

 

 

function thisMovie(movieName) {

if
(navigator.appName.indexOf(Microsoft) != -1) 

{

return window[movieName]

}

else

{

return
document[movieName]

}

}   

/script   

 

meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/

titleTextEditor/title

/head

body bgcolor=#ff onUnload=leave() 

form name = 'Text' 

object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swfl
ash.cab#version=8,0,0,0 width=349 height=113 id=testObj name
='testObj' align=middle

param name=allowScriptAccess value=always /

param name=movie value=TextEditor.swf /param name=quality
value=high /param name=bgcolor value=#ff /embed
src=TextEditor.swf quality=high bgcolor=#ff width=349
height=113 name=testObj align=middle
allowScriptAccess=sameDomain type=application/x-shockwave-flash
pluginspage=http://www.macromedia.com/go/getflashplayer; /

/object

object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swfl
ash.cab#version=8,0,0,0 width=349 height=113 id=testObj1 name
='testObj1' align=middle

param name=allowScriptAccess value=always /

param name=movie value=TextEditor.swf /param name=quality
value=high /param name=bgcolor value=#ff /embed
src=TextEditor.swf quality=high bgcolor=#ff width=349
height=113 name=testObj1 align=middle
allowScriptAccess=sameDomain type=application/x-shockwave-flash
pluginspage=http://www.macromedia.com/go/getflashplayer; /

/object

 

 

 

 

/form

script language=Javascript

window.testObj=window.Text.testObj;

window.testObj1=window.Text.testObj1;

 

/script

 

/body

/html

 

 

And the code inside the flash is movie is as follows

 

import flash.external.*;

_root.maxCharacters = _root.maxChars;

function fnGetValue(str) {

if (str == null or str == null) {

main_mc.mytxt.htmlText = ;



tatal_txt.text = 0;

} else {

main_mc.mytxt.htmlText = str;



var num = main_mc.mytxt.text.length;

if (Number(num)_root.maxCharacters) {

 
} else {

}

if (main_mc.mytxt.text.length=1) {

} else {

}

}

}

fnSetValue = function (id) {

str = main_mc.mytxt.htmlText;

var len = main_mc.mytxt.text.length;

//getURL(javascript:fnValues('+str+'));

ExternalInterface.call(fnTextValues, str, id, len);

};

var methodName:String = fnGetValue;

var instance:Object = null;

var method:Function = fnGetValue;

var wasSuccessful:Boolean = ExternalInterface.addCallback(methodName,
instance, method);

/

var methodName1:String = fnSetValue;

var instance1:Object = null;

var method1:Function = fnSetValue;

var 

RE: [Flashcoders] Eclipse Assistance (beginner)

2006-07-15 Thread Ed Staub
Flash Mel,

I'm maybe one step ahead of you here. I was watching the responses, hoping
to learn something.
No such luck.

It looks to me like you probably come from a Java background - yes?

Here's what I THINK is true - hopefully this will provoke someone to correct
me who knows more.  Take everything here with a grain of salt.

1.) The best Flash debugger for normal development is, unfortunately,
Macromedia's.  There are none in the Eclipse plug-ins.

2.) For unit testing, the most-recommended component seems to be As2Unit.  I
haven't tried it.  It's only available in compiled form, which gives me
pause.  This seems to be the most-recommended package, but there are many
others.  One that appears to have quite a bit of momentum is AsUnit
(http://asunit.org/) - I'd definitely check it out.  If you find something
you like, please drop me a line.

3.) I didn't see which plug-in you're using.  I tried FDT, since several
sites will tell you it's the best plug-in for AS development, but have a few
issues:

a. It's a commercial product - they want around $250 for it.  There's a
30-day trial
b. Nothing's been updated since last fall.  
c. It has a problem with F8 library organization - it doesn't support the
automatic switch-in of F8 or F7 depending on context.
d. The web site is slow to the point of unusability - I think it is severely
throttled.
e. Email bounces
f. Given the state of the website, I'd be scared to death to try to pay by
credit card there.

Based on all this, I switched to FlashDevelop (not Eclipse at all - it's
.NET, in fact!).  So far, so good - it's fast, slick, intuitive, and there
appears to be quite a bit of developer momentum in plugins, etc.  

In trying to find out what's going on, keep a close eye on WHEN something
was recommended.  What was best a year ago often isn't the best now.

The site that seems most relevant to your questions wasn't on the list
another responder sent earlier.  
   http://www.osflash.org 

Good luck,

-Ed Staub




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

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


Re: [Flashcoders] as3: weird package problem

2006-07-15 Thread Meinte van't Kruis

can anyone test my case and tell me if it actually works?
this thing is really weird, i've tried some other options, but
just naming a package anything keeps going wrong..

On 7/15/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:


Thanks for your reply,

I just tried out what you suggested, but didn't make any difference :(

It works when I leave the package name empty (this seems obvious).
But that wouldnt be a solution, because a class sitting somewhere else
wouldn't be able to access it.


On 7/15/06, John Grden [EMAIL PROTECTED] wrote:

 it's a stab in the dark, but have you tried renaming your class to
 somehting
 different than the folder/package it sits in?

 package nl.test{
public class MyClassTest{
public function MyClassTest(){
}
}
 }



 On 7/15/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
 
  Hellow,
 
  I'm currently exploring as3 with the free compiler and keep running
  against
  a seemingly strange problem.
  Here's my class:
 
  package nl.test{
  public class Test{
  public function Test(){
  }
  }
  }
 
  It's sitting in the directory c:\classes\nl\test. That directory is
 added
  in
  the flex configuration file:
 
  source-path
   path-elementc:\classes\/path-element
  /source-path
 
  I get the following error when I try to compile the class:
 
  C:\classes\nl\test\Test.as: Error: A file found in a source-path must
 have
  the s
  ame package structure '', as the definition's package, ' nl.test'.
 
  This error also shows when I don't add the c:\classes to the
 source-path
  in
  the flex-config.xml.
 
  I'm really stuck, I can't figure out what I'm doing wrong, probably
  overlooking something..
  Does anyone know?
 
  regards,
  Meinte
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 



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

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




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

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


RE: [Flashcoders] as3: weird package problem

2006-07-15 Thread Bernard Visscher
Try this:
source-path
path-elementc:/classes/path-element
/source-path

Note the / instead of \ for the path.

Hope this will help.

Bernard

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Namens 
 Meinte van't Kruis
 Verzonden: zaterdag 15 juli 2006 15:11
 Aan: Flashcoders mailing list
 Onderwerp: Re: [Flashcoders] as3: weird package problem
 
 Thanks for your reply,
 
 I just tried out what you suggested, but didn't make any difference :(
 
 It works when I leave the package name empty (this seems obvious).
 But that wouldnt be a solution, because a class sitting 
 somewhere else wouldn't be able to access it.
 
 On 7/15/06, John Grden [EMAIL PROTECTED] wrote:
 
  it's a stab in the dark, but have you tried renaming your class to 
  somehting different than the folder/package it sits in?
 
  package nl.test{
 public class MyClassTest{
 public function MyClassTest(){
 }
 }
  }
 
 
 
  On 7/15/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
  
   Hellow,
  
   I'm currently exploring as3 with the free compiler and 
 keep running 
   against a seemingly strange problem.
   Here's my class:
  
   package nl.test{
   public class Test{
   public function Test(){
   }
   }
   }
  
   It's sitting in the directory c:\classes\nl\test. That 
 directory is
  added
   in
   the flex configuration file:
  
   source-path
path-elementc:\classes\/path-element
   /source-path
  
   I get the following error when I try to compile the class:
  
   C:\classes\nl\test\Test.as: Error: A file found in a source-path 
   must
  have
   the s
   ame package structure '', as the definition's package, 'nl.test'.
  
   This error also shows when I don't add the c:\classes to the 
   source-path in the flex-config.xml.
  
   I'm really stuck, I can't figure out what I'm doing 
 wrong, probably 
   overlooking something..
   Does anyone know?
  
   regards,
   Meinte
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
   Brought to you by Fig Leaf Software
   Premier Authorized Adobe Consulting and Training 
   http://www.figleaf.com http://training.figleaf.com
  
 
 
 
  --
  John Grden
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training 
  http://www.figleaf.com http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training 
 http://www.figleaf.com http://training.figleaf.com
 

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

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


Re: [Flashcoders] Book recommendations for AS2 and game development

2006-07-15 Thread Ramon Miguel M. Tayag

I'd really like to know this too.

On 7/14/06, Paul Steven [EMAIL PROTECTED] wrote:

Anyone recommend a good book on game development that uses AS2 and classes
for development?

I have several flash game development books (Macromedia Flash MX 2004 Game
Development by Glen Rhodes, and Flash MX Game Design Demystified by Jobe
Makar) plus I have just got Essential Actionscript 2.0 by Colin Moock.

I am keen to learn the best way to structure a game using classes as I have
just started writing my first game using Flash 8 and AS2 and I am finding it
a lot different from how I previously done things in AS1 with prototypes. It
seems like I cannot just refer to movie clips in classes that easily.

Anyway any recommendations much appreciated.

Thanks

Paul


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

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


Re: [Flashcoders] as3: weird package problem

2006-07-15 Thread Meinte van't Kruis

I tried it just yet, doesn't work either :(.


On 7/15/06, Bernard Visscher [EMAIL PROTECTED] wrote:


Try this:
source-path
path-elementc:/classes/path-element
/source-path

Note the / instead of \ for the path.

Hope this will help.

Bernard

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Namens
 Meinte van't Kruis
 Verzonden: zaterdag 15 juli 2006 15:11
 Aan: Flashcoders mailing list
 Onderwerp: Re: [Flashcoders] as3: weird package problem

 Thanks for your reply,

 I just tried out what you suggested, but didn't make any difference :(

 It works when I leave the package name empty (this seems obvious).
 But that wouldnt be a solution, because a class sitting
 somewhere else wouldn't be able to access it.

 On 7/15/06, John Grden [EMAIL PROTECTED] wrote:
 
  it's a stab in the dark, but have you tried renaming your class to
  somehting different than the folder/package it sits in?
 
  package nl.test{
 public class MyClassTest{
 public function MyClassTest(){
 }
 }
  }
 
 
 
  On 7/15/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
  
   Hellow,
  
   I'm currently exploring as3 with the free compiler and
 keep running
   against a seemingly strange problem.
   Here's my class:
  
   package nl.test{
   public class Test{
   public function Test(){
   }
   }
   }
  
   It's sitting in the directory c:\classes\nl\test. That
 directory is
  added
   in
   the flex configuration file:
  
   source-path
path-elementc:\classes\/path-element
   /source-path
  
   I get the following error when I try to compile the class:
  
   C:\classes\nl\test\Test.as: Error: A file found in a source-path
   must
  have
   the s
   ame package structure '', as the definition's package, 'nl.test'.
  
   This error also shows when I don't add the c:\classes to the
   source-path in the flex-config.xml.
  
   I'm really stuck, I can't figure out what I'm doing
 wrong, probably
   overlooking something..
   Does anyone know?
  
   regards,
   Meinte
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
   Brought to you by Fig Leaf Software
   Premier Authorized Adobe Consulting and Training
   http://www.figleaf.com http://training.figleaf.com
  
 
 
 
  --
  John Grden
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


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

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


Re: [Flashcoders] Book recommendations for AS2 and game development

2006-07-15 Thread Charles Parcell

Sounds like you need books on OOP rather than ActipnScript. You are not
going to find a book on OOP with ActionScript at the moment. Rather you are
going to have to branch out a bit. Here are some books that I would suggest.
At the least they will get you looking in the right direction.

Object Design: Roles, Responsibilities, and Collaborations
http://www.amazon.com/gp/product/0201379430/sr=1-2/qid=1152976161/ref=sr_1_2/103-7225829-0820628?ie=UTF8s=books
*

*Object-Oriented Analysis and Design : Understanding System Development with
UML 2.0
http://www.amazon.com/gp/product/0470092408/sr=1-1/qid=1152976161/ref=sr_1_1/103-7225829-0820628?ie=UTF8s=books


These will then lead you into Design Patterns

Design Patterns: Elements of Reusable Object-Oriented Software*
*
http://www.amazon.com/gp/product/0201633612/sr=1-1/qid=1152977206/ref=pd_bbs_1/103-7225829-0820628?ie=UTF8s=books
*
*
Head First Design Patterns
http://www.amazon.com/gp/product/0596007124/sr=1-2/qid=1152977206/ref=pd_bbs_2/103-7225829-0820628?ie=UTF8s=books

Design Patterns Explained : A New Perspective on Object-Oriented Design
http://www.amazon.com/gp/product/0321247140/sr=1-3/qid=1152977206/ref=pd_bbs_3/103-7225829-0820628?ie=UTF8s=books


Personally, I found the Head First Design Patterns book to be the most
useful. Even though it uses Java as the language to show its examples, those
examples are very simple to understand and translate. Understanding the
different ways to structure your classes and extend them is huge. Thus
patterns are a great place to learn OOP.

Charles P.


On 7/14/06, Paul Steven [EMAIL PROTECTED] wrote:


Anyone recommend a good book on game development that uses AS2 and classes
for development?

I have several flash game development books (Macromedia Flash MX 2004 Game
Development by Glen Rhodes, and Flash MX Game Design Demystified by Jobe
Makar) plus I have just got Essential Actionscript 2.0 by Colin Moock.

I am keen to learn the best way to structure a game using classes as I
have
just started writing my first game using Flash 8 and AS2 and I am finding
it
a lot different from how I previously done things in AS1 with prototypes.
It
seems like I cannot just refer to movie clips in classes that easily.

Anyway any recommendations much appreciated.

Thanks

Paul

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

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


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

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


[Flashcoders] Sending variables

2006-07-15 Thread Ollie Scognamiglio

Hi there

I am trying to send variables from a flash form. No trouble for the  
normal form variables that sit at the root level, I press my submit  
button (which is also on the root level), and they all get sent fine.  
However, the variables that are inside a movie clip, are not sent.  
This is the problem. Can anyone please save the day and tell me how  
to send these variables when I press submit?


Best Regards

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

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


Re: [Flashcoders] First attempts at wirting code in AS2

2006-07-15 Thread Adam Pasztory

Classes don't share scope with the main timeline.  You should pass in
little_stars_mc as an argument to the Constructor when you create your
Class, then store it as a member variable so all your methods have access to
it.  The fact that it worked before with AS 1.0 was merely a side-effect of
the less strict scoping rules.

A little time spent reading some OOP books will save you hours of
frustration in the long run.  In addition to Essential AS 2.0, you might
check out Object-Oriented Actionscript from New Riders.

By the way, this sort of question is probably more appropriate for the Flash
Newbie board. :)

-Adam

On 7/14/06, Paul Steven [EMAIL PROTECTED] wrote:



public function Initialise_Game1_Demo():Void {



Game_Number = 1;
little_stars_mc.gotoAndStop game + Game_Number);
}

}


I am getting the following error

There is no method with the name 'little_stars_mc'.

little_stars_mc.gotoAndStop(game + Game_Number);


I presume I am doing something fundamentally wrong here so would
appreciate
any advice.

Many thanks

Paul

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

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


Re: [Flashcoders] import statement and accessing a class in AS3

2006-07-15 Thread Fumio Nonaka

Thank you, Geoffrey.

I referred the ActionScript 3.0 Language Reference and understood the
difference of 'import' directive between 3.0 and 2.0.

Also, I saw Adobe Flash 9 Public Alpha/Configration/ActionScript 
3.0/implicitImports.xml, in which classes are defined to be imported 
implicitly into Flash IDE.  The following packages are imported:


 implicitImport name = adobe.utils.*/
 implicitImport name = flash.accessibility.*/
 implicitImport name = flash.display.*/
 implicitImport name = flash.errors.*/
 implicitImport name = flash.events.*/
 implicitImport name = flash.external.*/
 implicitImport name = flash.filters.*/
 implicitImport name = flash.geom.*/
 implicitImport name = flash.media.*/
 implicitImport name = flash.net.*/
 implicitImport name = flash.printing.*/
 implicitImport name = flash.system.*/
 implicitImport name = flash.text.*/
 implicitImport name = flash.ui.*/
 implicitImport name = flash.utils.*/
 implicitImport name = flash.xml.*/
_
Geoffrey Williams wrote:

You must always import your classes in external AS files.

In Flash, the flash.* sub packages are automatically imported.


Thank you,

Fumio Nonaka
Phone: +81-42-397-9452
Fax: +81-42-397-9452
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My bookshttp://www.FumioNonaka.com/Books/index.html
Flash communityhttp://F-site.org/

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

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


[Flashcoders] amf-php, AS2, mysql, and multilanguage website

2006-07-15 Thread Gabriel
Hi all, can someone put a step by step guide about what are the correct 
steps to have a front(in flash) that connects to a MySql with AMFPHP, so 
this front would be multilanguage, meaning english, spanish, german, 
russian and , maybe, a lot (occidental) more...


thanks to all

GaB

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

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


[Flashcoders] How to embed metadata in SWF files?

2006-07-15 Thread Jeff Stearns
I hope that you'll take pity on a Flash novice.  I'm an experienced  
programmer, but Flash is very new to me.


I need to generate SWF movie files containing embedded data such as  
title, production year, etc.  The Flash player needs to be able to  
read these values when it starts playing the movie.


I'd really appreciate advice on how best to do this.

I wrote the program which generates the SWF files, so I have complete  
control over their content.  I tried embedding variable assignments  
in the first frame of my SWF files by generating the bytecodes to  
perform variable assignments (ActionPush year, ActionPush 2006,  
ActionSetVariable).  But I can't figure out how to access these  
variables from the Flash player.  Hints?


Or is there a better way to approach this?  All I want is for the  
player to be able to extract a few values from each movie file.


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

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


Re: [Flashcoders] How to embed metadata in SWF files?

2006-07-15 Thread Mike Britton

A couple questions for you Jeff:

1. What version of Flash player are you targeting?
2. How are you generating the swfs?


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

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