Hi I'm a beginner in Flash and I was wondering if it's possible, for example :
if you have 4 buttons on a page, that when the mouse is over one button, that the others disappear(fade out) and reappear on mouse out?
Thanks to any help I can get!
Maril
4 7684
Hi Maril,
Yes it is possible. You just have to put your button inside a movieclip first so you can access it dynamically.
Example:
Create your four buttons, now create a movieclip, place the first button there and name the movieclip btn01. Then create another movieclip, place the second button there and name it btn02. Repeat the steps with the other buttons.So now, you have four buttons and four movieclips. Your movieclip's name should be: btn01,btn02,btn 03,btn04. Place the four movieclips on your workarea.
We now have all the objects we need. Let's start coding.
1. Double Click on btn01, It will open the MovieClip, now on the button itself. Put this:
on(RollOver)
{
_root.btn02.alp ha=0;
_root.btn03.alp ha=0;
_root.btn04.alp ha=0;
}
on(RollOut)
{
_root.btn02.alp ha=100;
_root.btn03.alp ha=100;
_root.btn04.alp ha=100;
}
2.Now go back to your main scene. DoubleClick on btn02. On the Second Button put this:
on(RollOver)
{
_root.btn01.alp ha=0;
_root.btn03.alp ha=0;
_root.btn04.alp ha=0;
}
on(RollOut)
{
_root.btn01.alp ha=100;
_root.btn03.alp ha=100;
_root.btn04.alp ha=100;
}
3.For the Third button:
on(RollOver)
{
_root.btn01.alp ha=0;
_root.btn02.alp ha=0;
_root.btn04.alp ha=0;
}
on(RollOut)
{
_root.btn01.alp ha=100;
_root.btn02.alp ha=100;
_root.btn04.alp ha=100;
}
4.And lastly:
on(RollOver)
{
_root.btn01.alp ha=0;
_root.btn02.alp ha=0;
_root.btn03.alp ha=0;
}
on(RollOut)
{
_root.btn01.alp ha=100;
_root.btn02.alp ha=100;
_root.btn03.alp ha=100;
}
5. Run it and see if it works for you.
Well, That's kinda long.. hehe.. Try it first if it works. Hope this helps.
Thanks a lot, I'll try that!
CIAO CIAO! Maril
Hi,
Do you happen to know how to remove flash video swf from HTML code after it plays or after a user clicks on the close button? I created a transparent flash swf file. I created the close button and it stops and clears the screen. After the movie plays, I want it to somehow be removed, otherwise hyperlinks in the page “behind” the transparent movie will not function, and this will cause problems with clients’ sites. I refer to www.rovion.com, if you place their movie over working hyperlinks, they will not be available during playback, but it become available after the movie is unloaded.
If you know of any links to sources, please help me :*(
Thank in advance,
rsjpx
Hi rsjpx,
I'll just clear if I get what you're trying to do.You have an swf file embedded on your html page. You want it to disappear from your html page when it is over or you click a link/button.. is this correct? simplest way is to hyperlink to a dummy page which displays the same contents except the swf file. Another is through ASP. When the page loads, it checks a certain variable before it displays the swf file. Example:
<%
if temp=0 then
response.Write( "<embed src=""yourswfhe re.swf"">")
end if
%>
Now by default, the value of temp is automatically 0. So it will play your swf movie. Question is how you turn this temp to any number so the movie will not display.
<%
response.Write( "<a href=""youasphe re.asp?value=1 "">Hide Movie </a>")
%>
The link will give a value of 1. Now we try to retrieve it to our asp page.
Put the codes below, before the "if" statement
reqValue=Reques t.QueryString(" value")
conValue=round( reqValue,1)
temp=conValue
We retrieve the QueryString which contains the value 1. Now we convert it to a number/round it so it will not conflict our "IF" statement. And pass the it to our temp variable. When it enters the "IF" statement, it will not display the swf anymore.
Final code should look like this.
<%
reqValue=Reques t.QueryString(" value")
conValue=round( reqValue,1)
temp=conValue
if temp=0 then
response.Write( "<embed src=""yourswfhe re.swf"">")
end if
%>
<%
response.Write( "<a href=""youasphe re.asp?value=1 "">Hide Movie </a>")
%>
Hope it helps. Btw, this should rather be on the ASP topic.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: The Bicycling Guitarist |
last post by:
Thanks to Yukka for improving my <h1> content and to Andy Dingley for
pointing out how illogical my code was. I have converted my nav buttons to a
list and eliminated the horrid spangap class of "|". The better index page
is http://www.TheBicyclingGuitarist.net/better-index.htm
How do I get rid of those black dots in front of the red nav buttons? I
don't want them to show up. Now that I am using list markup, is that
satisfactory for...
|
by: Trint Smith |
last post by:
Ok,
On my website, tribidz.com, there is one page that needs to not have any
buttons or menu or address bar. How can I do this? What is the html
code or whatever?
Thanks,
Trint
..Net programmer
trintsmith@hotmail.com
|
by: djc |
last post by:
On the page_load event I am querying a database and binding data to some
text boxes, list boxes, and a repeater control. When the page loads it uses
the value of one of the database fields (status) to determine what options
should be available for this particular item (which is an issue... small
issue tracking system). Each of these options is an action that may be
performed on the issue and I am dynamically creating LinkButtons for each...
|
by: COHENMARVIN |
last post by:
I have a table with 2 buttons in it - a SAVE button and a DELETE
button. If Session("BothButtons") = True, I want to show both buttons.
If Session("BothButtons") = False, I want to show only the SAVE button.
This would be easy to do (I just would set DeleteButton.Visible =
False), but the problem is that the 2 buttons are in 2 different cells
of a table, something like this:
<td align="center"><ASP:Button id="Save" runat="server" /></td>...
|
by: rizwanahmed24 |
last post by:
Hello
i have made a custom control. i have placed a panel on it. I want this
panel to behave just like the normal panel. The problem i was having is
that the panel on my custom control doesnt accept other controls. The
control i drag drop on it becomes the child of my custom control's
parent form and not the child of my custom control. Then i added this
line
""
before my custom control class (i dont know what this line does). Now
| |
by: Kristian |
last post by:
Hi,
We have recently added some icons onto buttons for a windows app
(VS2005). While we are in the designer they all look ok, but
once we run the program some of the icons disappear from the buttons on
some screens. Other changes, such as text changes do appear ok.
Strangely, on the same screens icons for link labels come up ok.
Any ideas?
|
by: chupcha |
last post by:
Hello all,
I'm very new to java script and I need help.
I have a couple of buttons on a page that I need to disappear when one of the buttons is clicked. What I found is this:
onclick="this.setStyle('display', 'none')
It works great, but only for the button that is clicked. How would I make it for all the buttons to disappear?
|
by: Miki |
last post by:
Hello,
I have a simple Tkinter window with and buttons at the
bottom.
When I resize the window to be shorter, the first thing to disappear
are the buttons, however I want these button to be visible at all
times.
Is there a way to make sure that these buttons are always visible?
|
by: grego9 |
last post by:
I have two option buttons - Diplayed as Option Button 76 and Option Button 77 in the name box on a tab called "AMEND" .
When Option button 76 is slected I want a drop down box called Drop Down 43 to disappear.
I have gone into the VB editor and added the following macro to the AMEND Tab
Private Sub OptionButton76_Click()
DropDown43.Visible = False
End Sub
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |