Re: [Flashcoders] Creating a scrollable list: adding components tothe scrollpane contents

2006-09-02 Thread jcarlos

the problem I think is related to


var item = listContainer.createClassObject(symbolName,
instanceName,
this.getNextHighestDepth(), props);


you shoul let DepthManager manage the Depth

var item = listContainer.createClassChildAtDepth(symbolName, instanceName, 
DepthManager.kTop, props);



- Original Message - 
From: Jeroen Beckers [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, September 02, 2006 9:38 AM
Subject: Re: [Flashcoders] Creating a scrollable list: adding components 
tothe scrollpane contents



Couldn't you put the list component in a movieclip and add attach the 
movieclip to the scrollPane (which is a lot easier).

Also, what is  your 'createUniqueInstanceName()' function ?

Matt Bennett wrote:

Hello Flashcoders,

I'm building a scrollable list, and I keep track of the list items
with a Collection. I'm having trouble adding items to it - I think I'm
overwriting some instance variables somewhere.

In the code below, listContainer is a reference to the contents of a
ScrollPane component:

var listContainer = scrollPane.content;

Here's my function to add a list item:

  function addListItem(symbolName, props)
  {
  // Create the content (instance name: _itemX)
  var instanceName = this.createUniqueInstanceName();
  var item = listContainer.createClassObject(symbolName,
instanceName,
this.getNextHighestDepth(), props);

  //add to list items
  listItems.addItem(item);

  trace();
  trace(debugging addItem);
  var iterator = listItems.getIterator();
  while(iterator.hasNext()) {
  var thisitem = iterator.next();
  trace(this item: +thisitem+; type:
+thisitem.className);
  }
  trace();

  return item;
  }


After adding 3 items, the debug trace looks like this:


debugging addItem
this item: ; type: undefined
this item: ; type: undefined
this item: _level0.QUESTION
PAD.contentWidget.questionList.scrollPane.spContentHolder._item2;
type: View


I assumed that I was overwriting an instance name somewhere, but I
also traced the contents of listContainer with a for-in loop. This is
the output after the first item is added:


this item: 2441; type: undefined; text: undefined
...other irrelevant stuff
this item: true; type: undefined; text: undefined
this item: _level0.QUESTION
PAD.contentWidget.questionList.scrollPane.spContentHolder._item0;
type: View; text: question 1


And this the output after the second item is added:


this item: 2441; type: undefined; text: undefined
...other irrelevant stuff
this item: true; type: undefined; text: undefined
this item: _level0.QUESTION
PAD.contentWidget.questionList.scrollPane.spContentHolder._item1;
type: View; text: question 2


So it looks to me like I'm actually overwriting each _itemX instance
on listContainer - and hence the references in the Collection become
null pointers.

Does anyone have any experience with this?

Many thanks,
Matt.
___
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] working with dynamic images using mysql database

2006-08-22 Thread jcarlos

one thing is sure

you need some language to go from Flash to MySql

and php is one of the most used with it ...

so just googling it -)


http://www.amazon.com/gp/product/1903450160/104-4304575-8058314?v=glancen=283155


http://www.bigwebmaster.com/PHP/Scripts_and_Programs/Image_Galleries/


João Carlos


- Original Message - 
From: Martin Wood [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, August 22, 2006 5:10 AM
Subject: Re: [Flashcoders] working with dynamic images using mysql database


if you really want to (or have to) load images from the database then 
you'll need to look at the server language you are using and find out how 
to send the correct headers then send the image data.


Its probably easiest to get it working by displaying the images in a html 
page first, then just use the working url in your loadMovie call.


bhasker u wrote:

HI, all

I was trying to incorporate a small interface in my flash site where I 
would
like to load 9 thumbnails(images) in 3*3 grid, when ever the mouse moves 
on
to thumbnails should able to show the enlarged view in given space 
defined
beside the thumbs, loading the images from a folder is quite simple but 
here

iam interested to *load images from databse* using mysql.

can any one of u plz help me on this.



--
Martin Wood

http://relivethefuture.com/choronzon
___
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] RE: Best way to learn OO Analysis and Designwith ActionScript

2006-08-21 Thread jcarlos
I´ve made several attempts to reduce my OO blindness but I only could find a 
very sound help with


Head First  Design Patterns 
http://www.amazon.com/gp/product/0596007124/104-4304575-8058314?v=glancen=283155


it is Java based, but it doesn´t matter,

the style, the examples, it makes you laugh while you learn and even so, it 
is dense for beginners.





- Original Message - 
From: james [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Monday, August 21, 2006 5:41 AM
Subject: Re: [Flashcoders] RE: Best way to learn OO Analysis and Designwith 
ActionScript







I battled furiously to get my head around Object-Oriented Programming with 
Actionscript

http://www.amazon.com/gp/product/0735711836/sr=8-2/qid=1156121055/ref=sr_1_2/103-4690969-4407040?ie=UTF8
only to find that looking back a lot of the explanations largely added to 
my confusion.


IMHO your recommendation wasn't hard to follow but it did lack depth.



To be honest since recommending it I found out there are errors in some 
code examples, and the site specially made to download corrections:

http://www.oopas2.com

is not available.at least not on my internet :-)

I agree with your statement that any in-depth treatment of the subject of 
OOA/OOD/OOP will not be written for ActionScript.


As I understand it, in a similar way to the motivation for making PHP5 
much more Java like (in terms of OOP features) ActionScript 2.0 was made 
Java like in order that serious development tools such as UML and design 
patterns could be applied to the language, and so Java/C++/C# developers 
could easily migrate to using Flash.


It makes sense that Flash developers travel that line in the other 
direction and use some of the resources that Java/C++ coders have, such as 
design patterns and UML.


James
___
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] Possible Challenge: AS 3.0 Compiler :)

2006-08-06 Thread jcarlos

Doesn´t haXe www.haxe.org address this issues ?

I know is another language but it supports all AS 3.0 classes if I´m not 
wrong ?



- Original Message - 
From: astgtciv [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Sunday, August 06, 2006 1:33 PM
Subject: Re: [Flashcoders] Possible Challenge: AS 3.0 Compiler :)


An AS3 SWF compiler, written in AS3 and available at runtime could be 
useful. E.g., you could then compile a SWF on the fly, put its data into a 
ByteArray and then load it from there using 
flash.display.Loader.loadBytes(). This technique could be perhaps used to 
bypass some Flash 9 limitations: e.g., it seems that (unlike in  AS2 with 
duplicateMovieClip()) you can't completely clone a Sprite with its 
Graphics object (to which someting is drawn). You could also serialize the 
resulting swf and send it over a LocalConnection to another swf :)

___
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] xml Help ?

2006-08-06 Thread jcarlos
hi all,


I´m trying to build and xml data provider for a tree component, I´m using and 
recursive approach to get folders and files from some path ( I use zinc 
extensions and they work fine ) 

I get to transverse the folders structure, the tree shows all folders, and all 
files, but all files are being attached to the first folder only ..

What I´ve been trying is to pass the last node.firstChild as the node for the 
next iteration 
but it doesn´t worl at all .


function listFolderContents (path:String, node:XMLNode)
{

 var myFolders:Array = mdm.FileSystem.getFolderList (path);
 //
 for (var i = 0; i  myFolders.length; i++)
 {
  debugArea.text += myFolders[i] + \n;

  var myNodeFolder:XMLNode = myTreeDP.createElement (node);

  myNodeFolder.attributes.label = myFolders[i];

  myNodeFolder.attributes.url = fullPath;

  node.appendChild (myNodeFolder);
//
  listFolderContents (myFolders[i], node);
 }
 var myFiles = mdm.FileSystem.getFileList (path, *.jpg);
 for (var j = 0; i  myFiles.length; i++)
 {
   debugArea.text += path ++ myFiles[j] + \n;

  var myNodeFile:XMLNode = myTreeDP.createElement (node);

  myNodeFile.attributes.label = myFiles[j];

  myNodeFile.attributes.url = path + myFiles[j];

  node.firstChlid.appendChild (myNodeFile);
 }
 node = node.firstChild;
}

any ideas, please ?

João Carlos
___
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: Re: [Flashcoders] Mtasc Delegate

2006-08-05 Thread jcarlos

yes I was compiling with -mx flag ...

and I use an injection swf ..

I´ll give it a try

thanks

João Carlos

- Original Message - 
From: Hans Wichman [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, August 05, 2006 3:20 AM
Subject: Re: Re: [Flashcoders] Mtasc  Delegate


Hi,
are you compiling in mtasc with the -mx flag? If so, the delegate class will
not be compiled into your swf and it will not work.
When I work with Mtasc (through FlashDevelop) i find it the easiest to use
an injection swf, but i dont know if that is an option for you.
If so, create an swf in flash, with :
import mx.utils.Delegate;
var cls0:Delegate;
on the root and export it.

Now when you use this swf as injection swf with mtasc you will be able to
use the Delegate class.

HTH
JC



On 8/4/06, Chris Allen [EMAIL PROTECTED] wrote:


Another approach is to use Steve Webster's Delegate. It's polymorphic
with the MM version. Here it is anyway:

http://dynamicflash.com/2005/05/delegate-version-101/

You get additional functionality similar to Joey Lott's version too,
if you decide you need it.

Hope it helps.

-Chris

On 8/2/06, jcarlos [EMAIL PROTECTED] wrote:
 thanks Pål  I´will check that

 - Original Message -
 From: Pål Østerud [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Sent: Wednesday, August 02, 2006 6:48 AM
 Subject: Re: [Flashcoders] Mtasc  Delegate


 Hi João,
 Mtasc is more strict with variable scope than MM's compiler.
 If you want to use mtasc on MM's Delegate method you can rename the
variable
 called func inside the dynamically created function in the
Delegate.create
 method (that is two places exactly, and don't touch the line
 arguments.callee.func). I can't quote MM's sourcecode here due to
 copyright. Hope that helps.

 Yours sincerely,
 Pål Østerud

  --
 
  From: jcarlos [EMAIL PROTECTED]
  hi All,
  I´m having problems using Delegate  with MTASC
  this works fine Flash compiler
   if (_actionRelease)
   {
container_mc.onRelease = Delegate.create (this, handleRelease);
   }
  but doesn´t work with MTASC
  Any help?  Directions ?
  Thanks in advance
  João Carlos

 ___
 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


Re: [Flashcoders] grab a bitmap region?

2006-08-05 Thread jcarlos
that was my mistake ...   to Export for ActionScript the bitmap itself  not 
a bitmap converted to Mc ...



thanks


- Original Message - 
From: Charles Parcell [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Saturday, August 05, 2006 12:20 AM
Subject: Re: [Flashcoders] grab a bitmap region?


From
http://livedocs.macromedia.com/flash/8/main/1959.html

* Juise said on Feb 22, 2006 at 1:34 AM : *

Seems that symbol has to be bitmap - loadBitmap cannot get movieclip´s
bitmap data.


Charles P



On 8/3/06, jcarlos [EMAIL PROTECTED] wrote:


Does anyone has some links or directions about

How to mark an region over loading an image into a bitmapData on the stage
and copy parts of it ?

I´ve tryed the simplest example from FL 8 reference manual and I didn´t
get just to load the image on the stage

In the manual


...
import flash.display.BitmapData;

var linkageId:String = libraryBitmap;

var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId);

var mc:MovieClip = this.createEmptyMovieClip(mc,
this.getNextHighestDepth());

mc.attachBitmap(myBitmapData, this.getNextHighestDepth());


..

as loadBitmap is a static method so I must have inside a class so I did

import flash.display.BitmapData;
class LoadBitmap
{
private var _myBitmap:BitmapData  ;

function LoadBitmap (holder:MovieClip,linkageID:String)
{
  trace( LoadBitmap constructor  + holder ++ linkageID);
  // it works
  //_myBitmap = new BitmapData(100, 80, true, 0x);

  // it does not works and I get undefined to _myBitmap
  //_myBitmap= BitmapData.loadBitmap (linkageID);

  trace ( _myBitmap ) ;

  var mc:MovieClip = holder.createEmptyMovieClip (mc,
holder.getNextHighestDepth());
  mc._x = 0;
  mc._y = 0;
  mc.attachBitmap ( _myBitmap, 0);
}
}

and instantiate it in the main timeline

var loadBitmap:LoadBitmap = new LoadBitmap(this, myPhoto);

Nothing happens

What am I doing wrong?

in time:   myPhoto is there in the Library

João Carlos
___
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] grabbing screen caps in FL8

2006-08-05 Thread jcarlos
Well 

In the reference manual there is this example for the very start in 

It draw 2 rectangle as BitmapDat and then copy from one to another .   If 
you suppose that one was the result of client actions you could copy part of it 
  but if you mean to get some file/image at client side, grabbing som part 
from it or grabbing its screens and then upload to the server Í suppose you are 
going to need somethink link Zinc ou ScreenWeaver to extend your flash app.
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
var bitmapData_1:BitmapData = new BitmapData (100, 80, false, 0x00CC);
var bitmapData_2:BitmapData = new BitmapData (100, 80, false, 0x00FF);
var mc_1:MovieClip = this.createEmptyMovieClip (mc, this.getNextHighestDepth 
());
mc_1.attachBitmap (bitmapData_1, this.getNextHighestDepth ());
var mc_2:MovieClip = this.createEmptyMovieClip (mc, this.getNextHighestDepth 
());
mc_2.attachBitmap (bitmapData_2, this.getNextHighestDepth ());
mc_2._x = 101;
mc_1.onPress = function ()
{
 bitmapData_2.copyPixels (bitmapData_1, new Rectangle (0, 0, 50, 80), new Point 
(51, 0));
};
mc_2.onPress = function ()
{
 bitmapData_1.copyPixels (bitmapData_2, new Rectangle (0, 0, 50, 80), new Point 
(51, 0));
};


Informit as a lot of usefull start links 

http://www.informit.com/guides/content.asp?g=flashseqNum=337rl=1



- Original Message - 
From: keitai guy [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, August 04, 2006 5:04 PM
Subject: [Flashcoders] grabbing screen caps in FL8


 hi list -
 
 I need to get bitmaps of some flash content (things the user makes client 
 side).
 
 i guess this is possible with the new bitmap api. does anyone have
 tips /examples of this type of thing?
 
 thanks!
 
 /dc
 ___
 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] grab a bitmap region?

2006-08-04 Thread jcarlos
Does anyone has some links or directions about 

How to mark an region over loading an image into a bitmapData on the stage and 
copy parts of it ?

I´ve tryed the simplest example from FL 8 reference manual and I didn´t get 
just to load the image on the stage

In the manual 

...
import flash.display.BitmapData; 

var linkageId:String = libraryBitmap; 

var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId); 

var mc:MovieClip = this.createEmptyMovieClip(mc, this.getNextHighestDepth()); 

mc.attachBitmap(myBitmapData, this.getNextHighestDepth()); 

..

as loadBitmap is a static method so I must have inside a class so I did 

import flash.display.BitmapData;
class LoadBitmap
{
 private var _myBitmap:BitmapData  ;
 
 function LoadBitmap (holder:MovieClip,linkageID:String)
 {
  trace( LoadBitmap constructor  + holder ++ linkageID);
  // it works 
  //_myBitmap = new BitmapData(100, 80, true, 0x);
  
  // it does not works and I get undefined to _myBitmap
  //_myBitmap= BitmapData.loadBitmap (linkageID);
  
  trace ( _myBitmap ) ;
  
  var mc:MovieClip = holder.createEmptyMovieClip (mc, 
holder.getNextHighestDepth());
  mc._x = 0;
  mc._y = 0;
  mc.attachBitmap ( _myBitmap, 0);
 }
}

and instantiate it in the main timeline 

var loadBitmap:LoadBitmap = new LoadBitmap(this, myPhoto);

Nothing happens

What am I doing wrong?

in time:   myPhoto is there in the Library 

João Carlos 
___
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] tweening multiple properties simultaneously

2006-08-04 Thread jcarlos
I did some tests here with one rectangle and I think it is related to the mc 
origin point


When one tween scales it,  it grows from its left upper corner but the 
another tween doesn´t know about  the changes and make the movement based 
on the original position.


So you have to use onMotionChanged to get each ._width after each scale and 
then center at the same time


João Carlos

function moveAndScaling (activeState:MovieClip)
{
// move it to the center of the stage.
var myTweenX:Tween = new Tween (activeState, _xscale, Regular.easeOut, 
activeState._xscale, 200, 2, true);
var myTweenY:Tween = new Tween (activeState, _yscale, Regular.easeOut, 
activeState._yscale, 200, 2, true);

//

myTweenX.onMotionChanged = function ()
{

 var nX:Number = (Stage.width / 2) - activeState._width / 2;
 var nY:Number = (Stage.height / 2) - activeState._height / 2;

 activeState._x = nX;
 activeState._y = nY;
};
}


- Original Message - 
From: Merrill, Jason [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, August 02, 2006 12:09 PM
Subject: RE: [Flashcoders] tweening multiple properties simultaneously



Haven't followed the thread close, but maybe wrap it up in a static
class like this - call your custom function which has all the tweens
combined.  This is what I do, works for me.  Something like this:

//file Animate.as in actionscriptclasspath/com/boa/effects/

import mx.transitions.Tween;
import mx.transitions.easing.*;

class com.boa.effects.Animate{
  public static function myFade(clip:MovieClip, time:Number,
xscale:Number, yscale:Number):Array{
 var a:Object = new Tween(clip, _alpha, Regular.easeIn, 0, 100,
time, true);
 var b:Object = new Tween(clip, _xscale, Regular.easeIn, xscale,
100, time, true);
 var c:Object = new Tween(clip, _yscale, Regular.easeIn, yscale,
100, time, true);
 //returnArray is just an array of the tweens
 //so you can check to see if they are done:
 var returnArray:Array = new Array(a,b,c)
 return returnArray;
 }
}


//.fla and/or other class usage:

import.com.boa.effects.Animate;
Animate.myFade(myClip, .5, 50, 50)


Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions




___
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] Fw: grab a bitmap region?

2006-08-04 Thread jcarlos
Does anyone has some links or directions about :


How to mark an region over loading an image into a bitmapData on the stage and 
copy parts of it ?

At the same time I´ve tryed the simplest example from FL 8 reference manual and 
I didn´t get just to load the image on the stage

In the manual 

...
import flash.display.BitmapData; 

var linkageId:String = libraryBitmap; 

var myBitmapData:BitmapData = BitmapData.loadBitmap(linkageId); 

var mc:MovieClip = this.createEmptyMovieClip(mc, this.getNextHighestDepth()); 

mc.attachBitmap(myBitmapData, this.getNextHighestDepth()); 

..

as loadBitmap is a static method I must have inside a class so I did 

import flash.display.BitmapData;
class LoadBitmap
{
 private var _myBitmap:BitmapData  ;
 
 function LoadBitmap (holder:MovieClip,linkageID:String)
 {
  trace( LoadBitmap constructor  + holder ++ linkageID);
  // it works 
  //_myBitmap = new BitmapData(100, 80, true, 0x);
  
  // it does not works and I get undefined to _myBitmap
  //_myBitmap= BitmapData.loadBitmap (linkageID);
  
  trace ( _myBitmap ) ;
  
  var mc:MovieClip = holder.createEmptyMovieClip (mc, 
holder.getNextHighestDepth());
  mc._x = 0;
  mc._y = 0;
  mc.attachBitmap ( _myBitmap, 0);
 }
}

and instantiate it in the main timeline 

var loadBitmap:LoadBitmap = new LoadBitmap(this, myPhoto);

Nothing happens

What am I doing wrong?

in time:   myPhoto is there in the Library 

Thanks in advance 

João Carlos 
___
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] Mtasc Delegate

2006-08-02 Thread jcarlos

it doesn´t work


- Original Message - 
From: John Grden [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, August 02, 2006 12:30 AM
Subject: Re: [Flashcoders] Mtasc  Delegate


what's the error you get? or does it just simply not work?

JPG

On 8/1/06, jcarlos [EMAIL PROTECTED] wrote:


hi All,

I´m having problems using Delegate  with MTASC

this works fine Flash compiler

  if (_actionRelease)
  {
   container_mc.onRelease = Delegate.create (this, handleRelease);
  }

but doesn´t work with MTASC

Any help?  Directions ?

Thanks in advance

João Carlos

___
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] Mtasc Delegate

2006-08-02 Thread jcarlos

thanks Pål  I´will check that

- Original Message - 
From: Pål Østerud [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, August 02, 2006 6:48 AM
Subject: Re: [Flashcoders] Mtasc  Delegate


Hi João,
Mtasc is more strict with variable scope than MM's compiler.
If you want to use mtasc on MM's Delegate method you can rename the variable 
called func inside the dynamically created function in the Delegate.create 
method (that is two places exactly, and don't touch the line 
arguments.callee.func). I can't quote MM's sourcecode here due to 
copyright. Hope that helps.


Yours sincerely,
Pål Østerud


--

From: jcarlos [EMAIL PROTECTED]
hi All,
I´m having problems using Delegate  with MTASC
this works fine Flash compiler
 if (_actionRelease)
 {
  container_mc.onRelease = Delegate.create (this, handleRelease);
 }
but doesn´t work with MTASC
Any help?  Directions ?
Thanks in advance
João Carlos


___
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] Mtasc Delegate

2006-08-01 Thread jcarlos

hi All,

I´m having problems using Delegate  with MTASC

this works fine Flash compiler

 if (_actionRelease)
 {
  container_mc.onRelease = Delegate.create (this, handleRelease);
 }

but doesn´t work with MTASC

Any help?  Directions ?

Thanks in advance

João Carlos 


___
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] resize flash stage after the fact.

2006-07-25 Thread jcarlos

well

by hand I would group all symbols, register the lef margin for the group, 
modify the document size, and add/subtract the value added/subtracted to the 
symbols group´s left margin.


I think it works, not tested yet.

João Carlos


- Original Message - 
From: Matthew Ganz [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, July 25, 2006 6:07 PM
Subject: [Flashcoders] resize flash stage after the fact.


hi.

quick question about adding width to an fla and arranging the elements 
without having to change the registration point of each symbol. you can do 
this easily in photoshop by choosing the side of the canvas you want the 
dimensions added to.


basically, i'm adding 180 pixels of width and flash ide adds the extra space 
to the right...when i want it to the left. is there an elegent way to 
accomplish this?


thanks for any helpful tips.

matt.
___
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] sequential tweens ?

2006-07-24 Thread jcarlos

I think that there is time and occasion for each line of thought

If you only want a serie of movements in time the solution proposed by Zeh 
is great and I tested it and it works fine, better would it be if he upgrade 
them to AS 2.0 and AS 3.0 -)


But that are projects where we want some decision logic tree and solutions 
like those from Marty and Gerry seems more appropriate, in fact now that I 
begin to see the the problem clearer


What I´d like to have to some suggestions is not to use some package like 
animationpackage ( it is fine the suggestion from marcelo serpa and I´m 
using it too) but as a provocative study matter how to develop one simple 
framework in terms I´ve thought first  ( please excuse me if  I´m tin the 
non-sense field here)


From the framework´s user point of view he would only push Animation 

objects in some tree structure.

and I begin wondering about to use some TREE to represent it where the nodes 
at the same level would be the Animation objects to run at the same time 
and going to low level the animation following the sequence from that node


At first sight ( just exploring ideas) the Animation Class would have as 
properties


the Object to be animated
the desired Actions (Tween/Transition etc) Array to be applied to the 
Object

Null/Child  Animation Objects Array

The logic I´d like to implement would

the root object starts its job and when finished fire all ( if any ) its 
children nodes asynchronously and each node would wait the effect end 
before going down into low leves


Does it maky sense ? -)

João Carlos


- Original Message - 
From: Martin Wood [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, July 23, 2006 6:29 PM
Subject: Re: [Flashcoders] sequential tweens ?


Martin, do not take this personally, I don't mean to sound rude or 
anything, I'm sorry in advance if I do, and your code totally makes 
logical sense and it's 100% correct, but... WHY would someone need so 
much code just to produce sequential tweenings? A bunch of specialized 
functions just to make it work? And then suppose he has an slightly 
different animation he wants to do at the same time, will he need new 
functions, or add parameters to those functions, and so long and so 
forth? Why something so convoluted for something so simple? Simply 
because the tweening doesn't support delays? :(


don't worry i don't take it personally its only programming :)

To me it doesn't seem complicated, just a couple of functions, nothing 
special in either function.


If it doesn't fit the requirements, so be it.

Sorry for the rant, but really, there's a moment you have to use the best 
tool for the task - and I don't mean only the easiest. The tweening 
classes included on Flash are cool and all that, but they're too basic, 
too raw. Why you'd need dozens of lines just to do something that can be 
done with one single line in a pretty straightforward way is beyond me. 
Most of the times I have to build sites, there's so much having to be 
animated correctly that if I resorted to functions and complex callbacks 
any time I needed some kind of sequence or delay, my code would be a 
complete mess and the sequence would be unmaintainable. Now, with delays 
it's as easy as it gets. It's easier to read, debug, write, change, etc.


Don't be sorry, if it upsets you then best to let it out, bottling things 
up isn't good for the soul :)


Anyway, to consider if its easier to change then it really depends on how 
you want to change it. In some cases yes its undoubtedly easier, in other 
cases i think it could be harder but I don't know the API of your tweening 
classes so I cant say.


What if i wanted to trigger something when each tween ends? What if i want 
to perform an action depending on which tween has ended?


Each solution has its pro's and con's so its worth understanding the 
options and the trade offs.


Like i said i don't find functions or callbacks complicated, its the bread 
and butter of programming. The code i showed is an idiom that I've used on 
a number of occasions, not just for sequencing animations but for various 
things that need treating in a consequential manner and aren't all 
necessarily time based.


My advice is to still use another solution. MC Tween, laco's, Fuse Kit, 
it doesn't matter. Any of them will do the trick.


Mine too :)

I don't know any of the other animation kits so I couldn't vouch for their 
ease of use, size when installed or performance, but I've heard good 
things about those you mention.


anyway..shop around, its always the way to get the best deal and the 
solution that fits your needs.


Martin.
___
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

[Flashcoders] sequential tweens ?

2006-07-23 Thread jcarlos

Hi All,

I need some ideas how to workaround the following situation

I have na mc as an holder for some photoStrip   this photoStrip has n 
photos as mcs in it   I want to produce some tween over each one BUT 
the next tween should only begin after the previous has finished


as I don´t know how many photos are ther and as I´m using DepthManager class 
to to set up the photos into the PhotoStrip


I begin using  for in to trasverse the strip but I´m stucked here with some 
clever idea about how to chain these tweens, any help,please ?


 for (var prop in photoStrip)
 {
  if (prop != _childCounter)
  {
var animPhotoX:Tween = new Tween (photoStrip[prop], _xscale, 
Bounce.easeOut, 100, 120, 0.5, true);
var animPhotoY:Tween= new Tween (photoStrip[prop], _yscale, 
Bounce.easeOut, 100, 120, 0.5, true);


animPhotoY.onMotionFinished = function()
{
   //  would be the next tween something like
}
  }
 }
}



I know that inside the the strip the mcs are named as childDepth0  to 
childDepthN-1 being N the number of photos placed in it


I tryed something with a for photoStrip[depthChild + i]  but it didn´t 
work, since the for runs for all values of the control variable not caring 
about if  motionFinished has occurred or not


The last idea I had, but it seemed too dirty would be to have an SetInterval 
checking from time to time if the currente Tween ended and then increment 
i and clear it after the last tween happen.


I need something like an (irch)  GOTO  or some Design Pattern 
techinique I do not master at this point.


Joao Carlos



___
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] sequential tweens ?

2006-07-23 Thread jcarlos

yes .. I think it´s going to work .. I will try

- Original Message - 
From: John VanHorn [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, July 23, 2006 2:00 PM
Subject: Re: [Flashcoders] sequential tweens ?


i think the setInterval thing would work just fine. you could pass the same
time to the interval that you do to the tween.

or you could do somehthing like this:

//if pics are loaded dynamically, these can be set dynamically
var mcNum:Number = 1;
var mcMax:Number = 4;

function nextTween(){
   var theMc:MovieClip = this[mc + mcNum];
   var theTween:Tween = new Tween(theMc, _x, Strong.easeInOut, theMc._x,
theMc._x - 85, 1, true);
   theTween.onMotionFinished = function(){
   mcNum++;
   if(mcNum = mcMax){
   nextTween();
   }
   }
}

nextTween();

On 7/23/06, jcarlos [EMAIL PROTECTED] wrote:


Hi All,

I need some ideas how to workaround the following situation

I have na mc as an holder for some photoStrip   this photoStrip has n
photos as mcs in it   I want to produce some tween over each one BUT
the next tween should only begin after the previous has finished

as I don´t know how many photos are ther and as I´m using DepthManager
class
to to set up the photos into the PhotoStrip

I begin using  for in to trasverse the strip but I´m stucked here with
some
clever idea about how to chain these tweens, any help,please ?

  for (var prop in photoStrip)
  {
   if (prop != _childCounter)
   {
 var animPhotoX:Tween = new Tween (photoStrip[prop], _xscale,
Bounce.easeOut, 100, 120, 0.5, true);
 var animPhotoY:Tween= new Tween (photoStrip[prop], _yscale,
Bounce.easeOut, 100, 120, 0.5, true);

 animPhotoY.onMotionFinished = function()
 {
//  would be the next tween something like
 }
   }
  }
}



I know that inside the the strip the mcs are named as childDepth0  to
childDepthN-1 being N the number of photos placed in it

I tryed something with a for photoStrip[depthChild + i]  but it didn´t
work, since the for runs for all values of the control variable not caring
about if  motionFinished has occurred or not

The last idea I had, but it seemed too dirty would be to have an
SetInterval
checking from time to time if the currente Tween ended and then increment
i and clear it after the last tween happen.

I need something like an (irch)  GOTO  or some Design Pattern
techinique I do not master at this point.

Joao Carlos



___
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 Van Horn
[EMAIL PROTECTED]
___
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] sequential tweens ?

2006-07-23 Thread jcarlos
Well I made some through the onMotionFinished but your app is fully 
dependent on all tweens having their opening job done, the app logic gets 
hidden inside a series of  onMotionFinished wich you have to navigate 
through one by one.


For example I´m doing a CD where I have a lot of  opening activity and only 
after it I set the menus and  display containers


when I did it at first time I had just one function call

createCD()

and as all actions were sequentially dependents, to understand what the app 
did it was necessary to go from one function after another till I got the 
last one 


I was wondering about some colection or queue scheme where some animators 
objects ( object to be tweened, tweening properties ) would implement some 
interface and the complete animation chain would be achived in a FOR  IN 
loop through the collection, am I missing something here ?


I´d  rather to invest more in code clarity than in some special tricks,

even working for some time with OO I still have preference to realize what 
the app is doing in some structured fashion,


maybe I´m overstressing it -)

thanks for your time 

João Carlos

- Original Message - 
From: Zeh Fernando [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, July 23, 2006 1:52 PM
Subject: Re: [Flashcoders] sequential tweens ?



Hi All,
I need some ideas how to workaround the following situation
I have na mc as an holder for some photoStrip   this photoStrip has n 
photos as mcs in it   I want to produce some tween over each one BUT 
the next tween should only begin after the previous has finished


João,

Your best bet would be to use some better tweening engine that allows 
delays. That way you could fire all your tweens at once without having to 
worry about setting callbacks or other events when each tween is 
finished - you just give a increasingly bigger delkay for each photo. Not 
only this makes some clearer and more straightforward code, but you could 
even animate it in a way that the photos' tweening time intersect each 
other, without being dependent on chained events.


For this task I'd recommend mc tween, laco's tween, or the fuse kit. Any 
of them will do what you want, and there's probably a few more that I'm 
forgetting about.


You *could* do it with your onMotionFinished event. You'd need to setup a 
function that fires the animation, and each photo would have to fire the 
animation on the next one. It's simple, but it's awkward and 
counterproductive. And really, this kind of need is something that comes 
up so frequently when animating an interface that using a class or 
extension that supports delays instead is your best bet.



- Zeh
___
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] sequential tweens ?

2006-07-23 Thread jcarlos

Hi Marcelo

you had suggested that to me another time -)

I will take a look on them right now -)

João Carlos
- Original Message - 
From: Marcelo de Moraes Serpa [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, July 23, 2006 4:19 PM
Subject: Re: [Flashcoders] sequential tweens ?


Hi João! Have you taken a look at Fuse or animationpackage? It makes
sequential tweens much easir and straitghforward...

Cheers,

- Marcelo.

On 7/23/06, jcarlos [EMAIL PROTECTED] wrote:


yes .. I think it´s going to work .. I will try

- Original Message -
From: John VanHorn [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, July 23, 2006 2:00 PM
Subject: Re: [Flashcoders] sequential tweens ?


i think the setInterval thing would work just fine. you could pass the
same
time to the interval that you do to the tween.

or you could do somehthing like this:

//if pics are loaded dynamically, these can be set dynamically
var mcNum:Number = 1;
var mcMax:Number = 4;

function nextTween(){
var theMc:MovieClip = this[mc + mcNum];
var theTween:Tween = new Tween(theMc, _x, Strong.easeInOut,
theMc._x,
theMc._x - 85, 1, true);
theTween.onMotionFinished = function(){
mcNum++;
if(mcNum = mcMax){
nextTween();
}
}
}

nextTween();

On 7/23/06, jcarlos [EMAIL PROTECTED] wrote:

 Hi All,

 I need some ideas how to workaround the following situation

 I have na mc as an holder for some photoStrip   this photoStrip has
n
 photos as mcs in it   I want to produce some tween over each one BUT
 the next tween should only begin after the previous has finished

 as I don´t know how many photos are ther and as I´m using DepthManager
 class
 to to set up the photos into the PhotoStrip

 I begin using  for in to trasverse the strip but I´m stucked here with
 some
 clever idea about how to chain these tweens, any help,please ?

   for (var prop in photoStrip)
   {
if (prop != _childCounter)
{
  var animPhotoX:Tween = new Tween (photoStrip[prop], _xscale,
 Bounce.easeOut, 100, 120, 0.5, true);
  var animPhotoY:Tween= new Tween (photoStrip[prop], _yscale,
 Bounce.easeOut, 100, 120, 0.5, true);

  animPhotoY.onMotionFinished = function()
  {
 //  would be the next tween something like
  }
}
   }
 }



 I know that inside the the strip the mcs are named as childDepth0  to
 childDepthN-1 being N the number of photos placed in it

 I tryed something with a for photoStrip[depthChild + i]  but it didn´t
 work, since the for runs for all values of the control variable not
caring
 about if  motionFinished has occurred or not

 The last idea I had, but it seemed too dirty would be to have an
 SetInterval
 checking from time to time if the currente Tween ended and then
increment
 i and clear it after the last tween happen.

 I need something like an (irch)  GOTO  or some Design Pattern
 techinique I do not master at this point.

 Joao Carlos



 ___
 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 Van Horn
[EMAIL PROTECTED]
___
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] Flash SQL

2006-07-12 Thread jcarlos

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


Re: [Flashcoders] AS3 faster ??

2006-07-07 Thread jcarlos

but the faster part should be F9 Player itself, insn´t it ?


- Original Message - 
From: ben farrell [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, July 06, 2006 1:47 PM
Subject: Re: [Flashcoders] AS3 faster ??


At my local Adobe user group, we had a Flex 2 demo which of course 
utilizes the Flash 9 Player and AS3.  The presenter had some code that 
draws fractals on screen.  Using Flash 8 AS2, the fractal took around 45 
seconds to render.  Then he ran the same thing in Flash 9 AS3, and it 
rendered instantaneously.
So it was pretty damn impressive in my book.  I can't say that I've run 
into any daily problems where things don't compile fast enough, so I guess 
I dont know or really care bout that!

ben

Patrick Matte wrote:
Hi people, they say that AS3 is 10 times faster than AS2 but what does 
that
really means ? Does that mean that my movies will play faster even if I 
have
a few dozens movieclips with graphics flying all over the screen? Or does 
it

just mean that my .swf will be compiling 10 times faster?


___
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 - Missing

2006-07-05 Thread jcarlos

But wouldn´t be easier to have composition over extension ?

if you have one generic class that has the country movieclip like an 
property of this class


class  Country
{
 var mcCountry: MovieClip;
 var nameCountry:String;

function Country( mc: MovieClip, name:String)
   {
..
 ..
}

}
- Original Message - 
From: Meinte van't Kruis [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, July 05, 2006 8:17 AM
Subject: Re: [Flashcoders] AS3 - Missing


I'm not sure if it's entirely impossible to assign one class to multiple
movieclips, but if that's true than the easiest way to overcome that problem
is make a baseclass 'Country' and have Brazil extends Country.

You still have the silly task of assigning all your countries to a
different class, but at least your code will be easy to manage.

good luck
-Meinte

On 7/4/06, Marcos Neves [EMAIL PROTECTED] wrote:


Is this the place to talk about AS3? If not, where would be?

The concept of any movieClip be a class is very powerfull, given the
ability to do new ClassName to create a copy of any clip. But the Auto
Generated class and the fact that you can´t have two movieclips with
the same class is something that is limiting flash capabilities.

Example:
I have a A world map where each country is a movieclip. And every one
will have the same behavior. Before flash 9, what I did is assign a
class called Country to each movie clip. This way, I can easy update
the behavior of all at the same time.

With Flash 9, I can´t assign a class with the same name and can´t
specify a base class to the Auto Generated extends.
My suggestion is to do something like this:
http://neves.bs2.com.br/flex/preview.jpg

When ask for AutoGenerate, a check box would enable an different base
class, and I would write on the textbox. So a movieClip called Brazil,
would have a autoGenerated class called Brazil that extends the class
Country, witch would be my base class.

I´m shure no one can deny that this feature is essential.
___
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] very basic question: Help?

2006-06-30 Thread jcarlos
I want to understand which is the best/right way to concatenate movies which 
are dependent on serInterval to finish their execution, 

example

this is part of a very simple image slice movement, I can have n slices, but 
just after the finish of the last one I´d like to know that it has finished 
and then start another animation


for (var i = 0; i  nTarjas; i++)
{
 tarja[i] = this.attachMovie (mcTarjas, tarja + i, 
this.getNextHighestDepth ());
 tarja[i]._x = posXInicial + i * deltaX;
 tarja[i]._y = 0;
 tarja[i]._alpha = (100 - deltaX) + i;
 intervalo[i] = setInterval (moveTarja, deltaTime, i, deltaX);
} 

function moveTarja (atual, deltaX)
{
 tarja[atual]._x -= deltaX;
if (tarja[atual]._x  deltaX * atual)
{

clearInterval (intervalo[atual]);
}
}


stop ();


this code is on the timeline, is not attached to any AS 2 external class

I understand the callBack function concept but I don´t realize how to implement 
it in this situation , like 

myAnimation.onFinished = function()
{
 //  do another thing  
}


thanks for any help 

João Carlos
Brazil 
___
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] generating SWF/FLV ?

2006-06-27 Thread jcarlos
HI All,

I'd like to know if someone has some ideas about  an app usingo nly AS2 that 
would
get an JPG file, record some sound and them export them as SWF ou FLV, to
import further im some other app.

would it be possible ?
-- 
Joâo Carlos
Brazil  * * *
___
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] changing the width of a dynamic text field

2006-06-08 Thread jcarlos
I think is something related to the name of your textField, if it was created 
in the designing or programming mode 

