[Flashcoders] Hole-in-a-mask (a reverse mask question)?

2006-06-04 Thread Ville Walveranta

Hello everybody,

I've been racking my brain tonight trying to figure out a way to create a
reverse mask in Actionscript. I'm working on an application which is
entirely object-based; nothing on the stage other than object initialization
on the first frame. So everything needs to be programmatic.

Normally a mask displays what's on the underlying layer. I'm trying to
create a mask that would display an intermediate layer for the areas outside
of the mask shape, and basically be invisible for the areas of the mask
shape showing all underlying layers, whtever is displayed at that spot from
below.

An illustration (as viewed from the side :) may help...


[--]   - mask layer containing a shape, say a box in the middle

[------]   - an intermediate layer whose contents would be shown in 
  the areas *outside* of the above box-shaped mask

[  ]   - various content layers 
[- -- -]   - whose visible content would 
[---  -  --]   - show through the mask 
[--]   - on the top

I found a short comment by someone (Xeef) on Actionscript.org regarding
reverse mask as follows:

 you will need to use more masks 
 BackGround --Box on it -- An other Background Masked by an EMPTY mask 
 (will by invisible) now draw on the Mask the part of the 2. Backgound 
 will by revaled and over lap the Box

I haven't figured out yet what that means.

Any suggestions, ideas, thoughts? 

Thanks!

Ville



___
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] Flash/Eclipse Workflow

2006-06-04 Thread Weldon MacDonald

If I'm understandung this...
You add the IDE generated swf (IDE.swf) to the project. You then
create an external class that has a 'main' entry point  and it loads
the IDE.swf. (with a preloader of course).
Do I have this right? Sounds good, though the test will be can I
impliment it myself. You could also break IDE.swf into several
library1.swf, library2.swf and load them seperately, to spread out the
load, couldn't you?

this sounds similar to the Natural Entry Point method. Do you
instanciate the entry point class? If it extends MovieClip, then it
could also serve as _root, couldn't it? I'm searching for examples as
we speak...write?... Im close, thankis for the help

On 6/3/06, Scott Hyndman [EMAIL PROTECTED] wrote:

What I usually do is load in the assets swf through the MTASC
generated swf and use it as the root in the movieclip hierarchy. By
this I mean all movieclips created by my MTASC generated swf are
descendants of the asset swf. By doing so you can access all symbols
in the asset swf through attachMovieClip and you don't have to mess
around with injection. An added benefit is that you can display a
preloader on the asset swf which is quite likely large.

Hope that helps,
Scott

On 6/3/06, Weldon MacDonald [EMAIL PROTECTED] wrote:
 Ok, I installed Eclipse, spent a better part of a day downloading
 plugins and configuring everything. I'm using Ant tasks to compile
 with MTASC and send it to the standalone player.
 I don't see the need for swfmill, since I own Flash. My plan was to
 create vector graphics and any timeline stuff in flash (mostly done by
 my wife) and then move to Eclipse to write the code.
 But now I'm not at all sure how to structure a project. I read about
 several methods, but am at a loss as to how to proceed. What's best
 practise?
 Can I use one swf as a symbol library and compile it with the class
 files and a 'main' entrypoint? Do I inject all the code into the
 library swf?
 I've been experimenting with a class that's tied to a symbol in an
 .fla and would like to switch over to the new workflow, if I can
 figure out what that is. The symbol is a movieclip with nested
 movieclips. The class extends MovieClip and uses an init function
 rather than a constructor. The code I've been using to test is in the
 .fla  but the class file is external. How can I restructure this to
 include Eclipse in the workflow?


 Weldon MacDonald
 ___
 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




--
Weldon MacDonald
___
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] SharedObject path?

2006-06-04 Thread John Hattan
I just noticed this problem when re-compiling my games from Flash 6 to Flash
7. Some of my SharedObjects (i.e. Flash cookies) weren't being read properly
by some of my Flash content.

Getting out .SOL editor (Flash cookie viewer), I took a look at what was
being written out. Turns out some of the games are writing out to the
directory www.thecodezone.com and others are writing out to
thecodezone.com. For the life of me I can't find the rule that determines
what gets written out and how.

Anyone have any insight as to how Flash gets the source URL for its cookies
so I can make 'em write out to one consistent place?

---
John Hattan
The Code Zone - Sweet Software for a Saturnine World
www.thecodezone.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] Hole-in-a-mask (a reverse mask question)?

2006-06-04 Thread Helen Triolo
If you're using the drawing API to make the mask shape, you can make an 
inversion of it (to show everything but the mask shape) by giving the 
commands to draw the overall shape (ie, that covers the whole stage if 
that's what you want) and then the commands to draw the shape of the 
mask, in the reverse direction of the original drawing -- ie, draw the 
mask clockwise if the original shape was drawn counterclockwise--, and 
do both sets of commands between the beginFill and endFill.  Example 
here http://flash-creations.com/notes/dynamic_drawingapi.php#cutout 
under Using a shape with a cutout as a mask if you need.


Helen

Ville Walveranta wrote:


Hello everybody,

I've been racking my brain tonight trying to figure out a way to create a
reverse mask in Actionscript. I'm working on an application which is
entirely object-based; nothing on the stage other than object initialization
on the first frame. So everything needs to be programmatic.

Normally a mask displays what's on the underlying layer. I'm trying to
create a mask that would display an intermediate layer for the areas outside
of the mask shape, and basically be invisible for the areas of the mask
shape showing all underlying layers, whtever is displayed at that spot from
below.

An illustration (as viewed from the side :) may help...


[--]   - mask layer containing a shape, say a box in the middle

[------]   - an intermediate layer whose contents would be shown in 
 the areas *outside* of the above box-shaped mask


[  ]   - various content layers 
[- -- -]   - whose visible content would 
[---  -  --]   - show through the mask 
[--]   - on the top


I found a short comment by someone (Xeef) on Actionscript.org regarding
reverse mask as follows:

 you will need to use more masks 
 BackGround --Box on it -- An other Background Masked by an EMPTY mask 
 (will by invisible) now draw on the Mask the part of the 2. Backgound 
 will by revaled and over lap the Box


I haven't figured out yet what that means.

Any suggestions, ideas, thoughts? 


Thanks!

Ville
 



___
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] Flash/Eclipse Workflow

2006-06-04 Thread Adam Pasztory

I've had a lot of success with the Code Injection method, which I've
describe here: http://www.pasz.com/articles/workingWithFame/

You can still load external assets as needed, but you have full access to
the library of your main SWF.  It works well too if you need to create
projects that need to be compiled with *both* MTASC and Flash IDE.

On 6/3/06, Scott Hyndman [EMAIL PROTECTED] wrote:

What I usually do is load in the assets swf through the MTASC
generated swf and use it as the root in the movieclip hierarchy. By
this I mean all movieclips created by my MTASC generated swf are
descendants of the asset swf. By doing so you can access all symbols
in the asset swf through attachMovieClip and you don't have to mess
around with injection.


Not sure I folow how you're doing this.  When you load an external clip, you
can't do attachMovieClip, etc.
___
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] setting the centerpoint of a movieclip?

2006-06-04 Thread Bart Wttewaall

I took a rotateZ method from Robert Penner's Vector3D class and added
a pivotpoint to the formula. It works pretty well as a dynamic
registrationpoint :)

var mc:MovieClip;
var position:Object = {x:mc._x, y:mc._y};
var pivot:Object = {x:position.x+mc._width/2, y:position.y+mc._height/2};
var angle:Number = 0;

onEnterFrame = function():Void {
angle += 5;
rotate(angle);
}

function rotate(angle:Number):Void {
var ca:Number = cosD(angle);
var sa:Number = sinD(angle);
var x = (position.x - pivot.x) * ca - (position.y - pivot.y) * sa;
var y = (position.x - pivot.x) * sa + (position.y - pivot.y) * ca;

mc._x = pivot.x + x;
mc._y = pivot.y + y;
mc._rotation = angle %= 360;
}

function sinD(angle:Number):Number {
return Math.sin (angle * (Math.PI / 180));
}

function cosD(angle:Number):Number {
return Math.cos (angle * (Math.PI / 180));
}

2006/6/1, grimmwerks [EMAIL PROTECTED]:

That'll do it! 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


Re: [Flashcoders] Flash/Eclipse Workflow

2006-06-04 Thread Scott Hyndman

Yes you can, as long as you attach your movieclips BELOW the loaded clip.

