Join Our 3 MILLION+ Members Today! Register Here | Login
Go Back   BlackBerry Forums at CrackBerry.com > BlackBerry Professionals > Theme Developers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
    Thread Author   #1  
Old 08-09-2011, 11:33 AM
CrackBerry User
Device(s): Torch 9800
 
Location: Canada
Join Date: Jun 2011
Posts: 95
Likes Received: 2
Thanked 5 Times in 5 Posts
Default Animated homescreen svg

Ok heres the situation. Torch 9800s seem to have a bug when you have an animated gif on the homescreen and switch back and forth between portrait and landscape. Sometimes the gif will stop working.

So I figured maybe I can create an svg just for the homescreen wallpaper animation, leaving the rest to be customized in theme builder. Im new to svgs, but here is what I did:

In composer I created a new theme for the 9800. I went object>create animation. In the animation edit screen I imported an animated gif I made. I exited the editing and went to interactivity>actions, created a "play animation" action, I have the animation selected in the dropdown, restart>(tried both always and when not active), set to loop forever. In the little preview window the animation seems to play fine.

I then export>svg, I choose rgb blackberry for color, and save it. In Theme builder (a blackberry6 theme I created) I change the homescreen background to the svg i made. I get an error about "The current screen does not support svg 1.0. Your svg may not render correctly on your device. Do you wish to continue loading?" I click ok.

Now I export the theme to a cod, load it up in a 9800 simulator. When the theme turns on I see the last frame of the animation, but never actually see it animate. It just sits there on the last frame. In the svg I do see the call for each image/frame of the animation, and there is a part about the looping:

repeatCount="indefinite" restart="whenNotActive" calcMode="discrete"

So anyone have any ideas?

Damn torches and their gif bug, if they would just play the gif properly this wouldnt be an issue.
Reply With Quote Tip this Post
    Thread Author   #2  
Old 08-10-2011, 04:30 PM
CrackBerry User
Device(s): Torch 9800
 
Location: Canada
Join Date: Jun 2011
Posts: 95
Likes Received: 2
Thanked 5 Times in 5 Posts
Default

This is driving me crazy, Ive been trying different things in composer, importing the gif file, importing the individual frame images, but I cant seem to figure out how to make a homescreen animation svg.
Reply With Quote Tip this Post
    Thread Author   #3  
Old 08-10-2011, 06:30 PM
CrackBerry User
Device(s): Torch 9800
 
Location: Canada
Join Date: Jun 2011
Posts: 95
Likes Received: 2
Thanked 5 Times in 5 Posts
Default

Ok, I have the svg code now for an animated gif homescreen. I got it using the temp folder permissions trick. I got the homescreen svg for 2 different torch themes I made both with an animated homescreen...the main difference between the two is that one never has a problem, the animation always works, and the other the animation eventually freezes, skips, messes up/stops working all together.

The working animation is 12 frames over 1.2sec. The buggy one is 31 frames over 10.9 secs. I noticed some errors in the buggy svg, mainly due to calling the images of the gif out of order....but thats not what was happening when i loaded it on my torch....it would play fine on my phone, for a bit, then mess up. TB must have had a different problem in compiling it the 2 dif times.

Anyway, the code basically looks like this:

Code:
<?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 width="360"
      height="480"
      hotspot-wrap="false"
      version="1.1"
      baseProfile="tiny"
      xmlns="http://www.w3.org/2000/svg"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:pz="http://www.plazmic.com/plazmic_svgt_extents">
  <image id="hs_image_60"
        x="0"
        y="0"
        width="360"
        height="480"
        display="none"
        xlink:href="hs_image_60.png"/>
  <image id="hs_image_61"
        x="0"
        y="0"
        width="360"
        height="480"
        display="none"
        xlink:href="hs_image_61.png"/>
...etc, I take it this is defining the images for:

Code:
<animate id="hs_image_60_ani-display"
        xlink:href="#hs_image_60"
        attributeName="display"
        values="inline;none;none"
        keyTimes="0;0.083333;1"
        dur="1200.000018ms"
        repeatCount="indefinite"/>
  <animate id="hs_image_61_ani-display"
        xlink:href="#hs_image_61"
        attributeName="display"
        values="none;inline;none;none"
        keyTimes="0;0.083333;0.166667;1"
        dur="1200.000018ms"
        repeatCount="indefinite"/>

...etc 

</svg>
Looks basic enough. But is this the best way to do it?
Reply With Quote Tip this Post
    Thread Author   #4  
Old 08-10-2011, 08:38 PM
CrackBerry User
Device(s): Torch 9800
 
Location: Canada
Join Date: Jun 2011
Posts: 95
Likes Received: 2
Thanked 5 Times in 5 Posts
Default

Ok so the bugged out code was wrong in the order of the images called, and in their duration. I changed it manually, ran good in the simulator, loaded it on the phone, and it didnt take long until the animation just froze up. So I guess adding an svg for the animation didnt help any over adding the gif itself. The thing that really doesnt make any sense is that the theme I made with the shorter animation has never froze in 3 weeks of testing...and for that one I have a different animated gif in landscape then i do portrait. You would think that the animated gif bug for the torch would affect it no matter the length of the animation.

Is there any way of coding in some kind of condition that will automatically force it to start at the top of the homescreen svg again whenever your homescreen is in the front (ie the app menu and apps are not up)? If I could make it restart the svg then it would ensure a reset whenever you go back to the homescreen. So if it did freeze up the animation, then it would kinda force a sort of reboot of the code if you just open/closed the app menu.

Im kinda getting the feeling that im talking to myself here. Any help would be appreciated.
Reply With Quote Tip this Post
  #5  
Old 08-11-2011, 08:24 AM
CrackBerry Genius
Device(s): iPhone 4s
Carrier: Verizon
 
Join Date: Nov 2009
Posts: 2,310
Likes Received: 88
Thanked 169 Times in 112 Posts
Default

for some reason... the landscape homescreen interferes with portrait. Try to keep the landscape screen simple. No animation.. no docks.. etc.
__________________
Reply With Quote Tip this Post
    Thread Author   #6  
Old 08-11-2011, 08:29 AM
CrackBerry User
Device(s): Torch 9800
 
Location: Canada
Join Date: Jun 2011
Posts: 95
Likes Received: 2
Thanked 5 Times in 5 Posts
Default

Yea after I had figured that out I started keeping the landscape background a static image, but still its happening. Also I notice it freezing sometimes when I didnt even flip it to landscape, sometimes it happens just because I was in a browser window, and when I back out of it, the animation stops running.
Reply With Quote Tip this Post
Reply
BlackBerry Forums at CrackBerry.com > > BlackBerry Professionals > Theme Developers   Animated homescreen svg

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes