Pokémon Ruby Version, Sapphire Version, and Emerald Version - Trade Restrictions
A Mew or Deoxys without the so-called "obedience flag" set can’t be traded to or from a Emerald game, FireRed, or LeafGreen. (Normally, Mew and Deoxys have the "obedience flag" set.)
In Pokémon Emerald Version, Pokémon FireRed Version, and Pokémon LeafGreen Version, in battles other than Link Battles, if the obedience flag is not set for Mew or Deoxys, those Pokémon will always disobey even if their 32-bit Trainer ID and OT name match those of the player and even if the player has all Badges.
If a Pokémon with the obedience flag is migrated to a DS game, it will be treated as a Pokémon that had a "fateful encounter".