Solved

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

Posted on 2003-12-02
7
240 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

636 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