Skip to main content
September 15, 2009
Question

Load external swf into a specific _level

  • September 15, 2009
  • 1 reply
  • 792 views

Hi there,

I am loading an external swf into the mc 'image' using:

image.loadMovieNum("portfolio/100_design/1.swf", 1);

Every time a new image loads, I want it to load the level above, ie:

image.loadMovieNum("portfolio/100_design/1.swf", 2);

Is there a way this can be done dynamically. For example, "current level + 1"
Many thanks

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
September 15, 2009

yes, but loadMovieNum() is a function, not a method and shouldn't be applied to an object (like image):

var level:Number = 1;

then whenever you want to load, use:

loadMovieNum("yournextswf.swf",level++);

September 15, 2009

This worked well, but unfortunately not the way I had hoped (my fault).

What I am trying to achieve is:

Image 1 fades in.

Image 2 fades over over the top of image 1.

Image 3 fades over over the top of image 2 etc...

However I need this to work dynamically. Any ideas where I could achieve this?

Thanks

kglad
Community Expert
Community Expert
September 15, 2009

is the first frame of your loaded swf's empty?  if yes, then no problem using _levels.

if not, do you mind a momentary flash when your next swf loads and before its _alpha is assigned 0 and then faded-in?  if you don't mind, then no problem using _levels.

if you do mind that momentary flash, then using _levels will be more complex than using empty target movieclips.  is there some good reason to use _levels instead of target movieclips?