View Full Version : 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
02-20-2009, 02:12 PM
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.
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
02-21-2009, 11:43 AM
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.
hmm... and if the graphics are not manually added?
02-21-2009, 01:28 PM
How are they added? I can't help if I don't know what you are doing...
Well...i dont know how they are added :rolleyes:
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
02-21-2009, 05:53 PM
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.
Please can you give me an example of how to load such an image externally... together with XY coordinates.:rolleyes:
Update: Never mind....I have it
but how do I load the picture into the symbol when my picture is in the library and not external
02-22-2009, 11:01 AM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.