11-04-2007
|
#1 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
|
swapping images dynamicly
I'm trying to create an roll-over effect purely with action script. The idea is as following: There is an empty movieclip called mc1, then I dynamicly load an picture from my library into that. And when I roll-over an other picture will load into the mc.
How do I do this? it's not working with an simple, "mc1.loadMovie(pic1);"
So can this be done, and if so how?
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."
~Thomas Edison~
|
|
|
11-04-2007
|
#2 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
|
solved! code explained
alright, I got this one solved. I was using the wrong bit of code. For the people who want to know:
on (release) {
main.attachmovie("att1", "newname1", 1);
}
is the right bit of code, where "main" is the movieclip it should load to, "att1" is the file it should load.
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."
~Thomas Edison~
|
|
|
11-06-2007
|
#3 (permalink)
|
|
Sometimes...Mastermind
Join Date: Jan 2007
Location: Atlanta
Posts: 118
|
that's a promising little snippet there, unleash:
Wouldn't it be somehow possible to set up a real simple scene with 2 media playback components, fed by 2 external mp3s like you did with the images?
That would give them independent play\volume controls, right?
Are you thinkin what I'm thinkin?
...REEEEEEMIX!

__________________
|
|
|
11-06-2007
|
#4 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
|
Reeemix indeed
I didn't even think about it that way, I just tryed to get a slideshow/ gallery thingy to work. But that is indeed a great idea....
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."
~Thomas Edison~
|
|
|
11-07-2007
|
#5 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
|
Ooh Ooh, just an update,
I tried an "mutated" version of that part of code yesterday, for fun really. I made like a mini scratch table with 4 songs  It was fun to make but I forgot to save the files
did you have any luck?
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."
~Thomas Edison~
|
|
|
11-07-2007
|
#6 (permalink)
|
|
Sometimes...Mastermind
Join Date: Jan 2007
Location: Atlanta
Posts: 118
|
Freakin awesome, unleash!
I haven't had a chance to start on it, but I bet I can piece it together.
I've been thinkin, though. It could also use drop-down menus to feed the song instances, yeah?
Maybe they could go to a whole music folder.
And since AScript 3.0, you can put custom sound effects on a sound instance. Like gate filters and fades and all that. Do you think those can be controlled by AScript, too? Man! I gotta finish some of these WIPs so I can do this. 
__________________
|
|
|
11-08-2007
|
#7 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
|
hmm, good questioning
As far as I know everything in AS3.0/ CS3 is an object but also a variable. So if the classes are configured the right way everything should be possible:P
so I think that everything can be controlled by AS3.0 but you should put in a listener then. Then it would also be cool if you could make a "game"where people could like mix there own sounds and then save them onto their hard disk, don't you agree?
anyways I will have a look at it this afternoon maybe I can figure some things out.
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."
~Thomas Edison~
|
|
|
11-08-2007
|
#8 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
|
alright a new question occurd,
how can I center dynamicly loaded content(images), I used the snippet above in AS 2.0 but how to do the same in AS 3.0?
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."
~Thomas Edison~
|
|
|
11-08-2007
|
#9 (permalink)
|
|
photoshop ninja
Join Date: Oct 2006
Location: Red Deer - ish, alberta
Posts: 512
|
Quote:
To center something that is aligned to the left is pretty simple, you just need to think a little differently about what's going on. Say you have a Movie Clip centered vertically and horizontally on the Stage. Well, the top-left corner, where the registration point is, is located a little off-center. In fact, it is located at the center (which equals half the width of the Stage), minus half the Movie Clip's width and minus half the Movie Cli's height. So to center that with ActionScript, you simply place it:
myMovieClip._x = (Stage.width/2) - (myMovieClip._width/2);
myMovieClip._y = (Stage.height/2) - (myMovieClip._height/2);
Or, to center one Movie Clip within another (like an image within a frame):
mcImg._x = mcFrame._x + ((mcFrame._width/2)-(mcImg._width/2));
mcImg._y = mcFrame._y + ((mcFrame. _height/2)-(mcImg. _height/2));
|
i found this snippet from another forum
Just don't tell tamlin i went elsewhere for information 
__________________
Your a Graphic Designer...If you could go back in time you wouldn't go back to see the rise and fall of civilizations, you'd go back in time to destroy comic sans and papyrus.
|
|
|
11-08-2007
|
#10 (permalink)
|
|
Just unleashed!
Join Date: Jul 2005
Location: Inbetween
Posts: 2,198
|
hmm, I had that part solved...but that is AS 2.0,
and AS 3.0 isn't responding that well to that code
I will have another go at it, maybe an update tomorrow...
__________________
"I haven't failed, I've just found out
10.000 ways that don't work."
~Thomas Edison~
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 01:15 AM. Content Relevant URLs by vBSEO 3.2.0
|