Scott

On 6/4/06, Adam Pasztory [EMAIL PROTECTED] wrote:

I've had a lot of success with the Code Injection method, which I've
describe here: http://www.pasz.com/articles/workingWithFame/

You can still load external assets as needed, but you have full access to
the library of your main SWF.  It works well too if you need to create
projects that need to be compiled with *both* MTASC and Flash IDE.

On 6/3/06, Scott Hyndman [EMAIL PROTECTED] wrote:
 What I usually do is load in the assets swf through the MTASC
 generated swf and use it as the root in the movieclip hierarchy. By
 this I mean all movieclips created by my MTASC generated swf are
 descendants of the asset swf. By doing so you can access all symbols
 in the asset swf through attachMovieClip and you don't have to mess
 around with injection.

Not sure I folow how you're doing this.  When you load an external clip, you
can't do attachMovieClip, etc.
___
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] Flash/Eclipse Workflow

2006-06-04 Thread Scott Hyndman

If I'm understandung this...
You add the IDE generated swf (IDE.swf) to the project. You then
create an external class that has a 'main' entry point  and it loads
the IDE.swf. (with a preloader of course).


Correct


Do I have this right? Sounds good, though the test will be can I
impliment it myself. You could also break IDE.swf into several
library1.swf, library2.swf and load them seperately, to spread out the
load, couldn't you?


No, unfortunately not. Assets are only available to use from the
closest loaded parent. Let me explain with a little picture.

shell.swf (where all your classes most likely reside)
|
|-assets.swf (loaded by shell.swf)
  |
  |---movieclips that can access assets.swf library
  |
  |---assets2.swf
   |
   |movieclips that can access
assets2.swf (but not assets.swf)

It's limited by this parent cut-off idea, but it is still very useful
for getting IDE generated assets into my MTASC generated projects.

You can split this up a bit further even by including your classes in
a separate swf. The limitations shown above do not apply to loaded
classes. As soon as they are loaded, they are available.

Hope this helps,
Scott


this sounds similar to the Natural Entry Point method. Do you
instanciate the entry point class? If it extends MovieClip, then it
could also serve as _root, couldn't it? I'm searching for examples as
we speak...write?... Im close, thankis for the help

On 6/3/06, Scott Hyndman [EMAIL PROTECTED] wrote:
 What I usually do is load in the assets swf through the MTASC
 generated swf and use it as the root in the movieclip hierarchy. By
 this I mean all movieclips created by my MTASC generated swf are
 descendants of the asset swf. By doing so you can access all symbols
 in the asset swf through attachMovieClip and you don't have to mess
 around with injection. An added benefit is that you can display a
 preloader on the asset swf which is quite likely large.

 Hope that helps,
 Scott

 On 6/3/06, Weldon MacDonald [EMAIL PROTECTED] wrote:
  Ok, I installed Eclipse, spent a better part of a day downloading
  plugins and configuring everything. I'm using Ant tasks to compile
  with MTASC and send it to the standalone player.
  I don't see the need for swfmill, since I own Flash. My plan was to
  create vector graphics and any timeline stuff in flash (mostly done by
  my wife) and then move to Eclipse to write the code.
  But now I'm not at all sure how to structure a project. I read about
  several methods, but am at a loss as to how to proceed. What's best
  practise?
  Can I use one swf as a symbol library and compile it with the class
  files and a 'main' entrypoint? Do I inject all the code into the
  library swf?
  I've been experimenting with a class that's tied to a symbol in an
  .fla and would like to switch over to the new workflow, if I can
  figure out what that is. The symbol is a movieclip with nested
  movieclips. The class extends MovieClip and uses an init function
  rather than a constructor. The code I've been using to test is in the
  .fla  but the class file is external. How can I restructure this to
  include Eclipse in the workflow?
 
 
  Weldon MacDonald
  ___
  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



--
Weldon MacDonald
___
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] Re: Hole-in-a-mask (a reverse mask question)?

2006-06-04 Thread Ville Walveranta

Helen, 

Thanks for that info, it was very helpful! Works perfectly! :)

Ville

Helen Triolo wrote:
 If you're using the drawing API to make the mask shape, you can make an 
 inversion of it (to show everything but the mask shape) by giving the 
 commands to draw the overall shape (ie, that covers the whole stage if 
 that's what you want) and then the commands to draw the shape of the 
 mask, in the reverse direction of the original drawing -- ie, draw the 
 mask clockwise if the original shape was drawn counterclockwise--, and 
 do both sets of commands between the beginFill and endFill.  Example 
 here http://flash-creations.com/notes/dynamic_drawingapi.php#cutout 
 under Using a shape with a cutout as a mask if you need.

 Helen



___
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] unsubcribe, please

2006-06-04 Thread kathrin hunger

 too many email
ta kat
-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
  Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

___
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] Flash/Eclipse Workflow

2006-06-04 Thread Weldon MacDonald

thanks, there's nothing left but to actaiully try it.

On 6/4/06, Scott Hyndman [EMAIL PROTECTED] wrote:

 If I'm understandung this...
 You add the IDE generated swf (IDE.swf) to the project. You then
 create an external class that has a 'main' entry point  and it loads
 the IDE.swf. (with a preloader of course).

Correct

 Do I have this right? Sounds good, though the test will be can I
 impliment it myself. You could also break IDE.swf into several
 library1.swf, library2.swf and load them seperately, to spread out the
 load, couldn't you?

No, unfortunately not. Assets are only available to use from the
closest loaded parent. Let me explain with a little picture.

shell.swf (where all your classes most likely reside)
|
|-assets.swf (loaded by shell.swf)
   |
   |---movieclips that can access assets.swf library
   |
   |---assets2.swf
|
|movieclips that can access
assets2.swf (but not assets.swf)

It's limited by this parent cut-off idea, but it is still very useful
for getting IDE generated assets into my MTASC generated projects.

You can split this up a bit further even by including your classes in
a separate swf. The limitations shown above do not apply to loaded
classes. As soon as they are loaded, they are available.

Hope this helps,
Scott

 this sounds similar to the Natural Entry Point method. Do you
 instanciate the entry point class? If it extends MovieClip, then it
 could also serve as _root, couldn't it? I'm searching for examples as
 we speak...write?... Im close, thankis for the help

 On 6/3/06, Scott Hyndman [EMAIL PROTECTED] wrote:
  What I usually do is load in the assets swf through the MTASC
  generated swf and use it as the root in the movieclip hierarchy. By
  this I mean all movieclips created by my MTASC generated swf are
  descendants of the asset swf. By doing so you can access all symbols
  in the asset swf through attachMovieClip and you don't have to mess
  around with injection. An added benefit is that you can display a
  preloader on the asset swf which is quite likely large.
 
  Hope that helps,
  Scott
 
  On 6/3/06, Weldon MacDonald [EMAIL PROTECTED] wrote:
   Ok, I installed Eclipse, spent a better part of a day downloading
   plugins and configuring everything. I'm using Ant tasks to compile
   with MTASC and send it to the standalone player.
   I don't see the need for swfmill, since I own Flash. My plan was to
   create vector graphics and any timeline stuff in flash (mostly done by
   my wife) and then move to Eclipse to write the code.
   But now I'm not at all sure how to structure a project. I read about
   several methods, but am at a loss as to how to proceed. What's best
   practise?
   Can I use one swf as a symbol library and compile it with the class
   files and a 'main' entrypoint? Do I inject all the code into the
   library swf?
   I've been experimenting with a class that's tied to a symbol in an
   .fla and would like to switch over to the new workflow, if I can
   figure out what that is. The symbol is a movieclip with nested
   movieclips. The class extends MovieClip and uses an init function
   rather than a constructor. The code I've been using to test is in the
   .fla  but the class file is external. How can I restructure this to
   include Eclipse in the workflow?
  
  
   Weldon MacDonald
   ___
   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
 


 --
 Weldon MacDonald
 ___
 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




--
Weldon MacDonald
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the 

Re: [Flashcoders] maxDepth for dynamic movieclips?

2006-06-04 Thread Tyler Wright

You'll love using the XT DepthManager - plus if you read the comments on the
classes static properties there are exact (verified) numbers for max and min
depths supported by the Flash player.

You'll find the class at http://codext.com/code/6

Tyler

On 6/1/06, Zimmen [EMAIL PROTECTED] wrote:


