Controlling RealPlayer Playback Flash

If you use ActionScript in a Flash movie to control playback of the movie’s timeline (for example, gotoAndPlay() and stop()), then you’ll lose synchronization with your RealAudio track. Although RealPlayer will recognize Flash actions that are compatible with .SWF version 4 or earlier, it will not apply those actions to other tracks that are running simultaneously. To control the RealPlayer, you need to use a special getURL action on a Flash event handler (for example, a keyframe or a Button instance).

To send playback commands to RealPlayer from your Flash movies, do the following:

  1. In Flash 5, open a Flash movie that you want to convert to a tuned Flash .SWF.
  2. Select (or add) a Button instance that will control both the Flash movie timeline and any other tracks that will play along with your Flash content in RealPlayer. Or, you can select a keyframe on your Flash timeline.
  3. Open the Actions Panel (in Normal Mode). If you used a Button instance in Step 2, then add an onMouseEvent action and choose your desired mouse event (for example, press, release, and so on). If you selected a keyframe in Step 2, then you don’t need this action.
  4. Add a getURL action, and for the URL option, use one of the following RealPlayer commands:
    • command: pause(): This halts playback of all content playing in RealPlayer. All timelines in the Flash movie, including those of Movie Clips, stop on the current frame.
    • command: play(): This command tells RealPlayer to resume playback of all content.
    • command: stop(): This command stops playback and rewinds all content tracks to their respective starting points.
    • command: seek(time): The seek command sends all content tracks to the specified time and resumes playback. Time is denoted in the format dd:hh:mm:ss.xyz, where dd is the day, hh is the hour, mm is the minute, ss is the second, and xyz are the fraction of the second. If you omit the decimal point, then RealPlayer reads the last two digits as the seconds.

For example, command:seek(1:00) sends all playing tracks to the point where 1 minute has elapsed. command:seek(1:00:00) sends all playing tracks to the point where 1 hour has elapsed. If you add the following getURL action to a Flash keyframe or Button instance, the RealPlayer will go to the timeline position at 45 seconds on the Flash and RealAudio tracks:

getURL(“command:seek(45)”);

However, if you add a gotoAndPlay() or gotoAndStop() action to a keyframe or Button instance*, then only the Flash track will proceed to the new time position. All other Real tracks will continue to play from their current positions



Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Flash Topics