Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

field

Status
Not open for further replies.

slasticar

Technical User
Nov 1, 2006
12
0
0
BA
How can I remove picture from the stage whene I click on the stop. I know to this with text but with picture i dont know.I do something like this:

on stopMovie()
member(66).text =""
member(67).picture=""
end


Member 66 is field and I want to this with field 67 .
Thank you
 
This will erase the picture (or whatever the Member holds):

member(67).erase()

But if you just want to remove your picture from the Stage, instead of destroying the Member you can remove it from the Sprite channel:

sprite(1).member = 0

Kenneth Kawamoto
 
Or you can erase the image of a bitmap cast member by setting it to a blank image:

member(67).image = image(1,1,1)

The above line will set it to a white 1x1 pixel 1-bit image.

- Ben
 
It will, but he wants to erase the image in the 'stopmovie' handler, so you probably aren't going to see this.

Incidentally I often do this myself in 'stopmovie' if my movie dynamically creates images using copypixels, but I don't want them saved when saving my movie.

Eg, I have a placeholder image for a tile-mapped game. During play, I build a large tile-map image and display it using a cast member, and when I stop the movie in authoring mode, I want my placeholder image to revert back to a tiny blank image so as not to bloat my .dir source file :)

- Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top