[Tex/LaTex] Permanent transparent block

beameroverlays

I have two blocks in one slide. I need to show the first block, while making the other one transparent. However, I don't want the other one to show in the next slide. I just need it permanently transparent.

Later, after several slides, I would like to do the opposite way around.
I tried \onslide, \only, \uncover but all those methods show the first block in the next slide.

Can you tell me how to do this ?

\documentclass{beamer}
\begin{document}
\frame{
\begin{block}{Block1}
\begin{itemize}
    \item 1
    \item 2
\end{itemize}
\end{block}
\begin{block}{Block2}
\begin{itemize}
    \item 4
    \item 5
\end{itemize}
\end{block}
}
\end{document}

Best Answer

Here are two things you might want. Based on your comment in response to kara's answer, I am guessing it is the first you want. However, your use of 'slides' is ambiguous. I think of slides as parts of a beamer frame. So I'm inclined to read you as wanting all of this to happen within a single frame. In case that is what you want, I will include the second possibility as well.

\documentclass{beamer}
\begin{document}

\setbeamercovered{transparent}
\frame<1-2>[label=myblocks]{
  \begin{block}<1-2>{Block1}
    \begin{itemize}
        \item 1
        \item 2
    \end{itemize}
  \end{block}
  \begin{block}<3-4>{Block2}
    This block will only be shown later after the next frame.
    \begin{itemize}
        \item 4
        \item 5
    \end{itemize}
  \end{block}
}
\setbeamercovered{invisible}
\frame{
  Here is another frame with standard covering.
  \begin{itemize}
    \item<2-> This item is invisible on the first slide.
  \end{itemize}}
\setbeamercovered{transparent}
\againframe<3-4>{myblocks}
\frame{
  This frame just keeps the second block transparent on the first two slides and then makes the first transparent for the next two slides with no intervening other frames.
  \begin{block}<1-2>{Block1}
    \begin{itemize}
        \item 1
        \item 2
    \end{itemize}
  \end{block}
  \begin{block}<3-4>{Block2}
    \begin{itemize}
        \item 4
        \item 5
    \end{itemize}
  \end{block}
}
\end{document}