Re: Re: Re: Re: Re: [Flashcoders] Misreporting instanceof operator.

2006-08-29 Thread Ian Thomas

On 8/24/06, Chris Allen <[EMAIL PROTECTED]> wrote:

Thanks for your help on this Ian.

I'm not sure I understand all of what you found here, so let me
summarize with some questions to see if I got it right.

Flash 6 SWFs fail every time when loaded remotely? - This hasn't been
my experience. I've been able to load some small ones (20K) without
the issue.


Yes, for me, they failed every time.


You think it may have to so with domain security in Flash?


It was one immediate thought. My main thought is about the seperation
of the global spaces i.e. a Flash 6 clip loaded into a Flash 7+ clip
doesn't share the same _global. I'd imagine the same is true with
clips that have failed a domain security check.


When loading from your files system the Flash 7 and 8 files load
correctly but not Flash 6?


Yes.



Some findings I have made:

The behavior is slightly different on a Macintosh versus a Windows
machine. Which are you using?


Windows XP. Slightly different in what way?


Altering nothing before the SWF is fully loaded screws up the
instanceof stuff but all of the MovieClip properties work just fine.



If I try to alter the _visible property before it's fully loaded it
causes that property to no longer function once fully loaded.

That's even more peculiar. :-)

Ian
___
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: Re: Re: Re: Re: Re: [Flashcoders] Misreporting instanceof operator.

2006-08-29 Thread Ian Thomas

Again, how peculiar. I'd love to take a look at the internals of
MovieClip and Flash's loader system to see what's causing that
particular glitch!

Cheers,
 Ian

On 8/24/06, Chris Allen <[EMAIL PROTECTED]> wrote:

Okay,

I have fixed the problem. I would say that this is certainly bug with
Flash, but there is a work around. Thanks to Keith Peters for
mentioning this to me last night.

So here's the deal... Back in the day before MovieClipLoader when you
wanted to load and external SWF, you had to check a property of the
MovieClip to see if it existed before you could manipulate it. You
needed to create an interval that would check to see if it's
initialized in this way. This all makes sense to me, but what doesn't,
is that you can't just check that any property of MovieClip was set.
There is a magic property that seems to indicate that the MovieClip is
fully initialized. That property is _width.

So with this in mind I added a check to the onLoadProgress event like so:

private function handleLoadProgress(targetMC:MovieClip,
loadedBytes:Number, totalBytes:Number):Void
{
if (MovieAsset.HIDE_WHEN_LOADED)
{
if (targetMC._width != undefined || targetMC._width != 
0)
{
targetMC._visible = false;
}
}
}

Now, how's that for obscure? It does fix the issue, and instanceof is
indeed a MovieClip once again. Oh, and even better, _visible works
like a charm.

Thanks again to all those that helped out with this one.

-Chris


___
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: Re: Re: Re: Re: Re: [Flashcoders] Misreporting instanceof operator.

2006-08-24 Thread John Grden

Wow, and I thought KP was only good with random()!

yeah yeah, I know, I owe you a beer for that one.

On 8/24/06, Johannes Nel <[EMAIL PROTECTED]> wrote:


ha, how old school. when in doubt wait a frame or 15...

