hollywoood69:
Don't store pictures in the array, just store a reference to pictures. e.g
var pics:Array = ["pic1.jpg", "pic2.jpg", ...];
//btn is the btn you click on
btn.onPress = function()
{
//mc is the movieclip that holds your pictures
mc.loadMovie(pi cs[Math.random() * pics.length]);
}
_______
Cainnech:
remove inverted commas, i.e:
moviename...
User Profile
Collapse
-
AS3 is a complete change from AS2. Most of the code has changed in how it works. There is no code on movieclips anymore. Have a look for tuts on AS3 if you ahve to move over to it, otherwise, just keep to AS2 (you can change your publish settings to AS2).Leave a comment:
-
It's actually more benficial using your way, as you can then also look at and modify properties of the textfield. So you can format the text, change it's _x, _y, look at how many lines of text it has, etc....Leave a comment:
-
You'll need to post your fla I think. Otherwise, just check what other elements may be accidentally placed on the stage. Are you loading elements by script possibly?Leave a comment:
-
Quitting the project (only with a projector: in publish settings, check Windows projector or Mac projector if on a mac)
Making text appear:Code:fscommand("quit");
make a dynamic text field, and give it a linked variable (put a name in the Var box, I've used "txt" in the following code). Make 2 buttons
On the one button
...Code:on(press) { txt = "someLeave a comment:
-
Make
dynamictextboxn ame_txt._visibl e = false;
. When the button is pushed, change it to
dynamictextboxn ame_txt._visibl e = true;Leave a comment:
-
What you want is a content management system made in flash. If you want to save the data that you change you will need to do some php/xml type stuff. It gets very complex. But if you just want to be able to change pics while the movie runs, but not save the changes you make, then it's a little simpler.
Your text boxes should be dynamic text boxes. Give them an instance name and change them like so (where the instance name is textField1):...Leave a comment:
-
I'm not sure what movieclips your script is refering to, but here's the simplest way to do it:
Create your movieclips like this:
Then do a loop to get the lowest movieclip on the stage. You may want to name your movieClips sequentially to simplify this (eg. loader1, loader2).Code:container_mc.createEmptyMovieClip("slideshow", container_mc.getNextHighestDepth());
...Code:mc = this["loader"
Leave a comment:
-
There are various programs that do this for you. You can't import the swf into flash and edit it. You have to decompile to fla file. The decompliers aren't perfect and you aren't actually allowed to do it.Leave a comment:
-
You need to embed the text. Masked text that isn't embedded won't show. Same thing if you rotate the text. I think the code is myformat.embedF onts = true;Leave a comment:
-
Just a clarification: The actionscript should all be in foo so that it doesn't take up bytes in the pic movieclip. So the 50bytes won't be exceeded by the pic movieclip. It should be at 12 or so anyway.Leave a comment:
-
If you have sequentially named files you could do something like this:
PSEUDO CODE:
create a movieclip called foo with a movieclip called pic in it(just onEnterFrame{if (getBytesTotal( ) < 50) exists = false;} Set exists to true in onLoadFrame.
The reason for a if(getBytesTota l() < 50) is that if the movieclip is greater than 50 bytes, it most likely has a picture file in it. an empty movieclip takes up around 12 - 16bytes...Leave a comment:
No activity results to display
Show More
Leave a comment: