internet.com

Go to WebDeveloper Home


hm-v6-139x61.gif

Database Journal: The Knowledge Center for Database Professionals

find a web host with:
CGI Access
DB Support
NT Servers
UNIX Servers
Telnet Access

advanced search
jobs

Get FREE Development Info via your Email!

The Webdeveloper channel
FlashKit
GIF.com
HiermenusCentral
webdeveloper Jobs
Java Boutique
JavaScript.com
JavaScript Source
ScriptSearch
StreamingMedia World
WDJ
WDVL
WebDeveloper.com
WebReference.com
XMLFiles.com

internet.com
Internet News
Internet Investing
Internet Technology
Windows Internet Tech.
Linux/Open Source
Web Developer
ECommerce/Marketing
ISP Resources
ASP Resources
Wireless Internet
Downloads
Internet Resources
Internet Lists
International
EarthWeb
Career Resources

Search internet.com
Advertise
Corporate Info
Newsletters
E-mail Offers

internet.commerce
Be a Commerce Partner










T U T O R I A L S
WebDeveloper.com

Tutorial: RealSystem G2 & SMIL

By Scott Clark

Part 4

To create a fade in with your first image, you'll tell the G2 Player when to start the fade and how long to take for the fade to be completed. Since you told the Player when to start the presentation (in the header you told it to start at second zero--immediately), and you told it the time format you'll be using, you can now tell it to start a transition immediately:

<fadein start="0" duration="3" target="1"/>
This indicates that the fade-in starts at second 0, that it targets image number "1", (remember that the first image is handle="1") and that the whole transition lasts three seconds. That means that when this entire effect is over, it will be second 3 in the timeline. Time for the next effect--a zoom!
<viewchange start="4" duration="3" srcx="64"
srcy="64" srcw="128" srch="96"/>
A "viewchange" effects the image currently being shown in the G2 Player, which in this case would be image one. Since we finished the fade-in (above) in three seconds, this viewchange should start on second 4, and it should last three seconds (until second 7). The "srcx" and "srcy" indicates the X and Y coordinate of the source rectangle, and the "srcw" and "srch" indicates the width and height of the source rectangle respectively.

We could have also specified which section of the viewing area to display the "zoomed" rectangle, but the default is to take up the entire viewing area, which in this case is what I was after anyway.

Once we've zoomed in on the image, we want the image to fade into the next image, so we'll use a cross-fade:

<crossfade start="6" duration="3" target="2"/>
Once again, we have to indicate which image to target, when to start it (we start this one second before the last effect is finished, so we achieve a "movie" type effect), and how long the effect should take. Now that we've finished three effects, you can see how the timeline is achieved. Next we proceed with the second image in much the same manner:
<image handle="2" name="shroud.jpg"/>
<fadein start="9" duration="3" target="2"/>
<crossfade start="14" duration="3" target="3"/>
You can see that we target the fade-in to the second image, but we target the cross-fade to the upcoming third image. We do the same for the third and last image, adding another zoom and a couple fades:
<image handle="3" name="roots.jpg"/>
<fadein start="15" duration="3" target="3"/>
<viewchange start="18" duration="3"
  srcx="64" srcy="64" srcw="128" srch="96"/>
<crossfade start="23" duration="3" target="4"/>

[Move on to the next part of the article.]

This article first appeared in May, 1998.

Fast Jump to Anywhere on WebDeveloper.com:


Contact the WebDeveloper.com staff

Last modified: 20

 

Refresh Daily
Join Editor-in-Chief David Fiedler The Editor With No Time and find truth, justice, and a clue or two.


Browse by Category
[ Site Map ]

ActiveX / VBscript
Animated GIF Archive
Browsers
CGI / Perl
Database Connectivity
Design / Graphics
E-Commerce
HTML-Advanced: DHTML, CSS
HTML / Site Authoring Tools
Intranet/Groupware
Java
JavaScript
Multimedia: Audio / Video / Streaming Technologies
Opinions
Refresh Daily: Editorial Column
Security
Servers & Server Tools
Site Design / Graphics
Site Management / Marketing / Log File Analysis
Tutorials
VRML / 3D
XML