Skip navigation

Category Archives: Flash

In this section explains if you are making a website and you need a code for html to work with a pop-up html window with specific length and width.

CODE IN HTML

*this will be placed inside the html you are working on*
<script type=”text/javascript”>
//Insert this code inside the javascript
function popup(url) {
newwindow=window.open(url,’name’,’height=600,width=800′);
if (window.focus) {newwindow.focus()}
return false;

}
</script>

*Then this is the code for the link*
<a href=”samplepopup.html” onclick=”return popup(‘samplepopup.html’)”>This is the Pop-up</a>

In this section explains if you are making a website and you need a code for a flash button to work with a pop-up html window with specific length and width.

CODE IN FLASH

*this will be the code inside the flash button*
on (release) {
getURL (“javascript:openNewWindow(‘samplepopup.html’,’thewin’,’height=600,width=800,toolbar=no,scrollbars=no’);”);
}

*html code* *where the flash object is embeded*
<script language=”JavaScript”>
//Insert this code inside the javascript
function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }
</script>

*inside html-body tag*

<EMBED src=”samplepopup.swf” quality=high bgcolor=#FFFFFF WIDTH=800 HEIGHT=500 swLiveConnect=true name=samplepopup.swf TYPE=”application/x-shockwave-flash” PLUGINSPAGE=”http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash”></EMBED&gt;

take note: the width and height of the object is up to you to decide on what will you be using.

Advertisements

Hi, I’ve been developing a flash website and i was challenge to work a series of animations with mouse tooltip. I’ve search through the net and luckily i found a very useful tutorial regarding it. Many thanks to Sidney de Koning(email: sidney@oeoe.nl) for providing us a very good tutorial.

This works on Actionscript 1 & 2:

Make three layers in your main timeline, called actions, caption
and button. Put this piece of actionscript in your actions layer:

function tooltip (string) {
xmouse = getProperty(“”, _xmouse);
ymouse = getProperty(“”, _ymouse);
duplicateMovieClip (“_root.tooltip”, “tooltip1”, 1);
tooltip1.tooltip = string;
setProperty (tooltip1, _x, xmouse);
setProperty (tooltip1, _y, ymouse);
startDrag (“_root.tooltip1”);
tooltip1.gotoAndPlay(2);
}
function remove_tooltip () {
stopDrag ();
removeMovieClip (“tooltip1”);
}


Now make a graphic and name it ‘caption’ give it two layes;
one with a nice background and another with a dynamic txtbox, multiline, wordwrap turned on
and give it the variable ‘tooltip’.
This is going to be your tooltip.

Now make a new Movieclip and call it caption_MC, leave the first frame blank with a
stop() action, in the second frame put your caption graphic you`ve just made and
also give it a stop() action.
Put this graphic about 25 pixels under the + ‘centercross’ (the point where x and y are zero).
This way you are creating the illusion that the tooltip is ‘floating’.
Put this MC on the main stage, doesn`t matter where. Give it the instance name ‘tooltip’.

Now make a button with some nice up-, over-, down-, and hit states,
put this in your main timeline with these actions :

on (rollOver) {
_root.tooltip(“This is a mouse following tooltip!”);
}
on (rollOut, dragOut) {
_root.remove_tooltip();
}