Well, when you have a slideshow that shows clips one after the other then
you only really need 2 depths don't you ...
If not, perhaps some sort of depth manager that keeps track of used and
unused depths...


- Original Message -
From: grimmwerks [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, June 01, 2006 3:40 PM
Subject: [Flashcoders] maxDepth for dynamic movieclips?


 I've got an app that's a glorfied slideshow, slowly adding mc's and
 gettingNextHighestDepth() -- at some point I'm assuming it will get to
 the maxDepth; what would be the best way of resetting this?
 ___
 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] create an object of type defined with a string

2006-06-04 Thread Tyler Wright

If you need an object that already exists to be converted into an instance
of the class you can use the XT Prototype class

Prototype.makeInstanceof(obj, Array);

and using Zimmen's suggestion

Prototype.makeInstanceof(obj, _global[tType]);

good luck! you'll find the class at
http://codext.com/code/9

Tyler

On 6/1/06, Zimmen [EMAIL PROTECTED] wrote:


Yes it is... so you could use

function makeObject(tType){
   return (new _global[tType]())
}
test = makeObject(Array)

as well (this is what the findClass method does eventually. :)

On 6/1/06, Danny Kodicek [EMAIL PROTECTED] wrote:
 Thanks, Zimmen and Ian, that's helpful. I'll probably go with Ian's
 solution, which seems a bit more robust (I've been caught out before by
 clever tricks using eval()...)

 Danny

 - Original Message -
 From: Zimmen [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Thursday, June 01, 2006 5:33 PM
 Subject: Re: [Flashcoders] create an object of type defined with a
string


  This actually works:
 
  function makeObject(tType){
  var tVar = eval(tType)
  return (new tVar())
  }
  test = makeObject(Array)
  test.push(foo)
  test.push(bar)
  trace(test[0])
  trace(test[1])
  trace(test.length)
 
  Output:
 
  foo
  bar
  2
 
  On 6/1/06, Danny Kodicek [EMAIL PROTECTED] wrote:
  I want to have a function makeObject(tType:String) which returns an
  object
  of class tType. So makeObject(Array) should return a new Array
object.
  Any
  good way to do this? I'm sure it's something simple.
 
  And before you ask, yes, there is a reason why I need to do it this
  way...
 
  Danny
 
  ___
  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 Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] SharedObject path?

2006-06-04 Thread Stéphane Bebrone

Hi,

Maybe you can use the second parameter.

As the doc say:

*localPath*:String [optional] - A string that specifies the full or partial
path to the SWF file that created the shared object, and that determines
where the shared object is stored locally. The default value is the full
path.

Greets,

2006/6/4, John Hattan [EMAIL PROTECTED]:


I just noticed this problem when re-compiling my games from Flash 6 to
Flash
7. Some of my SharedObjects (i.e. Flash cookies) weren't being read
properly
by some of my Flash content.

Getting out .SOL editor (Flash cookie viewer), I took a look at what was
being written out. Turns out some of the games are writing out to the
directory www.thecodezone.com and others are writing out to
thecodezone.com. For the life of me I can't find the rule that
determines
what gets written out and how.

Anyone have any insight as to how Flash gets the source URL for its
cookies
so I can make 'em write out to one consistent place?

---
John Hattan
The Code Zone - Sweet Software for a Saturnine World
www.thecodezone.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





--
Regards,
Stéphane Bebrone
--
Flash | ASP.NET | Web Developer
http://weblog.shaoken.be
--
___
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] SharedObject path?

2006-06-04 Thread Julius - XK

look at System.exactSettings


Setting this to true will cause the player to use the full domain. So say
if someone went to your site and used www.yoursite.com to get there,
that's the directory it will use.  Then if someone else used yoursite.com,
it would use yoursite.com as the path.  This could cause problems for
your code unless you redirected someone that used yoursite.com to
www.yoursite.com.  To avoid all this, set exactSettings to false.  Then,
weather they used the www or not wouldn't matter it'll use yoursite.com
in all cases.

I believe this is the rule you were looking for.  Do look into the 
documentation

for System.exactSettings.  Where you use this setting in your code makes
a difference.  It should be done before anything else in your movie to work
and if your loading another swf in your movie it will use the setting of the
calling swf and not what you might have set in the sub swf.

Hope this helps :)

2006/6/4, John Hattan [EMAIL PROTECTED]:


I just noticed this problem when re-compiling my games from Flash 6 to
Flash
7. Some of my SharedObjects (i.e. Flash cookies) weren't being read
properly
by some of my Flash content.

Getting out .SOL editor (Flash cookie viewer), I took a look at what was
being written out. Turns out some of the games are writing out to the
directory www.thecodezone.com and others are writing out to
thecodezone.com. For the life of me I can't find the rule that
determines
what gets written out and how.

Anyone have any insight as to how Flash gets the source URL for its
cookies
so I can make 'em write out to one consistent place?

---
John Hattan
The Code Zone - Sweet Software for a Saturnine World
www.thecodezone.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





--
Regards,
Stéphane Bebrone
--
Flash | ASP.NET | Web Developer
http://weblog.shaoken.be
--
___
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] unsubcribe, please

2006-06-04 Thread Bart Wttewaall

rtff (read the freakin' footer) ;-)

2006/6/4, kathrin hunger [EMAIL PROTECTED]:


too many email
ta kat
--


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
  Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

___
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] Re: JS Error with ExternalInterface and Firefox

2006-06-04 Thread Adam Pasztory

Well, no one responded to my question, but after several hours of banging my
head against a wall, I figured out the problem, so I thought I'd update
here.

I was missing the name attribute in the embed tag.  Apparently IE keys
of the id attribute of the object tag, but FF looks for name.

On 6/3/06, Adam Pasztory [EMAIL PROTECTED] wrote:


Ack!  What happened?  This used to work, didn't it?

I'm getting an error with ExternalInterface in Firefox:
thisMovie(ExternalInterfaceExample).fromJS is not a function

This happens even when I try to run the simple example from the Flash 8
Essentials book.

Sorry if this is a stupid question, but I've been searching around for an
hour for an answer, and come up empty. :(

JS CODE:

function thisMovie(movieName)
{
   if (isIE())
   {
 return window[movieName]
   }
   else
   {
 return document[movieName]
   }
}

function isIE()
{
return navigator.appName.indexOf (Microsoft) != -1;
}

// This function will call the ActionScript function fromJS
function makeCall(str)
{
 thisMovie(ExternalInterfaceExample).fromJS(str);
}

// This function fromAS will be called from ActionScript
function fromAS(str)
{
document.inForm.inField.value = str;
}


___
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] What does this code mean and What are Inspectables ...

2006-06-04 Thread Alain Rousseau
You might also take a look at Joey Lott's Tutorial on the subject (V2 
Components)

It's for Flash MX 2004 but still applies to Flash 8.

http://www.person13.com/articles/components/creatingcomponents.html
and
http://www.communitymx.com/content/article.cfm?cid=A06B3C7D7B74030D

Steven Sacks wrote:


They are for AS2 components.

http://www.actionscript.org/forums/archive/index.php3/t-38760.html


___
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] What does this code mean and What are Inspectables ...

2006-06-04 Thread Stephen Ford
Thanks all,
 
Much appreciated. I now understand Inspectables and how they relate to 
classes/components/the flash IDE property panel.
However, I shouldn't have compressed two questions into one.
 
So the first part of my question remains. What does code appearing inside 
brackets mean, for example:
 
[Event(click)]
 
Does this have anything to do with the property panel inside the flash IDE ? or 
is this something else.
 
Please advise if you can.
 
Thanks,
Stephen.___
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] 19th June Flash Developers Group study group

2006-06-04 Thread Chris Velevitch

The next meeting will be 19th June and we'll be contining our study of
MXML with validating and formatting (see
http://www.flashdev.org.au/program for topic references).

Note: the meeting frequency will change to fortnightly (see program
for future dates) and there'll be no meetings in July.

At the meeting, the moderator will lead discussion and with questions
about the topic. The meeting is on at 6:30pm for 7pm start and
finishes around 8:30pm.

Details about the group, venue and program are available from
http://www.flashdev.org.au. Please also note, whilst the meetings and
the use of the club are free, the club does require us to purchase
beverages and/or snacks in exchange.

Please RSVP at http://www.flashdev.org.au/rsvp. There will be lucky
door prizes for those who rsvp.

(Put yourself on the http://www.frappr.com/flexdevelopers map)

Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au


--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
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