|
Invisible button
An invisible button can get all the button events,
but has no up, over, or down state, only a hit area. This means that your
button is invisible to the user, but can still do something when they
pass the mouse over the hit area, which is also called as the "hotspot".
The use of invisible button
In flash you can use the invisible button for creating
a "dragable area".
1. Open a new movie and create a button symbol. Insert
nothing for the on, over, and down state just define your hit area with
a filled square or circle.
2. Next, go back to your main timeline, open your library and drag an
instance of your button onto the stage, the button will appear as a semi-transparent
cyan shape, with the same size as the hit area you have defined in your
button.
3. You can put your invisible button on top of something else and then
select your invisible button and add the action script from the below,
then you are able to move something around. For example, you can make
have dragable windows which you can open, close, and move them around.
Action Script:
on (press) {
startDrag ("");
}
on (release) {
stopDrag("");
}
Pop_up a new window
In Flash, add the below code to a button.
on (release){
getURL("javascript:openNewWindow('yourmovie.html',
'thewin', height=270, width=385,
toolbar=no,scrollbars=no')");
}
When publish, add the code below to html that is generated
for the window that is to pop up.
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
Code for the container movie add this function
inside the head tag.
<SCRIPT
language="JavaScript">
function openNewWindow(URLtoOpen,windowName,windowFeatures){
newWindow=window.open(URLtoOpen,windowName,windowFeatures);
}
</SCRIPT>
HTML information in Flash
Links: The information below is about a link from
a textfield variable using HTML
Textfield
variable name = "url"
Action for the link:
<A HREF="www.macromedia.com">This
is a link from inside of a textfield variable using
HTML</A>
To make your text italic inside a textfield using
HTML
Textfield
variable name = "italic"
Action for Italic:
italic
= "<i>This is italic text inside a textfield using HTML</i>";
To make your text bold inside a textfield using
HTML
Textfield
variable name = "bold"
Action for Bold:
bold
= "<b>This is bold text inside a textfield using HTML</b>";
To specifies the font face and size in a textfield using HTML
Textfield
variable name = "font"
Action for font type and
size:
font
= "<font face=\"Arial\" size=\"12\">This
is a textfield variable containing HTML that specifies
the font type and size </font>";
|
|