Page 1 of 2

[24 Jan 2010] Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by gerograph
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 24 Jan 2010 19:30:39 -0000

Hi its me again, here comes another one:

How can I jump directly to the next slide ?

O.k. here are the details: Lets say, there is an anim running or 7 more textobjects/layers to be faded into the first slide. I want to STOP/BREAK EVERYTHING right away and jump to the next slide (without finishing the previous slide). Event could be a pressed button or maybe the spacebar... If possible it should be "Designer" compatible... therefore a Object with code inside Designer...

Any Ideas

Thanx for help Gero

[24 Jan 2010] Re: Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by Bugala
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 24 Jan 2010 20:11:04 -0000

In Designer you can use command:

%>page number

ie.

%>5

would be jumping to page 5

Notice however, that this is DESIGNER command, so if you are for example using Cubic IDE to do programming and then copy ppastet it to designers button or something, then when you are testing your code with Cubic IDE, it will report an error about that page change command.

Notice also that there seems to be some difficulty with Designers current version on using more than one option on jumping.

ie.

Code: Select all

If something
%>5
Elseif something
%>7
endif
In some cases it only reacted to first IF statement and didnt react to the rest at all.

So if you need to use say IF-ELSE statements to define where to jump, then my suggestion is that you do only one page jump, make designer project as a script, and alter that jumping part with ie. Cubic IDE.

It was fairly simple altering that Jump to page part. I dont remember exactly how it was in that code, but it was something like:

Function(16)

Which would mean as jump to page 16

so just use then:

Code: Select all

IF something
Function(16)
Elseif something
Function(18)
endif
and it works fine.

I actaully asked about this page jumping thing less than month ago, so if you check some previous postings you can check what i asked and what andreas answered, but basically i think i already summarised it all in this answer.

[24 Jan 2010] Re: Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by Bugala
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 24 Jan 2010 20:23:17 -0000

Just noticed i didint read your question very well after all.

Well, i think that previous answer might be of help too.

So basically with designers current version, there is to my understanding no easy way to do that.

For problem is that there is no way to execute code with page. You can execute code before page (which is pretty much same as programming from scratch without designer, although it does have some uses), and you can execute code when something is done (mouse moved over some button, button pressed etc.)

But independent code running alongside with slide show, ie. your "skip intro" button, that cant be done with designer currently if i have understood right.

However, in practice it is possible, by going to code level.

I think best way is that you make that page and make that button already in designer and also the code to taht button.

Then you compile your designer project as a script.

Then go find that page and alter code so that it keeps checking if that "skip intro" - button is being pressed.

Im not sure how to alter that page that way, since i havent done that yet (although im planning to do on my own project), but i think its propably fairly easy if you know how to code with hollywood.

Finding that page is very easy as Designer Script is marked as

Code: Select all

================START OF PAGE 1=============
================END OF PAGE 1============
and so on.

But if you really want to d oit with designer, there might actually be one solution, its not good solution, but it might work.

Make one whole screen size rectangle. Then put all the code that needs to be executed (skip intro button check) to "On mouse over" - code part of that whole screen rectangle.

This basically should work, but there are two problems with this.

If user runs program in window, and hes outside of window, then nothing happens.

If user keeps mouse still, then still nothing happens, since by some other guys test here in this mailing list indicated that hollywood doesnt react on "mouse over" unless mouse pointer have been moved.

But that could be one option. You would still need to do those slide showings in code level, but at least you could put those layers on screen with designer and just refer to them on code with numbers instead of creating them on that code from beginning.

[24 Jan 2010] Re: Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by gerograph
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 24 Jan 2010 21:04:56 -0000
it keeps checking if that "skip intro" - button is being pressed.
O.k. I had this Idea as well...

If I understood right, you suggest to add code in the HWD file ? If so, thats fine with me, because Designer can then still read the project, when reopening.

Or did you suggest to add code in HWS file ? Thats also o.k., but means if I change something in Designer, I have to "reedit" this part... Never mind could do this also
it keeps checking if that "skip intro" - button is being pressed. But how do you keep checking wether a skip intro button is pressed or not while running the script ?? Some code would be nice here !
This is probably really tricky isn't it

Thanx

[24 Jan 2010] Re: Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by Bugala
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 24 Jan 2010 23:34:23 -0000

I was suggesting altering .HWS, but didnt even come to my mind before that you could maybe try altering .HWD as well. Dont know if that can bring you some unexpected problems, i think best let Andreas answer to that one.

And yes, altering .HWS brings you one somewhat big problem.

Everytime you alter your .HWD file, you need to make new .HWS file and alter that code again.

Although if you are altering diffeerent page then its not so hard.

ie. You have altered code of page 2, and now you are making changes to page 4.

So copy-paste that old already altered page 2 to that new .HWS as well, and youre done.

I made you example altering code that i tried myself, seems you might need to change that code quite much actually. More than i expected.

So heres the .HWD file: http://dl.dropbox.com/u/3375468/Test-skip%20intro.hwd

and heres the .HWS file: http://dl.dropbox.com/u/3375468/Test-skip%20intro.hws

In that .HWS file i have commented it and i also left the original code there so you can compare the original and altered version. (theres about 10-20 lines that i altered - all in same place-page 1 i think it was)

Basically if doing that screenwide rectangle "On Mouse Over" - button, i think its pretty much copy pasting this altered code part into its "executable code"-part. With exception that you might need to make that "Skip"-rectangle as button on that rectangles code part.

[25 Jan 2010] Re: Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by gerograph
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 25 Jan 2010 16:10:22 -0000

Thanks, I checked to code... If I alter code in hws it will be a hassle and a bit more work... I could do this, though. But your examples give still no solution to the problem. If I press "Skip" rectangle HW continous to fade in the text up to "text 5". O.k afterwards slide 2 will be skipped, and slide 3 will be shown straight away. This is what should happen in your example:

Text 1 fades in -> Text 2 fades in -> user presses "Skip" -> slide 3 is shown (therefore Text 3, Text 4 and Text 5 will not bee displayed anymore)...

[25 Jan 2010] Re: Re: Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by Bugala
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 25 Jan 2010 21:38:42 +0200 (EET)
This is what should happen in your example:

Text 1 fades in -> Text 2 fades in -> user presses "Skip" -> slide 3 is shown (therefore Text 3, Text 4 and Text 5 will not bee displayed anymore)...
Hmm, i have to check that. For thats how it happened when i tried that .HWS file in my Cubic IDE under WINUAE.

I use Hollywood 4.5, but that shouldnt make difference if you use 4 or 4.5.

[25 Jan 2010] Re: Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by gerograph
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 25 Jan 2010 19:43:20 -0000

Hm... funny, so you are saying if using Cubic,Winuae and HW 4.5 your skip button brings you right after the first click to slide 3 (end of presentation) ? Did I understand you right there ?

[25 Jan 2010] Re: Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by Bugala
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 25 Jan 2010 19:58:35 -0000
Hm... funny, so you are saying if using Cubic,Winuae and HW 4.5 your skip button brings you right after the first click to slide 3 (end of presentation) ? Did I understand you right there ?
Yes, i just checked it again. I Opened that file i put on my dropbox (.HWS) and ran it on Cubic IDE and it worked like it was supposed.

That if i click Skip button at any point, it will jump directly to "Click page" (last slide) and wont whow remaining texts at all.

I say this just in case.

So the .HWS file should work as you meant. But that .HWD file shouldnt work that way.

Point on sending that .HWD file was to give example on how to make it first in .HWD (the way it doesnt work, but is easier to fix that code on .HWS then) and then how to alter it in .HWS to have it work like its supposed to.

So even that .HWD file has that skip button, it doesnt work in designer. Its just there so that when you make it into .HWS, that Button is included in that .hws and is therefore easier to fix the code into working status.

[25 Jan 2010] Re: Skip (intro) - jump directly to next slide

Posted: Sat Jun 13, 2020 5:32 pm
by gerograph
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 25 Jan 2010 20:46:45 -0000

Oh no... SORRY.... I have to pull back, my fault !!! Somehow I did not open/display the right hws script... If I do now, it should work, but doesn't because HW 4.0 comes up with an error message:

"Function CheckEvent() not found"

This might be due to version 4.0.... Even though the function is listed in HW Help Guide as old HW 1.0 upto 2.0 compatible. Maybe was reinvented in 4.5 ?