Search  

NEED HELP FIGURING THIS OUT

HomeForumsFlash Discussionneed help figuring this out
35540 duneglow
16 posts
Bought between 50 and 99 items

Currently I have this code that loads an external swf

this is the code for that:

////////////////////////////////////////////////////////////////////////////////////////

This frame loads the theme swf into the movie clip and must be at the bottom layer

if (_root.templatedir != ””;) {

loadMovie(_root.templatedir+”/”_root.category”/”_root.theme”.swf”, “loadmoviebottom”;);

} else { if (_root.templatedir1 != ””;) {

loadMovie(_root.templatedir1+"/"_root.category"/"_root.theme".swf", "loadmoviebottom");
} else {
}
loadMovie(theme+".swf", "loadmoviebottom");

} /////////////////////////////////////////////////////////////////////////////////////

Now I found this other code that loads and resizes swf files rather nicely and I like to use it instead to load the swf file that the above code loads.

and i believe that

_root.templatedir1+”/”_root.category”/”_root.theme”.swf”

is the path to the to the swf file that it loads and “loadmoviebottom” is the container that it loads it to.

the problem that I’m having is that :

_root.templatedir1+”/”_root.category”/”_root.theme”.swf”

will not load into nothing else but : “loadmoviebottom”

and the new code that i found has its own movie clip loader and renaming it to “loadmoviebottom” does not work.

this is an example of the code that i would like ot use: ///////////////////////////////////////////////////////////////////////////////////

Stage.scaleMode = “noScale”; Stage.align = “LT”;

this.createEmptyMovieClip(“container”, “100”;);

my_mc = new MovieClipLoader(); preload = new Object(); my_mc.addListener(preload);

preload.onLoadStart = function(targetMC) { container._visible = false; pText._visible = true; };

preload.onLoadProgress = function(targetMC, lBytes, tBytes) { bar._width = (lBytes/tBytes)100; pText.text = ”% “+Math.round((lBytes/tBytes)100); };

preload.onLoadInit = function(targetMC) { container._visible = true; pText._visible = false; if (Stage.height/Stage.width<targetMC._height/targetMC._width) { mc_prop = targetMC._width/targetMC._height; targetMC._height = Stage.height; targetMC._width = Stage.heightmc_prop; targetMC._y = (Stage.height/2)-(targetMC._height/2); targetMC._x = (Stage.width/2)-(targetMC._width/2); } else { mc_prop = targetMC._height/targetMC._width; targetMC._width = Stage.width; targetMC._height = Stage.widthmc_prop; targetMC._y = (Stage.height/2)-(targetMC._height/2); targetMC._x = (Stage.width/2)-(targetMC._width/2); } };

var stage_listener:Object = new Object(); stage_listener.onResize = function():Void { if (Stage.height/Stage.width<container._height/container._width) { mc_prop = container._width/container._height; container._height = Stage.height; container._width = Stage.heightmc_prop; container._y = (Stage.height/2)-(container._height/2); container._x = (Stage.width/2)-(container._width/2); } else { mc_prop = container._height/container._width; container._width = Stage.width; container._height = Stage.widthmc_prop; container._y = (Stage.height/2)-(container._height/2); container._x = (Stage.width/2)-(container._width/2); } }; Stage.addListener(stage_listener);

my_mc.loadClip(“sample.swf”, “container”;);

//////////////////////////////////////////////////////////////////////////////////////

Like i mentioned before I tried to use both:

///////////////////////////////////////////////////////////////////////////////////

my_mc.loadClip(_root.templatedir1+”/”_root.category”/”_root.theme ”.swf”, “container”;);

AND

my_mc.loadClip(_root.templatedir1+”/”_root.category”/”_root.theme ”.swf”, “loadmoviebottom”;);

/////////////////////////////////////////////////////////////////////////////////////

but neither o them worked, ofcouse with the second example I replaced “comtainer” with “loadmoviebottom” all through out the code.

I guess what I need this code to do is to be able to load and resize what ever gets loaded into the “loadmoviebottom” movieclip, But how do i do this?

I’ve been at this for days, any help would be appreciated.

Posted 2 months ago
35540 duneglow
16 posts
Bought between 50 and 99 items

Wow. no one here can help me with this?

Posted about 1 month ago
38812 Yvo
112 posts
Exclusive author Referred at least one person Sold between 100 and 1 000 dollars Bought between 1 and 9 items

I think you should use pastie to show your code. Makes it easier to read for the people here and I think will encourage more people to look through it.

Posted about 1 month ago