RE: [Flashcoders] Challenge: open YouTube FLV in your own SWF

2007-05-15 Thread Michael Mudge
I've been doing this with AS3 for a while now...  Just using a Loader.

Go to http://www.biality.com/tubes/tubes.swf 
Enter a nickname by typing /nick whatever
Then type this: /plugin http://www.youtube.com/v/G-U5N9WHuOI

- Kipp

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Stan Vassilev | FM
> Sent: Tuesday, May 08, 2007 6:47 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] Challenge: open YouTube FLV in your own SWF
> 
> 
> I've been desparately trying to figure out a way to do so, 
> you can't do it 
> since YouTube's crossdomain XML features *.google.com and 
> *.youtube.com. I 
> want to experiment with a "mashup" which requires direct 
> access to the FLV.
> 
> So I started looking at the various Google services, in the 
> hope one of them 
> serves from a *.google.com domain.
> 
> Google Pages? Maybe pages.google.com ? Nope, googlepages.com 
> Google Widgets? Maybe widgets.google.com? Nope, gmodules.com 
> Google Code Projects? googlecode.com...
> 
> There's nothing on YouTube about uploading direct files I 
> found, so my 
> little experiment is doomed to fail.. unless I'm missing 
> something? Does 
> anyone of you know a service/idea/trick/API to open a 
> streaming FLV somehow 
> from YouTube?
> 
> The only thing I could think of is, of course, screen 
> scraping the FLV url 
> (keepvid.com style) and downloading it to my server to play. 
> But that's not 
> really what I wanted...
> 
> Regards, Stan Vassilev 
> 
> ___
> 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] Detecting referrer in Flash

2007-05-03 Thread Michael Mudge
> You can use FlashVars to pass it into your SWF via the HTML embed.

I'm currently using an anchor (foo.swf#abc) or file parameters
(foo.swf&item=abc), which work fine.

But can I do any better than this?  I feel that passing in a parameter
is an invitation for tampering...  Not that it's incredibly critical,
but it'd be nice if developers could just drop-in the SWF without having
to configure it.

> public _url : String [read-only]

This gives the URL of the SWF itself -- this is already known.

- Kipp

___
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] Detecting referrer in Flash

2007-05-03 Thread Michael Mudge
Is there any way to determine which web page is displaying my SWF?  This
could be the referrer field of the HTTP request for the .SWF... Or any
other data that might indicate what the containing web page is.  I am
using this to determine how to match the theme of the source page, not
for security.

- Kipp

___
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] [semi-OT] - Preventing Software Piracy

2007-04-20 Thread Michael Mudge
> And me ;) !
> 
> How would I connect such a dongle with the app I am trying to 
> preotect when I am using Director and / or Flash!

I think I wasted a bit of your email blabbing about security.  The
reality is, you don't want a dongle, it just complicates things, and
hardware is generally expensive.  A decent and original licensing scheme
ought to work fine.

I think I can come up with some solutions for this...  It may be a
completely in-SWF solution, or a custom Projector program (.EXE that
holds your .SWF).  Is it worth my time to do some feasability testing?

- Kipp

___
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] [semi-OT] - Preventing Software Piracy

2007-04-19 Thread Michael Mudge
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Weyert de Boer
> 
> 
> Genuine Dongles? What about dumping dongle data and then use a dongle 
> emulator?

I'm glad you asked! =)

Making a totally un-copyable dongle is actually pretty trivial.  There
are many USB microcontrollers that have Flash-ROM embedded in the chip,
allowing you to "lock" the memory once its programmed -- no way to read
it, even if you physically dismantle the circuit, except through the
program's pre-programmed outputs.

Using a combination of book encryption and hashing algorithms, you can
essentially have gigabytes of random data that can only be expressed
through the microcontroller's pre-programmed USB outputs.  Using a
deliberate delay in the microcontroller, it could take 10 seconds to
verify any one arbitrary key.  Even if a straight year was spent
downloading keys, the counterfeit would only have one answer for every
100 verifications.

The PC then only stores one-way encrypted versions of the "answers", so
even the PC does not know what the dongle will answer (making it
impossible to steal keys from the PC).  To see if the dongle answered
correctly, the dongle's answer is encrypted using the same one-way
encryption, and that is compared to the PC's already encrypted answers.

- Kipp
PS. There are ways of hacking these chips, involving slicing the top of
the microchip off in a clean-room, running gold thread to the memory
controller and reading the embedded memory directly.  Haha.

