Hi folks…
PLEASE PLESE HELP ME!!.. iv bin writting on every forums and searching the internet for help, but nothing has turned up…
I am total noob regarding AS. I bought a download app from flashden.
here the linkto the app I bought:
http://www.flashden.net/item/force-download-with-php-and-flash/5649
Now as you see, there are no info on the thumb pic. So i looked and tried all sots of tutorials regading tooltip. And they all worked with movieclips or buttons. My thumb pic are loaded in via xml.
How can I apply a tooltip effect or make some containers or clips so i can use some of the cool looking tooltip out there. I saw some real nice tutorilas on tooltip but i cant use any of them
Please help me.
Here the simpel code for the xml file(loads in the thumbs and the filename which are to be downloaded):
<images>
<img thumb="pdflogo.jpg">help.pdf</img>
<img thumb="thumb2.jpg">image2.jpg</img>
<img thumb="rarlogo.jpg">mailform.rar</img>
<img thumb="soundThumb.jpg">16.wav</img>
<img thumb="thumb5.jpg">image5.jpg</img>
<img thumb="thumb1.jpg">image1.jpg</img>
</images>
and her is the code for the action script. which is are #include"code.as"
//**************************************************
//******************** SETTINGS ********************
//**************************************************
var thumb_width:Number = 53; // Thumbnail width
var thumb_height:Number = 40; // Thumbnail height
var thumb_sep:Number = 5; // Separation within thumbnails
var columns:Number = 8; // Number of thumbnails columns
var thumb_alpha:Number = 50; // Thumbnails alpha
var images_folder:String = "images_down/"; // Images folder (thumbs and images)
//**************************************************
//*********** NOTHING TO CHANGE FROM HERE **********
//**************************************************
// Import animation classes
import caurina.transitions.Tweener;
// Read XML of images
var imagesXML:XML = new XML();
imagesXML.ignoreWhite = true;
imagesXML.onLoad = parseXML;
imagesXML.load("download.xml");
// Function to attach thumbnails and give them actions
function parseXML():Void
{
var r:XMLNode = imagesXML.firstChild; // First node
var n:Number = r.childNodes.length; // Amount of images
for (var i:Number = 0; i < n; i++) // Generate thumbs
{
var image:MovieClip = cont.attachMovie("thumb", "thumb" + i, i); // Attach MC from Library
image._alpha = thumb_alpha; // Set alpha at beggining
image.id = i; // Save value
image._x = (thumb_width + thumb_sep) * (i % columns); // Thumb _x value on rows and columns
image._y = (thumb_height + thumb_sep) * int(i / columns); // Thumb _y value on rows and columns
image.img.loadMovie(images_folder + r.childNodes*.attributes.thumb); // Load image on thumb
image.onRollOver = function():Void { // RollOver effect
Tweener.addTween(this, {_alpha:100, time:.3, transition:"easeOutQuad"}); // Alpha to 100
};
image.onRollOut = function():Void { // RollOut effect
Tweener.addTween(this, {_alpha:thumb_alpha, time:.3, transition:"easeOutQuad"}); // Alpha less
};
image.onRelease = function():Void // onRelease actions
{
getURL("download.php?f=" + r.childNodes[this.id].firstChild.nodeValue, ""); // Call PHP to force download
};
}
};
// Function to center the thumbnails on Stage. Delete this function if you will use this in another SWF
/*cont.onEnterFrame = function():Void
{
this._x = ((Stage.width / 2) - (this._width / 2)); // Center thumbs on X coordinate
this._y = ((Stage.height / 2) - (this._height / 2)); // Center thumbs on Y coordinate
}*/
Please help me…
Regards Hrbi