Sign in to follow this  
Followers 0
Paulie

Help on animated intro screen

10 posts in this topic

I am making an interactive scene from Shakespere's Romeo and Juliet, I need help making my intro screen blink less, Right now, it does wat I want, but how can I make it smoother

CODE

;======================================;

; Romeo and Juliet Intro/Scene Selection Menu

;

; Created by: Paulie

; English Period 5

;======================================;

;---Includes---

#include <GUIConstants.au3>

#include <_GUICtrlCreateTable.au3>

;---Instal---

#cs

Fileinstall

#ce

;---Hotkeys---

Hotkeyset("{ESC}", "Force_Quit")

Hotkeyset("{NUMPAD6}", "Skip_intro")

;---Variables---

Global $button_[4], $label_[4], $Intro_label_[4], $left, $top_[4], $number, $i, $n,$intro_button_[1]

;---Intro Gui build---

WinMinimizeAll()

$intro = GuiCreate("", @DesktopWidth+5, @DesktopHeight, -1,-1, $WS_POPUP, $WS_EX_TOPMOST)

GUISetBkColor(0x00000)

GUISetState()

For $left = 1 to 225 step 10

$top_[0] = 100

$Intro_label_[0] = GUICtrlCreateLabel("The Tragedy of...", $left, $top_[0], 550, 200)

GUISetFont(50, 500, 0, "Signature")

GuiCtrlSetcolor($Intro_label_[0], 0xFFFFFF)

Sleep(75)

If $left < 225 then

sleep(10)

GUICtrlDelete($Intro_label_[0])

sleep(10)

Endif

$Intro_label_[0] = GUICtrlCreateLabel("The Tragedy of...", 250, $top_[0], 550, 200)

Next

GuiCtrlSetcolor($Intro_label_[0], 0xFFFFFF)

Sleep(500)

For $left =0 to 175 step 10

$top_[1] = 225

$Intro_label_[1] = GUICtrlCreateLabel("Romeo and Juliet", $left, $top_[1], 1000, 200)

GUISetFont(100, 500, 0, "Signature")

GuiCtrlSetcolor($Intro_label_[1], 0xFFFFFF)

Sleep(75)

If $left < 175 then

GUICtrlDelete($Intro_label_[1])

Endif

$Intro_label_[1] = GUICtrlCreateLabel("Romeo and Juliet", 175, $top_[1], 1000, 400)

Next

GuiCtrlSetcolor($Intro_label_[1], 0xFFFFFF)

For $left =1024 to 425 step -10

$top_[2] = 600

$Intro_label_[2] = GUICtrlCreateLabel("Created By: Paul Sandels", $left, $top_[2], 500, 200)

GUISetFont(20, 500, 0, "Veranda")

GuiCtrlSetcolor($Intro_label_[2], 0xFFFFFF)

Sleep(75)

If $left > 425 then

GUICtrlDelete($Intro_label_[2])

Endif

$Intro_label_[2] = GUICtrlCreateLabel("Created by: Paul Sandels", 450, $top_[2], 500, 400)

Next

GuiCtrlSetcolor($Intro_label_[2], 0xFFFFFF)

$Intro_button_[0] = GuiCtrlCreatebutton("Go To Menu", 500, 700, 200, 30,-1,-1)

GuiSetState()

;---Display/detect---

While 1

$message = GUIGetMsg()

If $message = $GUI_EVENT_CLOSE then exitloop

Wend

;---Fuctions---

Func Force_Quit()

Exit 0

EndFunc

Func Skip_intro()

Exit 0

Endfunc

I still need to finish it, but this is just the intro.

Plz help

TY

Share this post


Link to post
Share on other sites



HI,

solves not your prob, but I think also coool.

Check this out:

$intro = GUICreate("", @DesktopWidth + 5, @DesktopHeight, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
GUISetBkColor(0x00000)

DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $intro, "int", 1000, "long", 0x00080000);)0x00040010

