mike chambers | about

Dynamically Inserting images without knowing the image type

Generator has a separate image object for each of the image types it supports :

If you are not sure the type of image that will be inserted into the Generator template then you have to do one of two things :

  1. Create a movie clip with a layer for each image type that may be inserted. On each layer, place an insert [image] object, one on each layer.

Make sure that they are the same size and have the same property, and then for the image name, place the same Generator variable in object. Then when Generator processes the template, it will attempt to insert the image into each object, but only the correct object will work. Other than throwing some errors this will work fine.

  1. The other option is to use the Custom Insert Image object. It determines the type of image that is being inserted and then passes it onto the correct Generator image object.

You can download the object from the Macromedia Flash / Generator exchange.

Tags:
twitter github flickr behance