RE: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Merrill, Jason
Classes don't know their own scope, they are oblivious to anything
outside of them, (unless of course you import some other class - then
they know what the other class does, but still don't have any scope
reference).  What are you trying to do?  

Jason Merrill
Bank of America  
GTO Learning  Leadership Development
eTools  Multimedia Team


 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Helmut Granda
Sent: Tuesday, April 03, 2007 9:05 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Delegate Class Scoping self instantiated

 I understand that when instantiating a class you can set the 
scope where the instance is going to run, but how about when 
we dont actually instantiate the class on the timeline but we 
just link the class directly to the items on the stage, how 
is the scope treated in this case? I assume the class has to 
be instantiated on itself or do we need a separate class to 
keep track of this item?

TIA
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training 
http://www.figleaf.com http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Helmut Granda

Hey Jason,

All Im trying to do is run some animation inside a movieclip but without
instantiating the class. So what I do instead is just add a MovieClip on
stage that has a link to a class and it knows exactly what to do rather than
having to instantiate it manually.

BTW, I read your previous post that talks about classes talking to each
other, it is something I am trying to acomplish as well.

-h

On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:


Classes don't know their own scope, they are oblivious to anything
outside of them, (unless of course you import some other class - then
they know what the other class does, but still don't have any scope
reference).  What are you trying to do?

Jason Merrill
Bank of America
GTO Learning  Leadership Development
eTools  Multimedia Team




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Helmut Granda
Sent: Tuesday, April 03, 2007 9:05 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Delegate Class Scoping self instantiated

 I understand that when instantiating a class you can set the
scope where the instance is going to run, but how about when
we dont actually instantiate the class on the timeline but we
just link the class directly to the items on the stage, how
is the scope treated in this case? I assume the class has to
be instantiated on itself or do we need a separate class to
keep track of this item?

TIA
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Helmut Granda

Oh, and I forgot an important point, the reson why I want to find the scope
of the class is because inside the class there are variables that talk to
each other and I can have them talk back and forth like this

_level0.instance1.myVariable = blah;

but this of course wont work when the movie is loaded into a new movie
because the reference will be lost and changes to

_level0.movieHolder.instance1.myVariable = blah;

and of course it breaks the app.

Thanks again,
-h

On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:


Classes don't know their own scope, they are oblivious to anything
outside of them, (unless of course you import some other class - then
they know what the other class does, but still don't have any scope
reference).  What are you trying to do?

Jason Merrill
Bank of America
GTO Learning  Leadership Development
eTools  Multimedia Team




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Helmut Granda
Sent: Tuesday, April 03, 2007 9:05 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Delegate Class Scoping self instantiated

 I understand that when instantiating a class you can set the
scope where the instance is going to run, but how about when
we dont actually instantiate the class on the timeline but we
just link the class directly to the items on the stage, how
is the scope treated in this case? I assume the class has to
be instantiated on itself or do we need a separate class to
keep track of this item?

TIA
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Helmut Granda

So I figured it out or at least I think I did,

private var target: myClass;

function myClass(){

target = this;
}

now I can reference to properties within a class without breaking the app.
So in the same lines, is there anyway to code the classe so that we don't
have to reference to the properties and methods within the class without
having to say

target.objectA._x = 130;

but just have

objectA._x = 130;

Thanks
-h

On 4/3/07, Helmut Granda [EMAIL PROTECTED] wrote:


Oh, and I forgot an important point, the reson why I want to find the
scope of the class is because inside the class there are variables that talk
to each other and I can have them talk back and forth like this

_level0.instance1.myVariable = blah;

but this of course wont work when the movie is loaded into a new movie
because the reference will be lost and changes to

_level0.movieHolder.instance1.myVariable = blah;

and of course it breaks the app.

Thanks again,
-h

On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:

 Classes don't know their own scope, they are oblivious to anything
 outside of them, (unless of course you import some other class - then
 they know what the other class does, but still don't have any scope
 reference).  What are you trying to do?

 Jason Merrill
 Bank of America
 GTO Learning  Leadership Development
 eTools  Multimedia Team




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto: [EMAIL PROTECTED] On Behalf
 Of Helmut Granda
 Sent: Tuesday, April 03, 2007 9:05 AM
 To: Flashcoders mailing list
 Subject: [Flashcoders] Delegate Class Scoping self instantiated
 
  I understand that when instantiating a class you can set the
 scope where the instance is going to run, but how about when
 we dont actually instantiate the class on the timeline but we
 just link the class directly to the items on the stage, how
 is the scope treated in this case? I assume the class has to
 be instantiated on itself or do we need a separate class to
 keep track of this item?
 
 TIA
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Merrill, Jason
If class has it's own variables, just use them inside the class- but if
you want to Extend movieClip and expect it to know about variables
outside it's scope, well, that's breaking OOP AFAIK, classes only know
about themselves.  Instead, you will want to use a central composition
class and refer to movie clip instances instead of subclassing
movieClip.  At least as I see it - others may have some different ideas.

To make a movie clip animate itself, using myClass extends MovieClip,
you can just use this which is an instance of the movieClip.  i.e.
this._x += 10;


Jason Merrill
Bank of America  
GTO Learning  Leadership Development
eTools  Multimedia Team


 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Helmut Granda
Sent: Tuesday, April 03, 2007 9:30 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Delegate Class Scoping self instantiated

Oh, and I forgot an important point, the reson why I want to 
find the scope of the class is because inside the class there 
are variables that talk to each other and I can have them 
talk back and forth like this

_level0.instance1.myVariable = blah;

but this of course wont work when the movie is loaded into a 
new movie because the reference will be lost and changes to

_level0.movieHolder.instance1.myVariable = blah;

and of course it breaks the app.

Thanks again,
-h

On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:

 Classes don't know their own scope, they are oblivious to anything 
 outside of them, (unless of course you import some other 
class - then 
 they know what the other class does, but still don't have any scope 
 reference).  What are you trying to do?

 Jason Merrill
 Bank of America
 GTO Learning  Leadership Development eTools  Multimedia Team




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Helmut Granda
 Sent: Tuesday, April 03, 2007 9:05 AM
 To: Flashcoders mailing list
 Subject: [Flashcoders] Delegate Class Scoping self instantiated
 
  I understand that when instantiating a class you can set the
 scope where the instance is going to run, but how about when
 we dont actually instantiate the class on the timeline but we
 just link the class directly to the items on the stage, how
 is the scope treated in this case? I assume the class has to
 be instantiated on itself or do we need a separate class to
 keep track of this item?
 
 TIA
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Helmut Granda

You are correct, and it all seems clear now and working as expected, the
only guy that I cant understand is the Tween class and the way i can pass a
refrence of the main class inside it.

I have learend that this works

myTween.onMotionFinished = Delegate.create(this, myNextFunction);

but I am triggering other functions in the middle of the Tween

//code sample
   var playOnce:Boolean = true;

   myTween.onMotionChanged = function() {

   if ( (myTween.time  .2)  playOnce == true) {

   Delegate.create(scope, resetWin3);
   playOnce = false;
   }
   }

//end of sample

Which of course doesnt want to cooperate, I have tried to pass a reference
of the class into the Tween but still it wants to use  itself as a reference
rather than the refence passed into it. Any Ideas? I will keep googling in
the mean time...

On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:


If class has it's own variables, just use them inside the class- but if
you want to Extend movieClip and expect it to know about variables
outside it's scope, well, that's breaking OOP AFAIK, classes only know
about themselves.  Instead, you will want to use a central composition
class and refer to movie clip instances instead of subclassing
movieClip.  At least as I see it - others may have some different ideas.

To make a movie clip animate itself, using myClass extends MovieClip,
you can just use this which is an instance of the movieClip.  i.e.
this._x += 10;


Jason Merrill
Bank of America
GTO Learning  Leadership Development
eTools  Multimedia Team




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Helmut Granda
Sent: Tuesday, April 03, 2007 9:30 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Delegate Class Scoping self instantiated

Oh, and I forgot an important point, the reson why I want to
find the scope of the class is because inside the class there
are variables that talk to each other and I can have them
talk back and forth like this

_level0.instance1.myVariable = blah;

but this of course wont work when the movie is loaded into a
new movie because the reference will be lost and changes to

_level0.movieHolder.instance1.myVariable = blah;

and of course it breaks the app.

Thanks again,
-h

On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:

 Classes don't know their own scope, they are oblivious to anything
 outside of them, (unless of course you import some other
class - then
 they know what the other class does, but still don't have any scope
 reference).  What are you trying to do?

 Jason Merrill
 Bank of America
 GTO Learning  Leadership Development eTools  Multimedia Team




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Helmut Granda
 Sent: Tuesday, April 03, 2007 9:05 AM
 To: Flashcoders mailing list
 Subject: [Flashcoders] Delegate Class Scoping self instantiated
 
  I understand that when instantiating a class you can set the
 scope where the instance is going to run, but how about when
 we dont actually instantiate the class on the timeline but we
 just link the class directly to the items on the stage, how
 is the scope treated in this case? I assume the class has to
 be instantiated on itself or do we need a separate class to
 keep track of this item?
 
 TIA
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe

Re: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Helmut Granda

Correction in my sample code

//code sample
   var playOnce:Boolean = true;

   myTween.onMotionChanged = function() {

   if ( (myTween.time  .2)  playOnce == true) {

//correction
   Delegate.create(this, nextFunction);
   playOnce = false;
   }
   }

//end of sample

On 4/3/07, Helmut Granda [EMAIL PROTECTED] wrote:


You are correct, and it all seems clear now and working as expected, the
only guy that I cant understand is the Tween class and the way i can pass a
refrence of the main class inside it.

I have learend that this works

myTween.onMotionFinished = Delegate.create(this, myNextFunction);

but I am triggering other functions in the middle of the Tween

//code sample
var playOnce:Boolean = true;

myTween.onMotionChanged = function() {

if ( (myTween.time  .2)  playOnce == true) {

Delegate.create(scope, resetWin3);
playOnce = false;
}
}

//end of sample

Which of course doesnt want to cooperate, I have tried to pass a reference
of the class into the Tween but still it wants to use  itself as a reference
rather than the refence passed into it. Any Ideas? I will keep googling in
the mean time...

On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:

 If class has it's own variables, just use them inside the class- but if
 you want to Extend movieClip and expect it to know about variables
 outside it's scope, well, that's breaking OOP AFAIK, classes only know
 about themselves.  Instead, you will want to use a central composition
 class and refer to movie clip instances instead of subclassing
 movieClip.  At least as I see it - others may have some different ideas.

 To make a movie clip animate itself, using myClass extends MovieClip,
 you can just use this which is an instance of the movieClip.  i.e.
 this._x += 10;


 Jason Merrill
 Bank of America
 GTO Learning  Leadership Development
 eTools  Multimedia Team




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto: [EMAIL PROTECTED] On Behalf
 Of Helmut Granda
 Sent: Tuesday, April 03, 2007 9:30 AM
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Delegate Class Scoping self instantiated
 
 Oh, and I forgot an important point, the reson why I want to
 find the scope of the class is because inside the class there
 are variables that talk to each other and I can have them
 talk back and forth like this
 
 _level0.instance1.myVariable = blah;
 
 but this of course wont work when the movie is loaded into a
 new movie because the reference will be lost and changes to
 
 _level0.movieHolder.instance1.myVariable = blah;
 
 and of course it breaks the app.
 
 Thanks again,
 -h
 
 On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:
 
  Classes don't know their own scope, they are oblivious to anything
  outside of them, (unless of course you import some other
 class - then
  they know what the other class does, but still don't have any scope
  reference).  What are you trying to do?
 
  Jason Merrill
  Bank of America
  GTO Learning  Leadership Development eTools  Multimedia Team
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto: [EMAIL PROTECTED] On Behalf
  Of Helmut Granda
  Sent: Tuesday, April 03, 2007 9:05 AM
  To: Flashcoders mailing list
  Subject: [Flashcoders] Delegate Class Scoping self instantiated
  
   I understand that when instantiating a class you can set the
  scope where the instance is going to run, but how about when
  we dont actually instantiate the class on the timeline but we
  just link the class directly to the items on the stage, how
  is the scope treated in this case? I assume the class has to
  be instantiated on itself or do we need a separate class to
  keep track of this item?
  
  TIA
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com http://training.figleaf.com
  
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options

RE: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Merrill, Jason

