Okay, working on a right-click contextual menu to download jpegs. My particular issue is this: I’ve got the menu working properly, and I can create a new contextual menu item. The issue is this:
ActionScript Code:
[FONT=Courier New][LEFT]clickPic_cmi = [COLOR=#000000]**new**[/COLOR] [COLOR=#0000FF]ContextMenuItem[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]"Save Picture"[/COLOR], savePeg[COLOR=#000000])[/COLOR];
pegMenu_cm.[COLOR=#0000FF]customItems[/COLOR].[COLOR=#0000FF]push[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]function[/COLOR] savePegCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#000000]var[/COLOR] downloadPeg:FileReference = [COLOR=#000000]new[/COLOR] FileReferenceCOLOR=#000000[/COLOR];
downloadPeg.[COLOR=#000080]download[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“Deckard03.jpg”[/COLOR], [COLOR=#FF0000]“Deckard03.jpg”[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]
Where in clickPic_cmi the reference to savePeg is the function to be called. Now, this is where I’m having trouble- I want to be able to pass parameters through the function savePeg, instead of hard-coding specific references. But I can’t get it to work.
Any ideas?
Thanks to everyone who’s been helping me with this problem!