RE: [Flashcoders] Access dynamically created MovieClip from class?

2009-09-12 Thread Cor
OK, This is not possible by trying to instantiate -- new drawingSign

But in Main.as make drawingSign public:
Public static var drawingSign:Movieclip = new MovieClip();

And then in classdraw.as you can call it:
private var newSign:drawingSign = new Main.drawingSign(); 


But this is not the best way (OOP) to do it.
You should create a DrawingSign.as

HTH

Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ktt
Sent: vrijdag 11 september 2009 16:25
To: Flash Coders List
Subject: RE: [Flashcoders] Access dynamically created MovieClip from class?

Thank you the answer, but maybe I didn't define situation clearly:

I have two separate files main.as and classdraw.as

Movieclip is defined in main.as:

var drawingSign:Movieclip = new MovieClip();
drawingSign.x = 40;
drawingSign.y = 40;
//drawingSign.addEventListener(MouseEvent.CLICK,mc_clicked);
addChild(drawingSign);

I want to access drawingSign from my other classdraw.as file:

package (

import flash.events.*;
import flash.display.*;
import flash.utils.*; 

public class classdraw extends MovieClip {

private var newSign:drawingSign = new drawingSign(); // as it is used to
access objects from Library

public function classdraw() {

addChild (newSign);

}

But I geting errors :
1046: Type was not found or was not a compile-time constant: drawingSign.
1180; Call to a possibly undefined method drawingSign.

Regards,
Kioshin

--- On Fri, 9/11/09, Cor c...@chello.nl wrote:

 From: Cor c...@chello.nl
 Subject: RE: [Flashcoders] Access dynamically created MovieClip from
class?
 To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
 Date: Friday, September 11, 2009, 4:58 PM
 var drawingSign:Movieclip = new
 MovieClip(); //you forgot the w of new
 drawingSign.x = 40;
 drawingSign.y = 40;
 drawingSign.addEventListener(MouseEvent.CLICK,
 mc_clicked);
 addChild(drawingSign);
 
 private function mc_clicked(e:MouseEvent):void{
     trace(You have clicked drawingSign);
 }
 
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com]
 On Behalf Of ktt
 Sent: vrijdag 11 september 2009 15:40
 To: Flash Coders List
 Subject: [Flashcoders] Access dynamically created MovieClip
 from class?
 
 Hello,
 
 I have created Movieclip in main actionscript file main.as
 :
 
 var drawingSign:Movieclip = ne MovieClip();
 drawingSign.x = 40;
 drawingSign.y = 40;
 
 How could I access it (add listeners etc.) from a class
 file?
 Is it possible?
 
 Thank you in advance,
 kioshin
 
 
       
 ___
 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] Access dynamically created MovieClip from class?

2009-09-12 Thread Cor
In addition to the comment:
private var newSign:drawingSign = new drawingSign(); // as it is used to
access objects from Library

And if you have Movieclips in your library, give them a Linkage (right click
on the MC in library) and you can instantiate it everywhere.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ktt
Sent: vrijdag 11 september 2009 16:25
To: Flash Coders List
Subject: RE: [Flashcoders] Access dynamically created MovieClip from class?

Thank you the answer, but maybe I didn't define situation clearly:

I have two separate files main.as and classdraw.as

Movieclip is defined in main.as:

var drawingSign:Movieclip = new MovieClip();
drawingSign.x = 40;
drawingSign.y = 40;
//drawingSign.addEventListener(MouseEvent.CLICK,mc_clicked);
addChild(drawingSign);

I want to access drawingSign from my other classdraw.as file:

