# Loading a Jpg From Acces Database?

**URL:** <https://forum.kirupa.com/t/loading-a-jpg-from-acces-database/13822>\
**Category:** Uncategorized\
**Created:** [February 18, 2003, 5:04pm UTC](https://forum.kirupa.com/t/loading-a-jpg-from-acces-database/13822 "2003-02-18T17:04:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pubs3](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@pubs3](https://forum.kirupa.com/u/pubs3)\
**Post date:** [February 18, 2003, 5:04pm UTC](https://forum.kirupa.com/t/loading-a-jpg-from-acces-database/13822/1 "2003-02-18T17:04:42Z")

</div>

Hi to everyone…

My problem is simple. I did it with a button but a need without button. Here it is ;

I made an asp which was displaying an output from an acces DB like ;

&news=example&news\_image=example.jpg&result=ok

i’m getting the variables to my swf. When i try to load image at Frame 3 there is nothing. Here is the code.

Frame 1  
var news\_img  
loadVariablesNum(“news.asp”, 0);

Frame 3  
news\_img=news\_image  
loadMovie(“news\_img”, “news\_image\_mc”);

Frame 5  
if (result==“ok”) {  
gotoAndStop(7);  
} else {  
gotoAndPlay(3);  
}

Frame 7  
stop();

What’s the problem do you think ? By the way, as i say at the top, button solve the problem but i don’t want users must click a button. it loads the jpg file when the page opened.

Thanx For All…

---

<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 18, 2003, 6:14pm UTC](https://forum.kirupa.com/t/loading-a-jpg-from-acces-database/13822/2 "2003-02-18T18:14:49Z")

</div>

Try:  
loadMovie(news\_img, “news\_image\_mc”);

The quotes around it was thinking it was text instead of a variable.

---

<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 18, 2003, 6:20pm UTC](https://forum.kirupa.com/t/loading-a-jpg-from-acces-database/13822/3 "2003-02-18T18:20:55Z")

</div>

Hi again…

Sorry i do it like you said 🙂 i know it’s a variable so anyway, it’s still not working… :(☹

loadMovie(news\_img, “news\_image\_mc”);

it must be like this but where is the problem ?

---

<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 18, 2003, 6:28pm UTC](https://forum.kirupa.com/t/loading-a-jpg-from-acces-database/13822/4 "2003-02-18T18:28:04Z")

</div>

hard to say, do some testing on it, maybe the path to the variable is wrong. and you’ll need a \_parent or something.

on frame 3:  
trace(news\_img)

then test your movie, if it is even getting there, it will tell you what it’s trying to load.

---

<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 18, 2003, 6:34pm UTC](https://forum.kirupa.com/t/loading-a-jpg-from-acces-database/13822/5 "2003-02-18T18:34:46Z")

</div>

I tried everything… the path of the image and instance name of the movie clip are true. If it’s not true, the button will not load the image, am i wrong ?

tanx for your reply ?

---

<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 18, 2003, 6:44pm UTC](https://forum.kirupa.com/t/loading-a-jpg-from-acces-database/13822/6 "2003-02-18T18:44:25Z")

</div>

what if you hardcode it for testing:  
loadMovie(“example.jpg”, “news\_image\_mc”);

If it’s not loading, check that the swf and jpg are in the same file. And make sure your movieclip is definitely viewable on screen.

That’s all I can think of. You just need to find out where it’s not working.

---

<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 18, 2003, 7:06pm UTC](https://forum.kirupa.com/t/loading-a-jpg-from-acces-database/13822/7 "2003-02-18T19:06:21Z")

</div>

when i give this code at frame 3;

loadMovie(“example.jpg”, “news\_image\_mc”);

it’s working…

but when i give this code ;

loadMovie(news\_image, “news\_image\_mc”);

it’s not working… But when i set this code to a button it’s working… (The trace result is = example.jpg)

Finally it’s working when a button calling this code but when a frame or movie call this code it’s not working… i mean this code ;

[COLOR=blue]loadMovie(news\_image, “news\_image\_mc”);[/COLOR]
