Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 46
Registered: ‎10-29-2008
My Device: 9700

SVG fade out problem

I'm having an issue with an svg file I created (and successfully ran through the SVGTiny converter).  I originally created this SVG file for the 9000 device and it displayed perfectly there.  

However (using the same file) on the 9700, it doesn't seem to like the fade out part of the file.  The fade in works.  

 

I created this watered down version of the svg file in question that simply fades in, then waits, then fades out the 2 pngs.  On the 9700, it fades in, then remains there until the screen is popped off.  

any help would be great...

 

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="tiny" height="100%" preserveAspectRatio="xMidYMid meet" viewBox="-240 -180 480 360" width="100%">
<g>
<rect height="436" style="fill:#000000; stroke:none;" width="556" x="-276" y="-213"/>
<image height="63" id="Fade2" transform="translate(16)" width="32" x="-16" xlink:href="Fade2_img_1_1.png" y="-31"/>
<image height="63" id="FadeIn" transform="translate(-24)" width="50" x="-25" xlink:href="FadeIn_img_1_1.png" y="-31"/>
</g>
<animate attributeName="visibility" dur="3.2s" fill="freeze" keyTimes="0;1" values="visible;visible" xlink:href="#FadeIn"/>
<animate attributeName="visibility" dur="3.2s" fill="freeze" keyTimes="0;1" values="visible;visible" xlink:href="#Fade2"/>
<animate attributeName="opacity" dur="3.2s" fill="freeze" keyTimes="0;0.375;0.6875;1" values="0;1;1;0" xlink:href="#FadeIn"/>
<animate attributeName="opacity" dur="3.2s" fill="freeze" keyTimes="0;0.375;0.6875;1" values="0;1;1;0" xlink:href="#Fade2"/>
</svg>

 

 

Developer
Posts: 46
Registered: ‎10-29-2008
My Device: 9700

Re: SVG fade out problem

after more testing, it seems that the problem is that 9700 is not respecting multiple opacity transitions at a particular point in the timeline.  Therefore, it's not that it's a "fade out" problem.  

 

tested:

I can fade out if I modify the svg by stripping out the keyTimes but putting in a "from" and "to"

 

<animate attributeType="CSS" attributeName="opacity" from="1" to="0" dur="4.2s" fill="freeze" xlink:href="#FadeIn"/>

 this will fade out.  (swapping the 0 and 1, I can fade in also)  However this assumes that you want to start a fade in or a fade out at the beginning of the animation.  I'm looking to fade out later on in the timeline and the code keyTimes="0;0.375;0.6875;1" values="0;1;1;0" is not working properly

 

has anyone ever come across this yet on the 9700?  

 

 

Developer
Posts: 46
Registered: ‎10-29-2008
My Device: 9700

Re: SVG fade out problem

I was able to get it working by tweaking the svg file using the begin attribute with the to and from also.  I have no idea why Composer 5.0 wouldn't produce a workable svg file for the 9700.  here's an example of what I changed it to...

 

<animate attributeName="opacity" begin="0.60s" dur="2.65s" from="1" to="0" fill="freeze" values="0;0;0;1;1" xlink:href="#FadeIn"/>