0
complicated loading swf with xml
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/td-p/564469
May 15, 2007
May 15, 2007
Copy link to clipboard
Copied
main swf loads in new swf with xml image carousel including
reflection of image. when you click an image on the carousel, the
image slides over and changes to a new image with that image being
reflected. the new image is loaded into an empy movie clip, along
with the flipped image as well. the reflection is masking the
flipped image by creating a gradient fill in an empty movie clip,
cached as bitmap... in the xml swf, everything works just fine,
however, once its loaded into the main swf, the reflection doent
work, but the new images loads fine. which doesnt make much sense
to me since they are both being called the same way... any ideas?
flash 8 pro
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564470#M286001
May 15, 2007
May 15, 2007
Copy link to clipboard
Copied
if it helps, here my AS. when this is loaded into my main
timeline (another SWF) the gradient_mc and bigImageFlip dont work.
however, bigImageLoader does.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Enthusiast
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564471#M286002
May 15, 2007
May 15, 2007
Copy link to clipboard
Copied
There is a security issue with loaded images and BitMapData I
believe.
You may need System.security.allowDomain("*");
You may need System.security.allowDomain("*");
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564472#M286003
May 15, 2007
May 15, 2007
Copy link to clipboard
Copied
tried, and didnt work.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Enthusiast
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564473#M286004
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
1. Be sure in main.swf there is no masking or layering hiding
the reflection area. A way to test quickly is to load in a plain
master swf that is much larger than the externals swf.
2. Know the weakness of loadMovie for timing issues that require the external movie to be fully loaded before actions are taken on it. I see a bunch of these in the code you posted. Best to use MovieClipLoader.onLoadInit before you attempt to access the external swf properties or code or add code.
3. Be sure the code is firing on load and all objects are created. Add some trace statements for those objects.
4. I noticed you do not use BitmapData so this may not be relevant but be sure to add
System.security.allowDomain("*");
to the main.swf as well as in external swfs and only if you are using the BitmapData class.
5. As I started to look at the code a bit and noticed this item:
There is no constructor for the Flash MovieClip class. You will not see a compiler error message because you do not have the code wrapped into a class.
var home:MovieClip = new MovieClip();
However it does not have impact on the code.
better would be
var home:MovieClip;
2. Know the weakness of loadMovie for timing issues that require the external movie to be fully loaded before actions are taken on it. I see a bunch of these in the code you posted. Best to use MovieClipLoader.onLoadInit before you attempt to access the external swf properties or code or add code.
3. Be sure the code is firing on load and all objects are created. Add some trace statements for those objects.
4. I noticed you do not use BitmapData so this may not be relevant but be sure to add
System.security.allowDomain("*");
to the main.swf as well as in external swfs and only if you are using the BitmapData class.
5. As I started to look at the code a bit and noticed this item:
There is no constructor for the Flash MovieClip class. You will not see a compiler error message because you do not have the code wrapped into a class.
var home:MovieClip = new MovieClip();
However it does not have impact on the code.
better would be
var home:MovieClip;
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564474#M286005
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
i think its a problem with the cacheAsBitmap. it doesnt seem
to work when its loaded into the parent swf.. if I take that out of
the child SWF and test, it doesnt work either, so, i'm guessing its
not running that script..??... i tried the System.security, but
still nothing. any other suggestions??? greatly appreciated
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564475#M286007
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
just playing around with it.. i set the gradient_mc alpha to
100, and when i test the movie it works fine, the gradient shows
all the time..but once loaded into the main SWF it flashes on then
it goes away instead of staying on...
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Enthusiast
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564476#M286009
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
Actually I believe the cacheAsBitmap also has the Security
Issue when applied to a clip externally loaded content.
"but once loaded into the main SWF it flashes on then it goes away instead of staying on..."
That sounds like a timing issue. Did you try making a plain testingMain.swf and see what happens if you simply load it?
"but once loaded into the main SWF it flashes on then it goes away instead of staying on..."
That sounds like a timing issue. Did you try making a plain testingMain.swf and see what happens if you simply load it?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564477#M286010
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
well the rest of the movie loads just fine, instantly and
stays, its just the flipped image and its mask that doesnt appear
to load.
Edit: those are the two that are cached... and the security setting doesnt work... tried several times.. including putting my domain in the (" ") and with the *, both no luck. not locally or hosted.
Edit: those are the two that are cached... and the security setting doesnt work... tried several times.. including putting my domain in the (" ") and with the *, both no luck. not locally or hosted.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564478#M286013
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564479#M286014
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
if I trace(gradient_mc.cacheAsBitmap); and do the same for
bigImageFlip, on the original SWF it comes back 'true'.. however,
once it's loaded into SWF it comes back 'undefined'
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Enthusiast
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564480#M286015
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
1. Trace gradient_mc and others. See if it/they are
undefined. Then possible coding, timing issue.
2. Be sure the main.swf is Flash version that supports cacheAsBitmap or any item.
2. Be sure the main.swf is Flash version that supports cacheAsBitmap or any item.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564481#M286016
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
if i just trace(gradient_mc), once it's loaded into other swf
it came back "_level0.carousel_mc.gradient_mc"
carousel_mc is the empty movie clip im loading the swf into
however, if i do the trace once one of the images has been clicked and the gradient and flipped image should appear, it doesnt show anything when its loaded into the SWF.....but does show _level0.bigImageFlip in original.
_level0.gradient_mc
all files are flash 8 AS2
carousel_mc is the empty movie clip im loading the swf into
however, if i do the trace once one of the images has been clicked and the gradient and flipped image should appear, it doesnt show anything when its loaded into the SWF.....but does show _level0.bigImageFlip in original.
_level0.gradient_mc
all files are flash 8 AS2
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564482#M286017
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
making some progress... it has to do with the depths.. when i
mess with the depths, things start to happen, i just cant dial it
in right so they all display
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Damon Edwards
AUTHOR
Guru
,
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564483#M286018
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
got it to work with this...FINALLY, i felt like i was on
crazy pills.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Enthusiast
,
LATEST
/t5/animate-discussions/complicated-loading-swf-with-xml/m-p/564484#M286019
May 16, 2007
May 16, 2007
Copy link to clipboard
Copied
Super!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

