Get an ac adapter matching the voltage of battery required for the toy. The adapter comes with a male pin. Cut that off, then you should have a set of 2 exposed ends of the wire. Use a multimeter to determine the polarity of the 2 ends. Match it with the polarity of the battery terminal inside the toy. Tape everything nicely, so no part of the metallic wire is exposed. Switch on the adapter, and your toy is ready to work on electric power supply.