This content has been marked as final.
Show 15 replies
-
1. Re: Context menu problem
kglad Jul 9, 2008 7:37 AM (in response to tatiana1)show your code using the attach code option in this forum. -
2. Re: Context menu problem
tatiana1 Jul 9, 2008 8:36 AM (in response to tatiana1)Here it is. I do other things once it's loaded, but the ContextMenu bit is here.
var img:MovieClip = _root.p.createEmptyMovieClip("obj"+_root.objIdx, _root.objDpt);
img.menu = _root.rightMenu;
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mclListener);
mcLoader.loadClip(_global.path+"Temp/" + file.name, _root.p["obj"+_root.objIdx]); -
3. Re: Context menu problem
kglad Jul 9, 2008 8:46 AM (in response to tatiana1)1. use the attach code option to display code.
2. show the code that creates your contextmenu and your loader and listener code. -
-
5. Re: Context menu problem
kglad Jul 9, 2008 2:33 PM (in response to tatiana1)assign img's contextmenu in your listener's onLoadInit() method. -
6. Re: Context menu problem
tatiana1 Jul 10, 2008 1:41 AM (in response to tatiana1)I've tried it but it doesn't seem to work.
I noticed that when I have a shape (where the Context Menu works correctly) and a loaded bitmap image (where the Context Menu doesn't work), if I select the bitmap image and right click it, I get Flash's Context Menu (which is not what I want), but if I leave the bitmap selected and position myself over the unselected shape and right click, the correct Context Menu appears and whatever option I choose, correctly affects the bitmap image.
Therefore, the bitmap's Context Menu works correctly, but in order for it to appear, I have to be positioned elsewhere when I right click. Could it be a Flash bug? -
7. Re: Context menu problem
kglad Jul 10, 2008 8:45 AM (in response to tatiana1)i have no trouble applying a contextmenu to a loaded bitmap.
show your corrected code. -
8. Re: Context menu problem
tatiana1 Jul 10, 2008 9:47 AM (in response to kglad)Here is the complete code. I even tried attaching the image to a bitmap and unloading the clip, but the effect is the same. I really appreciate al your help.
-
9. Re: Context menu problem
tatiana1 Jul 10, 2008 9:47 AM (in response to kglad)Here is the complete code. I even tried attaching the image to a bitmap and unloading the clip, but the effect is the same. I really appreciate all your help.
-
10. Re: Context menu problem
kglad Jul 10, 2008 10:38 AM (in response to tatiana1)1. Delete is reserved. use a different name.
2. you need to define objRename() and objDelete().
3. you need to create your listener, mclListener. -
11. Re: Context menu problem
tatiana1 Jul 10, 2008 11:06 AM (in response to tatiana1)Ok, did everything. still no go... :( -
12. Re: Context menu problem
tatiana1 Jul 10, 2008 11:07 AM (in response to tatiana1)P.S. I don't know if this added bit of info may help, but I'm creating all of these objects inside a ScrollPane. -
13. Re: Context menu problem
kglad Jul 10, 2008 11:14 AM (in response to tatiana1)show your corrected code or, test outside a component. -
14. Re: Context menu problem
tatiana1 Jul 11, 2008 2:49 AM (in response to tatiana1)I don't know how, I don't know why, but it seems that the problem corrected itself. I don't think I made any particular change to the code, but now it seems to work correctly. Thanks for all your help!!! -