A flash cart SHOULD work with the Action Replay just like a normal cart. The only issue I can see is power - flash carts usually take more power than a regular cart, and the Action Replay also takes more power. Combine the two and you're using well more than twice the power through the cart port. So it's possible that the flash cart and AR together don't work for power reasons. I'd just use something like ucon64 to change the file with the cheat codes, then burn it to flash and try it. If that works, then the AR + flash is clearly where the problem was. If it does the same thing, it's the cheat code that's the problem.