RE: [Flashcoders] createEmptyMovieClip path

2006-04-08 Thread Boon Chew
Does the code I attached work for you?  Or you can send me what you got, I can 
have a look.  It's Friday evening after all, and I am playing with code 
anyways. :)

- boon

hbruyere [EMAIL PROTECTED] wrote: Ok

I mc instance on the stage (scene) is correctly named.

I'm compiling the movie in Flash7 AS2.0 .. but I just tried in Flash8 AS2.0
and this is still not working.

Hum... what's going on. I never had this king of problem before.
I'm going to check everything... but it doesn't make sense...
I'm sure that I'm going to be mad at myself when I'm going to solve this.

I will let you know.

Thanks again, in the meantime if you any other idea...

Hugues.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Boon Chew
Sent: Saturday, April 08, 2006 12:17 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] createEmptyMovieClip path

Did a quick test, works fine.  Maybe compare the solution and figure out
where your problem is?

(I have an empty movieclip instance on stage called mcEmpty, did you name
your movie instance in your Properties window?)

Below code tested on Flash 8:

var url = [ http://www.adobe.com/imageshome/flash_icon3.jpg;,
   http://www.adobe.com/imageshome/pdfprintengine_icon.gif; ];

for (var i = 0; i  url.length; i++)
{
// you can just create one MovieClipLoader to load all clips, but this
is ok too
var mcLoader:MovieClipLoader = new MovieClipLoader();

var mcHolder = mcEmpty.createEmptyMovieClip(mcHolder + i,
mcEmpty.getNextHighestDepth());
mcHolder._x = 40 * i;
mcLoader.loadClip(url[i], mcHolder);
}

hbruyere  wrote: No didn't solve my problem.
But thanks.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Boon Chew
Sent: Friday, April 07, 2006 11:38 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] createEmptyMovieClip path


At a glance, I caught at least one problem, not sure if they are others that
could cause your problem.


var NewMC_mc:MovieClip =
ContentContainer_mc.createEmptyMovieClip(container+i,
getNextHighestDepth());
You need to call getNextHighestDepth() on your ContentContainer_mc, like so:

var NewMC_mc:MovieClip =
ContentContainer_mc.createEmptyMovieClip(container+i,
ContentContainer_mc.getNextHighestDepth()); 

- boon

 hbruyere  wrote: Hi,

 

I don't understand what I get when running this:

 




 

for (var i = 0; i  NumPages_v; i ++)

{

var NewMC_mc:MovieClip =
ContentContainer_mc.createEmptyMovieClip(container+i,
getNextHighestDepth());

NewMC_mc._x = ScreenWidth_c * i;

NewMC_mc._y = 0;

var mcLoader:MovieClipLoader = new
MovieClipLoader();

mcLoader.addListener(this);

mcLoader.loadClip(WebsiteMap_a[i].File_tx,
NewMC_mc);

 

function onLoadInit(mc:MovieClip) {

trace(onLoadInit:  + mc);

}

 

 

}




 

I get NOTHING ! My external movieClips are not load or at least displayed.

 

But if If replace:

var NewMC_mc:MovieClip =
ContentContainer_mc.createEmptyMovieClip(container+i,
getNextHighestDepth());

 

by

 

var NewMC_mc:MovieClip = createEmptyMovieClip(container+i,
getNextHighestDepth());

 

it works.

 

But I want to load my external into the movie clip named
ContentContainer_mc present on the main scene on the root of my main
Movie.

 

What am I missing here ?

Must be stupid.

 

Any advice are welcome,

 

Thanks,

 

Hugues.

 

___
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


  
-
New Yahoo! Messenger with Voice. Call regular phones from your PC and save
big.
  
-
New Yahoo! Messenger with Voice. Call regular phones from your PC and save
big.
  
-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2�/min or less.
___
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:

[Flashcoders] Question on removeMovieClip

2006-04-08 Thread Jiri Heitlager

He list,

I came across something that i find very weird and cant remember coming 
across it before.
The thing is when I attach a movie to stage on a negative level, I can't 
remove it anymore with removeMovieClip().


An example.

_root.attachMovie(mc , mc , -100);

_root.onMouseDown = function(){
_root.mc.removeMovieClip()

}

Can somebody explain why that is?

Jiri


--
---

Jiri Heitlager
Stichting z25.org
Concordiastraat 67A
3551 EM Utrecht

tel:06-28159323
http://www.z25.org
[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


Re: [Flashcoders] Will this Microsoft ActiveX update affect Flash?

2006-04-08 Thread Kenneth Kawamoto

Steven Sacks wrote:

/ Will this negatively affect Flash?/


Perhaps you want to install the IE update and see it for yourself?
http://support.microsoft.com/kb/912945/en-gbhttp://support.microsoft.com/kb/912945/en-gb

It's not as bad as I thought - at least, as John Dowdell said, SWF 
displays as before. I thought you will not see the SWF at all until you 
click on the dialogue box.


Kenneth Kawamoto
www.materiaprima.co.uk
___
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] createEmptyMovieClip path

2006-04-08 Thread Weldon MacDonald
Ahhh the programmers life for me... :)

On 4/8/06, Boon Chew [EMAIL PROTECTED] wrote:
 Does the code I attached work for you?  Or you can send me what you got, I 
 can have a look.  It's Friday evening after all, and I am playing with code 
 anyways. :)

 - boon

 hbruyere [EMAIL PROTECTED] wrote: Ok

 I mc instance on the stage (scene) is correctly named.

 I'm compiling the movie in Flash7 AS2.0 .. but I just tried in Flash8 AS2.0
 and this is still not working.

 Hum... what's going on. I never had this king of problem before.
 I'm going to check everything... but it doesn't make sense...
 I'm sure that I'm going to be mad at myself when I'm going to solve this.

 I will let you know.

 Thanks again, in the meantime if you any other idea...

 Hugues.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Boon Chew
 Sent: Saturday, April 08, 2006 12:17 AM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] createEmptyMovieClip path

 Did a quick test, works fine.  Maybe compare the solution and figure out
 where your problem is?

 (I have an empty movieclip instance on stage called mcEmpty, did you name
 your movie instance in your Properties window?)

 Below code tested on Flash 8:

 var url = [ http://www.adobe.com/imageshome/flash_icon3.jpg;,
http://www.adobe.com/imageshome/pdfprintengine_icon.gif; ];

 for (var i = 0; i  url.length; i++)
 {
 // you can just create one MovieClipLoader to load all clips, but this
 is ok too
 var mcLoader:MovieClipLoader = new MovieClipLoader();

 var mcHolder = mcEmpty.createEmptyMovieClip(mcHolder + i,
 mcEmpty.getNextHighestDepth());
 mcHolder._x = 40 * i;
 mcLoader.loadClip(url[i], mcHolder);
 }

 hbruyere  wrote: No didn't solve my problem.
 But thanks.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Boon Chew
 Sent: Friday, April 07, 2006 11:38 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] createEmptyMovieClip path


 At a glance, I caught at least one problem, not sure if they are others that
 could cause your problem.


 var NewMC_mc:MovieClip =
 ContentContainer_mc.createEmptyMovieClip(container+i,
 getNextHighestDepth());
 You need to call getNextHighestDepth() on your ContentContainer_mc, like so:

 var NewMC_mc:MovieClip =
 ContentContainer_mc.createEmptyMovieClip(container+i,
 ContentContainer_mc.getNextHighestDepth());

 - boon

  hbruyere  wrote: Hi,



 I don't understand what I get when running this:



 
 



 for (var i = 0; i  NumPages_v; i ++)

 {

 var NewMC_mc:MovieClip =
 ContentContainer_mc.createEmptyMovieClip(container+i,
 getNextHighestDepth());

 NewMC_mc._x = ScreenWidth_c * i;

 NewMC_mc._y = 0;

 var mcLoader:MovieClipLoader = new
 MovieClipLoader();

 mcLoader.addListener(this);

 mcLoader.loadClip(WebsiteMap_a[i].File_tx,
 NewMC_mc);



 function onLoadInit(mc:MovieClip) {

 trace(onLoadInit:  + mc);

 }





 }

 
 



 I get NOTHING ! My external movieClips are not load or at least displayed.



 But if If replace:

 var NewMC_mc:MovieClip =
 ContentContainer_mc.createEmptyMovieClip(container+i,
 getNextHighestDepth());



 by



 var NewMC_mc:MovieClip = createEmptyMovieClip(container+i,
 getNextHighestDepth());



 it works.



 But I want to load my external into the movie clip named
 ContentContainer_mc present on the main scene on the root of my main
 Movie.



 What am I missing here ?

 Must be stupid.



 Any advice are welcome,



 Thanks,



 Hugues.



 ___
 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



 -
 New Yahoo! Messenger with Voice. Call regular phones from your PC and save
 big.

 -
 New Yahoo! Messenger with Voice. Call regular phones from your PC and save
 big.

 -
 Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
 countries) for 2�/min or less.
 ___
 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
 

Re: [Flashcoders] Question on removeMovieClip

2006-04-08 Thread Dimitrios Bendilas

Hi Jiri,

This is a common question here.

Negative levels are used by the Flash IDE. Whenever you create an instance 
of an

object on the stage on the IDE, it automatically gets a negative depth.

That's why removeMocieClip() does not work on negative depths.

You may remove a dynamically created clip that resides on a negative depth
if you first swap its depth with a positive depth. (prefereable a big one to 
make

sure there is no clip there

myClip.swapDepths(19);
myClip.removeMovieClip();

BUT

I suggest you never use negative depths. It gives you nothing but trouble.
You may find yourself spending hours to debug some code because you
forgot that some movieclips have negative depth.

You've got so many positive number to use as depths that it's totally
unneccessary to use negative values.

Regards,
Dimitrios Bendilas

- Original Message - 
From: Jiri Heitlager [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, April 08, 2006 12:05 PM
Subject: [Flashcoders] Question on removeMovieClip



He list,

I came across something that i find very weird and cant remember coming 
across it before.
The thing is when I attach a movie to stage on a negative level, I can't 
remove it anymore with removeMovieClip().


An example.

_root.attachMovie(mc , mc , -100);

_root.onMouseDown = function(){
_root.mc.removeMovieClip()

}

Can somebody explain why that is?

Jiri


--
---

Jiri Heitlager
Stichting z25.org
Concordiastraat 67A
3551 EM Utrecht

tel:06-28159323
http://www.z25.org
[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] assigning a function in the property inspector for a component

2006-04-08 Thread GregoryN

Why not?

Just don't forget that the same timeline as the component will be
_parent for the component's internal methods etc.
Then use eval or any other way.

-- 
Best regards,
 GregoryN

http://GOusable.com
Flash components development.
Usability services.


 -Rich Rodecker wrote:
 I have an inspectable field in my component where I want the user to
 be able to enter the name of a function to execute when a certain
 event occurs.  Since I would need to let the user enter a string, how
 can I let the user enter any path and still call the function?  I
 figure its gotta have something to do with Function.apply() or eval(),
 but i cant quite get it.
 
 for example, i would like them to be able to enter either :
  _level0.myObject.myFunction
 
 or
 
 myFunction (if this function would bee on the same timeline as the
 component)
 
 does that make sense?


___
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] Will this Microsoft ActiveX update affect Flash?

2006-04-08 Thread Hairy Dog Digital
Now here's the question that's been rolling in my head... 

Does anybody know of a way to run both a patched and unpatched version of IE
(Win), so that you can test both environments from a single Windows
workstation (without dual booting)? 

It's always been my understanding that IE wants one and only one version of
itself installed on a Windows system for all user accounts on that
workstation. Correct?

...Rob

 

 -Original Message-
 From: Kenneth Kawamoto [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, April 08, 2006 5:12 AM
 To: flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Will this Microsoft ActiveX update 
 affect Flash?
 
 Steven Sacks wrote:
 / Will this negatively affect Flash?/
 
 Perhaps you want to install the IE update and see it for yourself?
 http://support.microsoft.com/kb/912945/en-gbhttp://support.mi
crosoft.com/kb/912945/en-gb




___
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] Will this Microsoft ActiveX update affect Flash?

2006-04-08 Thread Jason
Those people who has Flash menu on their hybrid site will probably be the 
people who will be yelling the most because the users will typically need to 
double click on the menu...


CyanBlue

- Original Message - 
From: Kenneth Kawamoto [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Saturday, April 08, 2006 5:11 AM
Subject: Re: [Flashcoders] Will this Microsoft ActiveX update affect Flash?



Steven Sacks wrote:

/ Will this negatively affect Flash?/


Perhaps you want to install the IE update and see it for yourself?
http://support.microsoft.com/kb/912945/en-gbhttp://support.microsoft.com/kb/912945/en-gb

It's not as bad as I thought - at least, as John Dowdell said, SWF 
displays as before. I thought you will not see the SWF at all until you 
click on the dialogue box.


Kenneth Kawamoto
www.materiaprima.co.uk
___
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] Will this Microsoft ActiveX update affect Flash?

2006-04-08 Thread Kenneth Kawamoto
Does anybody know of a way to run both a patched and unpatched version 
of IE (Win), so that you can test both environments from a single 
Windows workstation (without dual booting)?


How about launching unpatched IE in a window running VPC-XP and patched 
IE in another window running Parallels-XP, both at the same time on 
Intel Mac...?


Wow, I really want Intel Mac now.

Kenneth Kawamoto
www.materiaprima.co.uk

___
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] Will this Microsoft ActiveX update affect Flash?

