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 03-25-2011, 07:51 AM
CrackBerry Addict
Device(s): Curve 8520!
Carrier: Du
 
Location: In a land far, far away...
Join Date: Oct 2010
Posts: 458
Likes Received: 0
Thanked 85 Times in 41 Posts
Default Canceling out code?

Okay, not sure if i can get an answer, but we'll see how good you guys are...

So i have a normal button, call it Button1. I added a code to that button so whenever it focuses in, it gets smaller. So far so good.

But let's say, that now i want another button, and when i click on it, the other button stays the same when i focus in on it. So basically, i want to annul code before using a button. What's the code for that?

Thanks!
Reply With Quote Tip this Post
  #2  
Old 03-25-2011, 02:48 PM
CrackBerry Master
Device(s): 9850 7.1.0.402 + PlayBook 16Gb
Carrier: Verizon
Pin: PM me for it!
 
Location: Eastern Shore of MD
Join Date: Sep 2008
Posts: 1,091
Likes Received: 119
Thanked 217 Times in 126 Posts
Default

Can you explain your question a little more? I've read this a couple of times and am not quite 100% sure on what you are asking?

Russ.
__________________
"If anyone would come after me, let him deny himself and take up his cross and follow me" - Matthew 16:24

Follow me on twitter: graymatteron
Reply With Quote Tip this Post
    Thread Author   #3  
Old 03-25-2011, 09:10 PM
CrackBerry Addict
Device(s): Curve 8520!
Carrier: Du
 
Location: In a land far, far away...
Join Date: Oct 2010
Posts: 458
Likes Received: 0
Thanked 85 Times in 41 Posts
Default

Sorry bout that.

I have three buttons, Button1, Buttton2, and Button3. I added code to the SVG such that when Button1 is focused, It gets smaller. Now I want to add some code to the SVG such that when I click on Button3, Button1 stops getting smaller whenever I focus on it, and when I click on Button2, it continues to get smaller. Basically like an on/off switch for code.

Is this possible? If yes, what's the code for it?
Reply With Quote Tip this Post
  #4  
Old 03-25-2011, 10:26 PM
CrackBerry Master
Device(s): 9850 7.1.0.402 + PlayBook 16Gb
Carrier: Verizon
Pin: PM me for it!
 
Location: Eastern Shore of MD
Join Date: Sep 2008
Posts: 1,091
Likes Received: 119
Thanked 217 Times in 126 Posts
Default

Ok, now I understand what you're asking.

There's no easy way to turn code on and off in SVG, but there is a workaround for this sort of thing. I'd do it like this:

Create two variants of button1 called button1a and button1b, put them both in the same place. Button1a has code that makes it smaller on button1a.focusin, button1b does not. In addition, button1a starts as visible and button1b starts hidden.

Button2 sets button1a visible on focusin and button1b to hidden on focusin. Button3 does the opposite. Effectively, buttons 2 & 3 turn one variant of button1 off and the other on.

In SVG this would look something like this:

Code:
<animateTransform xlink:href="#button1a" attributeName="transform" type="scale" to="0.5" fill="freeze" begin="button1a.focusin"/>

<set xlink:href="#button1a" attributeName="display" to="inline" begin="button2.activate"/>
<set xlink:href="#button1b" attributeName="display" to="none" begin="button2.activate"/>

<set xlink:href="#button1a" attributeName="display" to="none" begin="button3.activate"/>
<set xlink:href="#button1b" attributeName="display" to="inline" begin="button3.activate"/>
Hope this helps!

Russ.
__________________
"If anyone would come after me, let him deny himself and take up his cross and follow me" - Matthew 16:24

Follow me on twitter: graymatteron
Reply With Quote Tip this Post
    Thread Author   #5  
Old 03-25-2011, 10:42 PM
CrackBerry Addict
Device(s): Curve 8520!
Carrier: Du
 
Location: In a land far, far away...
Join Date: Oct 2010
Posts: 458
Likes Received: 0
Thanked 85 Times in 41 Posts
Default

Oh...Got it now

Thanks, Russ!!

Posted from my CrackBerry at wapforums.crackberry.com
Reply With Quote Tip this Post
Reply
BlackBerry Forums at CrackBerry.com > > BlackBerry Professionals > Theme Developers   Canceling out code?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes