# JPEG Dynamic Loading Help

**URL:** https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101
**Category:** flash
**Created:** [November 13, 2002, 9:25pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101 "2002-11-13T21:25:12Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![AWarrenM](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@AWarrenM](https://forum.kirupa.com/u/AWarrenM)
#### Post date: [November 13, 2002, 9:25pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/1 "2002-11-13T21:25:12Z")

</div>

Hey All,  
I searched through the forums and I couldn’t find anything that could help me.

## I used the code in the tutorial on loading jpeg images, the one with bush holding the presidency for dumbies book.

\_root.createEmptyMovieClip(“container”,1);  
container.loadMovie(“photo.jpg”);  
container.\_x = container.\_y = 0 ;

## \_root.onMouseDown = function () { startDrag (“container”,false) ; } \_root.onMouseUp = function () { stopDrag () ; }

Anyway, that’s the only picture I can get to show? I replaced “photo.jpg” with “test.jpg” and a couple others, and none of them would show up, only “photo.jpg”

I can’t figure out what’s going on? I have photoshop, am I not saving the images in the right format? Please help! I’m desperate.

Thanks, Anthony.

---

<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: [November 13, 2002, 9:34pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/2 "2002-11-13T21:34:14Z")

</div>

It should work.

Are your images in the same folder as your .swf file?

---

<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: [November 13, 2002, 9:37pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/3 "2002-11-13T21:37:07Z")

</div>

Yes, the exact same folder. Here’s another bit of information that might help you:

If I alter the bush picture in photoshop and then save it; it won’t display??

---

<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: [November 13, 2002, 9:56pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/4 "2002-11-13T21:56:35Z")

</div>

the images are in RGB?

---

<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: [November 13, 2002, 10:03pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/5 "2002-11-13T22:03:55Z")

</div>

Yep… the color setting is “web graphics default”

Am I crazy?

---

<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: [November 13, 2002, 10:06pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/6 "2002-11-13T22:06:28Z")

</div>

i just did it. check it out. this was my code. yours is a lot alike so it should work.

```php

// Create empty movie clip and set location
_root.createEmptyMovieClip("image_mc", 0);
image_mc._x = 50;
image_mc._y = 50;
image_mc._xscale = 50;
image_mc._yscale = 55;
// Button event handler
load_btn.onRelease = function() {
	// Load image
	image_mc.loadMovie(filename_txt.text);
}

```

but here, you cant use CKMY jpg’s and they cannot be Progressive jpg’s. inother words it cant load in pieces.

but this is how mine turned out, and btw, the image must be on your server.

[http://www.geocities.com/mdipi2k2/imagetest.htm](http://www.geocities.com/mdipi2k2/imagetest.htm)

---

<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: [November 13, 2002, 10:08pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/7 "2002-11-13T22:08:13Z")

</div>

so your code is to drag it? hmmm, i dont know. but i got mine to work… i will try to add a drag in mine.

---

<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: [November 13, 2002, 10:15pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/8 "2002-11-13T22:15:48Z")

</div>

well i gotta go, but when i get back, i think it is just a few more lines of code then i got it. so i will post it when done.

---

<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: [November 13, 2002, 10:32pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/9 "2002-11-13T22:32:26Z")

</div>

i added

```php
image_mc.onMouseDown = function() {
      startDrag(image_mc,flase)
}

```

which in theory should have worked correct? but i guess i need an instance name, yet cant give one because there is no MC to give it to. so i suppose that is what is happening to 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: [November 14, 2002, 12:40am UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/10 "2002-11-14T00:40:41Z")

</div>

The images were saved progressively; the weren’t mine and I didn’t know.

Sweet. Thanks for the help.

---

<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: [November 14, 2002, 2:23am UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/11 "2002-11-14T02:23:13Z")

</div>

mdipi…

image\_mc.onMouseDown = function() {  
this.startDrag(image\_mc,flase);  
}

so, all you’re missing is this.

---

<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: [November 14, 2002, 2:26am UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/12 "2002-11-14T02:26:12Z")

</div>

it was that simple! haha! and the book i am reading says something about remembering the this!

Andrew no problem,glad i could help :P.

---

<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: [November 14, 2002, 2:30am UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/13 "2002-11-14T02:30:32Z")

</div>

Montoya, i tryed the code and ented it under my existing code. but that just makes the button not work. its no big deal, i was just playing around with this. just wanted to let you know.

---

<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: [November 14, 2002, 2:46am UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/14 "2002-11-14T02:46:07Z")

</div>

that’s because I answered that one without looking. I was too busy practicing my sword skills (with my left hand, of course! That’s why Im smiling) \<------ movie reference!

I would’ve done like this:

```auto

mymc.onPress=function(){
	mymc.startdrag();
}
mymc.onRelease=function(){
	mymc.stopdrag();
}

```

if you are putting code on the actual mc:

```auto

on(press){
this.startdrag();
}
on(release){
this.stopdrag();
}

```

sorry for the mixup.

---

<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: [November 14, 2002, 8:23pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/15 "2002-11-14T20:23:17Z")

</div>

Princess bride fanatic huh? Def a good flick…

---

<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: [November 14, 2002, 8:53pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/16 "2002-11-14T20:53:07Z")

</div>

no big deal, but thanks for the clarifaction.

---

<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: [November 14, 2002, 11:16pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/17 "2002-11-14T23:16:43Z")

</div>

> 

```auto
mymc.onPress=function(){
	mymc.startdrag();
}
mymc.onRelease=function(){
	mymc.stopdrag();
}

```

i believe it should work with “this” Inigo:

```php
mymc.onPress=function(){
	this.startdrag();
}
mymc.onRelease=function(){
	this.stopdrag();
}

```

---

<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: [November 14, 2002, 11:32pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/18 "2002-11-14T23:32:49Z")

</div>

It works with either or.

---

<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: [November 14, 2002, 11:46pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/19 "2002-11-14T23:46:46Z")

</div>

lol i am lost(not inbeta). i will just stick with learning to code…

---

<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: [November 14, 2002, 11:47pm UTC](https://forum.kirupa.com/t/jpeg-dynamic-loading-help/8101/20 "2002-11-14T23:47:59Z")

</div>

lol, yeah, you will build yourself up to that point 🙂
