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 02-10-2011, 11:38 AM
CrackBerry Abuser
Device(s): Unlocked 9700 (Bold) / 32GB Playbook
Carrier: Rogers
Pin: hrm...
 
Location: Toronto, Canada
Join Date: Nov 2010
Posts: 264
Likes Received: 2
Thanked 16 Times in 15 Posts
Default SVG Coding help - 2D rotating wheel

I am trying to create a 2D rotating ring. For testing purposes (to understand svg coding a little more) I only created 3 buttons.

Each on its own layer(icon1,2,3). I expect I need to rotate each layer accordingly using the Transform, Translate XY coordinates. For the life of me I can't figure it out entirely…I would like the focus to always be at the same position while rotating the icons through that focus…



For arguments sake this is my setup:


-----Icon2-----

Icon1-----Icon3



Icon1 – 129, 291

Icon2 – 206, 252

Icon3 – 283, 291



I have 3 sets of Transform code for each Layer and tried using the difference in XY between Icon1,2,3 to move the according layer….I can't quite get it…



Please help I am totally lost....
__________________
32GB Playbook
Unlocked Bold 9700 - Berrylicious VI Hybrid

Last edited by Justam; 02-10-2011 at 11:47 AM.
Reply With Quote Tip this Post
  #2  
Old 02-10-2011, 12:42 PM
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

are you trying to rotate it.. or move it?
translate is to move an object from point a to point b... rotate will actually rotate the object.

post your animateTransform code....
__________________
Reply With Quote Tip this Post
    Thread Author   #3  
Old 02-10-2011, 02:27 PM
CrackBerry Abuser
Device(s): Unlocked 9700 (Bold) / 32GB Playbook
Carrier: Rogers
Pin: hrm...
 
Location: Toronto, Canada
Join Date: Nov 2010
Posts: 264
Likes Received: 2
Thanked 16 Times in 15 Posts
Default

I am away from my computer at the moment but I will post it when I am.

I am trying to move the buttons in a circular fashion eg:

From:
-----icon2-----
Icon1----icon3

To:
-----icon1-----
Icon3----icon2

Or:
-----icon3-----
Icon2----icon1

Etc...

Posted from my CrackBerry at wapforums.crackberry.com

Posted from my CrackBerry at wapforums.crackberry.com
Reply With Quote Tip this Post
    Thread Author   #4  
Old 02-10-2011, 03:20 PM
CrackBerry Abuser
Device(s): Unlocked 9700 (Bold) / 32GB Playbook
Carrier: Rogers
Pin: hrm...
 
Location: Toronto, Canada
Join Date: Nov 2010
Posts: 264
Likes Received: 2
Thanked 16 Times in 15 Posts
Default

This is how I was thinking it would work...

Original placement XY
left----------center-------right
129, 291----206, 252----283, 291

Difference in XY
Left to center-----Center to right-----right to left
77, -39---------------77, 39--------------154,0


Code:
<animateTransform xlink:href="#Icon1" id="_anim_bp081" attributeName="transform" type="translate" to="77,-39" dur="0.5s" fill="freeze" begin="Button_1.focusin" />
<animateTransform xlink:href="#Icon2" id="_anim_bp082" attributeName="transform" type="translate" to="77,39" dur="0.5s" fill="freeze" begin="Button_1.focusin" />
<animateTransform xlink:href="#Icon3" id="_anim_bp083" attributeName="transform" type="translate" to="-154,0" dur="0.5s" fill="freeze" begin="Button_1.focusin" />	
   
<animateTransform xlink:href="#Icon1" id="_anim_bp084" attributeName="transform" type="translate" to="0,0" dur="0.5s" fill="freeze" begin="Button_2.focusin" />
<animateTransform xlink:href="#Icon2" id="_anim_bp085" attributeName="transform" type="translate" to="0,0" dur="0.5s" fill="freeze" begin="Button_2.focusin" />
<animateTransform xlink:href="#Icon2" id="_anim_bp086" attributeName="transform" type="translate" to="0,0" dur="0.5s" fill="freeze" begin="Button_2.focusin" />
	
<animateTransform xlink:href="#Icon1" id="_anim_bp087" attributeName="transform" type="translate" to="154,0" dur="0.5s" fill="freeze" begin="Button_3.focusin" />
<animateTransform xlink:href="#Icon2" id="_anim_bp088" attributeName="transform" type="translate" to="-77,39" dur="0.5s" fill="freeze" begin="Button_3.focusin" />
<animateTransform xlink:href="#Icon3" id="_anim_bp089" attributeName="transform" type="translate" to="-77,-39" dur="0.5s" fill="freeze" begin="Button_3.focusin" />
I figured the .focusin is when the button is in the centered position and thus where the additional layers would be respectively...

I left Button_2 @ 0,0 because in this position the buttons would be at their original locations....am I right in doing so??...and if this is entirely wrong what should I be doing?
__________________
32GB Playbook
Unlocked Bold 9700 - Berrylicious VI Hybrid
Reply With Quote Tip this Post
  #5  
Old 02-10-2011, 04:22 PM
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

that looks ok.. what is it doing?
__________________
Reply With Quote Tip this Post
    Thread Author   #6  
Old 02-10-2011, 11:14 PM
CrackBerry Abuser
Device(s): Unlocked 9700 (Bold) / 32GB Playbook
Carrier: Rogers
Pin: hrm...
 
Location: Toronto, Canada
Join Date: Nov 2010
Posts: 264
Likes Received: 2
Thanked 16 Times in 15 Posts
Default

I uploaded a wmv of the action I was testing out. It's 516kb in a zip file. The free host I am using doesn't allow wmv files so I had to zip it.

http://webdev.99k.org/bb_dev/theme.zip

edit1: I had the svg code wrong gimme a moment let me fix it and reupload....
edit2: ok I sorted it out...I made a silly mistake in numbering the layers in the svg code..It is working now and the link above shows it doing so... the correct code is below.

Code:
<animateTransform xlink:href="#Icon1" id="_anim_bp081" attributeName="transform" type="translate" to="77,-39" dur="0.5s" fill="freeze" begin="Button_1.focusin" />
<animateTransform xlink:href="#Icon2" id="_anim_bp082" attributeName="transform" type="translate" to="77,39" dur="0.5s" fill="freeze" begin="Button_1.focusin" />
<animateTransform xlink:href="#Icon3" id="_anim_bp083" attributeName="transform" type="translate" to="-154,0" dur="0.5s" fill="freeze" begin="Button_1.focusin" />	
   
<animateTransform xlink:href="#Icon1" id="_anim_bp084" attributeName="transform" type="translate" to="0,0" dur="0.5s" fill="freeze" begin="Button_2.focusin" />
<animateTransform xlink:href="#Icon2" id="_anim_bp085" attributeName="transform" type="translate" to="0,0" dur="0.5s" fill="freeze" begin="Button_2.focusin" />
<animateTransform xlink:href="#Icon3" id="_anim_bp086" attributeName="transform" type="translate" to="0,0" dur="0.5s" fill="freeze" begin="Button_2.focusin" />
	
<animateTransform xlink:href="#Icon1" id="_anim_bp087" attributeName="transform" type="translate" to="154,0" dur="0.5s" fill="freeze" begin="Button_3.focusin" />
<animateTransform xlink:href="#Icon2" id="_anim_bp088" attributeName="transform" type="translate" to="-77,39" dur="0.5s" fill="freeze" begin="Button_3.focusin" />
<animateTransform xlink:href="#Icon3" id="_anim_bp089" attributeName="transform" type="translate" to="-77,-39" dur="0.5s" fill="freeze" begin="Button_3.focusin" />
Thanks StaticFX for your replies. I have read some of your posts here at CB, BBthemelab.com and the blackberry.com forums and I appreciate your assistance with the matter.

Now its time to code it for 12 buttons lol....
__________________
32GB Playbook
Unlocked Bold 9700 - Berrylicious VI Hybrid

Last edited by Justam; 02-11-2011 at 01:15 AM.
Reply With Quote Tip this Post
    Thread Author   #7  
Old 02-10-2011, 11:36 PM
CrackBerry Abuser
Device(s): Unlocked 9700 (Bold) / 32GB Playbook
Carrier: Rogers
Pin: hrm...
 
Location: Toronto, Canada
Join Date: Nov 2010
Posts: 264
Likes Received: 2
Thanked 16 Times in 15 Posts
Default

on a different note..I have read about creating an icon for Universal Search however I would very much like to use it as it is in stock os6..simply type and US comes up...do you know of a way to accomplish this? Is there a method of keytrapping and forcing it into a text input which activates US?

I have managed to assign an action for every letter on the qwerty pad that launches US however the input field in US does not contain the value of the key pressed....

I might just launch it via space bar but I would really like to figure this out..having it launch via any qwerty key and then that value that was pressed be present in the search field.

Any insight? If we can send the key press to a text area form then with every key press within that form launch US it should work..question is how to do that lol...
__________________
32GB Playbook
Unlocked Bold 9700 - Berrylicious VI Hybrid

Last edited by Justam; 02-11-2011 at 01:19 AM.
Reply With Quote Tip this Post
Reply
BlackBerry Forums at CrackBerry.com > > BlackBerry Professionals > Theme Developers   SVG Coding help - 2D rotating wheel

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes