Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10

Thread: move image

  1. #1
    Regular Coder
    Join Date
    Nov 2008
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    move image

    Is there any way to move an image in flash without it being in a movieclip?...i want to change the XY coordinates of a picture

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    I can't recall but I think only buttons, graphics, and movieclips can have an instance name. A plain bitmap should never be on the stage by itself. So convert it to a symbol (can be graphic rather than movieclip if you wish) and then you can apply the instance name for the actionscript.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    Regular Coder
    Join Date
    Nov 2008
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm ok .... my next problem then would be......

    how to turn all images in my library into symbols with actionscript. I have too many images to manually create a symbol for each image..... how can i create the symbol using actionscript if i know the image name in the library..... and to then insert that symbol into a particular frame

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    I don't think you can do that. You can click on each image and hit F8 I believe to have it automatically convert it to a symbol, it might take some time but I think thats the only way if you manually added the graphics.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #5
    Regular Coder
    Join Date
    Nov 2008
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm... and if the graphics are not manually added?

  • #6
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    How are they added? I can't help if I don't know what you are doing...
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #7
    Regular Coder
    Join Date
    Nov 2008
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well...i dont know how they are added

    here is what i am trying to do....


    I have an swf with just one frame but 100 layers. I want to somehow add 100 pictures to the swf either dynamically or pre-imported to the library. Each picture going to a separate layer. Then I want to be able to move the XY position of any picture that i choose .....with actionscript.

    I hope it is clear

  • #8
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    How are you going to decide how each element is positioned? You will have to know exactly where everything should go, which sounds rather complicated.

    Ideally you would have an XML file that has all of the files along with an X and Y positioning. Then you would just load the images externally using actionscript.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #9
    Regular Coder
    Join Date
    Nov 2008
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Please can you give me an example of how to load such an image externally... together with XY coordinates.


    Update: Never mind....I have it

    loadMovie("photo.jpg", symbol)

    but how do I load the picture into the symbol when my picture is in the library and not external
    Last edited by gani; 02-22-2009 at 09:12 AM.

  • #10
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    You have to provide an access point for each image. You do this by right clicking on the image and selecting "Export for Actionscript" and this dialogue gives you the ability to name the file for access with actionscript. Honestly its more frustrating than trying to load images externally especially if you have a lot.

    Use the library when you put images into a movie and don't intend to do much with them.

    Load all other images externally.

    Rules to live by. I'm thinking you just might have to rework your file because you are trying to do things that will only make your life harder if you keep editing the file.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Posting Permissions

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