The Spider-Man actress was recommended to Von Trier to play a depressed woman in the drama, and movie bosses set up a meeting between the pair.
But their busy schedules wouldn't allow a face-to-face chat - so they logged online instead.
Dunst tells Interview magazine, ""I was recommended to him by two directors. Then I got the script and they said he was very interested in me and that we were going to talk the next day.
""We Skyped, and it was a really easygoing, nice meeting. We didn't even talk about the script that much, and then our Skype connection got lost, and we called each other on the phone.
""It was really like the most simple... for the director that he is, it was like the easiest job that I got in so long, it was so simple, it was just like, 'Yes, I'd love you to be in my movie'. 'Great, I'd love to be in it'.""