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.
system
November 13, 2002, 9:34pm
2
It should work.
Are your images in the same folder as your .swf file?
system
November 13, 2002, 9:37pm
3
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??
system
November 13, 2002, 10:03pm
5
Yep… the color setting is “web graphics default”
Am I crazy?
system
November 13, 2002, 10:06pm
6
i just did it. check it out. this was my code. yours is a lot alike so it should work.
// 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
system
November 13, 2002, 10:08pm
7
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.
system
November 13, 2002, 10:15pm
8
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.
system
November 13, 2002, 10:32pm
9
i added
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.
system
November 14, 2002, 12:40am
10
The images were saved progressively; the weren’t mine and I didn’t know.
Sweet. Thanks for the help.
system
November 14, 2002, 2:23am
11
mdipi…
image_mc.onMouseDown = function() {
this.startDrag(image_mc,flase);
}
so, all you’re missing is this.
system
November 14, 2002, 2:26am
12
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.
system
November 14, 2002, 2:30am
13
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.
system
November 14, 2002, 2:46am
14
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:
mymc.onPress=function(){
mymc.startdrag();
}
mymc.onRelease=function(){
mymc.stopdrag();
}
if you are putting code on the actual mc:
on(press){
this.startdrag();
}
on(release){
this.stopdrag();
}
sorry for the mixup.
system
November 14, 2002, 8:23pm
15
Princess bride fanatic huh? Def a good flick…
system
November 14, 2002, 8:53pm
16
no big deal, but thanks for the clarifaction.
system
November 14, 2002, 11:16pm
17
mymc.onPress=function(){
mymc.startdrag();
}
mymc.onRelease=function(){
mymc.stopdrag();
}
i believe it should work with “this” Inigo:
mymc.onPress=function(){
this.startdrag();
}
mymc.onRelease=function(){
this.stopdrag();
}
system
November 14, 2002, 11:46pm
19
lol i am lost(not inbeta). i will just stick with learning to code…
system
November 14, 2002, 11:47pm
20
lol, yeah, you will build yourself up to that point