Re[2]: [Flashcoders] as 2 email validation class

2006-11-18 Thread R�kos Attila

Well, this is too simple, there are too many invalid strings which are
considered as valid by this script. I think if you validate the input,
then do it correctly or don't validate at all :) An incomplete
validation makes you feel that your data is valid and secure, however
it can lead to unexpected problems later.

  Attila

JB> I got a much simpler one:
JB> 
JB> Check for invalidity:
JB> 
JB> // ti = text input field
JB> if((ti.text.indexOf("@") == -1) || 
JB> (ti.text.indexOf(".",(ti.text.indexOf("@")+2)) == -1) ) {
JB> // email is invalid
JB> }
JB> 
JB> OR...
JB> 
JB> Check for validity:
JB> 
JB> // ti = text input field
JB> if((ti.text.indexOf("@") != -1) && 
JB> (ti.text.indexOf(".",(ti.text.indexOf("@")+2)) != -1) ) {
JB> // email is valid
JB> }


___
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] as 2 email validation class

2006-11-18 Thread Joseph Balderson

I got a much simpler one:

Check for invalidity:

// ti = text input field
if((ti.text.indexOf("@") == -1) || 
(ti.text.indexOf(".",(ti.text.indexOf("@")+2)) == -1) ) {

// email is invalid
}

OR...

Check for validity:

// ti = text input field
if((ti.text.indexOf("@") != -1) && 
(ti.text.indexOf(".",(ti.text.indexOf("@")+2)) != -1) ) {

// email is valid
}

__

Joseph Balderson, Flash Platform Developer
http://www.joeflash.ca | 416-768-0987
Writing partner, Community MX | http://www.communitymx.com
Consultant, New Toronto Group | http://www.newyyz.com

Rich Rodecker wrote:

I found this when I was adding stuff to actionscriptclasses.com :

http://www.robgonda.com/blog/index.cfm/2006/3/1/actionscript-regular-expression-class 



the download has an email validation example.



On 11/17/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:


> However it seems to think an email address with less that 4
> characters before the "@' is not valid (when it is).

So just modify it to allow less than 4 characters before the @.
___
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] MXML - Problem embedding FLA symbol

2006-11-18 Thread slangeberg

I'm trying to import a swf symbol into Flex 2. However, the following code
works great in AS3 project, but NOT in an MXML project:

   [Embed(source="../Art.swf", symbol="car_blue")]
   private var CarBlue:Class;

   private function init():void
   {
   var car_blue:Sprite = new CarBlue();
   addChild( car_blue );
   }

I get the following runtime error:

TypeError: Error #1034: Type Coercion failed: cannot convert
[EMAIL PROTECTED] to mx.core.UIComponent.
   at FlexDerby/::init()
   at FlexDerby/___Application1_creationComplete()
   at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction
()
   at flash.events::EventDispatcher/dispatchEvent()
   at mx.core::UIComponent/set initialized()
   at mx.managers::LayoutManager/::doPhasedInstantiation()
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at mx.core::UIComponent/::callLaterDispatcher2()
   at mx.core::UIComponent/::callLaterDispatcher()

: : ) Scott
___
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] swf and referring domain

2006-11-18 Thread Tyler Wright

Mick,

You don't need the import (in AS2) if you type out the full package name:
flash.external.ExternalInterface(...);

Tyler

On 11/17/06, Mick G <[EMAIL PROTECTED]> wrote:


Two lines...

*import* flash.*external*.*ExternalInterface
*var thisDomain:String = flash.external.ExternalInterface("eval", "
location.href");

I always forget that damn import and it kills me wasting time debugging it
;)





On 11/17/06, Tyler Wright <[EMAIL PROTECTED]> wrote:
>
> Dave,
>
> If you were just using Flash8 ... it's beautiful.
>
> var thisDomain:String = flash.external.ExternalInterface("eval", "
> location.href");
>
> one line, so sweet.
>
> Tyler
>
> On 11/15/06, Dave Segal <[EMAIL PROTECTED]> wrote:
> >
> > Is there a way to find the domain of the page that loads my swf. For
> > example, someone embeds an swf served from my server on their
> > www.myspace.com   page. Is there is way for
me
> to
> > determine that the request is coming from myspace.com at runtime?
> >
> > A search of the archive revealed this thread that describes exactly
the
> > problem that I am facing but I didn't see any solution.
> >
> >
>
http://chattyfig.figleaf.com/pipermail/flashcoders/2006-October/175064.html
> >
> > I have the option of using AS 3 if it provides a solution.
> >
> > Thanks.
> >
> > ___
> > 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] FlashInterface - Communicating between Flash 8 and Flash 9

2006-11-18 Thread Troy Rollins


On Nov 18, 2006, at 2:01 PM, Robert Taylor wrote:

Hey gang, just thought I would let everyone know I built up a  
couple of

classes that allow you to easily communicate between the ActionScript
Virtual Machines (AVMs). You can dispatch events, talk to functions  
and
properties synchronously through these class. The API is the same  
between
both AS2.0 and AS 3.0. I needed to have this ability for a project  
I am
currently working on and I am sure there will be many others who  
need this

solution. Anyway check out the links below and have fun with them.


Excellent timing. I was just about to do this for my own project.  
Although I doubt I would have designed a logo for it!!  ;-)


Why Adobe didn't build in this functionality, I can't imagine.

Thanks Rob.

--
Troy
RPSystems, Ltd.
http://www.rpsystems.net


___
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] FlashInterface - Communicating between Flash 8 and Flash 9

2006-11-18 Thread Robert Taylor
Hey gang, just thought I would let everyone know I built up a couple of
classes that allow you to easily communicate between the ActionScript
Virtual Machines (AVMs). You can dispatch events, talk to functions and
properties synchronously through these class. The API is the same between
both AS2.0 and AS 3.0. I needed to have this ability for a project I am
currently working on and I am sure there will be many others who need this
solution. Anyway check out the links below and have fun with them.

 

Article I wrote regarding the problem and solution:

http://www.flashextensions.com/blog/2006/11/14/interfacing-between-flash-8-9
-problems-and-solutions/

 

FlashInterface Page (Downloads, Documentation, and Examples)

http://www.flashextensions.com/products/flashinterface.php

 

Spread the news and let others know about these classes

Cheers,

 

Rob Taylor

[EMAIL PROTECTED]

Flash Extensions, LLC

Extend Flash. Extend Skills. Extend Possibilities!

 

___
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] runtime shared symbols and path problem

2006-11-18 Thread Matthias Dittgen

Hello,

I use runtime sharing to export some symbols, for example:
chapter1.swf with symbol "chapter1"
chapter2.swf with symbol "chapter2"

I import those like this into my main.swf:
"chapter1" from chapter1.swf
"chapter2" from chapter2.swf


when I run main.swf it works fine.




Now I need to load main.swf into another framework. This is done by:
loadMovie("/pathTo/main.swf",containerClip);
chapter1.swf, chapter2.swf  chapterN.swf shall be also in /pathTo/

when I run the framework main.swf is loaded, but does not load the chapters.
Any idea?

My goal is, that main.swf can run stand-alone as well as loaded in the
framework.

Sorry for my poor english.

Thank you,
Matthias
___
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