Individual web pages


#1

I have many scenes in my site, but when I publish the site, every scene (page) just has the same url address so I can’t provide clients links to specific pages. I’ve tried Daniel’s # linking to scenes idea and it just links right back to my home page every time. There must be a better way to do this. This is a MAJOR flaw in an otherwise great product.


#2

There might be a smarter answer. But I create separate hype docs (and subsequently a separate html files) for my web site galleries. There is an added advantage in that you end up with smaller files and quicker page loads. Granted I am dealing with image galleries which are large by nature. See if yo can jump around quickly on my site if you want. terrelb.com


#3

Thanks for the response! Very cool site! … How do you create separate Hype Docs and have the pages still link together? (I have animations in and out of the pages.) I’m guessing to have it “go to url…” on clicking, but how do you know what the url is for the next page you want it to point to? Here’s my site so you can see what I’m dealing with… fortmillercreative.com

THANKS SO MUCH!!

Ben


(Gerfried) #4

I’ve just tried out the Daniel’s linking mechanism, works fine for me.

  • Did you name your scenes in the scene window?
  • Are you sure you followed Daniel’s instructions? Whenever I create a Javascript function, Hype generates a second .js file in the output folder (index_hype_generated_script.js). That’s where your custom js sits. I don’t see that in your page.
  • Check if you’ve really configured a javascript function in the scene inspector for the “on scene load” event.

Concerning your second question - well, you can rename the output.html to anything you like, and that’s the name you’ll link to.


#5

Right, they link together via the action “go to url" instead of “jump to scene".

The url of the next page is simple the name of the next hype doc you create. So if your home page is a hype doc called “1” the html file is called “1.html”. Then make a hype doc called “2” and point to 2.html.

You can still have scenes to complete animations. Just go to the next url at a logical point.

I keep all my .html files in one folder. So I don’t need to enter the entire “www.whatever/whatever.html” in the action box, just name.html. But you will need to include the full path when sending someone a link via email.
For example: http://terrelb.com/TEXTBOOK-A.html
— As you can see when sending a link to an html file it needs to be case specific, in the action box and the link you send.

PS
Nice web page. How have you been doing in the market. I was creating html animations for the textbook industry. But from what I can see it has already moved off-shore along with my illustration work. Very frustrating. I’ve had to switch industries.


(Freelancer) #6

this method is not good for you?

www.yoursite.com/index#scene_name

	var checkHash = function() { 
var hash = window.location.hash.substring(1); 
for(var i = 0; i < hypeDocument.sceneNames().length; i++) {
if(hypeDocument.sceneNames()[i] == hash) {
hypeDocument.showSceneNamed(hash);
break;
}
}
}; 

if (window.loadedHashLocation != true) { 
window.loadedHashLocation = true; 
checkHash(); 
window.onhashchange = checkHash; 
}

window.location.hash = "#" + hypeDocument.currentSceneName();

scene_name.hype.zip (216.0 KB)


Another method, useful if you need to manage more projects


#7

THANKS SO MUCH EVERYONE… It’s clear I’m not a web guy… I’m more of a designer, so I’m kind of muddling through with the whole code thing. But I figured out my mistake with the Daniel # technique. I left spaces in the scene names instead of scene_names. With spaces in between words it just kept defaulting back to the first page. Anyway, probably something that was obvious to everyone else but me! Thanks for your help everyone!

PS - I still would love to have distinct pages instead of scenes in a newer version of Hype (or at least something that doesn’t involve a workaround.) Hype is such an intuitive program for designers who know After Effects, Cinema 4D, etc that the less we have to get involved with code the better and more accessible it is. THANKS AGAIN!!