PDA

View Full Version : loader


dsdsdsdsd
11-23-2003, 06:57 PM
--------------------------------------------------------------------------------

hello; on the main timeline I have:
----------------------------------------------------------
var initobject = {swf_name:"external.swf"};

_root.Button1_instance.onPress = function()
{ _root.attachMovie ("loader" , "loader_instance" , 1 , initobject);
loadMovieNum ("external.swf", 5);
}
-----------------------------------------------------------

on my loader symbol timeline I have:
-----------------------------------------------------------
onEnterFrame = function()
{ bytes_loaded = swf_name.getBytesLoaded();
trace ("swf_name " + swf_name); // first trace
trace ("bytes_loaded " + bytes_loaded); // second trace
};
------------------------------------------------------------

I am getting a good responce from the first trace but I am getting an undefined from the second; ofcourse I have tried many variations on the bytes_loaded = ...

any thoughts
thanks
Shannon Burnett

oldnewbie
11-23-2003, 08:11 PM
It should be...

bytes_loaded = _level5.getBytesLoaded();

You could use a variable, but certainely not holding the .swf's name. Either the level or the instance name of the container clip in which this external movie is loaded into.