package (

import flash.events.*;
import flash.display.*;
import flash.utils.*; 

public class classdraw extends MovieClip {

private var newSign:drawingSign = new drawingSign(); // as it is used to
access objects from Library

public function classdraw() {

addChild (newSign);

}

But I geting errors :
1046: Type was not found or was not a compile-time constant: drawingSign.
1180; Call to a possibly undefined method drawingSign.

Regards,
Kioshin

--- On Fri, 9/11/09, Cor c...@chello.nl wrote:

 From: Cor c...@chello.nl
 Subject: RE: [Flashcoders] Access dynamically created MovieClip from
class?
 To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
 Date: Friday, September 11, 2009, 4:58 PM
 var drawingSign:Movieclip = new
 MovieClip(); //you forgot the w of new
 drawingSign.x = 40;
 drawingSign.y = 40;
 drawingSign.addEventListener(MouseEvent.CLICK,
 mc_clicked);
 addChild(drawingSign);
 
 private function mc_clicked(e:MouseEvent):void{
     trace(You have clicked drawingSign);
 }
 
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com]
 On Behalf Of ktt
 Sent: vrijdag 11 september 2009 15:40
 To: Flash Coders List
 Subject: [Flashcoders] Access dynamically created MovieClip
 from class?
 
 Hello,
 
 I have created Movieclip in main actionscript file main.as
 :
 
 var drawingSign:Movieclip = ne MovieClip();
 drawingSign.x = 40;
 drawingSign.y = 40;
 
 How could I access it (add listeners etc.) from a class
 file?
 Is it possible?
 
 Thank you in advance,
 kioshin
 
 
       
 ___
 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] Access dynamically created MovieClip from class?

2009-09-12 Thread Cor
OOPS, and now I see Jason's response.
Sorry for the redundancy.

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: zaterdag 12 september 2009 9:08
To: 'Flash Coders List'
Subject: RE: [Flashcoders] Access dynamically created MovieClip from class?

OK, This is not possible by trying to instantiate -- new drawingSign

But in Main.as make drawingSign public:
Public static var drawingSign:Movieclip = new MovieClip();

And then in classdraw.as you can call it:
private var newSign:drawingSign = new Main.drawingSign(); 


But this is not the best way (OOP) to do it.
You should create a DrawingSign.as

HTH

Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ktt
Sent: vrijdag 11 september 2009 16:25
To: Flash Coders List
Subject: RE: [Flashcoders] Access dynamically created MovieClip from class?

Thank you the answer, but maybe I didn't define situation clearly:

I have two separate files main.as and classdraw.as

Movieclip is defined in main.as:

var drawingSign:Movieclip = new MovieClip();
drawingSign.x = 40;
drawingSign.y = 40;
//drawingSign.addEventListener(MouseEvent.CLICK,mc_clicked);
addChild(drawingSign);

I want to access drawingSign from my other classdraw.as file:

package (

import flash.events.*;
import flash.display.*;
import flash.utils.*; 

public class classdraw extends MovieClip {

private var newSign:drawingSign = new drawingSign(); // as it is used to
access objects from Library

public function classdraw() {

addChild (newSign);

}

But I geting errors :
1046: Type was not found or was not a compile-time constant: drawingSign.
1180; Call to a possibly undefined method drawingSign.

Regards,
Kioshin

--- On Fri, 9/11/09, Cor c...@chello.nl wrote:

 From: Cor c...@chello.nl
 Subject: RE: [Flashcoders] Access dynamically created MovieClip from
class?
 To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
 Date: Friday, September 11, 2009, 4:58 PM
 var drawingSign:Movieclip = new
 MovieClip(); //you forgot the w of new
 drawingSign.x = 40;
 drawingSign.y = 40;
 drawingSign.addEventListener(MouseEvent.CLICK,
 mc_clicked);
 addChild(drawingSign);
 
 private function mc_clicked(e:MouseEvent):void{
     trace(You have clicked drawingSign);
 }
 
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com]
 On Behalf Of ktt
 Sent: vrijdag 11 september 2009 15:40
 To: Flash Coders List
 Subject: [Flashcoders] Access dynamically created MovieClip
 from class?
 
 Hello,
 
 I have created Movieclip in main actionscript file main.as
 :
 
 var drawingSign:Movieclip = ne MovieClip();
 drawingSign.x = 40;
 drawingSign.y = 40;
 
 How could I access it (add listeners etc.) from a class
 file?
 Is it possible?
 
 Thank you in advance,
 kioshin
 
 
       
 ___
 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 mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash - PHP - mySQL Is there a better way now?

2009-09-12 Thread Karl DeSaulniers
Better way depends on your situation and needs. I use php flash and  
mysql all the time. Works for me.


Karl

Sent from losPhone

On Sep 12, 2009, at 11:30 AM, Don Schnell - TFE dschn...@toolsforeducation.com 
 wrote:




___
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] retreieving a node that contains a specific attribute from an XML list.

2009-09-12 Thread Isaac Alves
I have an XMLList  and I would like to retrieve a node in this list
that contain a specfic attribute.

here is how my XMLlist conteudo is organized. trace (conteudo) throws:

slide id=apresentacao
  titApresentação/tit
  txt (lots of text...)/txt
/slide
slide id=sumario
  titApresentação/tit
  txt (lots of text...)/txt
/slide
etc...

I've tried the following ways:

//  gets all nodes that contain the attribue id.  that is , the same
as trace(conteudo), cause every node contain an
//  id attribute. i don't need them all to contain the
attribute, but i've made so, trying to avoid errors. so there a lot of
//  nodes in which the id attribute is equal to  .
//  trace (conteudo.(hasOwnProperty(@id));

//  this one doesn't throws an error, but doesn't retrieve anything
//  trace (conteudo.(hasOwnProperty(@id == apresentacao)));

//  throws the error:   ReferenceError: Error #1065: A variável
apresentacao não foi definida. (variable not defined)
//  trace (conteudo.(hasOwnProperty(@id == apresentacao)));

//  same reference error...
//  trace (conteudo.(hasOwnProperty(@id == apresentacao)));

//   why it doesn't work like this? same reference errpr
//  trace (node i want:  + conteudo.(@id == apresentacao));

//  this one doesn't throws an error, but doesn't retrieve anything
//  trace (vamo ve:  + conteudo.(@id == apresentacao));

//  throws all the attributes @id that exist inside the xmllist, 
concatenated
//  trace ( + conteu...@id);

//  again, here it throws all the attributes @id that exist inside
the xmllist , concatenated
//  if (conteudo.(hasOwnProperty(@id == apresentacao)))
//  {
//  trace (tem o id: );
//  trace (conteu...@id);
//  }

 help please!!

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


RE: [Flashcoders] retreieving a node that contains a specific attribute from an XML list.

2009-09-12 Thread Cor
Try this:

trace (conteudo.slide[...@id);
trace (conteudo.slide[...@id);
trace (conteudo.slide[0].tit);



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Isaac Alves
Sent: zondag 13 september 2009 2:00
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] retreieving a node that contains a specific attribute
from an XML list.

I have an XMLList  and I would like to retrieve a node in this list
that contain a specfic attribute.

here is how my XMLlist conteudo is organized. trace (conteudo) throws:

slide id=apresentacao
  titApresentação/tit
  txt (lots of text...)/txt
/slide
slide id=sumario
  titApresentação/tit
  txt (lots of text...)/txt
/slide
etc...

I've tried the following ways:

//  gets all nodes that contain the attribue id.  that is , the same
as trace(conteudo), cause every node contain an
//  id attribute. i don't need them all to contain the
attribute, but i've made so, trying to avoid errors. so there a lot of
//  nodes in which the id attribute is equal to  .
//  trace (conteudo.(hasOwnProperty(@id));

//  this one doesn't throws an error, but doesn't retrieve anything
//  trace (conteudo.(hasOwnProperty(@id == apresentacao)));

//  throws the error:   ReferenceError: Error #1065: A variável
apresentacao não foi definida. (variable not defined)
//  trace (conteudo.(hasOwnProperty(@id == apresentacao)));

//  same reference error...
//  trace (conteudo.(hasOwnProperty(@id == apresentacao)));

//   why it doesn't work like this? same reference errpr
//  trace (node i want:  + conteudo.(@id == apresentacao));

//  this one doesn't throws an error, but doesn't retrieve anything
//  trace (vamo ve:  + conteudo.(@id == apresentacao));

//  throws all the attributes @id that exist inside the xmllist,
concatenated
//  trace ( + conteu...@id);

//  again, here it throws all the attributes @id that exist inside
the xmllist , concatenated
//  if (conteudo.(hasOwnProperty(@id == apresentacao)))
//  {
//  trace (tem o id: );
//  trace (conteu...@id);
//  }

 help please!!

___
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