I got this sample from the ActionScript manual, tested it and it works fine

  this.createTextField (my_txt, this.getNextHighestDepth (), 10, 40, 160, 
120);
  my_txt.background = true;
  my_txt.backgroundColor = 0xFF;
  my_txt.border = true;
  my_txt.multiline = true;
  my_txt.type = input;
  my_txt.wordWrap = true;

  this.createTextField (width_txt, this.getNextHighestDepth (), 10, 10, 30, 
20);
  width_txt.border = true;
  width_txt.maxChars = 3;
  width_txt.restrict = 0-9;
  width_txt.type = input;
  width_txt.text = my_txt._width;
  width_txt.onChanged = function ()
  {
   my_txt._width = this.text;
  };

  this.createTextField (height_txt, this.getNextHighestDepth (), 70, 10, 30, 
20);
  height_txt.border = true;
  height_txt.maxChars = 3;
  height_txt.restrict = 0-9;
  height_txt.type = input;
  height_txt.text = my_txt._height;
  height_txt.onChanged = function ()
  {
   my_txt._height = this.text;
  };

João Carlos Santiago

- Original Message - 
From: Phil Glatz [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, June 07, 2006 6:55 PM
Subject: [Flashcoders] changing the width of a dynamic text field


I have a single dynamic text field (pText) I'd like to dynamically 
 change the width of.  It is multiline with a border, and other options are 
 off.
 
 When I execute the following actionscript:
 
 trace('w1:'+pText._width);
 pText._width=200;
 trace('w2:'+pText._width);
 
 
 the trace output is:
 
 w1:400
 w2:375.7
 
 
 Why isn't the width of the textfield at w2 set to 200?  Seems like it 
 should.  (I'm prepared for a d'oh and slap to the forehead).
 
 ___
 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] callBack for Beginners ?

2006-06-07 Thread jcarlos
Hi All, 

I need help  

I trying to develop some small app that read a Parameters list from a XML file 
and then if succeded, read other XML files as specified by the Parameters file 
and only after these files were read and succeed the app would start, what is 
usually get with something like this 

..
  1.. var myParameters:XML = new XML(); 
  2.. myParametersignoreWhite = true; 
  3.. myParameters.onLoad = function(success) 
  4.. { 
  5.. if ( success) 
  6..{ 
  7..//  get the Paramenters from myParameters 
  8..//  begin reading other  XML files 
  9..// wait for them to succed 
  10..//  start app 
  11..} 
  12.. }; 
  13.. myParameters.load(parameters.xml);


but I´m guessing how to do it in a clean way, because after some files it gets 
messy and hard to read and mantain, 

how could I make each XML loading dispatch some special event after it succed 
to the main app and only after all events of all files occurred it would start 
it ??

Should the main app be implemented as some kind of OBSERVER pattern where it 
stays listening to these events ?

João Carlos
Rio Brazil
___
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] actionscript injection on root timeline?

2006-05-28 Thread jcarlos
Mtasc compiler has a parameter -frame  (framenumber) wich sets the injection 
point.

from mtasc.org

  Additional arguments are the following : 

a.. -swf file : specify input SWF which contains assets. 
b.. -cp path : add a directory path to the ClassPath : this is the list of 
directories that MTASC will use to look for .as files. You can use several 
times -cp to add several directories. 
c.. -main : will automaticaly call static function main once all classes 
are registered. 
d.. -header width:height:fps:bgcolor : does not load a SWF, instead create 
a new one containing only compiled code and using provided header informations. 
bgcolor is optional and should be 6 digits hexadecimal value. 
e.. -mx : use precompiled MX classes (see section on V2 components below). 
  Some other arguments, for advanced users : 

a.. -version n : specify SWF version : 6 to generate Player 6r89 compatible 
SWF or 8 to access Flash8 features. 
b.. -v : activate verbose mode, printing some additional informations about 
compiling process. 
c.. -out file : change output swf file. 
d.. -msvc : use Microsoft Visual Studio errors style formating instead of 
Java style (for file names and lines number). 
e.. -strict : will use strict compilation mode which require that all 
variables are explicitely typed. 
f.. -exclude file : exclude code generation of classes listed in specified 
file (format is one full class path per line). 
g.. -trace function : specify a custom trace function. (see Trace 
Facilities), or no disable all the traces. 
h.. -keep : keep AS2 classes compiled by MCC into the SWF (this could cause 
some classes to be present two times if also compiled with MTASC). 
i.. -frame f : will export AS2 classes into target frame of swf. 
j.. -pack path : compile all the files contained in specified package - not 
recursively (eg to compile files in c:\flash\code\my\app do mtasc -cp 
c:\flash\code -pack my/app). 
k.. -group : will merge classes into one single clip (this will reduce SWF 
size but might cause some problems if you're using -keep or -mx). 
l.. -wimp : adds warnings for import statements that are not used in the 
file. 
m.. -infer : adds type inference for initialized local variables (see 
below). 
and those who use MTASC and did not have know about haXe should spend some time 
and take a look for this language, 

from   www.haxe.org 

  Basicly, what haXe can do is : 

a.. create Flash SWF files using Flash APIs for Players 6,7,8 and soon 8.5
b.. generate Javascript code using Browser DHTML API, so you can create 
AJAX web applications
c.. generate Bytecode that can be used on the Server side (using an Apache 
plugin) or packed into standalone executable
  Each of theses platforms have their own API, but they share the same 
programming language and the same standard library, so if your classes are pure 
code (using no platform-specific API) then they can be compiled and used 
everywhere, depending on your needs. 

  Also, haXe make it easy to interoperate between theses different platforms, 
by providing common protocol libraries. Please note that it's still possible to 
use haXe on only one platform if you want for example keep your current working 
code.


João Carlos
 
- Original Message - 
From: aaron smith [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, May 28, 2006 6:07 AM
Subject: [Flashcoders] actionscript injection on root timeline?


 is it possible to use mtasc to inject code into the root timeline of a 
 already existing swf? the swf is an embeddedvideo. I want to inject some 
 code onto the first frame so I can control it when loaded.
 
 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@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] MTASC to EXE ?

2006-05-24 Thread jcarlos
What is the way, if there is one, for going from MTASC compiled SWF app and 
an .EXE  ?


Thanks,

João Carlos 


___
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