# Controling properties of external loaded swf files

**URL:** <https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567>\
**Category:** Uncategorized\
**Created:** [May 28, 2004, 7:34am UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567 "2004-05-28T07:34:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mx\_guest2004](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@mx\_guest2004](https://forum.kirupa.com/u/mx_guest2004)\
**Post date:** [May 28, 2004, 7:34am UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567/1 "2004-05-28T07:34:57Z")

</div>

Hi;  
I have loaded an external swf file by this code:  
[AS]  
createEmptyMovieClip(“movie”, 3);  
loadMovie(“star.swf”, “movie”);  
[/AS]

I want to know how to change some properties of this swf? For instance I want to change it’s \_alpha from 100 to 0, or it’s scale.  
Does the solution work for loaded images as well?  
Any help on this, please?

mx-guest2004 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 8:15am UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567/2 "2004-05-28T08:15:10Z")

</div>

```auto

  createEmptyMovieClip("movie", 3);
  loadMovie("star.swf", "movie");
  

```

you answered your own question. to refer to a movie clip, use the instance name. here, you specified it as “movie”. so, to change any of its characteristics after you have loaded it, just put its instance name and then the property. for your alpha question, it would be movie.\_alpha= 100 or 0 or whatever you want it to be. or, for its x coordinate: movie.\_x= 300. get the idea? if this isnt clear enough, let me know.

sam

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 8:55am UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567/3 "2004-05-28T08:55:20Z")

</div>

Thanks sam,  
I mean the changing of \_alpha.  
When loading I can give the “movie” an \_alpha value, but how can I fade it in/out? Or change it’s scale over some frames for a kind of zooming effect?

mx-guest2004

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 2:42pm UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567/4 "2004-05-28T14:42:30Z")

</div>

You’ll have to wait till the movie is loaded…

scotty(-:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 6:31pm UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567/5 "2004-05-28T18:31:25Z")

</div>

yea… once the movie is loaded, you have control of it. you can control every aspect of it with actionscript. or, you can simply change the actual movie’s timeline that you are loading. the movie you have loaded is the same as any other movie that exists on your timeline.

sam

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 6:46pm UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567/6 "2004-05-28T18:46:11Z")

</div>

Thanks guys. Here is a code made by a flash guru named divarch, and it’s works 🙂  
mx-guest2004

[AS]  
function reScale(clip, targ, speed) {//re-usable,and extendable to all props  
if (clip.\_xscale\<targ) {  
clip.\_xscale += speed;  
clip.\_yscale += speed;//optional  
} else {  
clearInterval(reScaleInt);  
trace(‘cleared’);//just to make sure  
}  
}  
//continues from previous post  
if(loaded==total){  
reScaleInt = setInterval(reScale, 20, movie, 300, 10);  
}  
[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 6:47pm UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567/7 "2004-05-28T18:47:35Z")

</div>

neato.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 6:54pm UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567/8 "2004-05-28T18:54:23Z")

</div>

> 

```auto
if(loaded==total){ 
 reScaleInt = setInterval(reScale, 20, movie, 300, 10); 
 } 
 

```

But like we’ve said, after loading;)

scotty(-:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 6:57pm UTC](https://forum.kirupa.com/t/controling-properties-of-external-loaded-swf-files/111567/9 "2004-05-28T18:57:47Z")

</div>

That’s right. I meant AFTER loading. 🙂  
mx-guest2004
