i just did a little test on moving a dynamicly loaded image, but it won’t move.
Anybody an idea what i am doing wrong here, if i make a pure actionscript shape,this style of coding does work.
The jpg is in the same folder as the Fla and i think it should move to the right now but it won’t.
(this could categorize as a dumb question , but yeahh anywayzz!!?.
WHAT AM I DOING WRONG HERE, i want my test.jpg 2 move!!!
Hey 2 All , i posted the same question in different forums, swampy from FlashKit showed me a way 2 make the dynamic jpg move but We don’t know why it does work and the first way does not.
THIS DOES NOT WORK
//-----------------------------------------------------
this.createEmptyMovieClip(“jpgHolder”,1)
jpgHolder.loadMovie(“test.jpg”)
jpgHolder._xscale=20
jpgHolder._yscale=20
jpgHolder._x=200
jpgHolder._y=200
BUT THIS DOES WORK
//-------------------------------------------------------
this.createEmptyMovieClip(“jpgHolder”, 1);
jpgHolder.loadMovie(“image1.jpg”);
jpgHolder._xscale = 20;
jpgHolder._yscale = 20;
jpgHolder._x = 200;
jpgHolder._y = 200;
function movejpgHolder()
{
jpgHolder._x += 10;
}
setInterval(movejpgHolder, 10);
//-------------------------------------------------------
AND THIS ALSO WORKS
//-------------------------------------------------------
this.createEmptyMovieClip(“jpgHolder”,1)
jpgHolder.loadMovie(“image1.jpg”)
jpgHolder._xscale=20
jpgHolder._yscale=20
jpgHolder._x=200
jpgHolder._y=200
well the second two methods us image1.jpg where as the first uses, test.jpg. I would suggest right off the bat checking “test.jpg” to make sure it is not a “progressive” jpg. Flash will not load progressives and is the most common problem with loading images.
i don’t know the difference, but i do know flash won’t accept progressive jpg’s.
Brainsey at actionscript.co gave me this expenation of my original problem with the jpg movement:
//-----------
With the first method the loadMovie action replaces any pre-existing onEnterFrame action. If you go Control->Test Movie->List Variables you will see no onEnterFrame defined.
By setting this.onEnterFrame, ‘this’ actually refers to _level0 so the method is not affected by loadMovie. Likewise, calling an function on interrupt won’t be affected.
The other way round it is to create a controller mc in jpegholder
and define controller.onEnterFrame.
//—
i found it a very useful explenation, so i posted it here.
*Originally posted by david *
**well the second two methods us image1.jpg where as the first uses, test.jpg. I would suggest right off the bat checking “test.jpg” to make sure it is not a “progressive” jpg. Flash will not load progressives and is the most common problem with loading images. **
progressive jpg don’t show in stage so it is no progressive jpg, that is not the problem.
And you’re right about image and test, they should all be test.jpg or image,jpg, this is also not the problem, i tested with test.jpg but when i posted i forgot that image was still there instead of test.jpg.
Thanx 4 your time david
greetz from deamothul - the script keeper -
well if it’s not the progressive issue, I’d say that it is directly related to the method of creating that function, on an item that is attached to another mc.
It’s probebly just the path you used.