Hi everyone,
I have put something together here that so far is just a page with 12 links. If you click on the dragable buttons, they load some experimental external swfs into that page. I have a few problems as you can tell by the subject of the thread, that I hope to resolve.
1- You have to double click the buttons. I know the scripts are not quite correct. How can I change the codes to use a normal single click on the buttons?
2- I tried to use a preloader on each of the movies loading into the stage, but I think there were some path problems. Am I suppose to avoid using _root and may be other terms?
3- What would be the aproach if I wanted to load those movies into a specific area, say a 300px by 300 px. Right now the empty movieclip I am using is taking three quarter of the screen. I would like to gradually use some more graphic to give it a half decent look.
4- If you click on the 12 oclock button, it loads a 3 minute clip of a song I have made (be aware of the lengthy loading time). you can see bits and pieces of the words on the right side of the screen. Is there any way to scale that clip to a smaller size so you can see the whole thing without messing with the clip itself. The full size is here.
Somebody tell me I’m suppose to plan ahead even when I want to do a small project like this one.
Thank you all so much.
My wife tells me that I have kirupa adiction.
1- There are lots of scripts out there on the web that detect double click etc. If you run a google search or a search on this forums, I’m sure you’ll find some.
2- _root can indeed cause problems when used in external swfs. This is because of the fact that if you load an swf in another movie, _root will target to the main timeline of the host movie in the entire movie, so also in your external swf that was loaded into it. You should use as much relative paths as possible. There is a good tutorial on paths here on kirupa.com.
3- Well, if you want your loaded movie to be 300x300px, the simplest and best way is to create your external swfs you’re loading with the size 300x300. If this is for some reason impossible, you can always adjust the size of the movieclip using actionscript after it’s been loaded. However, that might result in a distorted look.
4- You can always scale movieclips on your stage to any size you want (but of course, there are limits). This can be done using the transform panel for example, or using the free transform tool.
1- Here is the code used on each individual button:
on (press) {
startDrag("");
drag = true;
}
on (release, releaseOutside) {
stopDrag();
drag = false;
b2.onPress = function() {
loadMovie(“textrotation.swf”, _root.container);
};
}
I tried to use the function on the main timeline, but it didn’t work.
1-Double clicking is not what I intended to do. And yes, that’s the code on the buttons now. Is there a way to change the code so you can just have a single click? Also could the function be put on the main timeline instead of on the button itself? By the way each button is a movieclip converted to a button.
1-dragging is nothing special, just playing with codes.
if you test the movie, and click on a button, nothing happenes. If you click on the same button again, then it loads the swf.
so, can the code be altered that a single click would load the swf?
Voetsjoeba, thank you so much for all your responds.
I guess I’m gonna have to start the whole thing over and keep in mind all the issues that has come up.