Re: [Flashcoders] AS3 XML Namespaces Hell

2008-03-16 Thread Muzak

Odd, I used your xml for testing and it shows: http://tempuri.org/

//XML
?xml version=1.0 encoding=UTF-8?
string xmlns=http://tempuri.org/;
photos
   
item![CDATA[http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]/item
   
item![CDATA[http://www.somedomain.com/photos/jvc_1205424535bernard3.jpg]]/item
/photos
/string


//TESTED in FLA
var req:URLRequest = new URLRequest(photos.xml);
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, loaderCompleteHandler);
loader.load(req);

function loaderCompleteHandler(evt:Event):void {
trace(Application ::: loaderCompleteHandler);
var data:XML = new XML(evt.currentTarget.data);
//trace(data.toXMLString());
trace(data.namespace());
default xml namespace = data.namespace();
trace(data.photos.item[0]);
}

//OUTPUT
Application ::: loaderCompleteHandler
http://tempuri.org/
http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg

regards,
Muzak

- Original Message - 
From: Jason Van Cleave [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Sunday, March 16, 2008 12:11 AM
Subject: Re: [Flashcoders] AS3 XML Namespaces Hell



Thanks Muzak for looking. However that isn't working for me. I don't get
anything after  trace(data.namespace());

On Sat, Mar 15, 2008 at 5:38 AM, Muzak [EMAIL PROTECTED] wrote:


Set the namespace of the loaded xml as default:

function loaderCompleteHandler(evt:Event):void {
 var data:XML = new XML(evt.currentTarget.data);
 trace(data.toXMLString());
 trace(data.namespace());
 default xml namespace = data.namespace();
 trace(data.photos.item);
}


- Original Message -
From: Jason Van Cleave [EMAIL PROTECTED]
To: Flash Coders List Flashcoders@chattyfig.figleaf.com
Sent: Saturday, March 15, 2008 5:24 AM
Subject: [Flashcoders] AS3 XML Namespaces Hell


I have an app that is was pulling some XML like this

 ?xml version=1.0 encoding=UTF-8?
 photos
item![CDATA[
 
http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D
/item
item![CDATA[
 
http://www.somedomain.com/photos/jvc_1205424567bernard.jpg]]http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D
/item
item![CDATA[
 
http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D
/item
item![CDATA[
 
http://www.somedomain.com/photos/jvc_1205424567bernard.jpg]]http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D
/item
 /photos

 with this i could load xml and eventually get an XMLList with

 private function onXMLLoaded(e:Event):void
 {
var xml:XML = new XML(e.target.data);
var items:XMLList = xml.item;
 }


___
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] AS3 XML Namespaces Hell

2008-03-16 Thread Jason Van Cleave
I think I have some other things that are tripping it up. Looking in the
debugger my event.target.data is coming in partially unescaped

?xml version=1.0 encoding=utf-8?
string xmlns=http://tempuri.org/
lt;photosgt;lt;itemgt;lt;![CDATA[http://



On Sun, Mar 16, 2008 at 2:53 AM, Muzak [EMAIL PROTECTED] wrote:

 Odd, I used your xml for testing and it shows: http://tempuri.org/

 //XML
 ?xml version=1.0 encoding=UTF-8?
 string xmlns=http://tempuri.org/;
 photos
item![CDATA[
 http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D
 /item
 item![CDATA[
 http://www.somedomain.com/photos/jvc_1205424535bernard3.jpg]]http://www.somedomain.com/photos/jvc_1205424535bernard3.jpg%5D%5D
 /item
 /photos
 /string


 //TESTED in FLA
 var req:URLRequest = new URLRequest(photos.xml);
 var loader:URLLoader = new URLLoader();
 loader.addEventListener(Event.COMPLETE, loaderCompleteHandler);
 loader.load(req);

 function loaderCompleteHandler(evt:Event):void {
  trace(Application ::: loaderCompleteHandler);
  var data:XML = new XML(evt.currentTarget.data);
  //trace(data.toXMLString());
  trace(data.namespace());
  default xml namespace = data.namespace();
  trace(data.photos.item[0]);
 }

 //OUTPUT
 Application ::: loaderCompleteHandler
 http://tempuri.org/
 http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg

 regards,
 Muzak

 - Original Message -
 From: Jason Van Cleave [EMAIL PROTECTED]
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Sent: Sunday, March 16, 2008 12:11 AM
 Subject: Re: [Flashcoders] AS3 XML Namespaces Hell


  Thanks Muzak for looking. However that isn't working for me. I don't get
  anything after  trace(data.namespace());
 
  On Sat, Mar 15, 2008 at 5:38 AM, Muzak [EMAIL PROTECTED] wrote:
 
  Set the namespace of the loaded xml as default:
 
  function loaderCompleteHandler(evt:Event):void {
   var data:XML = new XML(evt.currentTarget.data);
   trace(data.toXMLString());
   trace(data.namespace());
   default xml namespace = data.namespace();
   trace(data.photos.item);
  }
 
 
  - Original Message -
  From: Jason Van Cleave [EMAIL PROTECTED]
  To: Flash Coders List Flashcoders@chattyfig.figleaf.com
  Sent: Saturday, March 15, 2008 5:24 AM
  Subject: [Flashcoders] AS3 XML Namespaces Hell
 
 
  I have an app that is was pulling some XML like this
  
   ?xml version=1.0 encoding=UTF-8?
   photos
  item![CDATA[
   http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D
 http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D
  /item
  item![CDATA[
   http://www.somedomain.com/photos/jvc_1205424567bernard.jpg]]http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D
 http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D
  /item
  item![CDATA[
   http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D
 http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D
  /item
  item![CDATA[
   http://www.somedomain.com/photos/jvc_1205424567bernard.jpg]]http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D
 http://www.somedomain.com/photos/jvc_1205424567bernard.jpg%5D%5D
  /item
   /photos
  
   with this i could load xml and eventually get an XMLList with
  
   private function onXMLLoaded(e:Event):void
   {
  var xml:XML = new XML(e.target.data);
  var items:XMLList = xml.item;
   }
  
 
  ___
  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


Re: [Flashcoders] AS3 XML Namespaces Hell

2008-03-16 Thread Muzak

What does this output?

var data:XML = new XML(evt.currentTarget.data);
trace(data.toXMLString());

Are you loading an xml file or xml data returned from a script file (php, asp, 
cf, etc..)?

regards,
Muzak

- Original Message - 
From: Jason Van Cleave [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Sunday, March 16, 2008 9:10 AM
Subject: Re: [Flashcoders] AS3 XML Namespaces Hell



I think I have some other things that are tripping it up. Looking in the
debugger my event.target.data is coming in partially unescaped

?xml version=1.0 encoding=utf-8?
string xmlns=http://tempuri.org/
lt;photosgt;lt;itemgt;lt;![CDATA[http://





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


Re: [Flashcoders] ScrollBar Class issues

2008-03-16 Thread Allandt Bik-Elliott (Receptacle)
hmmm yeh - i thought it might be something like that - thanks for the  
suggestion


a


On 15 Mar 2008, at 21:15, Kenneth Kawamoto wrote:

...or listen to the scroll event and move the Sprite according to  
the scrollPosition.


Kenneth Kawamoto
http://www.materiaprima.co.uk/

Allandt Bik-Elliott (Receptacle) wrote:
i want to have the scrollbar as a separate element on the page and  
not along the entire bottom of the scrolling area - i don't think  
you can do this with the scroll pane

On 15 Mar 2008, at 20:35, Kenneth Kawamoto wrote:
I'd use ScrollPane for this scenario - actually I've never  
encountered a situation ScrollBar on its own is required...!


Kenneth Kawamoto
http://www.materiaprima.co.uk/

Allandt Bik-Elliott (Receptacle) wrote:

hi all
i'm trying to implement a scrollbar using the built-in  
fl.controls.ScrollBar class but i'm not having much luck
i can get the scrollbar to react to a sprite but there's no  
built in method that will let the sprite react to the scrollbar  
(i've tried scrollTarget and scrollTargetName but they are both  
undefined in ScrollBar)

here is my scrollbar method so far
CODE
package com.receptacle.timeline
{
//package imports
import flash.display.Sprite;
import flash.display.Shape;
import flash.display.StageDisplayState;
import flash.display.StageScaleMode;
import fl.controls.ScrollBar;
import fl.controls.ScrollBarDirection;
import fl.controls.UIScrollBar;
public class TimelineApp extends Sprite
{
// class variable declarations
private var base:Sprite;
private var timelineArea:TimelineArea;
private var cp:CommonProperties;
private var taPanelY:uint;
private var taPanelHeight:uint
   // constructor
public function TimelineApp()
{
setVars();
setFullscreen();
addBaseSprite();
initialiseBackgroundElements();
initialiseMainTimeline();
initialiseEventNavigation();
initialiseTimelineScrollBar();
}
   private function setVars()
{
base = new Sprite()
cp= new CommonProperties();
taPanelY= cp.taTitleBarY;
taPanelHeight= cp.taTitleBarHeight +  
cp.taPanelHeight;

}
   private function addBaseSprite():void
{
addChild(base);
}
   private function setFullscreen():void
{
trace (Fullscreen);
stage.displayState= StageDisplayState.FULL_SCREEN;
stage.scaleMode= StageScaleMode.NO_SCALE;
}
   private function initialiseBackgroundElements():void
{
trace (Background elements initialised);
var backgroundElements:BackgroundElements = new  
BackgroundElements();

base.addChild(backgroundElements);
}
   private function initialiseMainTimeline():void
{
trace (Main Timeline initialised);
timelineArea = new TimelineArea();
base.addChild(timelineArea);
   // mask
var taMask:Shape = new Shape();
taMask.graphics.beginFill(0xFF);
taMask.graphics.drawRect(0, taPanelY, 800,  
taPanelHeight);

base.addChild(taMask);
timelineArea.mask = taMask;
}
   private function initialiseEventNavigation():void
{
trace (Event navigation initialised);
}
   private function initialiseTimelineScrollBar():void
{
trace (Timeline scrollbar initialised);
var scrollBar:ScrollBar= new ScrollBar();
scrollBar.direction=  
ScrollBarDirection.HORIZONTAL;

scrollBar.x= 10;
scrollBar.y= 550;
scrollBar.setSize(280, 40);
scrollBar.maxScrollPosition = timelineArea.width;
scrollBar.minScrollPosition = 0;
scrollBar.pageScrollSize = 800;
scrollBar.pageSize = 800;
trace(timelineArea.width is +timelineArea.width);
addChild(scrollBar);
}
}
}
/CODE
timelineArea and backgroundElements extend Sprite
Do i need to extend the scrollbar class to accept a file or has  
adobe written the class to do it automatically?
if i need to extend it anyway, are there any better skinnable  
scrollbars out there that i can use

hope you can help
a

___
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] Writing Custom MovieClip Classes

2008-03-16 Thread Omar Fouad
I have a MovieClip in my project that I put in the library. This MovieClip
is used in the application lots of times and I attach it on the stage on
run time when required like

var DC:DataCard = new DataCard();
DC.x = Math.random()*550;
DC.y = Math.random()*400;
addChild(DC);

In the Identifier Dialogue Box I set the Class name to DataCard and I am
trying to associate it to a Class file DataCard.as
This MovieClip has a text field for example, and it is named nameTF.
I want to be able to control the components of the DataCard MovieClip from
the Class Itself, in this case to change the text in the nameTF TextField.

So in the Class I worte:

package {
 import flash.display.MovieClip

 import flash.display.MovieClip;
 import flash.text.*;

 public class DataCard extends MovieClip {

  var cardName:String;

  static public function DataCard():void {
   nameTF.text = cardName;
  }
  public function set cardName(Name:String):void {
   cardName = Name;
  }
 }
}

It shows me many errors and it does not work.

when I tried:

public class DataCard extends MovieClip {

  public function CardName(CN:String):void {
   nameTF.text = CN;
  }
}

and in the FLA:

 var DC:DataCard = new DataCard();

DC.CardName(here is the name);

DC.x = Math.random()*550;
DC.y = Math.random()*400;
DC.name = dataCard;
addChild(DC);

this worked. But how can I use a Constructor, setters and getters in this
case? Also how can I set the name of the MovieClip like I would do in the
FLA DC.name = DCName; in the class itself?


Thanks for the Help.



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


[Flashcoders] Authenticating a REST service from a flash swf

2008-03-16 Thread Matt Muller
Hi, has anyone got any advice on approaching this subject?

Thanks

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


Re: [Flashcoders] AS3 XML Namespaces Hell

2008-03-16 Thread Jason Van Cleave
its being returned from .net/sharepoint, here's the output

string xmlns=http://tempuri.org/;lt;photosgt;lt;itemgt;lt;![CDATA[
http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]gt;lt;/itemgt;lt;itemgt;lt;![CDATA[http://www.somedomain.com/photos/jvc_1205424535bernard3.jpg]]gt;lt;/itemgt;lt;/photosgt;
/string


On Sun, Mar 16, 2008 at 5:17 AM, Muzak [EMAIL PROTECTED] wrote:

 What does this output?

  var data:XML = new XML(evt.currentTarget.data);
  trace(data.toXMLString());

 Are you loading an xml file or xml data returned from a script file (php,
 asp, cf, etc..)?

 regards,
 Muzak

 - Original Message -
 From: Jason Van Cleave [EMAIL PROTECTED]
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Sent: Sunday, March 16, 2008 9:10 AM
 Subject: Re: [Flashcoders] AS3 XML Namespaces Hell


 I think I have some other things that are tripping it up. Looking in the
  debugger my event.target.data is coming in partially unescaped
 
  ?xml version=1.0 encoding=utf-8?
  string xmlns=http://tempuri.org/
  lt;photosgt;lt;itemgt;lt;![CDATA[http://
 
 
 

 ___
 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 XML Namespaces Hell

2008-03-16 Thread Jason Van Cleave
to clarify, .net/sharepoint meaning a script.

On Sun, Mar 16, 2008 at 2:49 PM, Jason Van Cleave [EMAIL PROTECTED]
wrote:

 its being returned from .net/sharepoint, here's the output

 string xmlns=http://tempuri.org/;lt;photosgt;lt;itemgt;lt;![CDATA[
 http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]gt;lt;/itemgt;lt;itemgt;lt;![CDATA[http://www.somedomain.com/photos/jvc_1205424535bernard3.jpg]]gt;lt;/itemgt;lt;/photosgt;http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg%5D%5D%3E%3C/item%3E%3Citem%3E%3C%21%5BCDATA%5Bhttp://www.somedomain.com/photos/jvc_1205424535bernard3.jpg%5D%5D%3E%3C/item%3E%3C/photos%3E
 /string



 On Sun, Mar 16, 2008 at 5:17 AM, Muzak [EMAIL PROTECTED] wrote:

  What does this output?
 
   var data:XML = new XML(evt.currentTarget.data);
   trace(data.toXMLString());
 
  Are you loading an xml file or xml data returned from a script file
  (php, asp, cf, etc..)?
 
  regards,
  Muzak
 
  - Original Message -
  From: Jason Van Cleave [EMAIL PROTECTED]
  To: Flash Coders List flashcoders@chattyfig.figleaf.com
  Sent: Sunday, March 16, 2008 9:10 AM
  Subject: Re: [Flashcoders] AS3 XML Namespaces Hell
 
 
  I think I have some other things that are tripping it up. Looking in
  the
   debugger my event.target.data is coming in partially unescaped
  
   ?xml version=1.0 encoding=utf-8?
   string xmlns=http://tempuri.org/
   lt;photosgt;lt;itemgt;lt;![CDATA[http://
  
  
  
 
  ___
  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] Writing Custom MovieClip Classes

2008-03-16 Thread Steven Sacks
What is nameTF?  I don't see it declared in your class.  If you are 
using Automatically declare stage instances, turn it off.  Adobe put 
it in there specifically for newbies to code, it's not meant for proper 
developers to use.


Keep in mind you need to declare your stage instances as public vars.

You cannot make the constructor of a class a static function.

Setting card name has no effect on the value of the text field in your 
code.  I recommend using a more generic naming convention anyway.


package
{
   import flash.display.*;
   import flash.text.*;

   public class DataCard extends MovieClip
   {
  public var TXT_Name:TextField;

   public function DataCard()
   {
   super();
   }
   public function set label(value:String):void
   {
   TXT_Name.text = value;
   }
}





Omar Fouad wrote:

I have a MovieClip in my project that I put in the library. This MovieClip
is used in the application lots of times and I attach it on the stage on
run time when required like

var DC:DataCard = new DataCard();
DC.x = Math.random()*550;
DC.y = Math.random()*400;
addChild(DC);

In the Identifier Dialogue Box I set the Class name to DataCard and I am
trying to associate it to a Class file DataCard.as
This MovieClip has a text field for example, and it is named nameTF.
I want to be able to control the components of the DataCard MovieClip from
the Class Itself, in this case to change the text in the nameTF TextField.

So in the Class I worte:

package {
 import flash.display.MovieClip

 import flash.display.MovieClip;
 import flash.text.*;

 public class DataCard extends MovieClip {

  var cardName:String;

  static public function DataCard():void {
   nameTF.text = cardName;
  }
  public function set cardName(Name:String):void {
   cardName = Name;
  }
 }
}

It shows me many errors and it does not work.

when I tried:

public class DataCard extends MovieClip {

  public function CardName(CN:String):void {
   nameTF.text = CN;
  }
}

and in the FLA:

 var DC:DataCard = new DataCard();

DC.CardName(here is the name);

DC.x = Math.random()*550;
DC.y = Math.random()*400;
DC.name = dataCard;
addChild(DC);

this worked. But how can I use a Constructor, setters and getters in this
case? Also how can I set the name of the MovieClip like I would do in the
FLA DC.name = DCName; in the class itself?


Thanks for the Help.



  


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


Re: [Flashcoders] Writing Custom MovieClip Classes

2008-03-16 Thread Omar Fouad
NameTF is the name of the textField in the MovieClip in FLA

On Sun, Mar 16, 2008 at 9:42 PM, Steven Sacks [EMAIL PROTECTED]
wrote:

 What is nameTF?  I don't see it declared in your class.  If you are
 using Automatically declare stage instances, turn it off.  Adobe put
 it in there specifically for newbies to code, it's not meant for proper
 developers to use.

 Keep in mind you need to declare your stage instances as public vars.

 You cannot make the constructor of a class a static function.

 Setting card name has no effect on the value of the text field in your
 code.  I recommend using a more generic naming convention anyway.

 package
 {
import flash.display.*;
 import flash.text.*;

public class DataCard extends MovieClip
{
public var TXT_Name:TextField;

public function DataCard()
{
super();
}
public function set label(value:String):void
{
TXT_Name.text = value;
 }
 }





 Omar Fouad wrote:
  I have a MovieClip in my project that I put in the library. This
 MovieClip
  is used in the application lots of times and I attach it on the stage
 on
  run time when required like
 
  var DC:DataCard = new DataCard();
  DC.x = Math.random()*550;
  DC.y = Math.random()*400;
  addChild(DC);
 
  In the Identifier Dialogue Box I set the Class name to DataCard and I am
  trying to associate it to a Class file DataCard.as
  This MovieClip has a text field for example, and it is named nameTF.
  I want to be able to control the components of the DataCard MovieClip
 from
  the Class Itself, in this case to change the text in the nameTF
 TextField.
 
  So in the Class I worte:
 
  package {
   import flash.display.MovieClip
 
   import flash.display.MovieClip;
   import flash.text.*;
 
   public class DataCard extends MovieClip {
 
var cardName:String;
 
static public function DataCard():void {
 nameTF.text = cardName;
}
public function set cardName(Name:String):void {
 cardName = Name;
}
   }
  }
 
  It shows me many errors and it does not work.
 
  when I tried:
 
  public class DataCard extends MovieClip {
 
public function CardName(CN:String):void {
 nameTF.text = CN;
}
  }
 
  and in the FLA:
 
   var DC:DataCard = new DataCard();
 
  DC.CardName(here is the name);
 
  DC.x = Math.random()*550;
  DC.y = Math.random()*400;
  DC.name = dataCard;
  addChild(DC);
 
  this worked. But how can I use a Constructor, setters and getters in
 this
  case? Also how can I set the name of the MovieClip like I would do in
 the
  FLA DC.name = DCName; in the class itself?
 
 
  Thanks for the Help.
 
 
 
 

 ___
 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] Writing Custom MovieClip Classes

2008-03-16 Thread Omar Fouad
and by the way nameTF.text = bla bla works in the class. It changes the
textField text in the DataCard movieClip inside the fla file.

But thanks anyways. :D


On Sun, Mar 16, 2008 at 9:55 PM, Omar Fouad [EMAIL PROTECTED] wrote:

 NameTF is the name of the textField in the MovieClip in FLA


 On Sun, Mar 16, 2008 at 9:42 PM, Steven Sacks [EMAIL PROTECTED]
 wrote:

  What is nameTF?  I don't see it declared in your class.  If you are
  using Automatically declare stage instances, turn it off.  Adobe put
  it in there specifically for newbies to code, it's not meant for proper
  developers to use.
 
  Keep in mind you need to declare your stage instances as public vars.
 
  You cannot make the constructor of a class a static function.
 
  Setting card name has no effect on the value of the text field in your
  code.  I recommend using a more generic naming convention anyway.
 
  package
  {
 import flash.display.*;
  import flash.text.*;
 
 public class DataCard extends MovieClip
 {
 public var TXT_Name:TextField;
 
 public function DataCard()
 {
 super();
 }
 public function set label(value:String):void
 {
 TXT_Name.text = value;
  }
  }
 
 
 
 
 
  Omar Fouad wrote:
   I have a MovieClip in my project that I put in the library. This
  MovieClip
   is used in the application lots of times and I attach it on the
  stage on
   run time when required like
  
   var DC:DataCard = new DataCard();
   DC.x = Math.random()*550;
   DC.y = Math.random()*400;
   addChild(DC);
  
   In the Identifier Dialogue Box I set the Class name to DataCard and I
  am
   trying to associate it to a Class file DataCard.as
   This MovieClip has a text field for example, and it is named nameTF.
   I want to be able to control the components of the DataCard MovieClip
  from
   the Class Itself, in this case to change the text in the nameTF
  TextField.
  
   So in the Class I worte:
  
   package {
import flash.display.MovieClip
  
import flash.display.MovieClip;
import flash.text.*;
  
public class DataCard extends MovieClip {
  
 var cardName:String;
  
 static public function DataCard():void {
  nameTF.text = cardName;
 }
 public function set cardName(Name:String):void {
  cardName = Name;
 }
}
   }
  
   It shows me many errors and it does not work.
  
   when I tried:
  
   public class DataCard extends MovieClip {
  
 public function CardName(CN:String):void {
  nameTF.text = CN;
 }
   }
  
   and in the FLA:
  
var DC:DataCard = new DataCard();
  
   DC.CardName(here is the name);
  
   DC.x = Math.random()*550;
   DC.y = Math.random()*400;
   DC.name = dataCard;
   addChild(DC);
  
   this worked. But how can I use a Constructor, setters and getters in
  this
   case? Also how can I set the name of the MovieClip like I would do in
  the
   FLA DC.name = DCName; in the class itself?
  
  
   Thanks for the Help.
  
  
  
  
 
  ___
  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.




-- 
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] AS3... when to start?

2008-03-16 Thread Rich Shupe
Micky,

This thread became a Flash IDE versus FlexBuilder/other tool discussion but,
back to your original question, you can still code, and find resources to
help, AS3 in Flash.

I recently co-wrote a book with this in mind, for Flash users wanting to
learn AS3. It's definitely aimed at beginners, though.

Here's a tinyurl link to Amazon:
http://tinyurl.com/329c36

Rich

On 3/4/07 12:32 AM, Micky Hulse wrote:

 What happened to coding in Flash? Am I waiting for the next version of
 Flash until I can successfully and/or easily write AS3 via the Flash
 application? Will the future of Flash AS always require the Flex
 Builder? Or, is Flex Builder just one out of many/few code editors for
 compiling the new AS3 code?


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


[Flashcoders] frameworks and classes for flash cs3

2008-03-16 Thread Pedro Kostelec
Hi coders

I want to start coding with frameworks and classes like TweenLite. I would
be pretty new at it, so i'd like you to recommend me some of them that makes
flash coding easier or faster and improving performence.

Thanks

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


Re: [Flashcoders] frameworks and classes for flash cs3

2008-03-16 Thread Pedro Taranto
look at osflash.org and code.google.com

--
Pedro Taranto


On Sun, Mar 16, 2008 at 7:36 PM, Pedro Kostelec [EMAIL PROTECTED] wrote:

 Hi coders

 I want to start coding with frameworks and classes like TweenLite. I would
 be pretty new at it, so i'd like you to recommend me some of them that
 makes
 flash coding easier or faster and improving performence.

 Thanks

 --
 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] frameworks and classes for flash cs3

2008-03-16 Thread Pedro Kostelec
If I start searching this two sites (which i did once) i will fill my
computer with stuff i will surely never use. I just want to get the best
ones, the most used...which for a curious person like me is impossible.

So, can't you just tell which one are the best? I mean i am mostly using
fLASH  for as3 motion.

On Sun, Mar 16, 2008 at 11:58 PM, Pedro Taranto [EMAIL PROTECTED] wrote:

 look at osflash.org and code.google.com

 --
 Pedro Taranto


 On Sun, Mar 16, 2008 at 7:36 PM, Pedro Kostelec [EMAIL PROTECTED]
 wrote:

  Hi coders
 
  I want to start coding with frameworks and classes like TweenLite. I
 would
  be pretty new at it, so i'd like you to recommend me some of them that
  makes
  flash coding easier or faster and improving performence.
 
  Thanks
 
  --
  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




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


Re: [Flashcoders] AS3 XML Namespaces Hell

2008-03-16 Thread Muzak

Well, I think that output is wrong, or better yet, not suited for flash to 
consume.


- Original Message - 
From: Jason Van Cleave [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Sunday, March 16, 2008 7:49 PM
Subject: Re: [Flashcoders] AS3 XML Namespaces Hell



its being returned from .net/sharepoint, here's the output

string xmlns=http://tempuri.org/;lt;photosgt;lt;itemgt;lt;![CDATA[
http://www.somedomain.com/photos/jvc_1205424535bernard2.jpg]]gt;lt;/itemgt;lt;itemgt;lt;![CDATA[http://www.somedomain.com/photos/jvc_1205424535bernard3.jpg]]gt;lt;/itemgt;lt;/photosgt;
/string


On Sun, Mar 16, 2008 at 5:17 AM, Muzak [EMAIL PROTECTED] wrote:


What does this output?

 var data:XML = new XML(evt.currentTarget.data);
 trace(data.toXMLString());

Are you loading an xml file or xml data returned from a script file (php,
asp, cf, etc..)?

regards,
Muzak



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


Re: [Flashcoders] frameworks and classes for flash cs3

2008-03-16 Thread Glen Pike
There is no best one as the framework you need may depend on the job 
you want to do, e.g. PhotoShop is good for bitmaps, whilst Illustrator 
is good for drawing (that's not an opinion, just an example).


So I would suggest what you need to do is to be a bit more proactive and 
read up on the stuff that is out there, have a stab at what you think 
might be useful and play with it a little to see if it will really be 
suitable.


If you are working on a project, you would probably have to come up with 
a list of features that you need - then ask the list which framework(s) 
have these features.


The group ain't gonna spoon feed you, but it will help if you ask more 
meaningful questions.  :)


Pedro Kostelec wrote:

If I start searching this two sites (which i did once) i will fill my
computer with stuff i will surely never use. I just want to get the best
ones, the most used...which for a curious person like me is impossible.

So, can't you just tell which one are the best? I mean i am mostly using
fLASH  for as3 motion.

On Sun, Mar 16, 2008 at 11:58 PM, Pedro Taranto [EMAIL PROTECTED] wrote:

  

look at osflash.org and code.google.com

--
Pedro Taranto


On Sun, Mar 16, 2008 at 7:36 PM, Pedro Kostelec [EMAIL PROTECTED]
wrote:



Hi coders

I want to start coding with frameworks and classes like TweenLite. I
  

would


be pretty new at it, so i'd like you to recommend me some of them that
makes
flash coding easier or faster and improving performence.

Thanks

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






  


--

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] frameworks and classes for flash cs3

2008-03-16 Thread Pedro Taranto
what are the 'best' framework/classes is very subjective, there isnt an
UNIQUE framework that will solve all your problems

you have to choose and use the ones that speed up your workflow

In most of my projects I use pixlib (as2) and lowra (as3), but there are a
lot of frameworks that is better in each case

you should try all of them and use the one you feel more confortable to use,
maybe try to do the same thing using differents frameworks that have the
same purpose/focus:

for example:
Tweener vs TweenLite vs
Papervision3D vs Sandy vs Away3D
..

--
Pedro Taranto


On Sun, Mar 16, 2008 at 8:57 PM, Pedro Kostelec [EMAIL PROTECTED] wrote:

 If I start searching this two sites (which i did once) i will fill my
 computer with stuff i will surely never use. I just want to get the best
 ones, the most used...which for a curious person like me is impossible.

 So, can't you just tell which one are the best? I mean i am mostly using
 fLASH  for as3 motion.

 On Sun, Mar 16, 2008 at 11:58 PM, Pedro Taranto [EMAIL PROTECTED]
 wrote:

  look at osflash.org and code.google.com
 
  --
  Pedro Taranto
 
 
  On Sun, Mar 16, 2008 at 7:36 PM, Pedro Kostelec [EMAIL PROTECTED]
  wrote:
 
   Hi coders
  
   I want to start coding with frameworks and classes like TweenLite. I
  would
   be pretty new at it, so i'd like you to recommend me some of them that
   makes
   flash coding easier or faster and improving performence.
  
   Thanks
  
   --
   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
 



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


[Flashcoders] AS3 Classes and FLA not working together

2008-03-16 Thread Omar Fouad
So,
I am trying to do an application in Air with Flash CS3. I can't deny, I am
starting to hate AS3!

First of all, The document class technique (wich lets you set the name of
the starting class in the Document Class Text field) is not working while
developing in AIR. It only works in an actionscript 3.0 application.
Allright fine, I could manage in calling the class from the first frame

var Application:Amlak = new Amlak();

this way...

And note that I have a movieClip in the Fla library which has a Class Name
AmlakPanel, to be added to the stage later on runtime.

in the Amlak.as class :

package {

import flash.display.*;

public class Amlak extends Sprite {

public function Amlak():void {
trace(Starting Application);// traces like a charm!!!
var a = new AmlakPanel();
addChild(a); //this does not happen !!! G!!!

}
}
}

Why... Why and Why!!! :(



-- 
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] AS3 Classes and FLA not working together

2008-03-16 Thread Andrei Thomaz
hello Omar,

I'm developing a graphical editor for e-learning content using AIR. The
Document Class works fine for me. The only problem I had was that I had to
make it extend MovieClip, and put a stop() in its first frame. You have to
use a stop(), or else your app will flash indefinetely. While I was
testing it inside Flash, the document class extended Sprite and everything
worked. But, when I tryed the real application (installing the AIR file), it
didn't work.

I don't think you need to create an instance of your Document Class.
Something is wrong in your code or your .fla

Put a stop() in the first frame of you app, and give a feedback for us.


good luck,
andrei



On Sun, Mar 16, 2008 at 9:39 PM, Omar Fouad [EMAIL PROTECTED] wrote:

 So,
 I am trying to do an application in Air with Flash CS3. I can't deny, I am
 starting to hate AS3!

 First of all, The document class technique (wich lets you set the name of
 the starting class in the Document Class Text field) is not working while
 developing in AIR. It only works in an actionscript 3.0 application.
 Allright fine, I could manage in calling the class from the first frame

 var Application:Amlak = new Amlak();

 this way...

 And note that I have a movieClip in the Fla library which has a Class Name
 AmlakPanel, to be added to the stage later on runtime.

 in the Amlak.as class :

 package {

import flash.display.*;

public class Amlak extends Sprite {

public function Amlak():void {
trace(Starting Application);// traces like a charm!!!
var a = new AmlakPanel();
addChild(a); //this does not happen !!! G!!!

}
}
 }

 Why... Why and Why!!! :(



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

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


Re: [Flashcoders] AS3 Classes and FLA not working together

2008-03-16 Thread Jason Van Cleave
Create a Class for AmlakPanel instead of letting Flash generate it may help
you get a little further in debugging

On Sun, Mar 16, 2008 at 9:20 PM, Andrei Thomaz [EMAIL PROTECTED]
wrote:

 hello Omar,

 I'm developing a graphical editor for e-learning content using AIR. The
 Document Class works fine for me. The only problem I had was that I had to
 make it extend MovieClip, and put a stop() in its first frame. You have
 to
 use a stop(), or else your app will flash indefinetely. While I was
 testing it inside Flash, the document class extended Sprite and everything
 worked. But, when I tryed the real application (installing the AIR file),
 it
 didn't work.

 I don't think you need to create an instance of your Document Class.
 Something is wrong in your code or your .fla

 Put a stop() in the first frame of you app, and give a feedback for us.


 good luck,
 andrei



 On Sun, Mar 16, 2008 at 9:39 PM, Omar Fouad [EMAIL PROTECTED]
 wrote:

  So,
  I am trying to do an application in Air with Flash CS3. I can't deny, I
 am
  starting to hate AS3!
 
  First of all, The document class technique (wich lets you set the name
 of
  the starting class in the Document Class Text field) is not working
 while
  developing in AIR. It only works in an actionscript 3.0 application.
  Allright fine, I could manage in calling the class from the first frame
 
  var Application:Amlak = new Amlak();
 
  this way...
 
  And note that I have a movieClip in the Fla library which has a Class
 Name
  AmlakPanel, to be added to the stage later on runtime.
 
  in the Amlak.as class :
 
  package {
 
 import flash.display.*;
 
 public class Amlak extends Sprite {
 
 public function Amlak():void {
 trace(Starting Application);// traces like a charm!!!
 var a = new AmlakPanel();
 addChild(a); //this does not happen !!! G!!!
 
 }
 }
  }
 
  Why... Why and Why!!! :(
 
 
 
  --
  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
 
 ___
 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] AS3 Coding Conventions Question

2008-03-16 Thread Jason Van Cleave
This is a pretty nice doc and I agree/use most of these while doing as3
development. The use of ALL_CAPS constants makes sense to me but I am not
understanding what the purpose would be to not make the variable be the same
as the value.

For instance, this is what Adobe says and does from:

http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions

--
Constant names

Use all uppercase letters with underscores between words: OFF, DEFAULT_WIDTH
.

The words in the identifier must match the words in the constant value if it
is a String:

public static const FOO_BAR:String = fooBar;

--

For me it makes more sense and helps consistency to make it:

public static const FOO_BAR:String = FOO_BAR;


Anyone have a defense to Adobe's position?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders