Link to home
Start Free TrialLog in
Avatar of kieng
kieng

asked on

Retrieve the name and change _width and _height to a movie Loaded with loadmovie()

hello, my problem is concerned with the name of a movie, which I have loded with the loadmovie function.
I have included the code for this in an on release event in a button a goes as follows:

on (release)
{
loadmovie("blabla.swf", "_level0.forLoading");
_level0.forLoading.stop() // just for a few seconds so _width and _height can be retrieved and changed.

var the_name = "_level0.forLoading."   "          //(what goes here I have tried _name, _droptarget, _tabChildren and others but nothing works._ name returns "forLoading", the others "undefined")

thanks in advance!

in order for you to understand why I need this code , I should say that I need it so ! don't have to put the name of the loaded movie again in every button, but to retrieve it so it can be done automatically. and by that change its _width and _height cause these cannot change without the name. _width, _height and _name always referer to the empty movie "forLoading"

Please Help!!
Avatar of negatyve
negatyve

Why using the name? Use a direct reference:

on (release)
{
          loadmovie("blabla.swf", "_level0.forLoading");
          _level0.forLoading.stop()
          _level0.the_clip = _level0.forLoading;
}

then, from any other location in the movie (if this loading button was in the _root):

_level0.the_clip._width = ....
_level0.the_clip ._height = ...
Avatar of kieng

ASKER

it seems right to me I ll try it later on cause now I cant and Ill let u know tomorrow, however if I want to reference a _level within the movie which was loaded, meaning

_level0.the_clip._levelN               // without knowing the exact name how can this be done?
ASKER CERTIFIED SOLUTION
Avatar of negatyve
negatyve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kieng

ASKER

all right I get it thanks alot If that works you have the points:)) really thanks man you helped me from pending lots of hours for such a small thing anyway!
that's ok.. :)