The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Mouse-Activated Image-Orbit, A test script I put together
MasterCE
post Jan 30 2007, 05:28 PM
Post #1





Group: Members
Posts: 9
Joined: 30-January 07
Member No.: 1,727



This one time I found a javascript on a forum that makes all images orbit around by putting it in URL. When I joined IMVU, I found out you get to edit your homepage down to HTML and CSS of sections of it (Buddys, Visitors, etc.) Since I'm a noob at this kind of script, I'm not sure how I'd get this to work. It's like Torque script, which is mostly C++, but it's stil confusing. I knew this wouldn't work, but I still tried it.
My page is here: http://www.imvu.com/catalog/web_mypage.php?user=8574331
Info: The image in My Buddies which is bigger then the others is actually the code. I'm trying to test the script so I chose any image for a test. I'm hoping for a script that makes everything orbit while the image has cursor over it (I know, it has to keep still or it'd go back) and stop orbiting and go back to normal positions while it's not on it
CODE
<script type="text/JavaScript">
function A(num) {
if(num) {
  for(i=0; i<DIL; i++) {
  DIS=DI[ i ].style;
  DIS.position='absolute';
  DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5;
  DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5
  }
  R++
}
else {
void( 0 );
}
}
function btnHigh( btnName, hgh ) {
//Display correct button - hgh = 0 = normal button
// hgh = 1 = highlight button
var obtn = document.getElementById (btnName);
if (hgh) {
R=0;
x1=.1;
y1=.05;
x2=.25;
y2=.24;
x3=1.6;
y3=.24;
x4=300;
y4=200;
x5=300;
y5=200;
DI=document.images;
DIL=DI.length;
setInterval('A(1)',5);
void( 0 );
}
else {
A(0);
}
}
</script>
<img id= "btnHome" src="http://userimages.imvu.com/catalog/includes/modules/phpbb2/images/avatars/8196083_93003093345bee0b70098a.jpg"

onMouseOver="java script:btnHigh('btnHome',1);"
onMouseOut="java script:btnHigh('btnHome',0);">

Original:
CODE
java script:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5;DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++} setInterval('A()',5); void( 0 )


This post has been edited by MasterCE: Jan 30 2007, 06:08 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MasterCE
post Jan 30 2007, 06:35 PM
Post #2





Group: Members
Posts: 9
Joined: 30-January 07
Member No.: 1,727



Did I post this on the wrong forum or something?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MasterCE
post Jan 30 2007, 07:36 PM
Post #3





Group: Members
Posts: 9
Joined: 30-January 07
Member No.: 1,727



Thank you for putting it in the right place biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MasterCE
post Jan 31 2007, 03:49 PM
Post #4





Group: Members
Posts: 9
Joined: 30-January 07
Member No.: 1,727



Please help, I found out the script does work, but now it auto-activates and I can't stop it unless I make it to the edit button before the script activates. I took it off the page, btw. This is only a script to help me make my own, that's how I did it with Torque script. A simple example of something I made for use in Torque is here: http://pastebin.com/872382

Edit: Also, I need the script used for deleting windows:
<script type="text/JavaScript">
googlead.delete();
</script>

This post has been edited by MasterCE: Jan 31 2007, 04:25 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Effovex
post Jan 31 2007, 04:27 PM
Post #5


Serious Coder
*****

Group: Members
Posts: 251
Joined: 6-January 07
From: Sherbrooke, Qc, Canada
Member No.: 1,477



It'd help to see a page with your script in action, even if it's just a sample page demonstrating the problem you're experiencing. Can you put one up? I'm not even sure I know what you want to achieve, and the code you provided isn't very self-explanatory.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MasterCE
post Jan 31 2007, 05:50 PM
Post #6





Group: Members
Posts: 9
Joined: 30-January 07
Member No.: 1,727



I'm assuming you didn't read any of what I said and only read the scripts, right?

Please read topic post before claiming somehow has not given information to explain the help he/she needs.

This post has been edited by MasterCE: Jan 31 2007, 05:52 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Effovex
post Jan 31 2007, 06:34 PM
Post #7


Serious Coder
*****

Group: Members
Posts: 251
Joined: 6-January 07
From: Sherbrooke, Qc, Canada
Member No.: 1,477



Your only explanation is that you want stuff to "orbit around", which to me isn't exactly clear. I also see you didn't provide a sample like I asked. I saw nothing orbiting on your homepage and I don't have the slightest idea what Torque is or why you linked to a page full of Torque code.

I'm trying to help but if that's how you take it maybe you should just figure it how on your won.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MasterCE
post Jan 31 2007, 07:16 PM
Post #8





Group: Members
Posts: 9
Joined: 30-January 07
Member No.: 1,727



QUOTE(Effovex @ Jan 31 2007, 06:34 PM) *

Your only explanation is that you want stuff to "orbit around", which to me isn't exactly clear. I also see you didn't provide a sample like I asked. I saw nothing orbiting on your homepage and I don't have the slightest idea what Torque is or why you linked to a page full of Torque code.

I'm trying to help but if that's how you take it maybe you should just figure it how on your won.

GOD DAMNIT, READ EVERYTHING I said that I took off the scripts, the orginaly script I tried to make if from is at the bottom of the topic post, the page is there next to "My page is here: " and I put the page with Torque code to show how much I know of a script that is similar to the script I'm trying to use, Torque is a game engine you can get from garagegames.com for $100 (not telling you to get it, I'm telling you what it is and it's price) and the game engine uses simple to understand script.

Also, your seriously acting like what your account says you are "Newbie" Because you don't read anything without being forced and then you don't read all of it. I'm reacting like this because I DID say all the stuff you said I was missing and you're acting like I'm some noob who says "PLZ HLP <STLYE>PORN.COM<S/TLYE!!!!"

I don't like it when people say stuff like I'm not giving all the info when I am, because I did and it's noobish to think I didn't when it's right there

This post has been edited by MasterCE: Jan 31 2007, 07:40 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jan 31 2007, 07:59 PM
Post #9


WDG Member
********

Group: Root Admin
Posts: 8,317
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



I have a vague idea of what you're trying to do. It sounds like something that could be accomplished with a standard image roll-over, using an animated GIF for the hovered image, and a normal single-frame GIF for the normal image.

PS: Please watch your language. You aren't paying us for our advice, and frankly, you aren't making it easy for us to help you.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MasterCE
post Jan 31 2007, 08:21 PM
Post #10





Group: Members
Posts: 9
Joined: 30-January 07
Member No.: 1,727



Language: Sorry
What I am trying to do: You should try out the orginal script in url box, but to turn it off you have to refresh. It causes all images on the current page to start LOOKING like they are orbiting something when they are really just going up-left, stop, down-left, and back. I want to make it so when the mouse is over an image, it does this. I want it to return all images back to where they were when it's not over the image. Since I know it'd also effect that image, could you make it so the image can't move with the rest?

I have to go now, but I a going to try to get on at 12:00 AM local (valentines day event for IMVU starts Feb first and goes to 7th then it continues off at another later date for whoever did the first part, and I'm going to do it right when it starts biggrin.gif)

This post has been edited by MasterCE: Jan 31 2007, 08:22 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th December 2019 - 12:20 AM