Re: Re[5]: [Flashcoders] AS2 Vs. AS1

2006-03-22 Thread stone larsen
It traces out the email to send



--- [EMAIL PROTECTED] wrote:

 You need to copy the code he gave you - put it in an
 as file, make a
 movieclip with the assets he stated and bind it in
 the library to the
 class via the linkage properties (AS2 class).
 
 As for your previous post - what do you mean by
 traced out okay. What
 exactly traced out? Can you trace the variable you
 are looking for
 success?
 
  Ivan,
 
  I'm etting an error on the class says it needs
 to be
  external?
 
 
  --- Iv [EMAIL PROTECTED] wrote:
 
  Hello stone,
 
  - yes. a little trick needed:
 
  import mx.utils.Delegate;
 
  class EmailForm extends MovieClip {
 
private var submit_btn:Button;
private var new_lv : LoadVars;
private var email : TextField;
// private var request_url : String =
  emailSubmit.php;
private var request_url : String =
  emailSubmit.txt;
 
 
private function EmailForm () {
  this.submit_btn.onRelease =
  Delegate.create(this, this.onReleaseHandler);
}
 
private function onReleaseHandler() : Void {
  this.sendEmail();
}
 
private function sendEmail() : Void {
  trace(sendEmail+this);
  var lv:LoadVars = new LoadVars();
  this.new_lv = new LoadVars();
  lv[email] = this.email.text;
  this.new_lv.onData =
 Delegate.create(this,
  this.getResponse);
  lv.sendAndLoad(this.request_url,
  this.new_lv);
  // , POST
}
 
private function getResponse
  (loaded_data:String):Void {
  if (loaded_data == null) {
trace(Error);
return;
  }
 
 trace(EmailForm.getResponse(+[arguments]+));
  // trick
  var lv:LoadVars = new LoadVars();
  lv.onData(loaded_data);
  for (var i : String in lv) {
trace(i+=+lv[i]);
  }
}
 
  }
 
  --
  Ivan Dembicki
 
 


  [EMAIL PROTECTED] |
   | http://www.design.ru
 
  ___
  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
 
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
  protection around
  http://mail.yahoo.com
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.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
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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: Re[5]: [Flashcoders] AS2 Vs. AS1

2006-03-22 Thread stone larsen
Ivan and Stacey,

Thanks for your help on my AS1 to AS2 issue.

again, much thanks, got it figured out with your help.

-S

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] AS2 Vs. AS1

2006-03-21 Thread David Rorex
On 3/21/06, stone larsen [EMAIL PROTECTED] wrote:

 Is there a reason this works in AS1 and not AS2???


Could you give us more info on what exactly is not working with it?
Did you use trace()'s or the debugger to find out exactly which part is
failing?

-David R
___
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] AS2 Vs. AS1

2006-03-21 Thread stone larsen
David,

I'm not familiar with the debugger, i did put in some
trace's but came back with nothing.

here's the URL where I am trying to get it working

http://sireclothing.com/final/

here's the php

?php 
//get email value from POST variable
$email = trim($_POST['email']);
//add a new line for Each email address
$email .=\n; 
//initialize the variable
$fileName = subscribe.txt;
//open files
if (is_writable($fileName)) {
if(!$fp = fopen($fileName,a)){
echo status=Can't open the file name $fileName;
exit;
}
if (fwrite($fp,$email) === FALSE) {
echo status=Can't write to $fileName;
exit;
}
echo status=ok;
fclose($fp);
} else {
echo status=The file $fileName is not writable;
}
?

If you take a look the status goes directly to
Problem. I've been at this all day, no results, any
help?

Best,
Stone

--- David Rorex [EMAIL PROTECTED] wrote:

 On 3/21/06, stone larsen [EMAIL PROTECTED]
 wrote:
 
  Is there a reason this works in AS1 and not
 AS2???
 
 
 Could you give us more info on what exactly is not
 working with it?
 Did you use trace()'s or the debugger to find out
 exactly which part is
 failing?
 
 -David R
 ___
 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
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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] AS2 Vs. AS1

2006-03-21 Thread stone larsen
Ivan,

Thanks for the reply, can you give an example of what
you are referring to? I'm not quite understanding.

Best.

--- Iv [EMAIL PROTECTED] wrote:

 Hello stone,
 
 sl Is there a reason this works in AS1 and not
 AS2???
 - it is bad code because you usen't path to
 variables.
   in as1 to as2 conversation default name space is
 changed.
   just set this, _root etc and you will see a
 problem
   yourself.
 
 
 -- 
 Ivan Dembicki


 [EMAIL PROTECTED] |  
  | http://www.design.ru
 
 ___
 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
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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[3]: [Flashcoders] AS2 Vs. AS1

2006-03-21 Thread Iv
Hello,

I try convert this code to AS2 [...]

oops. my code is incorrect.
but main is not in my code.
main in principle: always use path to variables (or var declaration)
if you needn't scope missunderstanding.


-- 
Ivan Dembicki

[EMAIL PROTECTED] || 
http://www.design.ru

___
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[3]: [Flashcoders] AS2 Vs. AS1

2006-03-21 Thread stone larsen
Ivan,

Tried the code you sent, no luck... what was wrong
with it. I'm trying to learn this. Also tried the
delegate method it to failed.

any advise?

Can I send you the file, so you can comment on what is
wrong?

best,
Stone



--- Iv [EMAIL PROTECTED] wrote:

 Hello,
 
 I try convert this code to AS2 [...]
 
 oops. my code is incorrect.
 but main is not in my code.
 main in principle: always use path to variables (or
 var declaration)
 if you needn't scope missunderstanding.
 
 
 -- 
 Ivan Dembicki


 [EMAIL PROTECTED] |  
  | http://www.design.ru
 
 ___
 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
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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[5]: [Flashcoders] AS2 Vs. AS1

2006-03-21 Thread Iv
Hello stone,

- yes. a little trick needed:

import mx.utils.Delegate;

class EmailForm extends MovieClip {
  
  private var submit_btn:Button;
  private var new_lv : LoadVars;
  private var email : TextField;
  // private var request_url : String = emailSubmit.php;
  private var request_url : String = emailSubmit.txt;
  
  
  private function EmailForm () {
this.submit_btn.onRelease =  Delegate.create(this, this.onReleaseHandler);
  }
  
  private function onReleaseHandler() : Void {
this.sendEmail();
  }

  private function sendEmail() : Void {
trace(sendEmail+this);
var lv:LoadVars = new LoadVars();
this.new_lv = new LoadVars();
lv[email] = this.email.text;
this.new_lv.onData = Delegate.create(this, this.getResponse);
lv.sendAndLoad(this.request_url, this.new_lv);
// , POST
  }
  
  private function getResponse (loaded_data:String):Void {
if (loaded_data == null) {
  trace(Error);
  return;
}
trace(EmailForm.getResponse(+[arguments]+));
// trick
var lv:LoadVars = new LoadVars();
lv.onData(loaded_data);
for (var i : String in lv) {
  trace(i+=+lv[i]);
}
  }

}

-- 
Ivan Dembicki

[EMAIL PROTECTED] || 
http://www.design.ru

___
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[5]: [Flashcoders] AS2 Vs. AS1

2006-03-21 Thread stone larsen
Ivan,

I'm etting an error on the class says it needs to be
external?


--- Iv [EMAIL PROTECTED] wrote:

 Hello stone,
 
 - yes. a little trick needed:
 
 import mx.utils.Delegate;
 
 class EmailForm extends MovieClip {
   
   private var submit_btn:Button;
   private var new_lv : LoadVars;
   private var email : TextField;
   // private var request_url : String =
 emailSubmit.php;
   private var request_url : String =
 emailSubmit.txt;
   
   
   private function EmailForm () {
 this.submit_btn.onRelease = 
 Delegate.create(this, this.onReleaseHandler);
   }
   
   private function onReleaseHandler() : Void {
 this.sendEmail();
   }
 
   private function sendEmail() : Void {
 trace(sendEmail+this);
 var lv:LoadVars = new LoadVars();
 this.new_lv = new LoadVars();
 lv[email] = this.email.text;
 this.new_lv.onData = Delegate.create(this,
 this.getResponse);
 lv.sendAndLoad(this.request_url,
 this.new_lv);
 // , POST
   }
   
   private function getResponse
 (loaded_data:String):Void {
 if (loaded_data == null) {
   trace(Error);
   return;
 }
 trace(EmailForm.getResponse(+[arguments]+));
 // trick
 var lv:LoadVars = new LoadVars();
 lv.onData(loaded_data);
 for (var i : String in lv) {
   trace(i+=+lv[i]);
 }
   }
 
 }
 
 -- 
 Ivan Dembicki


 [EMAIL PROTECTED] |  
  | http://www.design.ru
 
 ___
 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
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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[7]: [Flashcoders] AS2 Vs. AS1

2006-03-21 Thread Iv
Hello stone,

sl I'm etting an error on the class says it needs to be
sl external?
- wow! of course.

sl Is there a reason this works in AS1 and not AS2?
- possible I understand you incorrect...


-- 
Ivan Dembicki

[EMAIL PROTECTED] || 
http://www.design.ru

___
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[5]: [Flashcoders] AS2 Vs. AS1

2006-03-21 Thread stacey
You need to copy the code he gave you - put it in an as file, make a
movieclip with the assets he stated and bind it in the library to the
class via the linkage properties (AS2 class).

As for your previous post - what do you mean by traced out okay. What
exactly traced out? Can you trace the variable you are looking for
success?

 Ivan,

 I'm etting an error on the class says it needs to be
 external?


 --- Iv [EMAIL PROTECTED] wrote:

 Hello stone,

 - yes. a little trick needed:

 import mx.utils.Delegate;

 class EmailForm extends MovieClip {

   private var submit_btn:Button;
   private var new_lv : LoadVars;
   private var email : TextField;
   // private var request_url : String =
 emailSubmit.php;
   private var request_url : String =
 emailSubmit.txt;


   private function EmailForm () {
 this.submit_btn.onRelease =
 Delegate.create(this, this.onReleaseHandler);
   }

   private function onReleaseHandler() : Void {
 this.sendEmail();
   }

   private function sendEmail() : Void {
 trace(sendEmail+this);
 var lv:LoadVars = new LoadVars();
 this.new_lv = new LoadVars();
 lv[email] = this.email.text;
 this.new_lv.onData = Delegate.create(this,
 this.getResponse);
 lv.sendAndLoad(this.request_url,
 this.new_lv);
 // , POST
   }

   private function getResponse
 (loaded_data:String):Void {
 if (loaded_data == null) {
   trace(Error);
   return;
 }
 trace(EmailForm.getResponse(+[arguments]+));
 // trick
 var lv:LoadVars = new LoadVars();
 lv.onData(loaded_data);
 for (var i : String in lv) {
   trace(i+=+lv[i]);
 }
   }

 }

 --
 Ivan Dembicki

 
 [EMAIL PROTECTED] |
  | http://www.design.ru

 ___
 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



 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around
 http://mail.yahoo.com

 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.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