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

BlackBerry Themes & Animated Graphics

Reply
New Developer
beav
Posts: 3
Registered: ‎09-23-2009
My Device: Not Specified

Composer: Looping frames?

I'm attemping to create a theme using Plazmic 4.7 update for a Tour/Curve 8900 (480x360).  I have a discrete button on my screen and unless it's rolled over/selected I want it to stay discrete.  The problem I'm running in to is that when the button is highlighted I need for it to stay lit.  I really would like to make it pulse so you know it's selected.  I'm wonder if there is a way to achieve this by looping the 'focus in' state?  I had first considered making a button in Adobe Flash and using it, however from reading, I discovered you can't use a movie clip.  I then tried to make an animated .gif of the pulse and use it as my focusImage, but that hasn't worked either. 

 

The only thing I've found that has worked so far is to stretch the 'focus in' to a high number of frames, but I'm afraid that's going to be too resource intensive.

 

Thanks for you time and any light you could shed on the situation.

Please use plain text.
New Developer
daveastra
Posts: 10
Registered: ‎09-28-2009
My Device: 9500, 8520, 8900

Re: Composer: Looping frames?

hi there, unfortunately i think youve clocked the only way to do this, which as you say will add lots of Kb to the size of your SVG file, as for using animated gif files, it will only play the first frame, which sucks. the only other possible way would be to include an animation, and link that to the `focus in` state, however this once again would use up alot of space.

 

if there is another way then id love to know as iv come across the same problem in the past

impossible is nothing
Please use plain text.
BlackBerry Development Advisor
cartman
Posts: 39
Registered: ‎11-16-2009
My Device: Not Specified

Re: Composer: Looping frames?

You may be able to do this by having triggering an animation for each of the states that you want to animate.  i.e. say you wanted a pulsing button for focus in, then turn the visibility off for everything in focus in.  Create a separate animation that has your pulsing button.  Create two actions for it in focus in that plays the animation and shows the animation.  Then for the other states add a hide action (as we don't want to see the animation anymore).  Also set the visibility to be true for that button.

 

It would be great to have a loop button per state though!

Please use plain text.
New Developer
Doganharp
Posts: 2
Registered: ‎12-09-2009
My Device: All

Re: Composer: Looping frames?

For some reason I can't get an animation to loop continuously. It will only play through once and then stops. It works fine in the composer and then when I load it to the phone only cycles once.

 

The animation is 500 frames long, but I could easily get it down to a fraction of that. Could the sheer length of it be what's preventing it from looping?

 

Please help, I've attempted to loop it in every way I know how.

Please use plain text.
Developer
HourglassThorne
Posts: 35
Registered: ‎11-17-2009
My Device: Not Specified

Re: Composer: Looping frames?

The only possible solution to your issue I can see involves opening up your SVG file and editing it by hand.

 

Open up your SVG in a text editing program like Notepad.  Then look for the <animate...> tags that control the animation related to your Focus In state.  It's somewhere in this tag that you want to insert this text:

 

repeatCount="indefinite"

 

What this does is make it so that all the animation coded inside that animate tag loops infinitely.  Take a look at this sample code I wrote for a winter theme I created to make it snow.  This code controls the animation of the snowflakes and loops the animation continuously.

 

    <animateTransform xlink:href="#Snowflakes" id="_anim_1"
        attributeName="transform" type="translate"
        values="0,-336;0,334"
        keyTimes="0;1"
        dur="6s" fill="freeze" repeatCount="indefinite"/>

 

If this is your first time hand-coding SVG, my suggestion would be to create just one button in Composer, then export the SVG and try editing it, so you don't have to go wading through 5+ buttons worth of coding.



Driving mobile personalization @ Access Lane.
Find over 300 Access Lane themes @ AppWorld.
Follow the artist @ Deviantart.com.
Please use plain text.