The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > Computer Modding Software > OS Apps and Development
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 07-01-2008, 06:46 PM
What's Jailbreak?
 
Join Date: Apr 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
How to change a page? Insert URL's? With the UIButtonbar... iMovies

First note of all = Making the app with JIGGY APP

Hi guys, thankyou for telling me about the uibuttonbar etc... I
already have a large code but every time I click on one of the other 7
Submenu buttons down the app, it doesnt change the page what I want to
do. I think I am doing something wrong, typing the text etc at wrong
place.

In your answer (i am sounding arrogant sorry) I would like to see
where to type the text like hello.text etc... and how to insert
hyperlinks? Feel free to use my code, I think it's too advanced for
naabs like me atm... I just started , please show it where to enter
the stuff in my code.


Here we go:


// com.indervir.imovies
// /Applications/iMovies.app/main.js


Plugins.load( "UIKit" ); // User Interface Kit, creates the interface.


var window = new
UIWindow( UIHardware.fullScreenApplicationContentRect ); // Content
will appear in rectangle window.
window.setHidden( false );
window.orderFront();
window.makeKey();
window.backgroundColor = [ 1 , 1 , 1 , 1 ]; // White background on
application.


var mainView = new UIView(); // Sets everything on a main view.
window.setContentView( mainView ); // Same as above. Content directed
to main view.


var bar = new UINavigationBar( [0 , 0 , 320 , 48] );
bar.setBarStyle(3); //Style of bar can be changed, look, appearance
etc
bar.showButtonsWithLeftTitle( null , "About");
var title = new UINavigationItem( "iMovies" );
bar.pushNavigationItem( title );
bar.onButtonClicked = function( bar , button )
{
if ( button == 0 )
{
var sheet = new UIAlertSheet( [0 , 0, 200, 60] , 0 );
sheet.setAlertSheetStyle(0);
sheet.setTitle( "About" );
sheet.setBodyText( "Created by Mithu.\n\nYou can watch movies for free
on iMovies using Wi-Fi or 3G. If you have any comments or thanking
please mail: the_darkside_gang...@hotmail.com\nWe are totally against
piracy if you are against iMovies please mail us." );
sheet.popupAlertAnimated( true );
mainView.addSubview( sheet );


}
};


mainView.addSubview ( bar );

var buttons =
[
{
UIButtonBarButtonTag: 1,
UIButtonBarButtonTitle: "Main",
UIButtonBarButtonInfo: "Featured.png",
UIButtonBarButtonSelectedInfo: "Featured_Sel.png",
UIButtonBarButtonType: 0



},


{
UIButtonBarButtonTag: 2,
UIButtonBarButtonTitle: "New",
UIButtonBarButtonInfo: "New.png",
UIButtonBarButtonSelectedInfo: "New_Sel.png",
UIButtonBarButtonType: 0


},


{
UIButtonBarButtonTag: 3,
UIButtonBarButtonTitle: "Popular",
UIButtonBarButtonInfo: "Popular.png",
UIButtonBarButtonSelectedInfo: "Popular_Sel.png",
UIButtonBarButtonType: 0


},


{
UIButtonBarButtonTag: 4,
UIButtonBarButtonTitle: "All",
UIButtonBarButtonInfo: "All.png",
UIButtonBarButtonSelectedInfo: "All_Sel.png",
UIButtonBarButtonType: 0


},


{
UIButtonBarButtonTag: 5,
UIButtonBarButtonTitle: "Web",
UIButtonBarButtonInfo: "Web.png",
UIButtonBarButtonSelectedInfo: "Web_Sel.png",
UIButtonBarButtonType: 0


},


{
UIButtonBarButtonTag: 6,
UIButtonBarButtonTitle: "Coding",
UIButtonBarButtonInfo: "Coding.png",
UIButtonBarButtonSelectedInfo: "Coding_Sel.png",
UIButtonBarButtonType: 0


},


{
UIButtonBarButtonTag: 7,
UIButtonBarButtonTitle: "Request",
UIButtonBarButtonInfo: "Request.png",
UIButtonBarButtonSelectedInfo: "Request_Sel.png",
UIButtonBarButtonType: 0


},


];

// The button bar is created a bit differently - you pass in its
// superview, its frame and the button definition.
// You do not need to do mainView.addSubview( bb )


var bb = new UIButtonBar( mainView , [ -10 , 420 , 330 , 40 ] ,
buttons );


// Style 1 is the cool black one used in the iPod app. 0 is blue -
like a
// navigation bar and 2 is gray.


bb.barStyle = 1;


// Now, you register a group of buttons - you give it a group number
// and an array of button tags. This lets you show entire groups
easily


bb.registerButtonGroup( 1 , [ 1 , 2 , 3 , 4 , 5 , 6 , 7 ] );


// Show that group. The second parameter is a duration for a fading
the
// group in.


bb.showButtonGroup( 1 , 1.0 );


// This selects a button


bb.showSelectionForButton( 1 );


// This adds a "badge" to the button ( a red circle with the string
you pass in)


bb.setBadgeValue( null , null );


// This animates the badge - it blinks


bb.setBadgeAnimated( null , null );


// The event when a button is pressed


bb.onButtonPressed = function( bar , button )
{
// We select the button that was pressed


bb.showSelectionForButton( button );


log( "PRESSED BUTTON:" + button );


log( "SELECTED BUTTON:" + bb.selectedButton );


/*
// This automatically brings up a customize sheet that
// the user can use to re-arrange and add buttons.


if ( button == 3 )
bb.customize( [ 1 , 2 , 3 ] );
*/


// This gives you an array of the currently visible buttons


log( "VISIBLE BUTTONS:" + bb.getVisibleButtonTags().toSource() );


// This is how you can remove the badge


if ( button == 3 )
bb.setBadgeValue( 3 , null );
else
bb.setBadgeValue( 3 , "25" );




I think i need some professional help . I am a beginner pls help me 0o
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > Computer Modding Software > OS Apps and Development

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 10:49 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top