Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432

    Flash: Disable Right-Click

    Hello everyone,

    I searched a bit on the forums to find a way to disable the flash right-click without setting enabled to false (I still need interaction with the object) and without putting it in a web object. I didn't find anything satisfying.

    Is there any other way? (note: I can't edit the SWF to disable the right-click).

    A post by Corey made back in 2004 is saying no, however is there anything new in those last four years?

    Thanks a lot!
    Fox
    Last edited by FoxLeader; 04-27-2008 at 04:04 PM.

  2. #2
    Join Date
    May 2006
    Posts
    5,380
    im needing do the same but have been putting it off, so i will be intrested to see any comments about this
    Open your eyes to Narcissism, Don't let her destroy your life!!

  3. #3
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475

    DisableMouse.dll

    If i read this post correctly, you want to disable the right click. I remember time ago posting here DisableMouse.dll. One of the functions (DisableRightClick) could do the job. See if it does what you're after.

    With Kind Regards
    sside

  4. #4
    Join Date
    May 2006
    Posts
    5,380
    yes, used with worms "IsInRect" function this could be just the ticket


    EDIT, yup, just the ticket


    put in global
    Code:
    function IsInRect(m_nX, m_nY, m_tblPos, m_tblSize)
    	local bReturn = false;
    	if (m_nX >= m_tblPos.X) and (m_nX <= m_tblPos.X + m_tblSize.Width) then
    		if (m_nY >= m_tblPos.Y) and (m_nY <= m_tblPos.Y + m_tblSize.Height) then
    			bReturn = true;
    		end
    	end
    	return bReturn;
    end
    put in on mouse move event
    Code:
    if IsInRect(e_X, e_Y,  Flash.GetPos("Flash1"), Flash.GetSize("Flash1")) then
    	DLL.CallFunction("AutoPlay\\Docs\\DisableMouse.dll", "DisableRightClick", 1, DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL);
    else
    	DLL.CallFunction("AutoPlay\\Docs\\DisableMouse.dll", "DisableRightClick", 0, DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL);
    end
    Thanks sside
    Open your eyes to Narcissism, Don't let her destroy your life!!

  5. #5
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432
    Wow, that's outstanding. Thanks a lot guys

  6. #6
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432
    Do any of you have that DLL? I found the topic here: http://www.indigorose.com/forums/showthread.php?t=18732 but it's down, and I haven't been able to find it in any of your ".Net extensions" volumes.

    Thanks again! (When I'll have done what I wanted, I hope you'll like it as I do )

  7. #7
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    475
    DisableMouse library thread is updated.

    DisableMouse.dll can also can be found at Ams .Net Extensions Volume 1
    http://indigorose.com/forums/showthr...t=DisableMouse

    With Kind Regards
    sside

  8. #8
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432
    I did a search in the forums and didn't find it. Anyway, thanks a lot!

  9. #9
    Join Date
    May 2006
    Posts
    5,380
    soz, i had it in my sside folder and dident think to post it
    Open your eyes to Narcissism, Don't let her destroy your life!!

  10. #10
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432
    np

    Isn't it possible to dynamically add that code to the page's event?

    Here's what I got (I tried it on page's On Show):
    Code:
    sCurrentActivePage = Application.GetCurrentPage();
    
    -- Get the script existing in the event
    sPreviousPageScript = Application.GetPageScript (sCurrentActivePage, "On Mouse Move");
    
    -- Set the AddToPageScript value
    sAddToPageScript = "if IsInRect(mouseX, mouseY,  Flash.GetPos(\"Flash1\"), Flash.GetSize(\"Flash1\")) then DLL.CallFunction(\"AutoPlay\\Components\\mouse.dll\", \"DisableRightClick\", 1, DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL); else DLL.CallFunction(\"AutoPlay\\Components\\mouse.dll\", \"DisableRightClick\", 0, DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL);end"
    
    -- Add the mouse move and flash right click disable to the end
    sNewPageScript = sPreviousPageScript .. "\r\n" ..sAddToPageScript;
    
    -- Set the event's script
    Application.SetPageScript(sCurrentActivePage, "On Mouse Move", sNewPageScript );
    I figured that since e_X and e_Y are local variables (aren't they?) I couldn't use them On Show so I added this to On Mouse Move:
    Code:
    mouseX = e_X
    mouseY = e_Y
    But this doesn't work either... any idea?

  11. #11
    Join Date
    May 2006
    Posts
    5,380
    ok, in the script you add to the page, remove ";", << is the lua character for EOL (end of line, this tells the lua engine thats its the end of the line of code)

    try this
    Code:
    sCurrentActivePage = Application.GetCurrentPage();
    
    -- Get the script existing in the event
    sPreviousPageScript = Application.GetPageScript (sCurrentActivePage, "On Mouse Move");
    
    -- Set the AddToPageScript value
    sAddToPageScript = "mouseX = e_X \r\n mouseY = e_Y \r\n if IsInRect(mouseX, mouseY,  Flash.GetPos(\"Flash1\"), Flash.GetSize(\"Flash1\")) then \r\n DLL.CallFunction(\"AutoPlay\\Components\\mouse.dll\", \"DisableRightClick\", 1, DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL)\r\n else \r\n DLL.CallFunction(\"AutoPlay\\Components\\mouse.dll\", \"DisableRightClick\", 0, DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL)\r\n end"
    
    -- Add the mouse move and flash right click disable to the end
    sNewPageScript = sPreviousPageScript .. "\r\n" ..sAddToPageScript;
    
    -- Set the event's script
    Application.SetPageScript(sCurrentActivePage, "On Mouse Move", sNewPageScript );
    Open your eyes to Narcissism, Don't let her destroy your life!!

  12. #12
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432
    This didn't work :s

    I'll post an apz in a few minutes.

  13. #13
    Join Date
    May 2006
    Posts
    5,380
    here, this works

    Code:
    sCurrentActivePage = Application.GetCurrentPage();
    
    -- Get the script existing in the event
    sPreviousPageScript = Application.GetPageScript (sCurrentActivePage, "On Mouse Move");
    
    -- Set the AddToPageScript value
    sAddToPageScript =[[
    if IsInRect(e_X, e_Y,  Flash.GetPos("Flash1"), Flash.GetSize("Flash1")) then
    	DLL.CallFunction("AutoPlay\\Docs\\DisableMouse.dll", "DisableRightClick", 1, DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL);
    else
    	DLL.CallFunction("AutoPlay\\Docs\\DisableMouse.dll", "DisableRightClick", 0, DLL_RETURN_TYPE_LONG, DLL_CALL_CDECL);
    end
    ]]
    -- Add the mouse move and flash right click disable to the end
    sNewPageScript = sPreviousPageScript .. "\r\n" ..sAddToPageScript;
    
    -- Set the event's script
    Application.SetPageScript(sCurrentActivePage, "On Mouse Move", sNewPageScript );
    Open your eyes to Narcissism, Don't let her destroy your life!!

  14. #14
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432
    I'm having an error !?!
    "attempt to index local 'm_tblPos' (a nil value)"
    Here's also the stripped-down *.apz.

    EDIT: Now it is
    EDIT2: Sorry, now it's the good one.
    Attached Files
    Last edited by FoxLeader; 04-28-2008 at 05:56 PM.

  15. #15
    Join Date
    May 2006
    Posts
    5,380
    you dident set the right name in the script, the object you created is called "CoverFlow" and the object in the script is called "Flash1"

    edit, sorry...change "Flash1" to "jsdakjdasadsdgdfkglka" ... lol, like the name

    edit...again

    thats pertty dam neat, just having a little play.....i like it
    Last edited by RizlaUK; 04-28-2008 at 06:06 PM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

Similar Threads

  1. How to disable popup menu for FLASH OBJECT ?
    By dmla in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 04-07-2004, 02:17 AM
  2. right click disable in application not html
    By thesven in forum AutoPlay Media Studio 4.0
    Replies: 8
    Last Post: 08-20-2003, 09:05 PM
  3. disable or eliminate dubble click
    By ovm in forum AutoPlay Media Studio 4.0
    Replies: 3
    Last Post: 02-17-2003, 09:24 AM
  4. HOWTO: Install the Flash Player from a CD-ROM
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-29-2002, 04:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts