Topic: SimpleViewer Flash Embed / ActionScript API Example

Hello everybody,

I have some issue regarding this example.
i tested succefully this example but i need to do something slighty different.

In my web site i create some pages trought XML files, i load them and attach them to movieclips and store them in an array.
When i need to show the page i get the movieclip from the array,  I attach it to my main root movie clip and make it slide from out the screen to inside the screen.

in simpleViewer gallery example, we have :

mcLoader.addChild(svLoader);
on my side i do :

Nclip = new MovieClip();
Nclip .addChild(svLoader);

so i create a new movie clip and attach the loader to it.
If i do this , i have an issue regarding the embedOptions

var options:Object = Object(svLoader.content).embedOptions;

the embedOptions are null.
In my app i need to attach the loader to my root movie clip, if i want the option to be valid.

for now i cheat , i attach to the root / load / then remove from root and attach to my movie clip. but it lauch a lot of reccurent errors in the simpleViewer.swf ( sorry french )

TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
    at com.airtight.simpleviewer::Preloader/removeMe()
    at com.airtight.simpleviewer::Preloader/onFadeOutDone()
    at com.airtight.simpleviewer::Preloader/doFadeOut()
TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
    at com.airtight.simpleviewer.display.thumbs::ThumbArea/update()
    at com.airtight.simpleviewer.display.components::Base/onInvalidate()

Any advice ?
thanks

Re: SimpleViewer Flash Embed / ActionScript API Example

I isolated the issue.
the loader must be linked to a Movie clip that is linked to the root otherwise it "bug"