Solved

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

Posted on 2003-12-02
7
196 Views
Last Modified: 2010-04-03
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!!
0
Comment
Question by:kieng
  • 3
  • 2
7 Comments
 
LVL 27

Expert Comment

by:negatyve
Comment Utility
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 = ...
0
 

Author Comment

by:kieng
Comment Utility
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?
0
 
LVL 27

Accepted Solution

by:
negatyve earned 50 total points
Comment Utility
there are no _level inside a movieclip: there's only one _level stack for all the movie. and you cannot reference a inner layer in any way.
0
 

Author Comment

by:kieng
Comment Utility
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!
0
 
LVL 27

Expert Comment

by:negatyve
Comment Utility
that's ok.. :)
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now