A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: specifying location of loaded jpeg

  1. #1

    specifying location of loaded jpeg

    Hi there,
    I'm using the LoadMovieNum command to load a jpeg file from a website. I have it loaded correctly but I'm not sure how to specify the location of it in my movie. If I use this command to load another swf file, I just put this.x = number and this.y=number in that swf file and it will go to that location. Obviously I can't use this method for a jpeg file. Thanks,

  2. #2
    associate admedia's Avatar
    Join Date
    Oct 2001

    Re: specifying location of loaded jpeg

    Originally posted by stryfe2
    Obviously I can't use this method for a jpeg file.
    Should work exactly the same way.

  3. #3
    Uses MX 2004 Pro Quixx's Avatar
    Join Date
    Nov 2004
    Using loadMovieNum(), sets the image to the level specified. So if you did: loadMovieNum("http://www.yourimage.com/image.jpg", 9);, You'd have to link to "_level9". So you could use: _level9._x = 100;. But the problem here is, if your code is executed before the image has fully loaded, the change will not take effect.

    You could put the code into an "onEnterFrame" event handler to check to see if has finished, and then remove the event handler when it's complete. So you'd have something like this (code placed on the first frame of the main time line):

    loadMovieNum("http://www.yourimage.com/image.jpg", 9);
    onEnterFrame = function () {
    	if (_level9._x != 100) {
    		_level9._x = 100;
    		_level9._y = 50;
    		_level9._xscale = _level9._yscale=80;
    	} else {
    		delete _root.onEnterFrame;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center