You are now sending an int instead of a long and only sending a byte (0 to 255) with Serial.write()
When you use Serial.print() with Arduino it is sending the data as a string made of human-readable ASCII text and you can easily deal with this on Processing side and convert to an int.