Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2003-12-02
7
Medium Priority
?
246 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 200 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

705 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