___
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] [semi-OT] - Preventing Software Piracy

2007-04-17 Thread Michael Mudge
If you want to verify that a genuine dongle is present, that's easy, but
I have no idea how you would communicate with the dongle from
ActionScript... You would almost definitely have to use an external
program.  I can think of a few Flash-drive-like dongle designs, but the
development cost may be very near the development cost of your entire
application.

Honestly, the best thing might be to go with a commercial anti-piracy
package.  These packages have already had the cost distributed over
multiple sales.  You won't have to reinvent the wheel, and you will have
a reasonable balance between price and effectiveness.

Now that the topic has come up though, I just might persue making such a
dongle... Hmm.

- Kipp

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of nik crosina
> Sent: Tuesday, April 17, 2007 4:52 PM
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] [semi-OT] - Preventing Software Piracy
> 
> 
> Hi Kipp,
> 
> that sounds exactly like the strategies recommended to me by 
> the Aladdin guys, and their manuals. And it also sounds 
> logical to me. The question to me is now whether I can tie a 
> dongle into actions script and then e.g. obfuscate the code 
> to a high enough degree that it would be above the pain level 
> of most crackers hackers and pirates.
> 
> I do understand that it is impossible to create something 
> bullet proof, but some big pain in the ass is what (and I 
> guess most) developers are after. At least it prevents the 
> layman user from just making a copy for their colleague, etc.
> 
> Nik C
> 
> On 4/17/07, Michael Mudge <[EMAIL PROTECTED]> wrote:
> > I can make a cheap, cryptographically secure USB or Serial 
> dongle no 
> > problem.
> >
> > However, the issue with any kind of software-based security is that 
> > once the software is on a client's machine, the client can 
> do whatever 
> > he wants with it; modify it not to use the dongle.
> >
> > But you CAN make it a serious pain in the ass.  In 
> unmanaged languages 
> > like C, it is especially helpful to make the program inherently 
> > incapable of running without the dongle -- by using the dongle to 
> > perform some essential calculation that isn't in your 
> program, or by 
> > sending the dongle pieces of your program's code to 
> "verify" that it's 
> > been unaltered.  Sometimes making a checksum of your own 
> code works, 
> > but then sometimes a hacker can use your own checksum algorithm to 
> > hack in a new checksum...
> >
> > ...so how far do you want to go with this?
> >
> > - Kipp
> >
> > > Hi Weyert,
> > >
> > > Can a dongle easily be circumvented then?
> > > What's the best way of protection then, and do you know where I 
> > > would find a specialist in this?
> > >
> > > Thanks,
> > >
> > > Nik
> > >
> > > On 4/17/07, Weyert de Boer <[EMAIL PROTECTED]> wrote:
> > > > Hi Nik,
> > > >
> > > > I have done research for my dad a while ago, and I came to the 
> > > > conclusion that it wasn't worth the effort $$$ wise.
> > > > > Not sure whether that is applicable to your project,
> > > Pete, but has
> > > > > anyone ever used dongle (i.e. hardware) protection for their 
> > > > > projects? I am currently testing out HASP from Aladdin,
> > > and does the
> > > > > job so far (have not come very far yet in testing though).
> > > > Yes, the problem with dongles is that it's quite hard to 
> > > > implement, right. Especially, I would like to advice 
> you not take 
> > > > any of the included examples or even consider build on 
> top of it. 
> > > > The examples are weak. Please rent some person who is 
> fully into 
> > > > the dongle and encryption. If not, it will be lost money.
> > > >
> > > > > What do you guys think about this kind of protection? Why
> > > isn't it
> > > > > used more often?
> > > > Because it's a big investment to implement.
> > > >
> > > > Yours,
> > > > Weyert de Boer
> > > >
> > > > ___
> > > > 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 Softwar

RE: [Flashcoders] [semi-OT] - Preventing Software Piracy

2007-04-17 Thread Michael Mudge
I can make a cheap, cryptographically secure USB or Serial dongle no
problem.

However, the issue with any kind of software-based security is that once
the software is on a client's machine, the client can do whatever he
wants with it; modify it not to use the dongle.

But you CAN make it a serious pain in the ass.  In unmanaged languages
like C, it is especially helpful to make the program inherently
incapable of running without the dongle -- by using the dongle to
perform some essential calculation that isn't in your program, or by
sending the dongle pieces of your program's code to "verify" that it's
been unaltered.  Sometimes making a checksum of your own code works, but
then sometimes a hacker can use your own checksum algorithm to hack in a
new checksum...

...so how far do you want to go with this?

- Kipp

> Hi Weyert,
> 
> Can a dongle easily be circumvented then?
> What's the best way of protection then, and do you know where 
> I would find a specialist in this?
> 
> Thanks,
> 
> Nik
> 
> On 4/17/07, Weyert de Boer <[EMAIL PROTECTED]> wrote:
> > Hi Nik,
> >
> > I have done research for my dad a while ago, and I came to the 
> > conclusion that it wasn't worth the effort $$$ wise.
> > > Not sure whether that is applicable to your project, 
> Pete, but has 
> > > anyone ever used dongle (i.e. hardware) protection for their 
> > > projects? I am currently testing out HASP from Aladdin, 
> and does the 
> > > job so far (have not come very far yet in testing though).
> > Yes, the problem with dongles is that it's quite hard to implement, 
> > right. Especially, I would like to advice you not take any of the 
> > included examples or even consider build on top of it. The examples 
> > are weak. Please rent some person who is fully into the dongle and 
> > encryption. If not, it will be lost money.
> >
> > > What do you guys think about this kind of protection? Why 
> isn't it 
> > > used more often?
> > Because it's a big investment to implement.
> >
> > Yours,
> > Weyert de Boer
> >
> > ___
> > 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
> >
> 
> 
> -- 
> Nik C
> ___
> 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] AS3 Socket class security

2007-04-14 Thread Michael Mudge
Thanks for the help.  Apparently, 5554 was a "special" port and was
firewalled.  I switched to a lower port and it works now.

- Kipp

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Andrés González & Aragón
> Sent: Friday, April 13, 2007 7:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Flashcoders] AS3 Socket class security
> 
> 
> Hi Michael,
> 
> Are you sure the crossdomain.xml is correct in biability server?
> 
> I was working in a as2-xmlsocket/as3-binarysocket conversion 
> recently and flash throwsme IOErrors when the message hasn't 
> well parsed or if the socket server hasn't connected.
> 
> Post the 'text' property of your IOError, it must have an 
> Error Number like #2031 (Socket Error)
> 
> -- 
> Andrés González Aragón
> Desarrollador Multimedia
> http://www.quantium.com.mx
> 
> 
> 
> 2007/4/13, Michael Mudge <[EMAIL PROTECTED]>:
> 
> > I wrote an app in AS3, served from 
> > http://www.biality.com/tubes/as3/tubes.swf, which makes a socket 
> > connection back to www.biality.com, port 5554.  I also have an AS2 
> > version of this app at http://www.biality.com/tubes/tubes.swf.
> >
> > The other person I'm working with is able to use the AS2 
> version, but 
> > not the AS3 version -- he is running the latest Flash 
> Player 9.  The 
> > AS3 version is firing an IOError (not a security error).  
> Can anyone 
> > else report on who can connect, who can't, and what player you're 
> > using?
> >
> > Any thoughts on why the connection can't be established?  
> Obviously, 
> > firewall settings and whatnot can play a role -- although his AS2 
> > version (which uses a different port) is working fine.  Is there 
> > something special about port 5554?  Is there something I 
> can set-up on 
> > the www.biality.com server to fix this?
> >
> > - Kipp
> >
> > ___
> > [EMAIL PROTECTED]
> > 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
> >
> ___
> [EMAIL PROTECTED]
> 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
> 

___
[EMAIL PROTECTED]
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] AS3 Socket class security

2007-04-13 Thread Michael Mudge
I wrote an app in AS3, served from
http://www.biality.com/tubes/as3/tubes.swf, which makes a socket
connection back to www.biality.com, port 5554.  I also have an AS2
version of this app at http://www.biality.com/tubes/tubes.swf.

The other person I'm working with is able to use the AS2 version, but
not the AS3 version -- he is running the latest Flash Player 9.  The AS3
version is firing an IOError (not a security error).  Can anyone else
report on who can connect, who can't, and what player you're using?

Any thoughts on why the connection can't be established?  Obviously,
firewall settings and whatnot can play a role -- although his AS2
version (which uses a different port) is working fine.  Is there
something special about port 5554?  Is there something I can set-up on
the www.biality.com server to fix this?

- Kipp

___
[EMAIL PROTECTED]
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] Accessing the instance of a class

2007-04-09 Thread Michael Mudge
> -Original Message by David Ngo-
> What instance are you trying to access? Your 'whatever' 
> class? If so, you'll need to use a Delegate to force scope:

I'm accustomed to lexical scope, so this was a confusing one for me.  I
understand exactly what you mean about using a delegate -- that will do
the trick, thanks!

- Kipp

___
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] Accessing the instance of a class

2007-04-08 Thread Michael Mudge
Here is an representation of something I'm trying to do on a much larger
scale:

class whatever {
  public var triggered:Boolean;
  public var foo:XMLSocket;
  public function whatever() {
foo = new XMLSocket();
foo.data = dodata;
  }
  private function dodata(what:XML) {
_.triggered = true;
  }
}

What goes in the blank?  How do I access the instance?  I have
determined that 'this' won't work; at the blank, the 'this' is actually
the XMLSocket.  'triggered' alone is apparently not in-scope... Any
ideas?

- Kipp
PS.  Many thanks for the help with classes not initializing -- It was
because a stale class of the same name had previously been loaded...
Stuck in memory.

___
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 not working when loaded from another movie..

2007-04-08 Thread Michael Mudge
It is quite likely that inner SWF you're loading accesses _root, which
by default accesses the outer SWF.  After you load the movie, try
setting it's _lockroot to true -- this will make the inner SWF's _root
point to the right place.

- Kipp

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Omar Fouad
> Sent: Sunday, April 08, 2007 9:47 PM
> To: Flashcoders mailing list
> Subject: [Flashcoders] Swf not working when loaded from 
> another movie..
> 
> 
> Hi list... i got an swf that actually is the gallery "part" 
> of a site i am working on the swf itself works when run 
> alone... But in the site, when loaded by loadMovie(), works 
> partially. does someone know why this is happening
> 
> Thanks so much
> 
> Regards
> 
> -- 
> Omar Fouad - Digital Emotions...
> 
> Love is always patient and kind. It is never jealous. Love is 
> never boastful nor conceited It is never rude or selfish. It 
> does not take offense and is not resentful. Love takes no 
> pleasure in other people's sins...but delights in the truth. 
> It is always ready to excuse, to trust, to hope... and to 
> endure... whatever comes. 
> ___
> 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] Constructors in AS2 SWFs not being called whenloaded by AS3

2007-04-07 Thread Michael Mudge
> Is there any reason why you aren't porting over the Thingy 
> class from AS2 to AS3? It might be easier to rewrite the 
> class using AS3.

The system I'm making is for featuring other artist's work... Some may
not have Flash 9, and really don't want to require them to use a program
that isn't even out yet... Also, there are some older AS2 apps that will
be adapted to this system.  The reason the base is in AS3 is because I
want to be able to at least support AS3, since I assume it will
eventually dominate, and AS3's got some other functionality that I would
like to incorporate.

That link to AVM1Movie was really interesting -- It definitely has some
very relevant stuff, but I still don't see why AS2 doesn't call the
constructor.  From what I can tell, the instance is created and all
other calls work, but the constructor itself just gets skipped.

Has anyone else tried this?  Would anyone else be willing to try and see
what other information can be gleaned from it?  Would it be proper to
say that this is a bug (rather than a shortcoming) in Flash Player 9?

- Kipp

> On 4/6/07, Michael Mudge <[EMAIL PROTECTED]> wrote:
> >
> > I've got an AS 2.0 (Flash 8) SWF that creates a class, and traces a 
> > property on that class... Something like this:
> >
> > foo = new Thingy();
> > trace(foo.test);
> >
> > All the class does is initialize that property; something 
> like this: 
> > class Thingy {
> >   public var test:String;
> >   public function Thingy() {
> > test = "hello";
> >   }
> > }
> >
> > This is pretty basic stuff -- and it works as expected.  
> When run, it 
> > simply traces "hello".  I then create an AS3 / Flash 9 app 
> that loads 
> > the aforementioned SWF... Something like this:
> >
> > As2thing = new Loader();
> > addChild(As2thing);
> > As2thing.load(new URLRequest("as2thing.swf"));
> >
> > Then suddenly, as2thing.swf doesn't quite behave the same; the 
> > Thingy's constructor doesn't get called -- it traces "undefined" 
> > instead.  Any idea why?
> >
> > - Kipp
> >
> > ___
> > 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] Constructors in AS2 SWFs not being called whenloaded by AS3

2007-04-07 Thread Michael Mudge
Well yes, in the larger scale of things I am using a LocalConnection...

But in this specific example, I am not trying to communicate at all --
I'm just trying to load and run the AS2 app.  Why does it run correctly
when standalone, but not within the AS3 app?

I read about the ApplicationDomain, but it looks like it's AS3-specifc.
I'm not trying to provide any AS3 classes or anything to the AS2 app --
I just want it to run, as-is.

- Kipp

> In the FP9 you can find 2 virtual machines, one for the AS3 
> and one for the AS1/2 .. you can use AS1/2 or AS3 code but 
> not the AS3 and the AS1/2 in the same time :)
> 
> If you want communicate between your SWFs running in AVM1 and 
> AVM2.. you must use the LocalConnection class :)

> 2007/4/7, Michael Mudge <[EMAIL PROTECTED]>:
> >
> > I've got an AS 2.0 (Flash 8) SWF that creates a class, and traces a 
> > property on that class... Something like this:
> >
> > foo = new Thingy();
> > trace(foo.test);
> >
> > All the class does is initialize that property; something 
> like this: 
> > class Thingy {
> >   public var test:String;
> >   public function Thingy() {
> > test = "hello";
> >   }
> > }
> >
> > This is pretty basic stuff -- and it works as expected.  
> When run, it 
> > simply traces "hello".  I then create an AS3 / Flash 9 app 
> that loads 
> > the aforementioned SWF... Something like this:
> >
> > As2thing = new Loader();
> > addChild(As2thing);
> > As2thing.load(new URLRequest("as2thing.swf"));
> >
> > Then suddenly, as2thing.swf doesn't quite behave the same; the 
> > Thingy's constructor doesn't get called -- it traces "undefined" 
> > instead.  Any idea why?
> >
> > - Kipp
> >
> > ___
> > 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] Constructors in AS2 SWFs not being called when loaded by AS3

2007-04-07 Thread Michael Mudge
I've got an AS 2.0 (Flash 8) SWF that creates a class, and traces a
property on that class... Something like this:

foo = new Thingy();
trace(foo.test);

All the class does is initialize that property; something like this:
class Thingy {
  public var test:String;
  public function Thingy() {
test = "hello";
  }
}

This is pretty basic stuff -- and it works as expected.  When run, it
simply traces "hello".  I then create an AS3 / Flash 9 app that loads
the aforementioned SWF... Something like this:

As2thing = new Loader();
addChild(As2thing);
As2thing.load(new URLRequest("as2thing.swf"));

Then suddenly, as2thing.swf doesn't quite behave the same; the Thingy's
constructor doesn't get called -- it traces "undefined" instead.  Any
idea why?

- Kipp

___
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] LocalConnection security

2007-03-30 Thread Michael Mudge
I have a Flash 9 app (named "fred"), which loads a Flash 8 app
("george"), and I need these two apps to be able to communicate, in both
directions.

It seems that a LocalConnection is the typical answer to this, but I
have issues with security.

fred is loaded from a private domain (my own), and george runs from a
highly public domain (like putfile).  Here are the problems:

I have a lot of control over fred, but the code in george needs to be
simple.

1. If fred makes a LocalConnection to listen to george (allowing his
domain), then any number of other apps, coencidentially loaded from
george's domain, can send crap to fred. -- Can I make fred verify that
it was george and not just some other schmuck SWF from george's site?
2. If another app on george's site makes a localconnection before george
gets loaded, it could trump george's ability to listen to commands from
fred.
3. If the fred+george app is loaded twice, the localconnections will
have already been in use, making them unable to make a connection in the
newly loaded copy.

...so, how can this be solved?  Is there a way to make LocalConnection
(or some other type of connection) talk only within the same Flash
player?  Is there a way to "know" what URL is sending data through the
LocalConnection?

- Kipp

___
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] Sending binary data to server - NO HEADERS

2007-03-28 Thread Michael Mudge
Although XML basically receives null-terminated XML data, it can *send*
any string.  You can basically make a rudamentary HTTP client by using
it.

Foo = new XMLSocket();
Foo.connect("wherever.com", 1234);
Foo.onConnect = function() {
  Foo.send(data);
  Foo.disconnect();
};
...something like that?

Or... in Flex, you can use a Socket class, which is quite similar... And
implement a more complete client.  If I had more details, I could
probably scribble something up...  What I don't know how to do is read a
local file in such a way that I'd be able to use its raw data as a
string to send to a socket.

- Kipp

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of David Rorex
> Sent: Wednesday, March 28, 2007 11:34 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] Sending binary data to server - NO HEADERS
> 
> 
> It seems like you are doing a lot of work, because of a 
> poorly-designed server script. I would really try and see if 
> you can get permission to modify the script.
> 
> If not, perhaps you can have a 'bridge' script, that recieves 
> the data from flash, formats it correctly for the other 
> script, then forwards it.
> 
> All the flash 8 methods of sending data to server that I can 
> think of, will have some sort of header or data format that 
> will need to be processed first.
> 
> -David R
> 
> On 3/5/07, Carlos Saenz <[EMAIL PROTECTED]> wrote:
> >
> > I am trying to send binary data to a server side script 
> which takes a 
> > variable called file, and saves it as a binary file.
> >
> > so if I have a variable in my flash movie "myfile", with a value of 
> > "asdf", and I send that to the server, it will make a file on the 
> > filesystem called "myfile", and the contents of it will be asdf
> >
> > Now, the trick is to send the script an image or video file. I have 
> > tried the following ways:
> >
> > 1) Using FileReference class (Flash 8)
> > --- This works with php and move_uploaded_file.
> > --- This does NOT work the server side script mentioned 
> above. It adds 
> > headers to the file. Same headers found here:
> >
> > http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/
> > wwhelp.htm?context=LiveDocs_Parts&file=2225.html
> >
> > Namely:
> > Content-Type: multipart/form-data; boundary=AaB03x
> > --AaB03x
> > Content-Disposition: form-data; name="Filedata"; 
> > filename="example.jpg"
> > Content-Type: application/octet-stream
> > ... contents of example.jpg ...
> > --AaB03x--
> >
> > PHP can handle this, the other script cannot. Unfortunately we are 
> > stuck with the other script. So I looked at different ways to send 
> > binary data to the server, without using FileReference.
> >
> >
> > 2) Flex Builder 2.
> >
> > Here we have some new classes. Such as URLRequest and 
> URLLoader, where 
> > you can use URLLoaderDataFormat.BINARY. This transferred 
> the file to 
> > the server side script we are stuck with perfectly. No errors or 
> > problems.
> >
> > Unfortunately they want a Flash Player 8 solution.
> >
> >
> > 3) Some examples on the web where people have taken a BitmapData 
> > object in Flash 8 and programmatically convert a bitmap 
> into an array 
> > of string data which represents pixel data, which is 
> converted on the 
> > server to an image.
> > -- Is this method possible with LoadVars to send a binary stream of 
> > data to a script via POST, which will make it think it's 
> the same as a 
> > file upload???
> >
> >
> > Well these are my three options
> > 1) FileReference -- Flash 8 --> Is there a way to eliminate the 
> > headers its sending by default?
> > 2) Flex Builder 2 - URLLoader class --> Any way to use this 
> in Flash 
> > Player 8? (Doesn't seem possible)
> > 3) Manually encode binary data into a variable and pass it through 
> > loadVars making the server think it's a file upload. Possible???
> >
> > OR
> >
> > 4) Any other possibility I may have overlooked?
> >
> > Thanks for any help,
> > -Carlos-
> > ___
> > 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
Premie

RE: [Flashcoders] flash game developer - multi-player games

2007-03-25 Thread Michael Mudge
You can talk to me.  I've got a multiplayer Flash program running at
http://www.biality.com/tubes/tubes.swf

It's a work in progress.  There's more info about how to write programs
for it it here:
http://www.newgrounds.com/bbs/topic.php?id=652309

- Kipp

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of bruce
> Sent: Friday, March 23, 2007 12:47 PM
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] flash game developer - multi-player games
> 
> 
> hi...
> 
> i'm trying to find out how/who i can talk to to get 
> information regarding flash games. specifically, if i'm 
> looking to talk to anyone/small company who's developed small 
> multiplayer flash games, who can i talk to...
> 
> thanks
> 
> -bruce
> 
> ___
> 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] ActionScript3, Socket, readObject

2007-03-22 Thread Michael Mudge
I'm using ActionScript3 in Flash 9 alpha... I've got a great Socket
setup working, but when the network traffic gets high, TCP's nature is
to combine and/or break up packets... The problem with this is that the
incoming data event gets fired before a complete object has
transmitted...