On 8/24/06, Chris Allen <[EMAIL PROTECTED]> wrote:
>
> Okay,
>
> I have fixed the problem. I would say that this is certainly bug with
> Flash, but there is a work around. Thanks to Keith Peters for
> mentioning this to me last night.
>
> So here's the deal... Back in the day before MovieClipLoader when you
> wanted to load and external SWF, you had to check a property of the
> MovieClip to see if it existed before you could manipulate it. You
> needed to create an interval that would check to see if it's
> initialized in this way. This all makes sense to me, but what doesn't,
> is that you can't just check that any property of MovieClip was set.
> There is a magic property that seems to indicate that the MovieClip is
> fully initialized. That property is _width.
>
> So with this in mind I added a check to the onLoadProgress event like
so:
>
> private function handleLoadProgress(targetMC:MovieClip,
> loadedBytes:Number, totalBytes:Number):Void
> {
> if (MovieAsset.HIDE_WHEN_LOADED)
> {
> if (targetMC._width != undefined ||
> targetMC._width != 0)
> {
> targetMC._visible = false;
> }
> }
> }
>
> Now, how's that for obscure? It does fix the issue, and instanceof is
> indeed a MovieClip once again. Oh, and even better, _visible works
> like a charm.
>
> Thanks again to all those that helped out with this one.
>
> -Chris
>
> On 8/24/06, Chris Allen <[EMAIL PROTECTED]> wrote:
> > Thanks for your help on this Ian.
> >
> > I'm not sure I understand all of what you found here, so let me
> > summarize with some questions to see if I got it right.
> >
> > Flash 6 SWFs fail every time when loaded remotely? - This hasn't been
> > my experience. I've been able to load some small ones (20K) without
> > the issue.
> >
> > You think it may have to so with domain security in Flash?
> >
> > When loading from your files system the Flash 7 and 8 files load
> > correctly but not Flash 6?
> >
> > Some findings I have made:
> >
> > The behavior is slightly different on a Macintosh versus a Windows
> > machine. Which are you using?
> >
> > Altering nothing before the SWF is fully loaded screws up the
> > instanceof stuff but all of the MovieClip properties work just fine.
> >
> > If I try to alter the _visible property before it's fully loaded it
> > causes that property to no longer function once fully loaded.
> >
> >
> > I have some other ideas to try out this morning and I will keep you
> > posted on my progress. Thanks to all of you who tried to help.
> >
> > -Chris
> >
> >
> > On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote:
> > > Oh, I should add - I get the same results when I throw the Fling
code
> > > out completely and write a simple loader from scratch.
> > >
> > > Cheers,
> > >   Ian
> > >
> > > On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote:
> > >
> > > > I'm certainly running out of ideas for a simple fix, here - and
it's
> > > > definitely not the loading code, it's a 'feature' or bug in the
> Flash
> > > > Player.
> > > ___
> > > 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
>



--
j:pn
http://www.lennel.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





--
[  JPG  ]
___
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: Re: Re: Re: Re: Re: [Flashcoders] Misreporting instanceof operator.

2006-08-24 Thread Johannes Nel

ha, how old school. when in doubt wait a frame or 15...

On 8/24/06, Chris Allen <[EMAIL PROTECTED]> wrote:


Okay,

I have fixed the problem. I would say that this is certainly bug with
Flash, but there is a work around. Thanks to Keith Peters for
mentioning this to me last night.

So here's the deal... Back in the day before MovieClipLoader when you
wanted to load and external SWF, you had to check a property of the
MovieClip to see if it existed before you could manipulate it. You
needed to create an interval that would check to see if it's
initialized in this way. This all makes sense to me, but what doesn't,
is that you can't just check that any property of MovieClip was set.
There is a magic property that seems to indicate that the MovieClip is
fully initialized. That property is _width.

So with this in mind I added a check to the onLoadProgress event like so:

private function handleLoadProgress(targetMC:MovieClip,
loadedBytes:Number, totalBytes:Number):Void
{
if (MovieAsset.HIDE_WHEN_LOADED)
{
if (targetMC._width != undefined ||
targetMC._width != 0)
{
targetMC._visible = false;
}
}
}

Now, how's that for obscure? It does fix the issue, and instanceof is
indeed a MovieClip once again. Oh, and even better, _visible works
like a charm.

Thanks again to all those that helped out with this one.

-Chris

On 8/24/06, Chris Allen <[EMAIL PROTECTED]> wrote:
> Thanks for your help on this Ian.
>
> I'm not sure I understand all of what you found here, so let me
> summarize with some questions to see if I got it right.
>
> Flash 6 SWFs fail every time when loaded remotely? - This hasn't been
> my experience. I've been able to load some small ones (20K) without
> the issue.
>
> You think it may have to so with domain security in Flash?
>
> When loading from your files system the Flash 7 and 8 files load
> correctly but not Flash 6?
>
> Some findings I have made:
>
> The behavior is slightly different on a Macintosh versus a Windows
> machine. Which are you using?
>
> Altering nothing before the SWF is fully loaded screws up the
> instanceof stuff but all of the MovieClip properties work just fine.
>
> If I try to alter the _visible property before it's fully loaded it
> causes that property to no longer function once fully loaded.
>
>
> I have some other ideas to try out this morning and I will keep you
> posted on my progress. Thanks to all of you who tried to help.
>
> -Chris
>
>
> On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote:
> > Oh, I should add - I get the same results when I throw the Fling code
> > out completely and write a simple loader from scratch.
> >
> > Cheers,
> >   Ian
> >
> > On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote:
> >
> > > I'm certainly running out of ideas for a simple fix, here - and it's
> > > definitely not the loading code, it's a 'feature' or bug in the
Flash
> > > Player.
> > ___
> > 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





--
j:pn
http://www.lennel.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


Re: Re: Re: Re: Re: Re: [Flashcoders] Misreporting instanceof operator.

2006-08-24 Thread Chris Allen

Okay,

I have fixed the problem. I would say that this is certainly bug with
Flash, but there is a work around. Thanks to Keith Peters for
mentioning this to me last night.

So here's the deal... Back in the day before MovieClipLoader when you
wanted to load and external SWF, you had to check a property of the
MovieClip to see if it existed before you could manipulate it. You
needed to create an interval that would check to see if it's
initialized in this way. This all makes sense to me, but what doesn't,
is that you can't just check that any property of MovieClip was set.
There is a magic property that seems to indicate that the MovieClip is
fully initialized. That property is _width.

So with this in mind I added a check to the onLoadProgress event like so:

private function handleLoadProgress(targetMC:MovieClip,
loadedBytes:Number, totalBytes:Number):Void
{   
if (MovieAsset.HIDE_WHEN_LOADED)
{
if (targetMC._width != undefined || targetMC._width != 
0)
{
targetMC._visible = false;
}
}
}

Now, how's that for obscure? It does fix the issue, and instanceof is
indeed a MovieClip once again. Oh, and even better, _visible works
like a charm.

Thanks again to all those that helped out with this one.

-Chris

On 8/24/06, Chris Allen <[EMAIL PROTECTED]> wrote:

Thanks for your help on this Ian.

I'm not sure I understand all of what you found here, so let me
summarize with some questions to see if I got it right.

Flash 6 SWFs fail every time when loaded remotely? - This hasn't been
my experience. I've been able to load some small ones (20K) without
the issue.

You think it may have to so with domain security in Flash?

When loading from your files system the Flash 7 and 8 files load
correctly but not Flash 6?

Some findings I have made:

The behavior is slightly different on a Macintosh versus a Windows
machine. Which are you using?

Altering nothing before the SWF is fully loaded screws up the
instanceof stuff but all of the MovieClip properties work just fine.

If I try to alter the _visible property before it's fully loaded it
causes that property to no longer function once fully loaded.


I have some other ideas to try out this morning and I will keep you
posted on my progress. Thanks to all of you who tried to help.

-Chris


On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote:
> Oh, I should add - I get the same results when I throw the Fling code
> out completely and write a simple loader from scratch.
>
> Cheers,
>   Ian
>
> On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote:
>
> > I'm certainly running out of ideas for a simple fix, here - and it's
> > definitely not the loading code, it's a 'feature' or bug in the Flash
> > Player.
> ___
> 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: Re: Re: Re: Re: [Flashcoders] Misreporting instanceof operator.

2006-08-24 Thread Chris Allen

Thanks for your help on this Ian.

I'm not sure I understand all of what you found here, so let me
summarize with some questions to see if I got it right.

Flash 6 SWFs fail every time when loaded remotely? - This hasn't been
my experience. I've been able to load some small ones (20K) without
the issue.

You think it may have to so with domain security in Flash?

When loading from your files system the Flash 7 and 8 files load
correctly but not Flash 6?

Some findings I have made:

The behavior is slightly different on a Macintosh versus a Windows
machine. Which are you using?

Altering nothing before the SWF is fully loaded screws up the
instanceof stuff but all of the MovieClip properties work just fine.

If I try to alter the _visible property before it's fully loaded it
causes that property to no longer function once fully loaded.


I have some other ideas to try out this morning and I will keep you
posted on my progress. Thanks to all of you who tried to help.

-Chris


On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote:

Oh, I should add - I get the same results when I throw the Fling code
out completely and write a simple loader from scratch.

Cheers,
  Ian

On 8/24/06, Ian Thomas <[EMAIL PROTECTED]> wrote:

> I'm certainly running out of ideas for a simple fix, here - and it's
> definitely not the loading code, it's a 'feature' or bug in the Flash
> Player.
___
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