The DllCall !!! Hope you like it.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

i've seen that posted in many places, but i don't quite understand how it works

what exactly does it do

Share this post


Link to post
Share on other sites

i've seen that posted in many places, but i don't quite understand how it works

what exactly does it do

Hi,

I think it alters the displaying process of the window. I guess you know that from powerpoint. Let the text explode, come from the left or top and so on. You can do this by changing the parameters of the dllCall.

DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $intro, "int", 1000, "long", 0x00080000);)0x00040010

The time is red

The option is green

Hope that helps.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

I think it alters the displaying process of the window. I guess you know that from powerpoint. Let the text explode, come from the left or top and so on. You can do this by changing the parameters of the dllCall.

DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $intro, "int", 1000, "long", 0x00080000);)0x00040010

The time is red

The option is green

Hope that helps.

So long,

Mega

Ok, that makes a little more sense, but how can i use it to animate text, cause it is ment for whole windows,

does this mean i have to make a new window for each label? :)

Share this post


Link to post
Share on other sites

Also, I'm having trouble with my button, the "Go To Menu" one, it isn't clickable and i don't know why

Plz help

Share this post


Link to post
Share on other sites

**Bump**

can't anyone help me?

Share this post


Link to post
Share on other sites

Try this... It's less blinky, although I dunno how much better you'll be able to get this because of your monitor's refresh rate. This is noticably better than your example though. You will need to add your other #include back in.

#include <GUIConstants.au3>

;---Hotkeys---

Hotkeyset("{ESC}", "Force_Quit")

Hotkeyset("{NUMPAD6}", "Skip_intro")

;---Variables---

Global $button_[4], $label_[4], $Intro_label_[4], $left, $top_[4], $number, $i, $n,$intro_button_[1]

;---Intro Gui build---

WinMinimizeAll()

$intro = GuiCreate("", @DesktopWidth+5, @DesktopHeight, -1,-1, $WS_POPUP, $WS_EX_TOPMOST)

GUISetBkColor(0x00000)

GUISetState()

IntroWords(1, 100, 0, 250, 10, 250, 550, 200, "The Tragedy of...", 50, 500, "Signature", 0xff0000)

IntroWords(2, 225, 0, 175, 10, 175, 1000, 400, "Romeo and Juliet", 100, 500, "Signature", 0xFFFFFF)

IntroWords(3, 600, 1024, 425, -10, 425, 500, 200, "Created By: Paul Sandels", 20, 500, "Veranda", 0xFFFFFF)

$Intro_button_[0] = GuiCtrlCreatebutton("Go To Menu", 500, 700, 200, 30,-1,-1)

GuiSetState()

;---Display/detect---

While 1

$message = GUIGetMsg()

If $message = $GUI_EVENT_CLOSE then exitloop

Wend

;---Fuctions---

Func IntroWords($round, $top, $left, $limit, $steps, $lessthan, $width, $height, $label, $size, $weight, $font, $color)

$Intro_label_[$round] = GUICtrlCreateLabel($label, $left, $top, $width, $height)

GUICtrlSetFont( -1, $size, $weight, 0, $font)

GuiCtrlSetcolor(-1, $color)

For $left = $left to $limit step $steps

Sleep(75)

Sleep(10)

GUICtrlSetPos($Intro_label_[$round], $left, $top, $width, $height)

Sleep(10)

Next

Sleep(500)

EndFunc

Func Force_Quit()

Exit 0

EndFunc

Func Skip_intro()

Exit 0

Endfunc

Share this post


Link to post
Share on other sites

Do you have access to PowerPoint? It may assist you to do your slide show homework a little faster...

Share this post


Link to post
Share on other sites

Do you have access to PowerPoint? It may assist you to do your slide show homework a little faster...

HI,

that was also my first thought. Why the hell doing things the easy way, when you can spent hours doing it complicated. :)

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0