-
Trouble loading an image
OK, I'm trying to load a jpg from my hard drive into a blank movie clip.
The clip's name is "picDisplay" and the photo file, as it resides in the same folder as my .fla file, is "photo.jpg".
Here is the AS attached to my button:
code:
on(release){
picDisplay.loadMovie("photo.jpg");
}
I'm using MX 2004
edit: Forgot to ask a question . Nothing is loading up when I press the button. What could I be doing wrong?
Last edited by agape; 10-05-2004 at 09:21 PM.
-
use this code
code: on(release){
loadMovie("???.jpg",_root.picDisplay);
}
Last edited by x_ash; 10-05-2004 at 09:47 PM.
Work hard... Play harder
-
Is picDisplay also the instance name of the container clip on stage, and not just it's Library name?
Have you tried adding _root?
code:
on(release){
_root.picDisplay.loadMovie("photo.jpg");
}
-
i guess the output of our code is the same oldnewbie.. =)
Work hard... Play harder
-
Yeah! Sure looks like it... Now that you've edited your's though!
I did also ask about the instance name... Which you didn't, and that would keep your script from working also!
-
Originally posted by oldnewbie
Is picDisplay also the instance name of the container clip on stage, and not just it's Library name?
Have you tried adding _root?
code:
on(release){
_root.picDisplay.loadMovie("photo.jpg");
}
Yup, it was that instance thing in the name...thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|