myTween.onMotionChanged = function() {

if ( (myTween.time  .2)  playOnce == true) {

Delegate.create(scope, resetWin3);

Because that's not how delegate works exactly :) - there is no scope
address to resetWin3 inside of the tween.onMotionChanged event. Instead
you should do it like this:

myTween.onMotionChanged = Delegate.create(scope, resetWin3)

If you want to pass an argument to the function then that's easy enough:

var myDel:Object = myTween.onMotionChanged = Delegate.create(scope,
resetWin3)
myDel.myArgument = hello

then in the resetWin3 function:

function resetWin3():Void
{
myVar = arguments.caller.myArgument
}

Jason Merrill
Bank of America  
GTO Learning  Leadership Development
eTools  Multimedia Team


 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Helmut Granda
Sent: Tuesday, April 03, 2007 10:07 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Delegate Class Scoping self instantiated

You are correct, and it all seems clear now and working as 
expected, the only guy that I cant understand is the Tween 
class and the way i can pass a refrence of the main class inside it.

I have learend that this works

myTween.onMotionFinished = Delegate.create(this, myNextFunction);

but I am triggering other functions in the middle of the Tween

//code sample
var playOnce:Boolean = true;

myTween.onMotionChanged = function() {

if ( (myTween.time  .2)  playOnce == true) {

Delegate.create(scope, resetWin3);
playOnce = false;
}
}

//end of sample

Which of course doesnt want to cooperate, I have tried to 
pass a reference of the class into the Tween but still it 
wants to use  itself as a reference rather than the refence 
passed into it. Any Ideas? I will keep googling in the mean time...

On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:

 If class has it's own variables, just use them inside the 
class- but 
 if you want to Extend movieClip and expect it to know about 
variables 
 outside it's scope, well, that's breaking OOP AFAIK, 
classes only know 
 about themselves.  Instead, you will want to use a central 
composition 
 class and refer to movie clip instances instead of subclassing 
 movieClip.  At least as I see it - others may have some 
different ideas.

 To make a movie clip animate itself, using myClass extends 
MovieClip, 
 you can just use this which is an instance of the movieClip.  i.e.
 this._x += 10;


 Jason Merrill
 Bank of America
 GTO Learning  Leadership Development eTools  Multimedia Team




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Helmut Granda
 Sent: Tuesday, April 03, 2007 9:30 AM
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Delegate Class Scoping self 
instantiated
 
 Oh, and I forgot an important point, the reson why I want to
 find the scope of the class is because inside the class there
 are variables that talk to each other and I can have them
 talk back and forth like this
 
 _level0.instance1.myVariable = blah;
 
 but this of course wont work when the movie is loaded into a
 new movie because the reference will be lost and changes to
 
 _level0.movieHolder.instance1.myVariable = blah;
 
 and of course it breaks the app.
 
 Thanks again,
 -h
 
 On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:
 
  Classes don't know their own scope, they are oblivious 
to anything
  outside of them, (unless of course you import some other
 class - then
  they know what the other class does, but still don't 
have any scope
  reference).  What are you trying to do?
 
  Jason Merrill
  Bank of America
  GTO Learning  Leadership Development eTools  Multimedia Team
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf
  Of Helmut Granda
  Sent: Tuesday, April 03, 2007 9:05 AM
  To: Flashcoders mailing list
  Subject: [Flashcoders] Delegate Class Scoping self 
instantiated
  
   I understand that when instantiating a class you can set the
  scope where the instance is going to run, but how about when
  we dont actually instantiate the class on the timeline but we
  just link the class directly to the items on the stage, how
  is the scope treated in this case? I assume the class has to
  be instantiated on itself or do we need a separate class to
  keep track of this item?
  
  TIA
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com http://training.figleaf.com
  
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http

Re: Re: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread John Mark Hawley
This looks like a lot of very strange stuff is going on in the design of this 
code. I think you should explain what you want to do at a very high level so we 
can see if there is a better and simpler way to accomplish it. (I can't figure 
out where the Delegate mentioned in the subject line is coming from, either.)

 
 From: Helmut Granda [EMAIL PROTECTED]
 Date: 2007/04/03 Tue AM 08:38:08 CDT
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Delegate Class Scoping self instantiated
 
 So I figured it out or at least I think I did,
 
 private var target: myClass;
 
 function myClass(){
 
  target = this;
 }
 
 now I can reference to properties within a class without breaking the app.
 So in the same lines, is there anyway to code the classe so that we don't
 have to reference to the properties and methods within the class without
 having to say
 
 target.objectA._x = 130;
 
 but just have
 
 objectA._x = 130;
 
 Thanks
 -h
 
 On 4/3/07, Helmut Granda [EMAIL PROTECTED] wrote:
 
  Oh, and I forgot an important point, the reson why I want to find the
  scope of the class is because inside the class there are variables that talk
  to each other and I can have them talk back and forth like this
 
  _level0.instance1.myVariable = blah;
 
  but this of course wont work when the movie is loaded into a new movie
  because the reference will be lost and changes to
 
  _level0.movieHolder.instance1.myVariable = blah;
 
  and of course it breaks the app.
 
  Thanks again,
  -h
 
  On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:
  
   Classes don't know their own scope, they are oblivious to anything
   outside of them, (unless of course you import some other class - then
   they know what the other class does, but still don't have any scope
   reference).  What are you trying to do?
  
   Jason Merrill
   Bank of America
   GTO Learning  Leadership Development
   eTools  Multimedia Team
  
  
  
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto: [EMAIL PROTECTED] On Behalf
   Of Helmut Granda
   Sent: Tuesday, April 03, 2007 9:05 AM
   To: Flashcoders mailing list
   Subject: [Flashcoders] Delegate Class Scoping self instantiated
   
I understand that when instantiating a class you can set the
   scope where the instance is going to run, but how about when
   we dont actually instantiate the class on the timeline but we
   just link the class directly to the items on the stage, how
   is the scope treated in this case? I assume the class has to
   be instantiated on itself or do we need a separate class to
   keep track of this item?
   
   TIA
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
   
   Brought to you by Fig Leaf Software
   Premier Authorized Adobe Consulting and Training
   http://www.figleaf.com http://training.figleaf.com
   
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
   Brought to you by Fig Leaf Software
   Premier Authorized Adobe Consulting and Training
   http://www.figleaf.com
   http://training.figleaf.com
  
 
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 

--
John Mark Hawley
The Nilbog Group
773.968.4980 (cell)

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: Re: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Helmut Granda

In the piece of code that I just sent basically what is happening is this:

Start Tween = Tween length 1 sec
If it has elapsed .2 seconds  then trigger a function

And my problem was that once the .2 seconds have happened the function wasnt
called since it was inside an If statement inside the onMotionChanged
function inside the Tween class

//Sample

   myTween.onMotionChanged = function() {

   if ( (myTween.time  .2)  playOnce == true) {
  // FunctionCallHappens here
   playOnce = false;
   }
   }

//end of sample

But as Jason explained making an object and then referencing to it seems to
work great. So the final question is, Did I explain my situation correctly
and would this be a good approach or should I think it over?

Thanks

On 4/3/07, John Mark Hawley [EMAIL PROTECTED] wrote:


This looks like a lot of very strange stuff is going on in the design of
this code. I think you should explain what you want to do at a very high
level so we can see if there is a better and simpler way to accomplish it.
(I can't figure out where the Delegate mentioned in the subject line is
coming from, either.)


 From: Helmut Granda [EMAIL PROTECTED]
 Date: 2007/04/03 Tue AM 08:38:08 CDT
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Delegate Class Scoping self instantiated

 So I figured it out or at least I think I did,

 private var target: myClass;

 function myClass(){

  target = this;
 }

 now I can reference to properties within a class without breaking the
app.
 So in the same lines, is there anyway to code the classe so that we
don't
 have to reference to the properties and methods within the class without
 having to say

 target.objectA._x = 130;

 but just have

 objectA._x = 130;

 Thanks
 -h

 On 4/3/07, Helmut Granda [EMAIL PROTECTED] wrote:
 
  Oh, and I forgot an important point, the reson why I want to find the
  scope of the class is because inside the class there are variables
that talk
  to each other and I can have them talk back and forth like this
 
  _level0.instance1.myVariable = blah;
 
  but this of course wont work when the movie is loaded into a new movie
  because the reference will be lost and changes to
 
  _level0.movieHolder.instance1.myVariable = blah;
 
  and of course it breaks the app.
 
  Thanks again,
  -h
 
  On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:
  
   Classes don't know their own scope, they are oblivious to anything
   outside of them, (unless of course you import some other class -
then
   they know what the other class does, but still don't have any scope
   reference).  What are you trying to do?
  
   Jason Merrill
   Bank of America
   GTO Learning  Leadership Development
   eTools  Multimedia Team
  
  
  
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto: [EMAIL PROTECTED] On Behalf
   Of Helmut Granda
   Sent: Tuesday, April 03, 2007 9:05 AM
   To: Flashcoders mailing list
   Subject: [Flashcoders] Delegate Class Scoping self instantiated
   
I understand that when instantiating a class you can set the
   scope where the instance is going to run, but how about when
   we dont actually instantiate the class on the timeline but we
   just link the class directly to the items on the stage, how
   is the scope treated in this case? I assume the class has to
   be instantiated on itself or do we need a separate class to
   keep track of this item?
   
   TIA
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
   
   Brought to you by Fig Leaf Software
   Premier Authorized Adobe Consulting and Training
   http://www.figleaf.com http://training.figleaf.com
   
   ___
   Flashcoders@chattyfig.figleaf.com
   To change your subscription options or search the archive:
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
   Brought to you by Fig Leaf Software
   Premier Authorized Adobe Consulting and Training
   http://www.figleaf.com
   http://training.figleaf.com
  
 
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com


--
John Mark Hawley
The Nilbog Group
773.968.4980 (cell)

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Re: Re: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Eric Walton

Anyone know how to feed what a visitor is viewing in an iframe into a
dynamic list, the iframe will have a search engine built into it?

Thanks in advance,


Eric Walton 9 / Edub9

To view more about
The Artwork of Eric Walton 9 / Edub9
please visit the following:
www.hollywoodfineart.com
www.myspace.com/ericwalton9_edub9
Providentia Marketing LLC
754-246-7620 Cel



On 4/3/07, Helmut Granda [EMAIL PROTECTED] wrote:


In the piece of code that I just sent basically what is happening is this:

Start Tween = Tween length 1 sec
If it has elapsed .2 seconds  then trigger a function

And my problem was that once the .2 seconds have happened the function
wasnt
called since it was inside an If statement inside the onMotionChanged
function inside the Tween class

//Sample

myTween.onMotionChanged = function() {

if ( (myTween.time  .2)  playOnce == true) {
   // FunctionCallHappens here
playOnce = false;
}
}

//end of sample

But as Jason explained making an object and then referencing to it seems
to
work great. So the final question is, Did I explain my situation correctly
and would this be a good approach or should I think it over?

Thanks

On 4/3/07, John Mark Hawley [EMAIL PROTECTED] wrote:

 This looks like a lot of very strange stuff is going on in the design of
 this code. I think you should explain what you want to do at a very high
 level so we can see if there is a better and simpler way to accomplish
it.
 (I can't figure out where the Delegate mentioned in the subject line is
 coming from, either.)

 
  From: Helmut Granda [EMAIL PROTECTED]
  Date: 2007/04/03 Tue AM 08:38:08 CDT
  To: flashcoders@chattyfig.figleaf.com
  Subject: Re: [Flashcoders] Delegate Class Scoping self instantiated
 
  So I figured it out or at least I think I did,
 
  private var target: myClass;
 
  function myClass(){
 
   target = this;
  }
 
  now I can reference to properties within a class without breaking the
 app.
  So in the same lines, is there anyway to code the classe so that we
 don't
  have to reference to the properties and methods within the class
without
  having to say
 
  target.objectA._x = 130;
 
  but just have
 
  objectA._x = 130;
 
  Thanks
  -h
 
  On 4/3/07, Helmut Granda [EMAIL PROTECTED] wrote:
  
   Oh, and I forgot an important point, the reson why I want to find
the
   scope of the class is because inside the class there are variables
 that talk
   to each other and I can have them talk back and forth like this
  
   _level0.instance1.myVariable = blah;
  
   but this of course wont work when the movie is loaded into a new
movie
   because the reference will be lost and changes to
  
   _level0.movieHolder.instance1.myVariable = blah;
  
   and of course it breaks the app.
  
   Thanks again,
   -h
  
   On 4/3/07, Merrill, Jason [EMAIL PROTECTED] wrote:
   
Classes don't know their own scope, they are oblivious to anything
outside of them, (unless of course you import some other class -
 then
they know what the other class does, but still don't have any
scope
reference).  What are you trying to do?
   
Jason Merrill
Bank of America
GTO Learning  Leadership Development
eTools  Multimedia Team
   
   
   
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto: [EMAIL PROTECTED] On Behalf
Of Helmut Granda
Sent: Tuesday, April 03, 2007 9:05 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Delegate Class Scoping self instantiated

 I understand that when instantiating a class you can set the
scope where the instance is going to run, but how about when
we dont actually instantiate the class on the timeline but we
just link the class directly to the items on the stage, how
is the scope treated in this case? I assume the class has to
be instantiated on itself or do we need a separate class to
keep track of this item?

TIA
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
   
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
   
  
  
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier

RE: Re: [Flashcoders] Delegate Class Scoping self instantiated

2007-04-03 Thread Merrill, Jason
Anyone know how to feed what a visitor is viewing in an 
iframe into a dynamic list, the iframe will have a search 
engine built into it?

Wrong thread, but seems you could use External Interface with Javscript
communication.  Will require some coding both on the HTML page and the
flash file.

Jason Merrill
Bank of America  
GTO Learning  Leadership Development
eTools  Multimedia Team


 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com