Jump to content

MinusMyThoughts

Members
  • Content Count

    227
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MinusMyThoughts

  • Rank
    Member
  • Birthday 06/26/1985

Previous Fields

  • Languages
    HTML, PHP, CSS, MySQL

Contact Methods

  • Website URL
    http://ennuidesign.com
  • ICQ
    0

Profile Information

  • Location
    Missoula, MT
  • Interests
    Music, art, graphic design, learning all this fun coding stuff.
  1. Hey, guys!I've got a problem with a set of SWF files that I'm trying to load into a static HTML site to play audio. There are three files: media-controller.swf (a stop, pause, and play buttons), music_loop.swf (2 WAV files; intro and loop, set on keyframes, set to play the intro once and then infinitely play the loop), and c.swf (a container document that calls music_loop.swf).media-controller.swf is a shared resource, called by music_loop.swf to allow the user to stop and start the loop at will.music_loop.swf has the following AS applied to it:keyframe 2780: gotoAndPlay(349);c.swf has one movie clip ("container") embedded in it, one keyframe, and the following AS:keyframe 1: container.loadMovie("music_loop.swf");I'm using jQuery's SWFObject to load the movie, which is working when I load c.swf, but the music_loop.swf file never loads.When I test this on my local machine, the file loads fine and loops as it's supposed to. However, online, I cannot get music_loop.swf to load, no matter if it's referenced by another SWF or called directly.Does anyone know what I'm doing wrong? Or, because this seems like a cumbersome way to accomplish what I thought would be a relatively simple task, does anyone know a better method of embedding two audio clips in an HTML site that will loop seamlessly?Thanks so much!-Jason
  2. Thanks! I was definitely making it too complicated. -Jason
  3. I've read about setAttribute() before, but I'm not sure how it would help me in this case...Do you have any ideas?If I could figure out how to access what thumbnail was clicked (is there a way to do that?) I wouldn't have any issues...-Jason
  4. I've just started learning OOP in JavaScript, and I'm running into some stumbling blocks with my first class...I'm trying to create a method that dynamically cycles through a list of images inside a div and attaches an onclick handler to display the full-size version of that image.The code I've been working with is: function ImageGallery() { this.getImages = function() { if(document.getElementById("gallery")) { var thumbs = document.getElementById("gallery").getElementsByTagName("a"); for(i=0; i < thumbs.length; i++) { var src = thumbs[i].getElementsByTagName("img")[0].src; thumbs[i].onclick = function() { var obj = new ImageGallery(); obj.src = src; obj.displayImages(); return false; } } } } this.displayImages = function() { replace = this.dir+'thumbs/'; var fullSrc = this.src.replace(replace,this.dir); document.getElementById("gallery").innerHTML += '<div id="gal_disp"><img src="'+fullSrc+'" /></div>'; } this.src = ''; this.dir = '';} If I only had one image, this would work fine, but it perpetually resets the src value and results in every image displaying the last image in the series. I had tried creating an array of objects with individual properties, but that seemed like a long-way-around approach.Does anyone have some insight? Thanks in advance!-Jason----------------Now playing: Bowerbirds - Bur Oakvia FoxyTunes
  5. That's exactly what's supposed to happen. The error that I'm being told exists is that the video will fade out, but then nothing happens. Since I can't get the site to throw any errors or duplicate this behavior, I was just curious to see if anyone could recreate the issue or if I need to tell my client that it's his computer.Thanks for looking!
  6. Hey, guys!I have a site that uses AJAX to load a video when a user clicks a thumbnail. I thought all was well (tested -- on my computers -- in IE6, IE7, FF2, FF3, Safari, and Opera 9.51), but I'm having a really strange issue on a client's computer:When they load the site, the JS is running: the slider works, and the video fades out like it's supposed to. However, the next video doesn't load and/or the original video reappears (this is according to the client).I was wondering if you guys would be willing to take a look at the site and tell me if you're seeing this issue, and if so, if you're aware of any way to fix it.The site is http://artistsnewmedia.com.Thanks for taking the time to look at this!-Jason
  7. What is the path you're passing?When you upload the image, how are you saving it?The method I've always used is to process the uploaded file and use move_uploaded_file() to put it in a folder so you can just return the path, save it to your database, and forget about all the complicated headers and other things that come with PHP-generated images.I'd say that's your best bet.-Jason
  8. MinusMyThoughts

    Reading csv file

    To stop the loop, you just have to add "break;" below "$userData = $tempData;".That'll save you quite a bit of overhead if your "users.log" file becomes large.[EDIT] I should have included a code sample. Here: if ($tempData[0] == $prk) { $userData = $tempData; break; } -Jason
  9. Hey, guys!I'm back again, with a whole new set of issues.I'm trying to clean up this project for the sake of code portability and my sanity later on if I have to update this awful mess. I ran into a wall with the following loop: function menuFunc() { // Assign an onclick value to the menu menu = document.getElementsByTagName("ul"); count = menu.length; for(n=0; n<count; n++) { menuItems = menu[n].getElementsByTagName("li"); num = menuItems.length; var where = new Array(); var page = new Array(); for(i=0; i<num; i++) { atag = menuItems[i].getElementsByTagName("a")[0]; where[i] = i*670; page[i] = atag.innerHTML.toLowerCase(); setBehavior = function() { checkAnim(where[i],page[i]); return false; } atag.addEventListener('click',setBehavior,false); } } } The aim of this function is to roll through my menu and attach a function as an "onclick" event. The problem I've run into thus far is that if I allow the variables "where" and "page" to be strings and pass them to the "checkAnim()" function, the value ends up being set for the last menu item across the board.Here's how it SHOULD work: <!--// BEGIN MENU //--> <ul class="menu"> <li><a href="#about">About</a></li> <li><a href="#portfolio">Portfolio</a></li> <li><a href="#services">Services</a></li> <li><a href="#press">Press</a></li> <li><a href="#contact">Contact</a></li> </ul> <!--// END MENU //--> When the code rolls through, it should add the following five event listeners: checkAnim(0,'about');checkAnim(670,'portfolio');checkAnim(1340,'services');checkAnim(2010,'press');checkAnim(2680,'contact'); However, when I click the link, each one appears to be set with "checkAnim(2680,'contact');".I tried setting up an array to solve this, but the array just causes the script to do nothing (without throwing any errors).Does anyone have ideas on what could be causing this and/or how it might be corrected? Thanks!-Jason
  10. A good place to figure out if you can create subdomains without using your host's provided tools would be on the hosting site's FAQs or their support forum/hotline.-Jason
  11. You could try something like this: $data = explode(',',$list_of_info);$numrows = count($data);$sql = 'INSERT INTO table_name VALUES ';$i = 1;foreach($data as $entry) { $sql .= "('$entry')"; if($i<$numrows) $sql .= ", "; $i++;}if(!mysql_query($sql)) die(mysql_error()); That's assuming the data only has one value per entry. If not, it'll be more complicated than that.-Jason
  12. So, when I said earlier that I'd fixed the problem, turns out I was wrong.When I came back from dinner, I reloaded the page and tried to run the same friggin' code, it presented the same problem I was having before.After a whole lot of heartache, I decided to try the DOM 2 model and used addEventListener. I've now tested in Opera, FF3, and Safari, all with success.Here's the working code: function handleEvent(imgnum) { // Set the new event handlers ctrImg = Math.round(imgnum-1); $(imgnum).addEventListener("click",function() { left(ctrImg,10,140,2) },false); } Thanks again for all the help I received on this.-Jason
  13. Hey! I think I fixed it!So, I was just staring at the code, and I started getting upset at all the inline CSS, which reminded me that all of my JS was failing before I declared it inline.Then, my Eureka! moment: I declared 'onclick="return false;"' on my testing span, and, hey! It works!Here is what I started with: <span id="testing" style="position:absolute;top:0px;left:550px;color:#FFF;">feedback</span> When I changed that to: <span id="testing" onclick="return false;" style="position:absolute;top:0px;left:550px;color:#FFF;">feedback</span> The alert fired, as well as the call to add text.Is there a workaround for that? I hate all the inline style and other miscellaneous crap I'm having to put in this code, and I'm dreading a future rework with the way it's looking right now...Thanks so much for all your help, guys! I really appreciate it.-Jason
  14. Hey! I think I fixed it!So, I was just staring at the code, and I started getting upset at all the inline CSS, which reminded me that all of my JS was failing before I declared it inline.Then, my Eureka! moment: I declared 'onclick="return false;"' on my testing span, and, hey! It works!Here is what I started with: <span id="testing" style="position:absolute;top:0px;left:550px;color:#FFF;">feedback</span> When I changed that to: <span id="testing" onclick="return false;" style="position:absolute;top:0px;left:550px;color:#FFF;">feedback</span> The alert fired, as well as the call to add text.Is there a workaround for that? I hate all the inline style and other miscellaneous crap I'm having to put in this code, and I'm dreading a future rework with the way it's looking right now...Thanks so much for all your help, guys! I really appreciate it.-Jason
  15. Safari and Opera deliver identical results.Are you getting the alert on Linux?-Jason
×
×
  • Create New...