-
Action help!
Ok, so I am not sure this is the best section for my question, but I hope I can gain some help anyway.
I am trying to make a website with flash. I would like for when you click on my button it changes pictures, and when you click off/onto another button, it goes back to the original link. Also I would like for the button to click to the write section in my content. This is my first time making anything like this and I need help. I don't know what I am doing wrong. T_T Here is the action script I have for that:
menu = ["about" , "portfolio" , "blog" , "contact" , "quilt"];
var current = menu[0];
for (var i = 0; i<menu.length; i++) {
var b = menu[i];
this[b+"-btn"].selected._visible = false;
this[b+"-btn"].txt = b;
this[b+"-btn"].onPress = function() {
_root.site[current+"-btn].selected._visible = false;
_root.site[this.txt+"-btn"].selected._visible = true;
current = this.txt;
_root.site.content.gotoAndStop(this.txt)
};
}
As I said I am very new at this so I could be totally wrong with what I have.
Also! I would like a loading screen for my website here is the action script I have for that:
onClipEvent (load) {
total-_root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
current = int(loaded/total*100);
p = ""+current+"%";
if (loaded ==total) {
_root.gotoAndStop(2);
}
}
These are the only two scripts I have for the site :-/
I tried to follow this tutorial but incorporating it to my own design. Have I failed completely or do I have some hope?
-
If you need more information to help me please let me know I will even zip everything for the flash up and put it up some where you could access it.
-
Originally Posted by Looney-Lola
Also! I would like a loading screen for my website here is the action script I have for that:
onClipEvent (load) {
total-_root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
current = int(loaded/total*100);
p = ""+current+"%";
if (loaded ==total) {
_root.gotoAndStop(2);
}
}
Well, first of all, you don't have to put variables everywhere. For example, indead of if(loaded == total) you could use if(_root.getBytesLoaded() == _root.getBytesTotal()). Also, you might want to make a stop(); somewhere to make sure it doesn't go to frame 2 anyway. The total-_root... seems incorrect...are you meaning total = _root.getBytesTotal();? Other then that the loader seems fine, assuming your dynamic text boxes, etc, are set up correctly. I don't really know anything about making websites it flash though.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|