Pop up window when mouse click


#1

Hello ,
I made a website for an art project, and I want to activate a little pop up window on mouse click.
is that possible ?

thank you everyone


(Jonathan Deutsch) #2

It depends on the type of pop up window you mean. If you mean a literal window or tab, you can add an On Mouse Click action via the Actions Inspector that can Go to URL… with the Open in new window box checked. If that isn’t sufficient you can look into using Javascript’s window.open() method.

If you simply want a box to appear within the current window, you can have a mouse click action that runs a timeline that animates the opacity and/or display value of a box on your scene. See this basic example:

showbox.hype.zip (13.5 KB)


(Jack Browning) #3

downloaded and saw your work. Understand well as it is straightforward, however I am still having an issue. Your insight would be greatly appreciated.

Main Timeline - Slides in for 3 seconds then Rest on a Page with buttons. The one button is to call a Pop up that will layover the Page. I created a Timeline called (Mission), the created a Box that is Under the Stage, and when called (0.5 sec) goes from Below the Stage to the Middle of the Stage.

I use your Start Timeline and reference the Mission Timeline. This all works, the issue is… that the rectangle/box appears immediately and over the First Frame (of the Main Timeline) through the 3 second animation. I thought that subsequent Timelines are not Called or Executed until called via an Event?? Please help - thank you


#4

If you share your document then we can see what’s happening and offer the solution. :wink: it could be something simple but we’d be guessing as to what it is.

The only time a time line would play is if you have created a symbol and then animated on the main timeline of that symbol. Default in Hype is to add a key frame that plays the symbol’s main timeline.


(Jack Browning) #5

Ali_Pop.hype.zip (2.9 MB)

Now the Mission button isnt working - but this is the pop up issue - Thank you!


#6

Hello ,
How can I start two timeline on the sale scene . with java script fonction
?
Thank you

Marion


#7

HI Jack @jdbrowningjr

Apologies as neither of us were notified as the reply was to the topic and not to a name or the post directly. :slight_smile: The problem you are having is that when you created the animation in a separate timeline, the Main timeline still has the object (element) in the original place. What you need to do is move the object to it’s starting place before you record any animation. That way it moves to the start position on the main timeline too. What I would do is delete the animation and then move the object to it’s start position and then re-do the animation up into the middle.

Hope that makes sense.

Here is an edited version of your doc.

Ali_Pop-vDBear.hype.zip (2.9 MB)


#8

on Scene Load (or any event)

hypeDocument.startTimelineNamed('timeline1', hypeDocument.kDirectionForward);
hypeDocument.startTimelineNamed('timeline2', hypeDocument.kDirectionForward);

P.S @marion. I feel you need to learn the API and possibly other javascript libraries a little bit more as there is another post that, as well as this one, seems to be asking for solutions but not much sharing of a document. We cannot / maybe will not do the work for you but will help out when shown that you have tried. We are just a friendly forum not a support service. :wink: If you have any issues relating to the running of Hype then that is different.


(Jack Browning) #9

Hi DBear - thank you for your help. What you presented did work and helped me get past that initial issue, but I am now experiencing a deeper issue in the same category. When I created the second timeline (mission) it worked and when called by the button showed when it was supposed to and not before.

However, now it appears that it is Stepping on the Timeline below it. In other words, when my Rectangle on the Mission Timeline is not even visible and Below the Main Stage - it appears not to matter. The Buttons on the Main Timeline cannot be accessed. They are there Visibly, but they do not work, Until - I Remove the Mission Timeline pieces then they work. So even though the rectangle and alike are not Visible and Below the Main Timeline till called - they are Covering the Main Timeline - this is very confusing… and frustrating… Any help is greatly appreciated _ how do i add a file so you can see?
`