[Flashcoders] domain name

2006-05-23 Thread Laurent CUCHET
I try to find a page and determine if www are there
I have to write all the time the website name.

Is there a way to know if www is in Name ??
Thank you

domainname = new LocalConnection();
trace(domainname.domain());
this.dm.text = domainname.domain();
if (this.dm.text == www.webpage.com) {
#include flash_AS_detection.as
} else {
getURL(http://www.webpage.com;, _parent);
}



___
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] domain name

2006-05-23 Thread flashcoders
You cannot include an as file in run-time. This is done by the compiler when
you publish your swf file.

When you want to check the existence of a substring in some string (like a
domain name) you can use the string functions in actionscript.
Like the split function...

var domain_str:String = www.somedomain.com;
var split_arr:Array = domain_str.split (.);
/*
* split_arr is now an array [www,somedomain,com]
if (split_arr[0] == www) {
 trace (got www);
} else {
 trace (no www here);
}


But i'm not sure this is what you mean!

Simon


Citeren Laurent CUCHET [EMAIL PROTECTED]:

 I try to find a page and determine if www are there
 I have to write all the time the website name.

 Is there a way to know if www is in Name ??
 Thank you

 domainname = new LocalConnection();
 trace(domainname.domain());
 this.dm.text = domainname.domain();
 if (this.dm.text == www.webpage.com) {
 #include flash_AS_detection.as
 } else {
 getURL(http://www.webpage.com;, _parent);
 }



 ___
 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






This message was sent using IMP, the Internet Messaging Program.

___
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] domain name

2006-05-23 Thread Zimmen
You cannot include an as file in run-time. This is done by the compiler when 
you publish your swf file.


When you want to check the existence of a substring in some string (like a 
domain name) you can use the string functions in actionscript.

Like the split function...

var domain_str:String = www.somedomain.com;
var split_arr:Array = domain_str.split (.);
/*
* split_arr is now an array [www,somedomain,com]
if (split_arr[0] == www) {
trace (got www);
} else {
trace (no www here);
}


But i'm not sure this is what you mean!

Simon

- Original Message - 
From: Laurent CUCHET [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, May 23, 2006 2:16 PM
Subject: [Flashcoders]  domain name



I try to find a page and determine if www are there
I have to write all the time the website name.

Is there a way to know if www is in Name ??
Thank you

domainname = new LocalConnection();
trace(domainname.domain());
this.dm.text = domainname.domain();
if (this.dm.text == www.webpage.com) {
   #include flash_AS_detection.as
} else {
   getURL(http://www.webpage.com;, _parent);
}



___
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