I have a graph, and I want my EdgeRenderingFunction to colour the edges based on the vertex they originate from. In this toy example, I'm trying to get the edge originating from vertex 1 to be red:
GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 5 -> 1, 5 -> 2, 5 -> 3, 5 -> 4,
1 -> 4, 3 -> 5, 3 -> 3},
EdgeRenderingFunction -> (If[First[#1] === 1, {Red, Line[#1]},
Line[#1]] &), VertexLabeling -> True]

What am I doing wrong? I was following the (slightly more complicated) model given in the Mathematica documentation:
GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 5 -> 1, 5 -> 2, 5 -> 3, 5 -> 4,
1 -> 4, 3 -> 5, 3 -> 3},
EdgeRenderingFunction -> (If[
Length[#1] > 2, {Red, Line[#1],
Text[If[First[#1] === Last[#1], "loop", "multiedge"],
LineScaledCoordinate[#1, .7], Background -> White]},
Line[#1]] &), VertexLabeling -> True]



GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 5 -> 1, 5 -> 2, 5 -> 3, 5 -> 4, 1 -> 4, 3 -> 5, 3 -> 3}, EdgeRenderingFunction -> (If[First[#2] === 1, {Red, Line[#1]}, Line[#1]] &), VertexLabeling -> True]? – b.gatessucks Oct 22 '12 at 12:19