Jump to content
Search Community

XMLLoader - SWF with height, width and scaleMode does not display

Mr Pablo test
Moderator Tag

Recommended Posts

I have a particular SWF file that works perfectly on it's own, but when loading it into my app with XMLLoader and I set the height, width and scaleMode, it will not display. I get my white background.

 

Tracing the current frames, the SWF is playing, but for some reason I cannot see its contents.

 

The SWF in question makes a call to a server and displays 2 images (jpgs). It holds the images in an array and displays them in order, across 20 seconds (480 frames, 24fps). Plays perfectly well on its own, and when I do NOT set the height, width and scale parameters in the xml document used to reference it in LoaderMax.

 

Anyone come across this before?

 

Cheers

Link to comment
Share on other sites

Nope, doesn't sound familiar. Tough to diagnose without seeing the files and publishing them on our end. You were using a 3rd party tool from Jump Eye components in your stuff, right? I wonder if that's causing the issue (not sure - they usually do a nice job with their stuff). If you're still having trouble, please try to isolate the problem in a separate set of simplified files and post them here (zip them together first) so that we can take a peek. 

Link to comment
Share on other sites

The SWF in this instance is not using the Jumpeye components.

 

I have attached the fla for the SWF in question. Please add it to a XMLLoader xml doc and try with and without the parameters mentioned.

 

The app containing LoaderMax should have stage dimensions of 1280x720.

 

When the xml height, width and scaleModes are set, it should show blank, but still play. without all 3, it displays.

 

EDIT - I am still experiencing issues with the Jumpeye MCTE v3 in terms of playing various assets in various orders. I made a thread for this a few days ago

Link to comment
Share on other sites

The problem is that your swf is completely empty initially - the first frame is blank and you have a stop() action there. So when the SWFLoader attempts to figure out how much to scale the content, it can't effectively do that because its width/height are both 0. If you just put a simple rectangle the size of the stage on the first frame, that should solve the problem. It's fine if it's even a transparent rectangle, although it seems like black would be best in your file. 

Link to comment
Share on other sites

The problem is that your swf is completely empty initially - the first frame is blank and you have a stop() action there. So when the SWFLoader attempts to figure out how much to scale the content, it can't effectively do that because its width/height are both 0. If you just put a simple rectangle the size of the stage on the first frame, that should solve the problem. It's fine if it's even a transparent rectangle, although it seems like black would be best in your file.

Hmm, I'm sure there isn't a "stop()" command in there...

 

Eitherway, I added a basic rectangle, same size as the stage, but that didn't seem to do anything...

 

gonna keep fiddling.

Link to comment
Share on other sites

Are you looking at the test file you uploaded? I see a stop() on the first frame, and then all your code is on the second frame. Right? 

 

Worked like a charm for me when I added the rectangle on the first frame and did the gotoAndPlay(2) or gotoAndStop(2) on the rawContent once the SWFLoader completed. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...