ModMyMotoModMyiModMyGphone





Unlocked iPhones


  Apple Forums | ModMyi.com | iPhone, iPod, Mac, OS X, Mods, More > 3rd Party Apps For iPhone | iPod Touch > Web Apps
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-11-2008, 09:45 PM
LukeGab's Avatar
Green Apple
 
Join Date: Apr 2008
Device + Firmware: iPod Touch 1.1.4
Operating System: Windows XP
Location: Nortrh Dakota
Posts: 71
Thanks: 142
Thanked 3 Times in 3 Posts
Send a message via MSN to LukeGab
Random Image Script

Are we allowed to discuss scripting here as it is a Web App forum?

I've been designing a small Web App that rolls up to 5 dice. It all went well until I had two or more dice on the screen using 1 of 6 random images. Can you guess what they did? They both choose the same image every time - so it's always doubles...

I've tried other scripts that use choose from gallery but none have worked so far. The only thing I can thing of now is to use frames, where each dice is its own frame without a border or scroll bar.

Anyone have a working random image script that meets my needs?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 10:01 PM
iPhone? More like MyPhone
 
Join Date: Oct 2007
Posts: 152
Thanks: 5
Thanked 13 Times in 12 Posts

Post what you have for code, as can be done without frames.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3 (permalink)  
Old 04-11-2008, 10:58 PM
LukeGab's Avatar
Green Apple
 
Join Date: Apr 2008
Device + Firmware: iPod Touch 1.1.4
Operating System: Windows XP
Location: Nortrh Dakota
Posts: 71
Thanks: 142
Thanked 3 Times in 3 Posts
Send a message via MSN to LukeGab

Sorry I don't have the code anymore. Deleted it after several failed attempts of editing it.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4 (permalink)  
Old 04-12-2008, 12:27 AM
iPhone? More like MyPhone
 
Join Date: Oct 2007
Posts: 152
Thanks: 5
Thanked 13 Times in 12 Posts

If you had it working with 1 is was way you added 2-6.


Without seeing your code and seeing issue, can only suggest this.

Since dice i assume images named 1.gif 2.gif 3.gif 4.gif 5.gif 6.gif

You are using a random # generator 1-6

You are have 5 place holders by a 1 by 5 array

now there are a # of ways todo this but simpliest way is to use a for loop


For roll of dice 1 to 5
do
result=random code;
placeholder[roll of dice] = [result].gif;

end

Its not coded for you, but you should be able to follow without being spoonfeed.

Last edited by theguyz; 04-12-2008 at 12:33 AM.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums | ModMyi.com | iPhone, iPod, Mac, OS X, Mods, More > 3rd Party Apps For iPhone | iPod Touch > Web Apps

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Go to Top
ModMyI

All times are GMT -6. The time now is 02:24 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 | Dedicated Server Hosting by SingleHop | Copyright © 2007-08 by ModMy, LLC. All rights reserved.

RSS - Contact Us / ModMyi Home / Archive / Privacy Statement - Top

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110