I see no way to "know" if the entire object has arrived yet; so to find
out, I just try.  If the object isn't all there yet, it throws an error
and I bail until more data comes in.  The problem is, even when
readObject fails, it trashes the data.  (evidenced by the trace).  Any
ideas on how to fix this?

Here's the code:

function newSocketData() {
  var result;

  while(1) {
var bufsize:Number = sock.bytesAvailable;
try {
  result = sock.readObject();
} catch (e:EOFError) {
  trace("Data before: " + bufsize + " -- Now: " +
sock.bytesAvailable);
  return;
}
handleObject(result);
  }
}

- Kipp

___
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] Evaluate string as actionscript?

2007-02-15 Thread Michael Mudge
As far as I know, you can't do this.  The Flash player is basically a
virtual machine (runs compiled code); it does not have a compiler, so it
can't take text-code and turn it into compiled code.  One possibility is
breaking up that string, dummy, in to "_root.aaa", "text" and "abc".
Then you can do this:

eval("_root.aaa")["text"] = "abc"

- Michael Mudge

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Berkay Unal
> Sent: Thursday, February 15, 2007 6:38 PM
> To: [FlashCoders]
> Subject: [Flashcoders] Evaluate string as actionscript?
> 
> 
> Hi Coders,
> 
> I have a string variable called dummy. i want to evalute it 
> so that the textfield on _root will have a value of "abc". I 
> cannot made it with eval. How can i do that?
> 
> Here is the sample.
> 
> dummy = "_root.aaa.text= \"abc\""
> 
> Thanks
> -- 
> Berkay UNAL
> [EMAIL PROTECTED] ___
> 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] handling non-western characters in Flash

2007-02-15 Thread Michael Mudge
The Cyberbit Bitstream font is 13 megs!

Device fonts work fine if the target machines "speak" the target
language, which can usually be reasonably expected.

- Kipp

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mick G
> Sent: Thursday, February 15, 2007 3:55 PM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] handling non-western characters in Flash
> 
> 
> The problem is that some other asian language fonts for 
> example could be 200K. There's lots of characters in some languages ;)
> 
> 
> 
> On 2/15/07, Donald Desloge <[EMAIL PROTECTED]> wrote:
> >
> > I like the XML idea, have one for every language. You 
> mentioned using 
> > device fonts instead of embedding them, have you ever tried 
> this with 
> > shared fonts? Maybe have on font per shared library and 
> load on demand 
> > the font that you need?
> >
> > Donald
> > - Original Message 
> > From: Mick G <[EMAIL PROTECTED]>
> > To: Flashcoders mailing list 
> > Sent: Thursday, February 15, 2007 2:20:20 PM
> > Subject: Re: [Flashcoders] handling non-western characters in Flash
> >
> > I did this for a project recently...
> > - Used XML files (different one for each language)
> > - Use device fonts (embedding fonts for most languages is not an 
> > option... eg. Japanese font files would add massive file size)
> >
> > On 2/15/07, Michael Mudge <[EMAIL PROTECTED]> wrote:
> > >
> > > It'll take a ton of space, but try embedding a font that supports 
> > > all the characters you need.  Bitstream Cyberbit is a unicode TTF 
> > > that has practically everything.  As far as I can tell, Flash 
> > > supports UTF8, which is an 8-bit unicode format...  Files, 
> > > variables, etc should all be in this format.  Or, you can 
> paste the 
> > > non-western charaters straight in to Flash and they'll 
> work fine... 
> > > You can even save files this way; they'll be in the UTF-8 format.
> > >
> > > I have all manner of oriental characters working on my 
> chat program 
> > > without any extra work, except that the viewing machine needs to 
> > > have the right font installed.
> > >
> > > - Kipp
> > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED] On Behalf Of 
> > > > Donald Desloge
> > > > Sent: Thursday, February 15, 2007 10:48 AM
> > > > To: Flashcoders mailing list
> > > > Subject: [Flashcoders] handling non-western characters in Flash
> > > >
> > > >
> > > > I've got a client who wants to have multiple language 
> support. I 
> > > > was wondering if there is a preferred way, for those 
> who have done 
> > > > this before, for handling non-western characters in Flash? Any 
> > > > advice?
> > > >
> > > >
> > > >
> > > >
> > > > __
> > > > __
> > > > Don't get soaked.  Take a quick peak at the forecast
> > > > with the Yahoo! Search weather shortcut. 
> > > > http://tools.search.yahoo.com/shortcuts/> #loc_weather
> > > >
> > > > ___
> > > >
> > > > 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/listinf

[Flashcoders] Make your own multiuser flash apps

2007-02-15 Thread Michael Mudge
I have noticed there are an awful lot of users who would like to make
multiuser Flash apps and basically get nowhere.  Some of the problems
are having the know-how, having access to an appropriate server, and
knowing how to send the data.

To solve this, I wrote an application that provides a tidy API for
multi-user applications that load into it, along with a chat.  This
program, called "Tubes", allows users to find, host and join multiuser
.SWFs, and provides the communication code necessary for the .SWFs to
easily communicate.  Strings, booleans, numbers, arrays and objects are
all automatically serialized, transferred and deserialized with a single
function call.

Right now, anyone can log in and start writing code, and there are a
handful of developers using it already.  If you're experienced with
ActionScript, you could literally have a minimal multiuser application
running here *one hour from now*, and you can get help from the other
developers through the chat.

Here is the URL:  http://www.biality.com/tubes/tubes.swf

To host a multiuser application, you give the /plugin command a URL.
For example, type this into the chat: "/plugin
http://www.biality.com/tubes/ping.swf"; (without the quotes).  This will
load the SWF into the upper portion of the program.  When you press the
grey box, it will measure the network responsiveness.

If you want to involve other users, use ping2.swf instead -- this
version measures the network responsiveness of everyone who has joined
you.  For other users to join, they would need to type "/cjoin",
followed by the username of anyone who is already viewing the ping2
application.  (This will be simpler in the future).

You can see the source for both of these applications at
http://www.biality.com/tubes/ping.fla and
http://www.biality.com/tubes/ping2.fla.  It is well commented and
*simple to understand*.  Edit these with your own ideas, upload the SWF
to your own site, and give the URL to the /plugin command.

To see a more sophistocated multiuser application, type "/plugin
mines.swf" and have other people join you.  If you'd like to see even
more, just use the chat to ask what the others have been up to.

Have a look at this illustration:
http://i93.photobucket.com/albums/l50/Rubbercookie/Diagram.png
With the exception of managing users, the Tubes server is basically
transparent.  The Tubes server initializes the server object (that you
create) on the first SWF, forwarding messages from all clients
(including the client on the same machine) to that one server.

As a note -- you should not exchange data between client functions and
your server object directly, because the "correct" server object might
be on another machine; always use serverCall and clientCall.  (This will
make sense when you read the .FLA examples and look at the diagram)

This is still a work in progress.  There will be a browser to make
finding applications easier for users.  There will be ways to store
persistent data on the server.  There will be ways to write server code
directly on the server to reduce the lag of bouncing messages around.
There will be networks to help guide users to your web site, and viewers
of your site will be able to chat with you -- and eachother -- right
there on your pages.  There will be more debugging tools (hint: use
_level0.itrace() like trace() and set server.debug = true).

And, most importantly: there will be ways to take users directly to your
multiuser app through a web page, without the user having to log in or
type any commands.

Let me know what you think, how it can be improved, and if you have any
questions!

- Kipp

___
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] handling non-western characters in Flash

2007-02-15 Thread Michael Mudge
It'll take a ton of space, but try embedding a font that supports all
the characters you need.  Bitstream Cyberbit is a unicode TTF that has
practically everything.  As far as I can tell, Flash supports UTF8,
which is an 8-bit unicode format...  Files, variables, etc should all be
in this format.  Or, you can paste the non-western charaters straight in
to Flash and they'll work fine... You can even save files this way;
they'll be in the UTF-8 format.

I have all manner of oriental characters working on my chat program
without any extra work, except that the viewing machine needs to have
the right font installed.

- Kipp

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Donald Desloge
> Sent: Thursday, February 15, 2007 10:48 AM
> To: Flashcoders mailing list
> Subject: [Flashcoders] handling non-western characters in Flash
> 
> 
> I've got a client who wants to have multiple language 
> support. I was wondering if there is a preferred way, for 
> those who have done this before, for handling non-western 
> characters in Flash? Any advice?
> 
> 
> 
>  
> __
> __
> Don't get soaked.  Take a quick peak at the forecast
> with the Yahoo! Search weather shortcut. 
> http://tools.search.yahoo.com/shortcuts/> #loc_weather
> 
> ___
> 
> 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