2006-04-08 Thread Hairy Dog Digital
 How about launching unpatched IE in a window running VPC-XP 
 and patched IE in another window running Parallels-XP, both 
 at the same time on Intel Mac...?

If you're volunteering to send me a boot camp Mac, I'd not complain ;)



___
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] Lookup tables

2006-04-08 Thread Andreas Rønning
Anyone know of good online tutorials or treatments on generating and 
using lookup tables to speed up sin/cos and similar math in AS2?
I'm looking for ways to reuse the results of a single calculation across 
a number of variations of the calculated problem.


Yes this is game related :) Shoot-em-up related to be specific. Flash 
doesn't lend itself well to bullet storms it would seem.


- Andreas
___
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] Lookup tables

2006-04-08 Thread Helen Triolo
If array lookup (mysin[some-calculated-angle]) is faster than whatever 
Flash uses to find Math.sin(some-calculated-angle) --you could write a 
loop to test that, since I don't know if it's true-- then the simplest 
thing would be to write (in a dummy fla) a loop to dump the contents you 
need (in the format/precision you need it) to the output panel and then 
paste that into the as file to create the array.


(bullet storms at 3am on a Sunday?)

Helen

--
http://flash-creations.com
http://i-technica.com



Andreas Rønning wrote:

Anyone know of good online tutorials or treatments on generating and 
using lookup tables to speed up sin/cos and similar math in AS2?
I'm looking for ways to reuse the results of a single calculation 
across a number of variations of the calculated problem.


Yes this is game related :) Shoot-em-up related to be specific. Flash 
doesn't lend itself well to bullet storms it would seem.


- Andreas




___
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] Lookup tables

2006-04-08 Thread Mark Winterhalder
On 4/9/06, Helen Triolo [EMAIL PROTECTED] wrote:
 If array lookup (mysin[some-calculated-angle]) is faster than whatever
 Flash uses to find Math.sin(some-calculated-angle) --you could write a
 loop to test that, since I don't know if it's true-- then the simplest
 thing would be to write (in a dummy fla) a loop to dump the contents you
 need (in the format/precision you need it) to the output panel and then
 paste that into the as file to create the array.

It is faster, mySinTable[ angle ] takes only a minuscule amount of
time longer than Math[ sin ], which wouldn't even have called the
function yet, and calling the function will take longer than
evaluating the register where angle is stored in.
However, that assumes that angle already is an integer and in range of
the table. With Math.sin you don't have to deal with that, and calling
Math.sin (almost certainly) is faster than mySinTable[ ( ( angle %
range ) * precision )|0 ] (and that doesn't even deal with negative
values for angle yet). Plus, it's more precise and you can save some
time by having a local var mySin = Math.sin.

For a table, I'd simply build it at initialisation, if I thought it
would be worth it -- but I don't. The penalty of the Math functions is
nowhere near as bad as calling a custom method. They're actually
pretty fast. Whatever you do with them will take much longer, say,
redrawing calculated vectors, hit tests, etc.

Better spend your time improving the algorithm you plan to use. Use
local vars, avoid function calls.

Mark

--
http://snafoo.org/
___
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