Re: [Flashcoders] Re: How to take screenshot of sites , as seen on snap.com

2008-04-01 Thread Digg Yeah
Thank you guys.
Thuy Nguyen, can you just give a little bit more detail on how this is
possible using just js and css?
Ain Tohvri, i tried browsershots. But what they do is to fire the browser,
and take screenshots using Python. Is there anyway to take snaps without
physically launching the browser?

Thanks!
Roger.

On Mon, Mar 31, 2008 at 6:22 PM, Thuy Nguyen [EMAIL PROTECTED]
wrote:

 JavaScript and CSS

 ---
 Thuy Nguyen
 Web Developer
 Angus Productions Inc.




 On Mar 30, 2008, at 11:03 AM, flashcoders-
 [EMAIL PROTECTED] wrote:

  Send Flashcoders mailing list submissions to
flashcoders@chattyfig.figleaf.com
 
  To subscribe or unsubscribe via the World Wide Web, visit
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
 
  You can reach the person managing the list at
[EMAIL PROTECTED]
 
  When replying, please edit your Subject line so it is more specific
  than Re: Contents of Flashcoders digest...
 
 
  Today's Topics:
 
 1. How to take screenshot of sites , as seen on snap.com (Digg
  Yeah)
 
 
  --
 
  Message: 1
  Date: Sun, 30 Mar 2008 19:29:56 +0530
  From: Digg Yeah [EMAIL PROTECTED]
  Subject: [Flashcoders] How to take screenshot of sites , as seen on
snap.com
  To: flashcoders@chattyfig.figleaf.com
  Message-ID:
[EMAIL PROTECTED]
  Content-Type: text/plain; charset=ISO-8859-1
 
  Not sure if this is the right place to ask this, but can anybody
  share a
  pointer to how snap.com capture sceenshot of  sites?
  Any help would be much appreciated.
 
  Thank you for your time.
 
 
  --
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
  End of Flashcoders Digest, Vol 6, Issue 48
  **

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

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


Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Jason Van Cleave
you can try and authenticate before you go to the page or hardcode your
user/pass like

var url:String = http://user:[EMAIL PROTECTED];

On Mon, Mar 31, 2008 at 11:32 AM, Gert-Jan van der Wel 
[EMAIL PROTECTED] wrote:

 Hi everybody,

 I'm having some trouble with connecting to a SOAP web service from my
 AS2 app. I need to log in on the web service to use it, but I don't
 know when I should use the login/pass. I use this script:

 var service:WebService = new WebService( url );
 var call:PendingCall = service.doSomething();

 call.onResult = function( result:XML ) {
trace( result );
 };
 call.onFault = function( fault:SOAPFault ) {
trace(Webservice fault: + fault.faultcode + , +
 fault.faultstring );
 }

 When I run it on my local machine there's no problem, but when I run
 it from our server a html dialog appears and I get a SOAPFault.

 Any suggestions?

 Cheers,
 Gert-Jan



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

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


Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Allandt Bik-Elliott (Receptacle)
ah yes - i couldn't get the mouseChildren to work before when i had  
drawn in the movieclip but now i've separated the container movieclip  
from the drawn-in shape, it' s working


thanks for your help guys

here's a copy of my code in case anyone else is interested:
CODE
// on xml load complete
private function periodCompleteListener(e:Event):void
{
periodXmlDoc = periodXmlLoader.doc;
trace (periodXmlDoc.toXMLString());

for each (var period:XML in periodXmlDoc.*)
{
createPeriodBar([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],  
[EMAIL PROTECTED]);

}
}

		private function createPeriodBar(dateStart:int, dateEnd:int,  
pbTitle:String, pbDate:String, pbList:Array = null):void

{
var pixelStart:int = yearsToPixels(dateStart);
var pixelEnd:int   = yearsToPixels(dateEnd);

var pbX:int = pixelStart;
var pbWidth:int = pixelEnd - pixelStart;

			var pbYStart:int = taTitleBarHeight + pbSpace; // start point for  
all period bars
			var pbY:int = pbYStart + pbGetY(dateStart, dateEnd) * (pbHeight 
+pbSpace);  // pbGetY(below) returns a level which is multiplied by  
the hight and the spacing


			var pbcontainer:MovieClip = new MovieClip(); // movieclip that  
holds a variable (rolloverText), textfield and shape

var pb:Shape = new Shape();

if (uint(dateEnd-dateStart)  1)
{
pb.graphics.beginFill(0xFF,.3);// white 50% 
alpha

pb.graphics.drawRoundRect(0,0,pbWidth,pbHeight,pbHeight);
pb.graphics.endFill();
pbcontainer.x = pbX;
pbcontainer.y = pbY;

var pbText:SimpleTextField = new SimpleTextField(0xFF, 14,  
headingFont, 4, -2, pbWidth-4, 25, pbTitle, false);

pbText.selectable = false;
pbText.text +=  ;
pbText.text += pbDate;
var pbf:TextFormat = new TextFormat();
pbf.font= 
subheadingFont;
pbf.size= 10;
var pbCurrentLength = 
pbTitle.length+1;
var pbDateLength= pbText.length;
pbText.setTextFormat(pbf, pbCurrentLength, 
pbDateLength);

pbcontainer.addChild(pbText);
pbcontainer.addChild(pb);
pbcontainer.mouseChildren = false;
} else
{
pb.graphics.beginFill(0xFF,.5);// white 50% 
alpha
pb.graphics.drawCircle(0,0,pbHeight/2);
pb.graphics.endFill();
pbcontainer.x = pbX;
pbcontainer.y = pbY+(pbHeight/2);

pbcontainer.addChild(pb);
}
pbcontainer.rolloverText = pbTitle + \n + pbDate;
			pbcontainer.addEventListener(MouseEvent.MOUSE_OVER,  
pbMouseOverListener);


scrollableBase.addChild(pbcontainer);
}

		// replaces the mousefollower.text with what's in the rolloverText  
variable

private function pbMouseOverListener(e:MouseEvent):void
{
mfTextField.text = e.target.rolloverText;
mouseFollower.visible = true;
}

		// this stacks the period bars automatically based on if the dates  
overlap

