HOTSPOT – CONFUSION

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

HOTSPOT ? CONFUSION

Postby LindaCat » Thu Dec 21, 2006 2:00 pm

As hotspots in every frame begins at #1, I have some 100 hotspots all named #1, and that can get confusing. Is it possible to identify them by frame-name? ?TheBakery?#13 or ?CloseElm?#26, - for instance? Or should there be some complex coding here?
User avatar
LindaCat
Active Member
 
Posts: 98
Joined: Mon Sep 18, 2006 3:26 pm

Postby SeryousYew » Thu Dec 21, 2006 5:42 pm

All controls are AM is based on VisualBasic 6. The hotspots are "Picture control" and are all named "HotSpot" the difference is the Index property that is an integer number e.g. Hospot(0) Hospot(1) Hospot(2) ...
So, try with:

Code: Select all
Set MyHospot = Frame.Hotspot(1)

Sub MyHotSpt_Click()
 'yor code here
End Sub

where 'frame' is your frame

For identify more hotspot by frame use a loop
Code: Select all
for i=0 to 100     ' 100 or number of h.s.
     Set MyFrameHS(i) = frame.hotspot(i)
next i

and obtain a new array
SeryousYew
Member
 
Posts: 29
Joined: Sat Nov 11, 2006 2:02 pm

Postby LindaCat » Thu Dec 21, 2006 6:17 pm

Thanks.
This looks a bit different from the other code I've copied & pasted. Where do I put it?
User avatar
LindaCat
Active Member
 
Posts: 98
Joined: Mon Sep 18, 2006 3:26 pm

Postby SeryousYew » Thu Dec 21, 2006 7:43 pm

Go to frame properties and in the last tab enable the the VBCode(the checkbox) and a text box appear. I don't have AM installed now and I can' t assure you that it will works


If it was what you meant ,I'll try to explain (don't mind the other post :P)

Set MyFrame(Index) = FrameName.Hotspot(Index)

-For Myframe choose a name, the name of the frame for example
- Index is an integer number from 0 to 9999... and identify the objects (the hotspots in this case. As i said all hotspot control has the same name)
- FrameName is the name of the frame contenting the hotspots

If you have many hotspot you can speed up using a cycle:

For i=0 to HotspotNumber-1
Set MyFrame(i) = FrameName.Hotspot([i)
Next i

HotspotNumber-1 is the number of the hotspot you have in this frame less 1 because index starts from 0.

EXAMPLE:
Code: Select all
For i=0 to 9
   Set BedroomHS(i) = BedRoom.Hotspot(i)
Next i

Action.LoadAPicture BedRoomHS(4)  "foo.jpeg"
BedRoomHS(6).Visible = False
SeryousYew
Member
 
Posts: 29
Joined: Sat Nov 11, 2006 2:02 pm

Postby LindaCat » Thu Dec 21, 2006 9:33 pm

Thanks again! :D

Do you happen to know where I can learn Basic C6 for free on the net? I feel so stupid and helpless, just copying blindly, without anything really making sense to me...
User avatar
LindaCat
Active Member
 
Posts: 98
Joined: Mon Sep 18, 2006 3:26 pm

Postby SeryousYew » Fri Dec 22, 2006 1:18 am

Don't worry, no one birth skilled :wink:
You can find material just searching with Google and downloading KBasic http://www.kbasic.com/ with it it's possible to make some tests further more inside you find many example. At first sight seems confused but it's free and fully compatible with the original Visual Basic 6.
Feel free to ask me any questions :wink:
SeryousYew
Member
 
Posts: 29
Joined: Sat Nov 11, 2006 2:02 pm


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron