Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mouse over on movieclip 1

Status
Not open for further replies.

rds747

Technical User
Joined
Mar 8, 2005
Messages
180
Location
US
Is this possible?

Have a movieclip in motion embedded into a button so when the user rolls over the movieclip/button a form is displayed? It seems possible.

Is there a tutorial that shows this example?

I'll try this out soon.
 
perfectly possible in a number of ways

perhaps the easiest is to have the form as a separate swf and load this into an empty clip (myform say) on rollover

myclip.onRollOver = function(){
myform.loadMovie("form.swf")
}

well im sure you get the idea


 
ok, I'm attempting to use the rollover event of the movieclip, but am having difficulty with it. Here is the code:
Code:
createEmptyMovieClip("my_mc", getNextHighestDepth());
my_mc.loadMovie("Glassimage.jpg");
my_mc._x = 200;
my_mc._y = 200;
my_mc.onPress = function () {
    trace ("onPress called");
}
But the output panel doesn't show up. GlassImage is just a static image of a glass I drew in MSPaint.

Thanks for the help!
 
nothing wrong with the code.....fault lies with jpg...try with a different jpg file and ought to work well

make sure code is on main timeline
 
I have a couple of onPress methods for different movie clips that are referencing the same function. For example, both Example1_mc.onPress and Example2_mc.onPress call the function funCellName.

So would there be a way that I can code in AS Example1_mc.onPress, Example2_mc.onPress = function () { funCellName()} as both movie clips are referencing the same function.

Thanks!
 
Makes sense..Flash isnt so bad after all

Another question is when I'm creating a textfield through ActionScript, how do I give it a variable name? I know the first parameter is an instance name, but how do I assign a variable name to the textfield?

Thanks!
 
Is there an "exit function" in flash or something similar?
 
If I created a function, that isn't expected to return a value, and the function has a boolean in which if it is true then the function should exit.

Does ActionScript have a way that I can do that? In Vb or C++, I would be able to use the built-in method exit function or exit sub.

Also, if I have an array of type number, which has decimal values that need to be converted to integer, how would I convert that array to type integer? I know there is a parseint, but from what I've read it only works for type string.

Thanks for the help!
 
The only thing similar to "exit function" in AS is "break". You can use it to exit loops. Otherwise you can use the "Try...Catch...Finally" or just carefully craft your "if" statements.

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
So one more question..

I have two movieclips. One is a movieclip of an object that starts from its home position and starts moving along the x and y coordinates, 2 pixels at a time, reaching a destination point. Once it reaches that destination point it needs to be grouped together with the 2nd movieclip and move back to its home position.

Is there a way in ActionScript to group together two movieclips?

Thanks for the help!
 
if I create an empty movieclip with an image loaded into it, why can't I retrieve its height?

Below is an example where I tried to get the height of a movieclip. The trace gives me back 0.

Is it because the movieclip doesn't resize itself to the image that I loaded into it? If that's the case how would I retrieve the size of a movieclip with an image in it.

Code:
this.createEmptyMovieClip("Rectangle_mc", 0);
Rectangle_mc.loadMovie("Rectangle.PNG");
mfunsendHeight(Rectangle_mc._name);

function mfunsendHeight(RackHeight:Object)
{
   trace("MovieClip height is " + getProperty
   (RackHeight,_height));
}
 
You don't have access to the properties, until the movie or picture is fully loaded.
Often the movie clip holder is set to be invisible to start with (_alpha set to 0), the movie or picture loaded and it's loading monitored (preloading code)... Once it's fully loaded, and you have access to it's properties, you can then position, scale the movie clip, and then set it's alpha back to 100%.

Regards. Affiliate Program - Web Hosting - Web Design
03/13/05 -> OLDNEWBIE VS FLASHKIT
 
is there a property that allows to change the color of a movieclip?

thanks!
 
How do I use the CallFunction in the Flash8 component to send a boolean in the <argument> tag to VB6?

I tried <argument><bool>""bValue = true""</bool></argument>
 
if I have a string that holds the instance name of a textbox that I want to create, how would I do that? This is what I've tried:

Code:
sTextField = new TextField
createTextField(sTextField, getNextHighestDepth(), x , y, w, h)

but when I try trace("Name of textbox is " + sTextField._name); neither of the two attempts work.

If someone can help me. I would like to also put a border and size limitation (TextFormat) on the textboxes.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top