private function pbGetY(dateStart:int, dateEnd:int):int
{
var level:int = 0;
for (var i=0; ipreviousDateEnd_ar.length; i++)
{
if (dateStartpreviousDateEnd_ar[level])
{
previousDateEnd_ar[level] = dateEnd;
return level;
}
level++;
}
previousDateEnd_ar.push(dateEnd);

Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Allandt Bik-Elliott (Receptacle)

thanks Jiri

i've just got the design patterns book so i'll be digging into that  
at some point in the near future


a

On 1 Apr 2008, at 10:40, Jiri Heitlager wrote:

I think the best way to learn about Event Bubbling is understanding  
the Composite desing pattern. This is the pattern the DisplayList  
is implementing and bubbling will make much more sense when you  
understand the workings of the Composite Pattern. At least it did  
for me.


Jiri

Steven Sacks wrote:
IMO, explaining Event Bubbling as the reason the TextField is the  
target is complicating the immediate solution he needs, which is  
mouseChildren = false.
Yes, it's Event Bubbling that's causing the target to be the  
TextField.  To understand Event Bubbling, read about it in the  
docs, or better yet, in a book (like Moock's).  But, then you MUST  
do it yourself to learn how it works.  If you don't play with it  
yourself, you will never get it no matter how much somebody  
explains it to you.  I'm fully convinced of that.  You gotta mess  
around with it to fully understand why it's so amazingly awesome.

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

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




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


Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Gert-Jan van der Wel
Thanks for your suggestion, but it doesn't seem to work...

Gert-Jan

2008/4/1, Jason Van Cleave [EMAIL PROTECTED]:

 you can try and authenticate before you go to the page or hardcode your
 user/pass like

 var url:String = http://user:[EMAIL PROTECTED];


 On Mon, Mar 31, 2008 at 11:32 AM, Gert-Jan van der Wel 
 [EMAIL PROTECTED] wrote:

  Hi everybody,
 
  I'm having some trouble with connecting to a SOAP web service from my
  AS2 app. I need to log in on the web service to use it, but I don't
  know when I should use the login/pass. I use this script:
 
  var service:WebService = new WebService( url );
  var call:PendingCall = service.doSomething();
 
  call.onResult = function( result:XML ) {
 trace( result );
  };
  call.onFault = function( fault:SOAPFault ) {
 trace(Webservice fault: + fault.faultcode + , +
  fault.faultstring );
  }
 
  When I run it on my local machine there's no problem, but when I run
  it from our server a html dialog appears and I get a SOAPFault.
 
  Any suggestions?
 
  Cheers,
  Gert-Jan
 
 
 

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




-- 
Gert-Jan van der Wel
Co-Founder  CTO

Floorplanner.com
+31 (0)10 281 0799
+31 (0)6 1665 0338
[EMAIL PROTECTED]
http://www.floorplanner.com
skype: gertjan-floorplanner
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Jiri Heitlager
I think the best way to learn about Event Bubbling is understanding the 
Composite desing pattern. This is the pattern the DisplayList is 
implementing and bubbling will make much more sense when you understand 
the workings of the Composite Pattern. At least it did for me.


Jiri

Steven Sacks wrote:
IMO, explaining Event Bubbling as the reason the TextField is the target 
is complicating the immediate solution he needs, which is mouseChildren 
= false.


Yes, it's Event Bubbling that's causing the target to be the TextField.  
To understand Event Bubbling, read about it in the docs, or better yet, 
in a book (like Moock's).  But, then you MUST do it yourself to learn 
how it works.  If you don't play with it yourself, you will never get 
it no matter how much somebody explains it to you.  I'm fully convinced 
of that.  You gotta mess around with it to fully understand why it's so 
amazingly awesome.


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


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


[Flashcoders] some dying logic ...

2008-04-01 Thread Cedric Muller

Hello,

I did develop a global process, in which my customized objects do  
have a 'die' method which is called in the end of an object's life in  
order to clean *everything* (like removing internal movieclips,  
sprites, listeners, timers, ..)


this is what I came up with: the following block code is part of  
MyWhateverObject die method:


//  basicNews is some basic Repeater 
if (this.basicNews != null) {
	this.basicNews.removeEventListener(RepeaterEvent.CLICK,  
this.onNewsClicked);

this.removeChild(this.basicNews);
this.basicNews.die();
this.basicNews = null;
}

my question is the following: when would you call the basicNews.die()  
method ? BEFORE or AFTER the 'this.removeChild(this.basicNews)' ?


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


[Flashcoders] Some feedback on a coding design question

2008-04-01 Thread Jiri Heitlager

Hello List,

I am currently building an application that uses panels. The Panels 
implement a Composite Pattern. The panel holds instances of 
panelButtonSets class.

The panel displays certain sets based on a selected item in the client code.

Now my question is, how do I get around a lot of if statements in the 
panel like so:

if(clientcode.selecteditem.type == 1){
 panel.addSet(position_panel)
 panel.addSet(rotation_panel)
 panel.addSet(edit_panel)
}else if(clientcode.selecteditem.type == 2){
//different sets of button sets
}

etc...

One solution I am thinking about is the following, but I would like to 
get some feedback on this approach.


BasicButtonSet() {

addSets(new panelButtonSets(position_panel))
addSets(new panelButtonSets(rotation_panel))
}

ColorButtonSet() extends BasicButtonSet {

addSets(new panelButtonSets(color_panel))
addSets(new panelButtonSets(brightness_panel))
}

var basicSet:ButtonSet = new BasicButtonSet();
var colorSet:ButtonSet = new ColorButtonSet();

Then the selected item holds a reference to a certain set that can be 
loaded into the panel.



var set = selectItem.GetButtonSet();

Panel.loadSetObject(set )
{
	for every set in the parameter set, call its render method and place it 
at the right position


};

The thing in this solution is that every set is allready instantiated 
and therefore is probably a quit expensive solution?



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


Re: [Flashcoders] Re: How to take screenshot of sites , as seen on snap.com

2008-04-01 Thread Vlado Krempl

Hi there,

Another great tool to take snaps of your websites is to use snagit.

http://www.snagit.com

Hope that helps,

vlado krempl
sydney, australia


- Original Message - 
From: Digg Yeah [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Tuesday, April 01, 2008 5:01 PM
Subject: Re: [Flashcoders] Re: How to take screenshot of sites ,as seen on 
snap.com




Thank you guys.
Thuy Nguyen, can you just give a little bit more detail on how this is
possible using just js and css?
Ain Tohvri, i tried browsershots. But what they do is to fire the browser,
and take screenshots using Python. Is there anyway to take snaps without
physically launching the browser?

Thanks!
Roger.

On Mon, Mar 31, 2008 at 6:22 PM, Thuy Nguyen [EMAIL PROTECTED]
wrote:


JavaScript and CSS

---
Thuy Nguyen
Web Developer
Angus Productions Inc.




On Mar 30, 2008, at 11:03 AM, flashcoders-
[EMAIL PROTECTED] wrote:

 Send Flashcoders mailing list submissions to
   flashcoders@chattyfig.figleaf.com

 To subscribe or unsubscribe via the World Wide Web, visit
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 or, via email, send a message with subject or body 'help' to
   [EMAIL PROTECTED]

 You can reach the person managing the list at
   [EMAIL PROTECTED]

 When replying, please edit your Subject line so it is more specific
 than Re: Contents of Flashcoders digest...


 Today's Topics:

1. How to take screenshot of sites , as seen on snap.com (Digg
 Yeah)


 --

 Message: 1
 Date: Sun, 30 Mar 2008 19:29:56 +0530
 From: Digg Yeah [EMAIL PROTECTED]
 Subject: [Flashcoders] How to take screenshot of sites , as seen on
   snap.com
 To: flashcoders@chattyfig.figleaf.com
 Message-ID:
   [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1

 Not sure if this is the right place to ask this, but can anybody
 share a
 pointer to how snap.com capture sceenshot of  sites?
 Any help would be much appreciated.

 Thank you for your time.


 --

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


 End of Flashcoders Digest, Vol 6, Issue 48
 **

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


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




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


Re: [Flashcoders] Some feedback on a coding design question

2008-04-01 Thread Raymond Simmons

Jiri,

Sounds like the state pattern would be helpful here.  Define a class for 
each state of the application.  Each class will contain methods for actions 
the user can take in that state, like selectListItem.  When the user takes 
the given action (ex., selecting a list item), the associated function in 
the current state is called, and the correct actions are performed.  Once 
those actions are performed, move the application to the new state. 
Essentially the current state class decides what actions to take in response 
to user interaction with the application.


Thanks,
Raymond Simmons

- Original Message - 
From: Jiri Heitlager [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Tuesday, April 01, 2008 6:03 AM
Subject: [Flashcoders] Some feedback on a coding design question



Hello List,

I am currently building an application that uses panels. The Panels 
implement a Composite Pattern. The panel holds instances of 
panelButtonSets class.
The panel displays certain sets based on a selected item in the client 
code.


Now my question is, how do I get around a lot of if statements in the 
panel like so:

if(clientcode.selecteditem.type == 1){
 panel.addSet(position_panel)
 panel.addSet(rotation_panel)
 panel.addSet(edit_panel)
}else if(clientcode.selecteditem.type == 2){
//different sets of button sets
}

etc...

One solution I am thinking about is the following, but I would like to get 
some feedback on this approach.


BasicButtonSet() {

addSets(new panelButtonSets(position_panel))
addSets(new panelButtonSets(rotation_panel))
}

ColorButtonSet() extends BasicButtonSet {

addSets(new panelButtonSets(color_panel))
addSets(new panelButtonSets(brightness_panel))
}

var basicSet:ButtonSet = new BasicButtonSet();
var colorSet:ButtonSet = new ColorButtonSet();

Then the selected item holds a reference to a certain set that can be 
loaded into the panel.



var set = selectItem.GetButtonSet();

Panel.loadSetObject(set )
{
for every set in the parameter set, call its render method and place it at 
the right position


};

The thing in this solution is that every set is allready instantiated and 
therefore is probably a quit expensive solution?



Jiri 


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


Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Hans Wichman
hi,
creating a webservice is asynchronous, at least in as2, you will have
to wait for the creation to complete.
That probably doesnt solve your problem ,but is a prerequisite anyway

greetz
JC

On Tue, Apr 1, 2008 at 11:46 AM, Gert-Jan van der Wel
[EMAIL PROTECTED] wrote:
 Thanks for your suggestion, but it doesn't seem to work...

 Gert-Jan

 2008/4/1, Jason Van Cleave [EMAIL PROTECTED]:

 
  you can try and authenticate before you go to the page or hardcode your
  user/pass like
 
  var url:String = http://user:[EMAIL PROTECTED];
 
 
  On Mon, Mar 31, 2008 at 11:32 AM, Gert-Jan van der Wel 
  [EMAIL PROTECTED] wrote:
 
   Hi everybody,
  
   I'm having some trouble with connecting to a SOAP web service from my
   AS2 app. I need to log in on the web service to use it, but I don't
   know when I should use the login/pass. I use this script:
  
   var service:WebService = new WebService( url );
   var call:PendingCall = service.doSomething();
  
   call.onResult = function( result:XML ) {
  trace( result );
   };
   call.onFault = function( fault:SOAPFault ) {
  trace(Webservice fault: + fault.faultcode + , +
   fault.faultstring );
   }
  
   When I run it on my local machine there's no problem, but when I run
   it from our server a html dialog appears and I get a SOAPFault.
  
   Any suggestions?
  
   Cheers,
   Gert-Jan
  
  
  
 
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 Gert-Jan van der Wel
 Co-Founder  CTO

 Floorplanner.com
 +31 (0)10 281 0799
 +31 (0)6 1665 0338
 [EMAIL PROTECTED]
 http://www.floorplanner.com
 skype: gertjan-floorplanner

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

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


RE: [Flashcoders] Re: How to take screenshot of sites , as seen on snap.com

2008-04-01 Thread Merrill, Jason
I'll second Snagit - it's awesome and doeswhat Vlado describes.  Has a
ton of other features too - best capture utility out there IMO.

Jason Merrill
Bank of America  
GTO and Risk LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community


Are you a Bank of America associate interested in innovative learning
ideas and technologies? 
Check out our internal  GTO Innovative Learning Blog  subscribe.

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


Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Meinte van't Kruis
the problem with most explanations about event bubbling is that it
concentrates on the displaylist (understandable), i'd like to see an example
of custom events being bubbled. Though Steven's probably right, playing with
it helps alot.

On Tue, Apr 1, 2008 at 12:49 PM, Allandt Bik-Elliott (Receptacle) 
[EMAIL PROTECTED] wrote:

 thanks Jiri

 i've just got the design patterns book so i'll be digging into that
 at some point in the near future

 a

 On 1 Apr 2008, at 10:40, Jiri Heitlager wrote:

  I think the best way to learn about Event Bubbling is understanding
  the Composite desing pattern. This is the pattern the DisplayList
  is implementing and bubbling will make much more sense when you
  understand the workings of the Composite Pattern. At least it did
  for me.
 
  Jiri
 
  Steven Sacks wrote:
  IMO, explaining Event Bubbling as the reason the TextField is the
  target is complicating the immediate solution he needs, which is
  mouseChildren = false.
  Yes, it's Event Bubbling that's causing the target to be the
  TextField.  To understand Event Bubbling, read about it in the
  docs, or better yet, in a book (like Moock's).  But, then you MUST
  do it yourself to learn how it works.  If you don't play with it
  yourself, you will never get it no matter how much somebody
  explains it to you.  I'm fully convinced of that.  You gotta mess
  around with it to fully understand why it's so amazingly awesome.
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 


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




-- 
M.A. van't Kruis
http://www.malatze.nl/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Merrill, Jason
the problem with most explanations about event bubbling is 
that it concentrates on the displaylist (understandable), i'd 
like to see an example of custom events being bubbled.

I think that's because only display objects can bubble events, I don't
think non-visual classes can bubble events (unless they extend a display
object like Sprite, but that's a hack).  I don't know why it is this
way, but that has been my understanding.  I wish non-visual classes
could bubble too.  If someone knows otherwise, please advise.


Jason Merrill
Bank of America  
GTO and Risk LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community


Are you a Bank of America associate interested in innovative learning
ideas and technologies? 
Check out our internal  GTO Innovative Learning Blog  subscribe.



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


[Flashcoders] Multiple SWFs (50) in one html page dramaticly increase memory ?

2008-04-01 Thread Flap Flap
Hi there,

We have a php dev here that have embed a simple swf in a php file that show
search result.
Each result line show an image with an effect so the image is loaded by a
swf.
When we make a test with 50 line of result, the memory of the browser raise
up of 50 Mo...
Even if the swf is empty of code !

Is this a common issue of yours ?

thanks

-- 
Benoît Milgram / Flapflap
http://www.kilooctet.net

I'm also a music mashup / bootlegs producer :
http://www.djgaston.net
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Root casting as Main big problem [solved]

2008-04-01 Thread laurent

yes!

var mcRoot:MovieClip = MovieClip( root ).parent.parent as MovieClip;

finaly got it right, as natural as it has to be the MovieClip( root ) 
point to the root of the mc your calling it from.

Then you have to go through the parents till you find the root1.

Thanks so much for the MovieCLip casting ;) and for the swc chapter, now 
I will be able to use that imageprocessing library given as a swc.

Cheers
L

laurent a écrit :


hm...the MovieClip( root ) help to compile with no error. But then 
trying to acces a method of the root throw an error about:
TypeError: Error #1010: Un terme n'est pas défini et n'a pas de 
propriété.


term undefined...it can't find the object referenced


so I casted the object I'm trying to acces from root:

import org.lf.PreLoader;  
   trace(PreLoader( MovieClip( root ).pl ));

   trace(PreLoader( MovieClip( root ).pl ).lxl);
   var mc:MovieClip = MovieClip( root ).pl.lxl;
   if( MovieClip( root ).ready[ mc ] ){
   mc.launch();  }else{
   MovieClip( root ).ready[ mc ] = true;
   }

and the trace return null for the first one and then throw an error 
because it can't find anything.


Do I have to make a swc ??

thx
L

laurent a écrit :
Thanks for the precise answer, I got the book, will have a look tom 
and try the MovieClip workaround.

Now I will bang my head on sweeter stuff ;) thx
L

jonathan howe a écrit :
I think you might be able to get around this by using a swc, which 
can be
checked for classes by the complier without actually including it in 
the
swf. Do you have Moock's Essential Actionscript 3.0? Chapter 31 
details the
various ways you can do it, all based on which authoring tool you're 
using.

A little much for me to repeat in email.

-jonathan


On Fri, Mar 28, 2008 at 11:10 AM, laurent [EMAIL PROTECTED] 
wrote:


 

Hi, It's very urgent,

try to make it clear:

I have one MovieClip index.swf, with a Main.as class attch to it.

In this class I define properties and method, of course :)

And I load external movieclip, one name content.swf


in this content swf I need to talk with rootand I cast it with 
Main(

root ).myproperty

The problem when I publish this mc is looking for the Main class and
check if element are there, for exemple some linked moviclip, but they
are in the index library.

so I can copy all needed asset in the content library, and perhaps it
will fixe it but I will have all content duplicated...so is there a
workaround ??

Thanks for any urgent help! ;)

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






  


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




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




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


[Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Stuart (FunkDaWeb)
Hi All

Is there any way to autosize the height of a textfield only? I want to manually 
set the width of a dynamic textbox but have the user increase the size of the 
text via a button. I currently have it working how i need but the textbox cuts 
off the bottom of the text when its bigger than the textbox.

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


Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Kevin Newman

Is the posted swf and the webservice on the same servers (url)?

If not, you may have a crossdomain.xml policy  issue.

Kevin N.


Gert-Jan van der Wel wrote:

Thanks for your suggestion, but it doesn't seem to work...

Gert-Jan

2008/4/1, Jason Van Cleave [EMAIL PROTECTED]:
  

you can try and authenticate before you go to the page or hardcode your
user/pass like

var url:String = http://user:[EMAIL PROTECTED];


On Mon, Mar 31, 2008 at 11:32 AM, Gert-Jan van der Wel 
[EMAIL PROTECTED] wrote:



Hi everybody,

I'm having some trouble with connecting to a SOAP web service from my
AS2 app. I need to log in on the web service to use it, but I don't
know when I should use the login/pass. I use this script:

var service:WebService = new WebService( url );
var call:PendingCall = service.doSomething();

call.onResult = function( result:XML ) {
   trace( result );
};
call.onFault = function( fault:SOAPFault ) {
   trace(Webservice fault: + fault.faultcode + , +
fault.faultstring );
}

When I run it on my local machine there's no problem, but when I run
it from our server a html dialog appears and I get a SOAPFault.

Any suggestions?

Cheers,
Gert-Jan


  



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


Re: [Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Cedric Muller

very sketchy idea:

var txtHeight:Number = txtField.textHeight + 4;// (see Flash docs for  
further information on how text is laidout in a TextField object)

txtField.height = txtHeight;

hth,
Cedric


Hi All

Is there any way to autosize the height of a textfield only? I want  
to manually set the width of a dynamic textbox but have the user  
increase the size of the text via a button. I currently have it  
working how i need but the textbox cuts off the bottom of the text  
when its bigger than the textbox.


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


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


RE: [Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Andrew Murphy
You can also do it like this:

var tf:TextField = new TextField();
with(tf){
autoSize = TextFieldAutoSize.LEFT;
wordWrap = true; // width wordWrap set to true it autosizes
// the height to fit the text
w = 300;
text = Blahblahblah yackitty schmackity.
}


Andrew Murphy
Interactive Media Specialist
[EMAIL PROTECTED]

Delvinia
214 King Street West, Suite 214 
Toronto Canada M5H 3S6
P 416.364.1455 ext. 232
F 416.364.9830
W www.delvinia.com

CONFIDENTIALITY NOTICE
This email message may contain privileged or confidential information. If
you are not the intended recipient or received this communication by error,
please notify the sender and delete the message without copying or
disclosing it.

AVIS DE CONFIDENTIALITÉ
Ce message peut contenir de l'information légalement privilégiée ou
confidentielle. Si vous n'êtes pas le destinataire ou croyez avoir reçu par
erreur ce message, nous vous saurions gré d'en aviser l'émetteur et d'en
détruire le contenu sans le communiquer a d'autres ou le reproduire.
 
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stuart
(FunkDaWeb)
Sent: April 1, 2008 12:33 PM
To: Flash Coders List
Subject: [Flashcoders] TextFieldAutoSize [AS3]

Hi All

Is there any way to autosize the height of a textfield only? I want to
manually set the width of a dynamic textbox but have the user increase the
size of the text via a button. I currently have it working how i need but
the textbox cuts off the bottom of the text when its bigger than the
textbox.

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

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.3/1354 - Release Date: 01/04/2008
5:38 AM
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.3/1354 - Release Date: 01/04/2008
5:38 AM
 


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


Re: [Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Stuart (FunkDaWeb)
Worked like a charm many thanks! :o)

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


Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Gert-Jan van der Wel
No, they're not on the same domain. I thought that you only needed a
crossdomain.xml when communicating between swf's. Do you also need one with
web services?

Gert-Jan

2008/4/1, Kevin Newman [EMAIL PROTECTED]:

 Is the posted swf and the webservice on the same servers (url)?

 If not, you may have a crossdomain.xml policy  issue.

 Kevin N.



 Gert-Jan van der Wel wrote:
  Thanks for your suggestion, but it doesn't seem to work...
 
  Gert-Jan
 
  2008/4/1, Jason Van Cleave [EMAIL PROTECTED]:
 
  you can try and authenticate before you go to the page or hardcode your
  user/pass like
 
  var url:String = http://user:[EMAIL PROTECTED];
 
 
  On Mon, Mar 31, 2008 at 11:32 AM, Gert-Jan van der Wel 
  [EMAIL PROTECTED] wrote:
 
 
  Hi everybody,
 
  I'm having some trouble with connecting to a SOAP web service from my
  AS2 app. I need to log in on the web service to use it, but I don't
  know when I should use the login/pass. I use this script:
 
  var service:WebService = new WebService( url );
  var call:PendingCall = service.doSomething();
 
  call.onResult = function( result:XML ) {
 trace( result );
  };
  call.onFault = function( fault:SOAPFault ) {
 trace(Webservice fault: + fault.faultcode + , +
  fault.faultstring );
  }
 
  When I run it on my local machine there's no problem, but when I run
  it from our server a html dialog appears and I get a SOAPFault.
 
  Any suggestions?
 
  Cheers,
  Gert-Jan
 
 
 


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

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


[Flashcoders] using scrollRect and the width / height properties in AS3 F9 - weirdness

2008-04-01 Thread John Axel Eriksson

Hi.


I'm building a simple scrollbar and a scrollcontent class. I'm using  
these in dialogs among other things.
These dialogs draw a frame around their content based on the contents  
width and height + a margin (to
describe it simply). I've not had any problems with this until I  
started using my scroll classes and, to be more

precise, using scrollRects.

What I've found out is that when a scrollRect is set on a  
DisplayObject, the width and height properties on that
DisplayObject do not reflect the scrollRects values until some time in  
the future (perhaps next frame) - I've tested
using a timer which traces out the width and height values at  
different times.


My problem is that this messes up the whole displayList hierarchy and  
the only way to get my dialogs to draw right
is to set some arbitrary timer to fire an event which updates the  
dialog and spefically the frame around the content at
some time in the future (50-100 ms seems to work, but perhaps a  
shorter period could work as well). This is completely

INSANE in my opinion and it doesn't even fix all problems for me.

Why do scrollRects work like that? I can't see ANY benefit to it, only  
trouble. Could anyone help out or explain why this

works the way it does?


Try it yourselves:


import flash.display.*;
import flash.geom.*;
import flash.events.TimerEvent;
import flash.utils.Timer;

var sp1:Sprite=new Sprite();
sp1.graphics.beginFill(0x99,1.0);
sp1.graphics.drawRect(0,0,100,100);

var sp2:Sprite=new Sprite();
sp2.scrollRect=new Rectangle(0,0,20,20);

sp2.addChild(sp1);
addChild(sp2);


function traceValues(te:TimerEvent=null){
trace('container width: '+sp2.width);
trace('child width: '+sp1.width);
}

traceValues();

var t:Timer=new Timer(100, 1);
t.addEventListener(TimerEvent.TIMER, traceValues);
t.start();

stop();
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread EECOLOR
Indeed, if you set the width of a TextField and autoSize to LEFT, it will
automatically resize only the height.


Greetz Erik


On 4/1/08, Andrew Murphy [EMAIL PROTECTED] wrote:

 You can also do it like this:

 var tf:TextField = new TextField();
 with(tf){
 autoSize = TextFieldAutoSize.LEFT;
 wordWrap = true; // width wordWrap set to true it autosizes
 // the height to fit the text
 w = 300;
 text = Blahblahblah yackitty schmackity.
 }

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


RE: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Merrill, Jason
I don't necessary see extending DisplayObject as a hack.  
It's creative leveraging of AS3's native architecture. 

Extending a display object to get the event bubbling of for a non-visual
class - if not a hack, then it's certainly kludgy. 

Jason Merrill
Bank of America  
GTO and Risk LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community


Are you a Bank of America associate interested in innovative learning
ideas and technologies? 
Check out our internal  GTO Innovative Learning Blog  subscribe.




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


[Flashcoders] An error I cant iron out...

2008-04-01 Thread Patrick Jakub Jankun
Hello everyone,

I have a issue with an error I cant get rid off:
TypeError: Error #1007: Instantiation attempted on a non-constructor.

Strange thing is, it occurs only when I try to compile with Flash IDE as
Document class,
It¹s not there when I compile it through Linux free command line compiler :(
can someone
Explain me for what should I look? Because the Error messages in Flash ide
are quite hmm..
Mystic to me (at this time, im like 3 months into AS3)

Thanks for any advice,
Patrick
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Steven Sacks
Extending DisplayObject to access some of its native functionality (e.g. 
event bubbling) seems fine to me, especially if you look at it from the 
perspective of EventDispatcher has events and DisplayObject extends 
EventDispatcher and adds bubbling functionality.  If you need bubbling, 
extend the class that provides that.


The whole non-visual argument is a bit of a red herring considering 
we're using Flash and, until recently, all Actionscript was inside of or 
attached to a display object (MovieClip).  Technically, it still is.  ;)


Flash is a visual tool, and I maximize my productivity by leveraging it 
fully.  Flash has all kinds of great Flash-centric features and you can 
definitely use them to your advantage.  It's not hacking to use the 
API given to you.  :)


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


Re: [Flashcoders] using scrollRect and the width / height properties in AS3 F9 - weirdness

2008-04-01 Thread Pedro Kostelec
I don't get your problem. What is this code about? It has no scrollbar??!!
If you want to refresh the stage faster (using a timer) just add
t.updateAfterEvent();

On Tue, Apr 1, 2008 at 8:26 PM, John Axel Eriksson [EMAIL PROTECTED] wrote:

 Hi.


 I'm building a simple scrollbar and a scrollcontent class. I'm using
 these in dialogs among other things.
 These dialogs draw a frame around their content based on the contents
 width and height + a margin (to
 describe it simply). I've not had any problems with this until I
 started using my scroll classes and, to be more
 precise, using scrollRects.

 What I've found out is that when a scrollRect is set on a
 DisplayObject, the width and height properties on that
 DisplayObject do not reflect the scrollRects values until some time in
 the future (perhaps next frame) - I've tested
 using a timer which traces out the width and height values at
 different times.

 My problem is that this messes up the whole displayList hierarchy and
 the only way to get my dialogs to draw right
 is to set some arbitrary timer to fire an event which updates the
 dialog and spefically the frame around the content at
 some time in the future (50-100 ms seems to work, but perhaps a
 shorter period could work as well). This is completely
 INSANE in my opinion and it doesn't even fix all problems for me.

 Why do scrollRects work like that? I can't see ANY benefit to it, only
 trouble. Could anyone help out or explain why this
 works the way it does?


 Try it yourselves:


 import flash.display.*;
 import flash.geom.*;
 import flash.events.TimerEvent;
 import flash.utils.Timer;

 var sp1:Sprite=new Sprite();
 sp1.graphics.beginFill(0x99,1.0);
 sp1.graphics.drawRect(0,0,100,100);

 var sp2:Sprite=new Sprite();
 sp2.scrollRect=new Rectangle(0,0,20,20);

 sp2.addChild(sp1);
 addChild(sp2);


 function traceValues(te:TimerEvent=null){
trace('container width: '+sp2.width);
trace('child width: '+sp1.width);
 }

 traceValues();

 var t:Timer=new Timer(100, 1);
 t.addEventListener(TimerEvent.TIMER, traceValues);
 t.start();

 stop();
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Pedro D.K.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] books for flash programming

2008-04-01 Thread Alan MacDougall



On 3/24/08, Naveen Bhaskar [EMAIL PROTECTED] wrote:
  

Hi,

I am a flash designer and I am in intermediate in programming.(AS2).

anybody pls tellme what are the good books I can refer.



And remember, just learning Actionscript in particular will not teach 
you programming in general. Jeff Atwood has an excellent list of books 
on topics essential to all programmers, even Actionscript programmers: 
http://www.codinghorror.com/blog/archives/20.html


And if you really want to be a programmer, learn more than just 
Actionscript! A scripting language like Python, Ruby, or Perl will be 
extremely useful to you even as Flash developer -- but you'll never 
realize it until you've learned one.

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


RE: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Merrill, Jason
Well, you still haven't convinced me it isn't kludy, but no bother
your perspective - my perspective - both different, doesn't matter in
the end. :) 

Jason Merrill
Bank of America  
GTO and Risk LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community


Are you a Bank of America associate interested in innovative learning
ideas and technologies? 
Check out our internal  GTO Innovative Learning Blog  subscribe.




 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Steven Sacks
Sent: Tuesday, April 01, 2008 3:05 PM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 MouseEvent target?

Extending DisplayObject to access some of its native 
functionality (e.g. 
event bubbling) seems fine to me, especially if you look at 
it from the perspective of EventDispatcher has events and 
DisplayObject extends EventDispatcher and adds bubbling 
functionality.  If you need bubbling, extend the class that 
provides that.

The whole non-visual argument is a bit of a red herring 
considering we're using Flash and, until recently, all 
Actionscript was inside of or attached to a display object 
(MovieClip).  Technically, it still is.  ;)

Flash is a visual tool, and I maximize my productivity by 
leveraging it fully.  Flash has all kinds of great 
Flash-centric features and you can definitely use them to 
your advantage.  It's not hacking to use the API given to you.  :)

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

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


[Flashcoders] Interfaces

2008-04-01 Thread Omar Fouad
list,
I've been reading tons of books and I still can't get the concept of
Interfaces.

Can someone explain it with an easy example for me?

Help will be really appreciated.

-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

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


RE: [Flashcoders] Interfaces

2008-04-01 Thread Merrill, Jason
I've been reading tons of books and I still can't get the 
concept of Interfaces.

It's actually very very simple.  An interface is just a special class
that sets the rules of other classes.  So an interface doesn't do
anything in your application, it just helps the coder(s) to make sure
they write certain methods, have certain properties, which return
certain things etc.  If a class implements that interface, then the
Flash/Flex whatever compiler will complain if the class is not written
to have certain properties and methods.  It's just to help with coding,
especially in team environments, it doesn't actually do anything in your
application.

Does that make sense?

Jason Merrill
Bank of America  
GTO and Risk LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community


Are you a Bank of America associate interested in innovative learning
ideas and technologies? 
Check out our internal  GTO Innovative Learning Blog  subscribe.



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


Re: [Flashcoders] Multiple SWFs (50) in one html page dramaticly increase memory ?

2008-04-01 Thread Bob Wohl
Are you saying that you are loading 50 images into 1 swf?

OR 50 images into 50 swfs and loading those into 1 swf?

OR 50 swfs embeded into a browser?



On Tue, Apr 1, 2008 at 8:08 AM, Flap Flap [EMAIL PROTECTED]
wrote:

 Hi there,

 We have a php dev here that have embed a simple swf in a php file that
 show
 search result.
 Each result line show an image with an effect so the image is loaded by a
 swf.
 When we make a test with 50 line of result, the memory of the browser
 raise
 up of 50 Mo...
 Even if the swf is empty of code !

 Is this a common issue of yours ?

 thanks

 --
 Benoît Milgram / Flapflap
 http://www.kilooctet.net

 I'm also a music mashup / bootlegs producer :
 http://www.djgaston.net

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


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


Re: [Flashcoders] Interfaces

2008-04-01 Thread Omar Fouad
Yeah, but I've read that a Class that implements an interface an call
function from other classes that allready extends other Classes.
it's like a multiple inheritance. But how can I achieve it?

On Tue, Apr 1, 2008 at 10:30 PM, Merrill, Jason 
[EMAIL PROTECTED] wrote:

 I've been reading tons of books and I still can't get the
 concept of Interfaces.

 It's actually very very simple.  An interface is just a special class
 that sets the rules of other classes.  So an interface doesn't do
 anything in your application, it just helps the coder(s) to make sure
 they write certain methods, have certain properties, which return
 certain things etc.  If a class implements that interface, then the
 Flash/Flex whatever compiler will complain if the class is not written
 to have certain properties and methods.  It's just to help with coding,
 especially in team environments, it doesn't actually do anything in your
 application.

 Does that make sense?

 Jason Merrill
 Bank of America
 GTO and Risk LLD Solutions Design  Development
 eTools  Multimedia

 Bank of America Flash Platform Developer Community


 Are you a Bank of America associate interested in innovative learning
 ideas and technologies?
 Check out our internal  GTO Innovative Learning Blog  subscribe.



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




-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

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


RE: [Flashcoders] Interfaces

2008-04-01 Thread Merrill, Jason
Yeah, but I've read that a Class that implements an interface 
an call function from other classes that allready extends 
other Classes.
it's like a multiple inheritance. But how can I achieve it?

I don't quite follow what the issue is, but don't confuse inheritance
with implements.  Do you mean:

package
{
ClassA extends ClassB implements IClassInterface
{
}
}



Jason Merrill
Bank of America  
GTO and Risk LLD Solutions Design  Development 
eTools  Multimedia 

Bank of America Flash Platform Developer Community


Are you a Bank of America associate interested in innovative learning
ideas and technologies? 
Check out our internal  GTO Innovative Learning Blog  subscribe.



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


Re: [Flashcoders] Interfaces

2008-04-01 Thread EECOLOR
An interface is used to make sure your code is not tightly coupled. Instead
of saying which class should be given, you say which interface should be
given. This means that a developer has more freedom to implement his own
version of an interface.

Lets say you make a person interface called IPerson. This interface has name
getters and setters:

*public interface IPerson
{
   function get name():String;
   function set name(name:String):void;
};*

Now you want to fill up a classroom. The only thing needed within the
classroom is the name of a person. To add a person to the classroom you call
the addPerson method. The class:

*public class ClassRoom
{
   public function addPerson(person:IPerson):void
   {
//do stuff with the person
   };
};*

The addPerson method has a person argument typed as IPerson. This means that
I can give any type of instance to this function as long as it implements
the IPerson interface. This interface makes sure that the class given to the
addPerson method has a name getter and setter.

An example of a person:

*class Jack implements IPerson
{
   private var _name:String;

   public function get name():String
   {
   return _name;
   };

   public function set name(name:String):void
   {
  _name = name;
   };
};*

How my class implements the IPerson interface does not matter to the
ClassRoom class. The only thing the ClassRoom class is interested in is the
name getter and setter.

There are a few cases where interfaces come in handy:

- If you want to be able to easialy switch an implementation without
breaking existing code
- If you are using a module and want to call (from the module) a method in
your framework. The framework should be typed as an interface to prevent it
from being compiled into the module.
- If you are not taking care of the actual implementation (another developer
will write this piece of code), you only want a certain method to be
available because you are using this implementation.
- To give freedom to other developers of your code
(mx.core.UIComponentimplements IUIComponent in Flex. And within Flex
everything is typed as
IUIComponent. This means you could write your own version of IUIComponent if
needed.

On a side note. On complex applications I start with writing interfaces for
every part of my application to prevent me from writing actual code and
thinking about the structure. This approach has only personal benefits and
has officially no added value except for the ones named above (in a later
stage).


Greetz Erik

On 4/1/08, Omar Fouad [EMAIL PROTECTED] wrote:

 Yeah, but I've read that a Class that implements an interface an call
 function from other classes that allready extends other Classes.
 it's like a multiple inheritance. But how can I achieve it?


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


Re: [Flashcoders] using scrollRect and the width / height properties in AS3 F9 - weirdness

2008-04-01 Thread John Eriksson
This code is about the width and height properties not getting changed until
some time in the future (perhaps one frame ahead or a few ms ahead) when
setting a scrollRect. This causes all kinds of problems. The code was very
very simple, just to show that the values are not immediately changed when
setting a scrollRect... I would like to know why that is and what possible
benefits there could be?

The code only shows that setting a scrollRect does NOT immediately change a
DisplayObject's width and height props.

/John

2008/4/1, Pedro Kostelec [EMAIL PROTECTED]:

 I don't get your problem. What is this code about? It has no scrollbar??!!
 If you want to refresh the stage faster (using a timer) just add
 t.updateAfterEvent();


 On Tue, Apr 1, 2008 at 8:26 PM, John Axel Eriksson [EMAIL PROTECTED] wrote:

  Hi.
 
 
  I'm building a simple scrollbar and a scrollcontent class. I'm using
  these in dialogs among other things.
  These dialogs draw a frame around their content based on the contents
  width and height + a margin (to
  describe it simply). I've not had any problems with this until I
  started using my scroll classes and, to be more
  precise, using scrollRects.
 
  What I've found out is that when a scrollRect is set on a
  DisplayObject, the width and height properties on that
  DisplayObject do not reflect the scrollRects values until some time in
  the future (perhaps next frame) - I've tested
  using a timer which traces out the width and height values at
  different times.
 
  My problem is that this messes up the whole displayList hierarchy and
  the only way to get my dialogs to draw right
  is to set some arbitrary timer to fire an event which updates the
  dialog and spefically the frame around the content at
  some time in the future (50-100 ms seems to work, but perhaps a
  shorter period could work as well). This is completely
  INSANE in my opinion and it doesn't even fix all problems for me.
 
  Why do scrollRects work like that? I can't see ANY benefit to it, only
  trouble. Could anyone help out or explain why this
  works the way it does?
 
 
  Try it yourselves:
 
 
  import flash.display.*;
  import flash.geom.*;
  import flash.events.TimerEvent;
  import flash.utils.Timer;
 
  var sp1:Sprite=new Sprite();
  sp1.graphics.beginFill(0x99,1.0);
  sp1.graphics.drawRect(0,0,100,100);
 
  var sp2:Sprite=new Sprite();
  sp2.scrollRect=new Rectangle(0,0,20,20);
 
  sp2.addChild(sp1);
  addChild(sp2);
 
 
  function traceValues(te:TimerEvent=null){
 trace('container width: '+sp2.width);
 trace('child width: '+sp1.width);
  }
 
  traceValues();
 
  var t:Timer=new Timer(100, 1);
  t.addEventListener(TimerEvent.TIMER, traceValues);
  t.start();
 
  stop();

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




 --
 Pedro D.K.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Interfaces

2008-04-01 Thread Steven Sacks
Interfaces can do much more than just help multiple coders stay on 
track.  In Actionscript 3, they can be used to mimic multiple 
inheritance, decrease file size of loaded swfs, and clarify your own code.


Interfaces are simple, but understanding Interfaces and how and when to 
use them takes a bit more time.  You need a firmly established 
understanding of core OOP concepts like inheritance, abstract/concrete, 
and factories.  Once you fully understand those, the transition into 
learning how interfaces work will be a lot easier and will pave the way 
for the Ah ha! moment when you actually get how they benefit you.


If you're the only person working on a project, interfaces can be less 
useful unless you know how to use them well.  Putting them in just to 
put them in serves no purpose other than bloating your code.  But, 
sometimes you need to do that in order to figure them out.


For instance, let's say you have multiple swfs, and some class and its 
inheritance chain is fairly large when compiled.  Rather than import the 
Abstract class type in the loaded swfs, you can instead import the 
Interface for the class and your loaded swf won't need to know the inner 
workings of any class that follows the interface to compile.  At 
runtime, the class will exist because the main movie loaded it, and all 
the loaded swf needs to know is that if it calls a particular method of 
an interface, it's guaranteed to be in the class because the class 
follows that interface.  That's just one example of how interfaces can 
be used.


If you want to see some example code for interfaces, install my Gaia 
Framework, create a new AS3 project, and take a look at the 
com.gaiaframework.api package.  There are interfaces for all of the 
asset classes, as well as the the main Gaia API.  There are more 
complicated uses for interfaces, such as multiple inheritance, but best 
to learn the basics before you jump into that aspect.

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


Re: [Flashcoders] Interfaces

2008-04-01 Thread robert

On Apr 1, 2008, at 1:19 PM, Omar Fouad wrote:

list,
I've been reading tons of books and I still can't get the concept of
Interfaces.

Can someone explain it with an easy example for me?

Help will be really appreciated.



This guy's example gave me a good foothold. Maybe it will help:

http://labs.thesedays.com/2006/12/03/composition-over-inheritance-a-real-life-example/

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


Re: [Flashcoders] Interfaces

2008-04-01 Thread Muzak


If you're the only person working on a project, interfaces can be less 
useful unless you know how to use them well.  Putting them in just to 
put them in serves no purpose other than bloating your code.  But, 
sometimes you need to do that in order to figure them out.




I'd even go as far as saying that if you don't know what they are, you probably 
don't need them ;-)
In your typical every day Flex/Flash type of applications they're (usually) 
overkill.

You'll see them used in frameworks and microarchitectures, like the Flex 
framework, Cairngorm, etc..
So they're more of an API-thing rather than an RIA-thing (if that makes sense).

Have a look at the available flex framework interfaces (they typically begin 
with a capital I):
http://livedocs.adobe.com/flex/3/langref/all-index-I.html

regards,
Muzak

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


Re: [Flashcoders] An error I cant iron out...

2008-04-01 Thread Glen Pike
It might happen if you are doing things inside the class that the IDE 
does not support - there are lots of things on the internet about 
this.  Many of them seem to be because people are using [Embed] (this 
does not work with the IDE), but it could be something similar:


http://www.google.co.uk/search?hl=enq=TypeError%3A+Error+%231007+%22document+class%22btnG=Searchmeta= 
http://www.google.co.uk/search?hl=enq=TypeError%3A+Error+%231007+%22document+class%22btnG=Searchmeta=


If it's not the [Embed] issue, something else in your class is flaky - 
try commenting lines out in the class constructor and then comment out 
any variables that are populated when you declare them, e.g.


class MyClass extends MovieClip {

   //Comment stuff like this out
   private var myChild:MovieClip = new MovieClip();
}

Try to compile as you comment each bit out, etc...

HTH

Glen

Patrick Jakub Jankun wrote:

Hello everyone,

I have a issue with an error I cant get rid off:
TypeError: Error #1007: Instantiation attempted on a non-constructor.

Strange thing is, it occurs only when I try to compile with Flash IDE as
Document class,
It¹s not there when I compile it through Linux free command line compiler :(
can someone
Explain me for what should I look? Because the Error messages in Flash ide
are quite hmm..
Mystic to me (at this time, im like 3 months into AS3)

Thanks for any advice,
Patrick
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


--

Glen Pike
01736 759321
www.glenpike.co.uk http://www.glenpike.co.uk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Interfaces

2008-04-01 Thread Omar Fouad
Well, the example in the blog explained it a lot, though it is in
Actionscript 2.0.

And yes, I wont need Interfaces unless I really feel like I HAVE to use
them.
In my project I have some Panels (screens) in the fla Library and each one
of them is linked to a Class (linkage). Each class or Panel extends an
abstract Class called APanel that extends MovieClip. The APanel Class
contains some features that I need to be shared to all the other Panels. In
the Main class, I managed how to switch them, based on the application flow
and navigation. I use some navigation buttons that slide them to the right
or to the left of the stage.
Till here everything worked fine. But at a certain point I found some
problematic issues. I also need the panels to slide when a certain button is
pressed in one of them. Of course the function I used in the Main Class to
slide the Panels away, wouldn't be available to the other classes unless I
set them to be static, so I could write:

Main.SlideLeft();

Fine. But to make the function static, I'd put in consideration some other
things like turning some of the Main Class Properties used in the function
to static. And that is a problem because library variables cannot be
declared static.

So I think that the use of an interface somewhere would solve the problem.


On Wed, Apr 2, 2008 at 12:24 AM, Muzak [EMAIL PROTECTED] wrote:

 
  If you're the only person working on a project, interfaces can be less
  useful unless you know how to use them well.  Putting them in just to
  put them in serves no purpose other than bloating your code.  But,
  sometimes you need to do that in order to figure them out.
 

 I'd even go as far as saying that if you don't know what they are, you
 probably don't need them ;-)
 In your typical every day Flex/Flash type of applications they're
 (usually) overkill'll.

 You'll see them used in frameworks and microarchitectures, like the Flex
 framework, Cairngorm, etc..
 So they're more of an API-thing rather than an RIA-thing (if that makes
 sense).

 Have a look at the available flex framework interfaces (they typically
 begin with a capital I):
 http://livedocs.adobe.com/flex/3/langref/all-index-I.html

 regards,
 Muzak

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




-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

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


Re: [Flashcoders] Interfaces

2008-04-01 Thread Muzak
Have the panel with the button dispatch an event to which the parent (main) listens, 
The listener then takes care of things (like moving the panel).


Interfaces have nothing to do with this.

regards,
Muzak

- Original Message - 
From: Omar Fouad [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, April 02, 2008 1:58 AM
Subject: Re: [Flashcoders] Interfaces



Well, the example in the blog explained it a lot, though it is in
Actionscript 2.0.

And yes, I wont need Interfaces unless I really feel like I HAVE to use
them.
In my project I have some Panels (screens) in the fla Library and each one
of them is linked to a Class (linkage). Each class or Panel extends an
abstract Class called APanel that extends MovieClip. The APanel Class
contains some features that I need to be shared to all the other Panels. In
the Main class, I managed how to switch them, based on the application flow
and navigation. I use some navigation buttons that slide them to the right
or to the left of the stage.
Till here everything worked fine. But at a certain point I found some
problematic issues. I also need the panels to slide when a certain button is
pressed in one of them. Of course the function I used in the Main Class to
slide the Panels away, wouldn't be available to the other classes unless I
set them to be static, so I could write:

Main.SlideLeft();

Fine. But to make the function static, I'd put in consideration some other
things like turning some of the Main Class Properties used in the function
to static. And that is a problem because library variables cannot be
declared static.

So I think that the use of an interface somewhere would solve the problem.


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


[Flashcoders] removeChild - targeting question

2008-04-01 Thread Forrest Maready
The code below has a problem. The  line within the removeDead function
is supposed to removeChild on the emitter object.
I can't for the life of me figure out what the path is- is it
event.target.parent.removeChild(event.target) or is it parent.removeChild(
event.target) or what? I've tried everything I can think of to no avail-
lots of The supplied DisplayObject must be a child of the caller.

Any ideas? Thank you Flashcoders. May your brightness never dim.




public class Main extends MovieClip
{

var emitter:PEmitter;
var pArray:Array;

public function Main()
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, createPEmitter);
}

public function createPEmitter(event:MouseEvent)
{
if (event.buttonDown == true)
{
emitter = new PEmitter(event.target.mouseX,
event.target.mouseY, circle, 5, 0x00, 3, 3, 95, 90);
//  PEmitter (PositionX:Number, PositionY:Number,
spriteType:String, amount:Number, color:uint, velocity:Number,
velocityRandom:Number, emissionRange:Number, emissionAngle:Number)
addChild(emitter);
emitter.mouseChildren = false;
emitter.addEventListener (Event.ENTER_FRAME, removeDead);
}
}

function removeDead(event:Event)
{
if (emitter.pParticle.pArray.length == 0)
{
trace (No more particles);
 *parent.removeChild(emitter); // THIS LINE NEEDS HELP-- DO YOU
KNOW WHAT PATH WILL REMOVE THE ABOVE EMITTER INSTANCE?
emitter.removeEventListener (Event.ENTER_FRAME, removeDead);
}
}

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


Re: [Flashcoders] removeChild - targeting question

2008-04-01 Thread Steven Sacks

try event.currentTarget

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


Re: [Flashcoders] removeChild - targeting question

2008-04-01 Thread Leandro Ferreira
emitter.parent?


   Leandro Ferreira

On 4/1/08, Forrest Maready [EMAIL PROTECTED] wrote:

 The code below has a problem. The  line within the removeDead function
 is supposed to removeChild on the emitter object.
 I can't for the life of me figure out what the path is- is it
 event.target.parent.removeChild(event.target) or is it parent.removeChild(
 event.target) or what? I've tried everything I can think of to no avail-
 lots of The supplied DisplayObject must be a child of the caller.

 Any ideas? Thank you Flashcoders. May your brightness never dim.




 public class Main extends MovieClip
 {

 var emitter:PEmitter;
 var pArray:Array;

 public function Main()
 {
 stage.addEventListener(MouseEvent.MOUSE_MOVE, createPEmitter);
 }

 public function createPEmitter(event:MouseEvent)
 {
 if (event.buttonDown == true)
 {
 emitter = new PEmitter(event.target.mouseX,
 event.target.mouseY, circle, 5, 0x00, 3, 3, 95, 90);
 //  PEmitter (PositionX:Number, PositionY:Number,
 spriteType:String, amount:Number, color:uint, velocity:Number,
 velocityRandom:Number, emissionRange:Number, emissionAngle:Number)
 addChild(emitter);
 emitter.mouseChildren = false;
 emitter.addEventListener (Event.ENTER_FRAME, removeDead);
 }
 }

 function removeDead(event:Event)
 {
 if (emitter.pParticle.pArray.length == 0)
 {
 trace (No more particles);
   *parent.removeChild(emitter); // THIS LINE NEEDS HELP-- DO
 YOU
 KNOW WHAT PATH WILL REMOVE THE ABOVE EMITTER INSTANCE?
 emitter.removeEventListener (Event.ENTER_FRAME,
 removeDead);
 }
 }

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

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


Re: [Flashcoders] removeChild - targeting question

2008-04-01 Thread Forrest Maready
Steven said event.currentTarget
Leandro said emitter.parent

Thanks guys!
I think the removeChild is working below (event.currentTarget), but now I'm
getting the Cannot access property or method of a null object reference
which is usually what happens when the EventListener is calling a
non-existent object. Can you suggest a change for the first line to remove
the event listener properly?

Thanks again


emitter.removeEventListener (Event.ENTER_FRAME, removeDead);   //NOW
I THINK THIS LINE IS WRONG
event.currentTarget.parent.removeChild(event.currentTarget);



Code for reference:

 function removeDead(event:Event)

  {
  if (emitter.pParticle.pArray.length == 0)
  {
  trace (No more particles);
*parent.removeChild(emitter); // THIS LINE NEEDS HELP-- DO
  YOU
  KNOW WHAT PATH WILL REMOVE THE ABOVE EMITTER INSTANCE?
  emitter.removeEventListener (Event.ENTER_FRAME,
  removeDead);
  }
  }
 
  }


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