# Playing mc only when jpg loaded

**URL:** https://forum.kirupa.com/t/playing-mc-only-when-jpg-loaded/102429
**Category:** Uncategorized
**Created:** [February 23, 2004, 8:50pm UTC](https://forum.kirupa.com/t/playing-mc-only-when-jpg-loaded/102429 "2004-02-23T20:50:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![z3r0](https://avatars.discourse-cdn.com/v4/letter/z/cdc98d/32.png) [@z3r0](https://forum.kirupa.com/u/z3r0)
#### Post date: [February 23, 2004, 8:50pm UTC](https://forum.kirupa.com/t/playing-mc-only-when-jpg-loaded/102429/1 "2004-02-23T20:50:39Z")

</div>

I’m loading jpgs into a mclip called holder.  
I need to execute another movieclip called “flash” when the picture is  
loaded.  
The flash movieclip is a sort of bright so can’t be called to make play when  
the  
button is pressed since the jpg will start to load… (they must appear  
together).

How can I do that?

the “flash” must appear everytime a picture finished it’s loading…

Can someone give me an answer, tutorial or something please?  
I’m stuck…

Thank you!

---

<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: [February 23, 2004, 11:52pm UTC](https://forum.kirupa.com/t/playing-mc-only-when-jpg-loaded/102429/2 "2004-02-23T23:52:43Z")

</div>

Nope, that will not work…

the jpg is being loaded to an empty mc called “holder”… if the picture loaded (using enterFrame) the condition will be true and again and again will play…

\_root.holder.loadMovie(“photos/pic.jpg”);

other mclip (component) checks if picture is loaded and shows a percentual bar

added that to the component script but didn’t work either (plays the first time but not anymore later)

if (this.bar.\_xscale == 99) {  
\_root.flash.play();  
}

Any ideas?

---

<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: [February 24, 2004, 12:19am UTC](https://forum.kirupa.com/t/playing-mc-only-when-jpg-loaded/102429/3 "2004-02-24T00:19:14Z")

</div>

> \*Originally posted by z3r0 \*  
> **Nope, that will not work…**  
> Yes i think it will work.

---

<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: [February 24, 2004, 12:23am UTC](https://forum.kirupa.com/t/playing-mc-only-when-jpg-loaded/102429/4 "2004-02-24T00:23:35Z")

</div>

Well, actually is not working because on enterframe checks if the picture is loaded… if it is the clip plays but the condition makes the clip play again and again… over and over…

---

<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: [February 24, 2004, 2:41am UTC](https://forum.kirupa.com/t/playing-mc-only-when-jpg-loaded/102429/5 "2004-02-24T02:41:55Z")

</div>

Put a stop action in the end of the movieclip?
