-
1. Re: focusrect problem for dynamic movieclip
kglad Jul 31, 2009 11:09 PM (in response to kkc_mca)what are you trying to do?
-
2. Re: focusrect problem for dynamic movieclip
kkc_mca Jul 31, 2009 11:28 PM (in response to kglad)i want to create a dynamic gallery which scroll the images for flash lite 3.0 with ActionScript 2
I am not able to focus the images
-
3. Re: focusrect problem for dynamic movieclip
kglad Aug 1, 2009 8:03 AM (in response to kkc_mca)you want to allow users to set focus on the images or you're trying to set focus without user interaction?
-
4. Re: focusrect problem for dynamic movieclip
kkc_mca Aug 3, 2009 4:24 AM (in response to kglad)I want to allow users to set focus
-
5. Re: focusrect problem for dynamic movieclip
kglad Aug 3, 2009 7:00 AM (in response to kkc_mca)use:
function createGallery():Void
{
for(var i:Number=0; i<NO_OF_IMAGES;i++)
{
var pImage:MovieClip = tLevel.createEmptyMovieClip("pImage"+i,tLevel.getNextHighestDepth());
pImage.createEmptyMovieClip("targetMC",1);
pImage.onRelease = function ()
{
trace("pImage onRelease called");
}
imgCollection.push(pImage); // inserting the reference into an array for further access
} // end of for loop
_loadImageRef=setInterval(loadImages, 500);
}
function loadImages():Void {
if(imagesLoaded< NO_OF_IMAGES)
{
imgCollection[imagesLoaded].targetMC.loadMovie("image URL"); // loading the image into the movie clip
imagesLoaded++;
}
else
{
clearInterval(_loadImageRef);
}
}
-
6. Re: focusrect problem for dynamic movieclip
kkc_mca Aug 3, 2009 7:34 AM (in response to kglad)I am not able to load the images
-
7. Re: focusrect problem for dynamic movieclip
kglad Aug 3, 2009 7:40 AM (in response to kkc_mca)show the code you used.
-
8. Re: focusrect problem for dynamic movieclip
kkc_mca Aug 3, 2009 7:55 AM (in response to kkc_mca)Sorry for the previous reply
I made a little mistake while copying
yes I am able to load the images
here you are creating one more movie clip in pImage and loading the images in it, am I right?
thanks for your help
-
9. Re: focusrect problem for dynamic movieclip
kglad Aug 3, 2009 12:24 PM (in response to kkc_mca)1 person found this helpfulyes.
when a movieclip is used as a load target its mouse handlers (among other things) are reset. so, you must either wait until loading is complete to assign those mouse handlers or, assign the handlers to a parent movieclip and load into a child target movieclip. i did the latter.
-
10. Re: focusrect problem for dynamic movieclip
kkc_mca Aug 3, 2009 10:54 PM (in response to kglad)How I can know which object is focused ?
I registered an listener to the pImage so that when the user click on the image i would like to display the movie clip name
I tried with the onSetFocus it is giving the previous focused object not the current, how to get the current focus object
pImage.onRelease = onSetFocusFunction;
function onSetFocusFunction(oldFocus) {
trace("onSetFocus called, previous focus was: "+oldFocus);
}
i would like to get the movie clip name when the user clicks on it -
11. Re: focusrect problem for dynamic movieclip
kglad Aug 3, 2009 11:20 PM (in response to kkc_mca)assign whatever property you want to retrieve in your loop when you create pImage.
-
12. Re: focusrect problem for dynamic movieclip
kkc_mca Aug 4, 2009 3:03 AM (in response to kglad)i am assigning the name to movieclip
but i am able to get the previous focus , how i can get the present focus movie clip
-
13. Re: focusrect problem for dynamic movieclip
kglad Aug 4, 2009 8:53 AM (in response to kkc_mca)show your code.