Re[2]: [Flashcoders] passing parameters to function on context menu

2006-12-09 Thread Fratiman Vladut
Saturday, December 9, 2006, 3:04:41 AM, you wrote:

 var cm:ContextMenu=new ContextMenu(cmHandler);
 function cmHandler(){
 trace(menu open);
 }
 var item1=new ContextMenuItem(item 1, itemHandler);
 item1.value=1;
 cm.customItems.push(item1);
 function itemHandler(obj, item){
 trace(item value: +item.value);
 }
 this.menu=cm;

Thanks!!

___
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] data drid, dataProvider and list columns in reverse order problem

2006-12-09 Thread Fratiman Vladut
Hi!
I have an xml structure, that i want to list into an data grid
component. I want to use dataProvider for that so i proceed like this:
var my_data:Array = new Array();
for (var aNode:XMLNode = my_xml.firstChild.firstChild; aNode != null; 
aNode=aNode.nextSibling) {
if (aNode.nodeType == 1) {
var obj = new Object();
for (var attr in aNode.attributes) {
obj[attr] = aNode.attributes[attr];
}
my_data.addItem(obj);
}
}
//my_dg is instance name for data grid component
my_dg.dataProvider = my_data;
Problem is that, columns are displayed in reverse order than is in
my_xml. How i can resolve that?
For example:
var xml_str = datapacketrow name=John password=123 //datapacket;
var my_xml:XML = new XML(xml_str);
wil display first column password and then name.

___
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: flash applicatin and database

2006-12-09 Thread Roberto Scordino
I own and use v12 and also Valentina (paradigma software).
have a look at Valentina is very performance impressive IMB but never
used online (only in multimedia dvd production)
Roberto
Director +v12 has performance issues. Has any one worked on such kind of
project? Can anyone guide?


___
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] Good book on vectors / collisions for games

2006-12-09 Thread Micky Hulse

Paul Steven wrote:

Just working on a game at the moment that involves various balls colliding.


Not specific to games, but you might want to thumb through:

Foundation ActionScript Animation: Making Things Move! (Foundation) 
(Paperback) -- by Keith Peters

http://snipurl.com/14mwk

Definitely covers ball collision and physics and such...

Not sure if it is too basic for your level, but you might find it worth 
the gander.


Good luck,
Cheers,
Micky

--
 Wishlist: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse
___
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] 2nd Try: Urgent - IE rendering SWF larger than FF

2006-12-09 Thread Dennis Landi
Hello.

I really need help on this one.  I am stumped.

Please looke at this page in IE and Firefox:
http://dennislandi.com/tiledesigner/tile_designer03.html

IE on WinXP Pro on both IE6 and IE7 appears to be
rendering my SWF about 15% to 20% larger than its
intended size.  FF renders the same page/swf
perfectly.

Firstly, can anyone confirm this on their machines? 
What do you see?  And please include the Browser
version and OS you are running.

This is an app I would like to move to completion, but
I don't feel I can do so until I can get an
explanation  for this IE behaviour. The reason for
this is because the IE rendering is badly distorting
the tile images in this app.  They really need to be
rendered at the intended size.

But perhaps most of you out there don't see this
anomaly that I see on my machines?  Do FF and IE
rendering look the same to you or different?

(Remember to include info on browser version and OS)

Help!

-dennis



___
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] 2nd Try: Urgent - IE rendering SWF larger than FF

2006-12-09 Thread Ian Thomas

Try replacing your 'scale=noscale' parameter (and the param version)
with 'scaleMode=noScale'

Ian

On 12/9/06, Dennis Landi [EMAIL PROTECTED] wrote:


Hello.

I really need help on this one.  I am stumped.

Please looke at this page in IE and Firefox:
http://dennislandi.com/tiledesigner/tile_designer03.html

IE on WinXP Pro on both IE6 and IE7 appears to be
rendering my SWF about 15% to 20% larger than its
intended size.  FF renders the same page/swf
perfectly.

Firstly, can anyone confirm this on their machines?
What do you see?  And please include the Browser
version and OS you are running.

This is an app I would like to move to completion, but
I don't feel I can do so until I can get an
explanation  for this IE behaviour. The reason for
this is because the IE rendering is badly distorting
the tile images in this app.  They really need to be
rendered at the intended size.

But perhaps most of you out there don't see this
anomaly that I see on my machines?  Do FF and IE
rendering look the same to you or different?

(Remember to include info on browser version and OS)

Help!

-dennis



___
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] SOLVED: IE rendering SWF larger than FF

2006-12-09 Thread Dennis Landi

--- Dennis Landi [EMAIL PROTECTED] wrote:

 This is an app I would like to move to completion,
 but
 I don't feel I can do so until I can get an
 explanation  for this IE behaviour. The reason for
 this is because the IE rendering is badly distorting
 the tile images in this app.  They really need to be
 rendered at the intended size.
 

 This is an app I would like to move to completion,
but I don't feel I can 
 do so until I can get an explanation  for this IE
behaviour. The reason 
 for this is because the IE rendering is badly
distorting the tile images 
 in this app (on my machines).  They really need to
be rendered at the 
 intended size.

As usually happens when I write a post like that, an
idea occurs to me almost immediately.  I tried to
analyze why macromedia's own site didn't exhibit the
problem, and the only difference i could see was the
javascript 
generated nature of the page.  Since I intend to
dynamically generate the javascript/html via my
webserver anyway, this is in-line with my intentions.
Long story short generating the page content at
run-time via javascript 
solves the problem.

http://dennislandi.com/tiledesigner/tile_designer04.html

The simply code to accomplish this for those
interested in flash via 
javascript:


html xmlns=http://www.w3.org/1999/xhtml;
xml:lang=en lang=en
head
meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1 /
titletile_designer04/title
/head
body bgcolor=#00
TABLE width=100% border=0
TBODY
TR
TD align=middle
SCRIPT language=JavaScript
!--
var FlashVars = 'a1=' + escape() +
   'sesId=' + escape(FB3A791D61DAD40) +
   'is_IE=' + escape(FALSE);

document.write( 'object 
classid=clsid:D27CDB6E-AE6D-11cf-96B8-44455354
codebase=

scale=noscale width=1000 height=850
id=aws_ringtones align=' );
document.write( 'param name=movie
value=tile_designer03.swf' );
document.write( 'param name=quality value=high'
);
document.write( 'param name=scale value=noscale'
);
document.write( 'param name=align value=left' );
document.write( 'param name=bgcolor
value=#00' );
document.write( 'param name=FlashVars value=' +
FlashVars + '' );
document.write( 'embed src=tile_designer03.swf
quality=high 
bgcolor=#00 scale=noscale

FlashVars=' + FlashVars + ' width=1000
height=850 
name=tile_designer03 align=left

type=application/x-shockwave-flash 
pluginspage=http://www.macromedia.com/go/getflashplayer;'
);
document.write( '/embed' );
document.write( '/object' );
//--
/SCRIPT

/body
/html


___
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] 2nd Try: Urgent - IE rendering SWF larger than FF

2006-12-09 Thread Micky Hulse

Ian Thomas wrote:

Try replacing your 'scale=noscale' parameter (and the param version)
with 'scaleMode=noScale'


You might also want to think about using:

http://blog.deconcept.com/swfobject/

Once you get the JS setup, embedding flash is a breeze. Maybe it will 
also fix your probs.


Good luck,
Cheers,
Micky


--
 Wishlist: http://snipurl.com/vrs9
   Switch: http://browsehappy.com/
 BCC?: http://snipurl.com/w6f8
   My: http://del.icio.us/mhulse
___
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] Re: flash applicatin and database

2006-12-09 Thread Nehal Gandhi

hey
thanks for the reply.

cant use flash remoting due to the cost factor. and..php.. i cant use as
never worked on it.

Valentina, i will look into it..how about Zinc? any idea? will it work for
MAC server or MAC standalone?

-Nehal



On 12/9/06, Roberto Scordino [EMAIL PROTECTED] wrote:


I own and use v12 and also Valentina (paradigma software).
have a look at Valentina is very performance impressive IMB but never
used online (only in multimedia dvd production)
Roberto
Director +v12 has performance issues. Has any one worked on such kind of
project? Can anyone guide?


___
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] flash applicatin and database

2006-12-09 Thread David Ham
Have you looked at OpenAMF? http://openamf.com

I used it on a project a couple of years ago, and it works great. It's free,
and our developers evaluated it and found it to be functionally
indistinguishable from Flash Remoting.

OK
DAH




___
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] JSFL Saving a created document

2006-12-09 Thread Chris W. Paterson
Wow thanks!  Your blog on how to create a publish profile is also very helpful 
to me!  

The save commands:
document.save();
document.saveAndCompact();

fl.saveDocument();
fl.saveDocumentAs();

They all assume that the file is already saved if not then it prompts a Save 
As dialog with the file browser... The problem is I want to save the document 
in a specific place with a specific name and not let the user pick the name and 
where to save it.  Am I missing something?

Again Thanks!
Chris
 
 


- Original Message 
From: Steven Sacks | BLITZ [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, December 8, 2006 6:32:19 PM
Subject: RE: [Flashcoders] JSFL Saving a created document

You should download the JSFL documentation file.

fl8_extending.pdf

Not sure what the URL is but search Adobe's site and you'll find it like
I did.

Here's a taste of the functions that handle it.  
Check my blog for the entire script where I am creating templates.
http://www.stevensacks.net/


var doc = fl.getDocumentDOM();
function saveFile(s) {
var fPath = getRelativePath() + s + .fla;
fl.saveDocument(doc, fPath);
}
function getRelativePath() {
var pathArr = doc.path.split(\\);
pathArr.length--;
return(file:/// + pathArr.join(/) + /);
}
___
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






 

Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited
___
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] strange behavior with combo box

2006-12-09 Thread Fratiman Vladut
I have on stage an button with instance name my_btn, and an empty
movie clip named container.
In library i have an movie clip, with linkage name test, that contain an 
combo box with some
values.
When i press the button, i load into container, movie clip test from
library.
my_btn.onPress = function(){
removeMovieClip(container.test);
container.attachMovie(test, test, this.getNextHighestDepth());
}
Strange occur, when i press again the button. Then combo box not show
the selected value.
How can deal with that?

___
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] MovieClipLoader/loadMovie vs. digit on instance name

2006-12-09 Thread Wagner Amaral

Yesterday I was building a WindowManager class, and I wanted to assign
random names to each created window. So I went for the obvious:

var randName:String = String(Math.round( Math.random() * 100 ));
var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ +
randName, _tgt.getNextHighestDepth(), initObj) );

which gives me something like: _level0.windowContainer.newWin_123456

however, when I tried to load an external image into a movieclip
inside this new Window, MovieClipLoader.loadClip() failed silently,
and loadMovie() gives an error in the path (doesn't specify which
path, but then I found it was the destination movie's path)
setting properties like _newWin.textContainer.text = 'xyz'; works ok,
but I could not load an image into _newWin.imageContainer, even though
I can trace it (gives me
_level0.windowContainer.newWin_123456.imageContainer)

then I did this, and the image loaded correctly, along with the text properties:

var randName:String = String(Math.round( Math.random() * 100 ));
var randNameArray:Array = randName.split( '' );
var newNameArray:Array = new Array( randNameArray.length );
for ( var i:Number = 0; i  randNameArray.length; ++i ) {
newNameArray[i] = String.fromCharCode( 97 + Number(randNameArray[i]) );
}
randName = newNameArray.join( '' );
var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ +
randName, _tgt.getNextHighestDepth(), initObj) );

basically I converted the numbers into their letter equivalent,
starting from a, which gives me something like:
_level0.windowContainer.newWin_abcdef

and now both loadMovie() and MovieClipLoader.loadClip() loads the
image correctly

my question is, why is this happening? isn't a digit a valid
'variable-letter' in flash ?
is this a known issue, or is it just me? am I doing something wrong?
___
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] MovieClipLoader/loadMovie vs. digit on instance name

2006-12-09 Thread Alain Rousseau

Hi Wagner,

INMHO, the best way to add your numbers to the name of MovieClip is to 
first define a variable as the base name of your mc, then add the number 
(id) to that base name. I do it like this :


var baseName:String = newWin_;
var mcID:Number = Math.round( Math.random() * 100 );
var mcName:String = baseName + mcID;

you'll be sure to allways have a string that way!

I usually use this in a loop (for or while) where I use an incremental 
number (i++)


var baseName:String = newWin_;
for (var i:Number = 0; i  maxMC; i++) {
   var mcName:String = baseName + i;
}

HTH

Alain

Wagner Amaral wrote:

Yesterday I was building a WindowManager class, and I wanted to assign
random names to each created window. So I went for the obvious:

var randName:String = String(Math.round( Math.random() * 100 ));
var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ +
randName, _tgt.getNextHighestDepth(), initObj) );

which gives me something like: _level0.windowContainer.newWin_123456

however, when I tried to load an external image into a movieclip
inside this new Window, MovieClipLoader.loadClip() failed silently,
and loadMovie() gives an error in the path (doesn't specify which
path, but then I found it was the destination movie's path)
setting properties like _newWin.textContainer.text = 'xyz'; works ok,
but I could not load an image into _newWin.imageContainer, even though
I can trace it (gives me
_level0.windowContainer.newWin_123456.imageContainer)

then I did this, and the image loaded correctly, along with the text 
properties:


var randName:String = String(Math.round( Math.random() * 100 ));
var randNameArray:Array = randName.split( '' );
var newNameArray:Array = new Array( randNameArray.length );
for ( var i:Number = 0; i  randNameArray.length; ++i ) {
newNameArray[i] = String.fromCharCode( 97 + 
Number(randNameArray[i]) );

}
randName = newNameArray.join( '' );
var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ +
randName, _tgt.getNextHighestDepth(), initObj) );

basically I converted the numbers into their letter equivalent,
starting from a, which gives me something like:
_level0.windowContainer.newWin_abcdef

and now both loadMovie() and MovieClipLoader.loadClip() loads the
image correctly

my question is, why is this happening? isn't a digit a valid
'variable-letter' in flash ?
is this a known issue, or is it just me? am I doing something wrong?
___
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] MovieClipLoader/loadMovie vs. digit on instance name

2006-12-09 Thread T. Michael Keesey

On 12/9/06, Wagner Amaral [EMAIL PROTECTED] wrote:

Yesterday I was building a WindowManager class, and I wanted to assign
random names to each created window. So I went for the obvious:

var randName:String = String(Math.round( Math.random() * 100 ));
var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ +
randName, _tgt.getNextHighestDepth(), initObj) );

which gives me something like: _level0.windowContainer.newWin_123456


A bit of a tangent, but this doesn't seem like a good strategy to me.
Although the odds are against it (literally a million to one), it is
possible to have a duplicate name (especially since  random numbers
are not really random). If the goal is to have a unique name for each
instance, why not just keep a static integer variable and increment it
each time?

public static var LINKAGE_ID:String = Window;
private static var windowNameIndex:Number = 0;
public static function createWindow(parent:MovieClip, init:Object):Window {
   var windowName:String = window + String(windowNameIndex++);
   var clip:MovieClip = parent.attachMovie(LINKAGE_ID, windowName,
parent.getNextHighestDepth(), init);
   return Window(clip);
}

Or am I missing some requirement?
--
T. Michael Keesey
The Dinosauricon: http://dino.lm.com
Parry  Carney: http://parryandcarney.com
ISPN Forum: http://www.phylonames.org/forum/
___
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