You have actionSettings for mouse over.
So write a action setting to run a macro and in the macro set the
vissibility of the object as vissible (msoTrue)
> I am trying to make a game that will allow the player to have an inventory. I
> need a way to have an object appear in the inventory when another objects is
> "mouse-overed."
> Can someone give me the VBA code for this?
> Thanks!
.. sorry I'm a noob with vb. Also what if the object was an autoshape?
> You have actionSettings for mouse over.
> So write a action setting to run a macro and in the macro set the
[quoted text clipped - 5 lines]
> > Can someone give me the VBA code for this?
> > Thanks!
vindys - 31 Mar 2008 14:17 GMT
Hi Desmond,
As I dont know whats the exact way you doing
So I feel only one way
Select the object which you want to keep vissible and to set actionsettings
for mouse over and run this function
Sub PrepareVissibleShape()
With ActiveWindow.Selection.ShapeRange(1)
.Visible = msoTrue
.Name = "VissibleObj"
.ActionSettings(ppMouseOver).Action = ppActionRunMacro
.ActionSettings(ppMouseOver).Run = MakeShapeVissible
End With
End Sub
Now Select the shape which you want to make invissible and run this macro
Sub PrepareInvissibleShape()
With ActiveWindow.Selection.ShapeRange(1)
.Visible = msoFalse
.Name = "InvissibleObj"
End With
End Sub
Also keep this macro in the same module
Sub MakeShapeVissible()
Dim sh As Shape
For i = 1 To ActivePresentation.Slides(1).Shapes.Count 'Change Slide index
accrodingly
With ActivePresentation.Slides(1).Shapes(i)
If .Name = "VissibleObj" Then
.Visible = msoFalse
ElseIf .Name = "InvissibleObj" Then
.Visible = msoTrue
End If
End With
Next i
End Sub
Now you try slideshow and see if it works.
Check this website if you don't know where to write VBA code
http://pptfaq.com/FAQ00033.htm
> .. sorry I'm a noob with vb. Also what if the object was an autoshape?
>
[quoted text clipped - 7 lines]
> > > Can someone give me the VBA code for this?
> > > Thanks!
John Wilson - 31 Mar 2008 14:18 GMT
Does it have to be a mouseover? A triggered animation is likely to be more
reliable but this would have to be a click.
Can you explain " .... on another slide" though. If you need an object to
appear on a DIFFERENT slide then it would have to be vba.
Using vba to set the visible property can cause problems with other
animations and also once set to true or false it will stay that way next time
you run the presentation unless you write code to initialise it how you want.
tutorials on triggers
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html#triggers

Signature
Amazing PPT Hints, Tips and Tutorials
http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
> .. sorry I'm a noob with vb. Also what if the object was an autoshape?
>
[quoted text clipped - 7 lines]
> > > Can someone give me the VBA code for this?
> > > Thanks!