SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jan 2004
    Location
    japan
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy how to load an external jpg and set the position and size

    As title
    I will like to load external jpg file into flash movie, but the image always appear in the top corner, how to load the image in certain position (can i use x and y to tell the position? or any other way??)

    also if the external image files are all in different sizes, but when it load into flash movie how to set the image in same size? for example inside the image folder there are two jpg files which is 100X50 and 120X40. flash movie likes to load both two images in certain place which have to reduce the size into 50X30! how to make it work???

    can anyone help me please?
    EC

  2. #2
    always learning . . .
    Join Date
    Nov 2003
    Location
    UK
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    to load a jpeg dynamically use
    Code:
    loadMovie("URLtopicture.jpg", instance name to load to)
    The above will load the jpeg in place of the MC with the instance using its co-ordinates! position it where you wish and it shall load there! or can use

    image._x and same with y to set position

    height and width can be used by image._height = 50 and image._width = 50 etc etc

    It is advisable first as flash isnt the ultimate best for picture handling to make them reasonably close to the correct size before!

    Hope it helps

  3. #3
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When loading jpegs, the clip you load the image into cannot be modified. Instead you need set the x and y of a container clip. For instance. Make a clip and put a nested clip in it called foo at 0,0.

    Code:
    _root.attachMovie("holder", 0);
    holder.foo.loadMovie("some.jpg");
     
    //After jpeg loads, set holder._x and holder._y
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  4. #4
    SitePoint Member
    Join Date
    Jan 2004
    Location
    japan
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ??? why it doesn't work????
    aaaa I don't understand why????
    anyone can show me sample file please??


Bookmarks

Posting Permissions

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