Solved

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

Posted on 2003-12-02
7
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 27

Expert Comment

by:negatyve
ID: 9860145
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
ID: 9860245
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
ID: 9860289
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
ID: 9860317
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
ID: 9860410
that's ok.. :)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adobe Flash Player won't install on Windows 7 3 276
EMET 5.2 / Adobe Flash 2 252
Adobe Flash Player ActionScript error 6 69
Include Adobe AIR libraries in Flash Builder 4 137
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

740 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