ActionScript 2.0 :: [FMX] Control Function For MC's?
Apr 6, 2004
I have 120 MC's (little squares, names square_01, square_02, etc) around my stage like a frame around a painting. I would like to create an onRollOver/Out effect for these mc's, but it seems a bit much to me to place them all in an array.
The effect have to be that when you roll over the alpha is going to 0 and that on roll out the alpha will be restored to 100. I also would like the effect to be easing. I know how make a function to control the alpha. But I don't know how to continiue from there. I think it has something to do with a (for in) loop witch I tried, without any results.
View 7 Replies
Similar Posts:
Apr 6, 2004
I have 120 MC's (little squares, names square_01, square_02, etc) around my stage like a frame around a painting. I would like to create an onRollOver/Out effect for these mc's, but it seems a bit much to me to place them all in an array.
The effect have to be that when you roll over the alpha is going to 0 and that on roll out the alpha will be restored to 100. I also would like the effect to be easing. I know how make a function to control the alpha.But I don't know how to continiue from there. I think it has something to do with a (for in) loop witch I tried, without any results.
View 7 Replies
Nov 26, 2009
I have a keyboard which consists of 26 MCs, named keya, keyb, keyc.... and so on.
I want to create a button that will disable all these buttons at once, but I'm not sure how to express it in actionscript. Basically, I need it to say 'on release, key X (where x = all characters from a to z) _enabled= false;
View 3 Replies
Aug 14, 2010
I'm doing a simple game. When two objects collide, a function is activated with a movie clip of an animated explosion. I wonder how to do to control this animation so it's played two times? Just a simple for loop?Then another thing, how to create a short delay so that the code don't jump away direct without showing the explosion when there is code like gotoAndStop in the end of the function? Perhaps I also whant a tweeing rotation of the explosion movie clip before leaving the function? In some way it seem like it would be necessary with some delay?
View 0 Replies
Jul 21, 2004
I need a function to load and play external swf�s.
I need it to load and play intro.swf into movieclip clip1 , when it is finished load and play about.swf into movieclip clip 2. when this swf has finished load and play outro.swf into clip3. the swfs contains proggressive flv. The function should be as dynamic as possible, cause i need it to control other videoclips in swfs as well.
View 1 Replies
Jul 21, 2004
I need a function to load and play external swf's.I need it to load and play intro.swf into movieclip clip1 , when it is finished load and play about.swf into movieclip clip 2. when this swf has finished load and play outro.swf into clip3. the swfs contains proggressive flv. The function should be as dynamic as possible, cause i need it to control other videoclips in swfs as well.
View 1 Replies
Jan 5, 2009
This is the code for my cycle function on the main timeline:
var intID:Number;
var frame:Number = 0;
function playOn(){
if(frame == 2){
[Code].....
I want my button to clear the function and then stop where it is. Shouldn't this work?
on (release) {
_root.clearInterval(intID);
_root.stop();
}
View 6 Replies
Apr 27, 2007
I have been developing an interactive map, part of that has buildings, each is separate movie clip. Each needs to have a bit of stuff happen onrollover and stop onrollout. I have that all working if I code each building separate. Instead of having 60-80 nearly identical blocks of code, is there a way I can consolidate this down to less code. for instance, instead of declaring the name and path of the button I'm rolling over, is there a way for flash to figure that out by getting the name of the current movieclip the mouse is over and then sticking that in the code? here is the code as it is right now:
Code:
var tt2:TooltipBuilding = new TooltipBuilding(0x660000, 0x000000, 0xFFFFFF);
_root.mainMap.mainMap.cateteachingcenter.onRollOver = function() {
[code]......
View 1 Replies
Mar 12, 2004
I need to create a specific drawing sequence that uses multple clicks to arrive at a certain shape.
Basically, I need the user to be able to draw a pie wedge over a bitmap image. The actual drawiing is not the problem right now, what I am struggling with is how to control the action based on how many times the person has clicked.
On the very first click, a temporary line is drawn from the center of the image, and the user can move the mouse around to get the first line where they want.
They click again and the temp line is cleared and the final line is put in place. Then, as they move the mouse off that last end point, I need a new temporary line to automatically generate (this is the second straight side of the wedge). They click a final time and that line locks in place and the wedge completes.
Now, the problem I have is that I am using a switch statement to test the clicks. When the routine starts I've got the var _root.c = 0. Here's the switch:
[AS]switch (_root.c) {
case 0 :
_root.canvasArc.onMouseUp = drawFirstLine;
break;
[Code]....
As you can see I am incrementing _root.c at the end of this. This part works fine (I verified that it is making _root.c = 1), but it seems that by breaking out of the switch statement, it doesn't go back and check anything again, so my case 1 never gets read and the rest of the process can't happen. I tried an if statement and even looped through that with setInterval but that doesn't seem to work either. Is there just a smarter way to do this?
View 3 Replies
Jan 21, 2012
i've a problem about checking array with if statement.. my code is above and i can't see "it works" text on trace. I want to take the first value of an array after shuffle function, and i want to check it with if statement.
[Code]...
View 4 Replies
Jan 12, 2009
For instance, in the below code a parent can control a SWF child's function "alert ()". But how a SWF child can control parent's function "ReceivingChildMsg()" ?
View 4 Replies
Feb 28, 2012
Is it possible to reference a control in an application from a static function?
What I have is a Viewstack containing VBoxes stored in separate controls. Ex:
<mx:ViewStack id="content" width="100%" height="100%" resizeToContent="true">
<controls:Login/>
<controls:Dash/>
[Code]....
Once I get logged in on my login control, I would like to change the selected index of my ViewStack. From my outside controls, I cannot reference my ViewStack by name. I can reference a public static function from an outside control however I cannot refer to the ViewStack from within that function.
View 3 Replies
Jan 4, 2009
I have a flash piece with 3 main keyframes/story ("story1", "story2" & "story 3") that cycles (and loops) from story to story, and 3 buttons that stop the cycle and take you to one of the stories
So on my first frame I have:
_root.mainMC.playing = "true";
function playOn(frame) {
/gotoAndPlay(frame);
}
Then on each keyframe I have:
stop();
setTimeout(this,'playOn',2000,"whatever the next frame is")
Then on button I have:
on (press) {
_root.mainMC.playing = "false";
gotoAndStop("story3");
}
I think somehow I have to have the button clear the function because for example, if I am viewing story 1 during the cycle and click 3, it goes to 3 and then quickly goes back to 2 and then stops on 3.
View 9 Replies
Mar 8, 2012
I am trying to control a external swf file with a pause function. The main idea is loading an external file and when I want, pause it and its childs. The loader object is "introStage"
[Code]...
View 9 Replies
Feb 4, 2010
have a mc on stage ('sq') and it gets duplicated using the loop.have a simple Tween function for over state called 'over'how would I write so that when rollover on (for example) sq3,apply the over function to sq2 and sq4 as well (the ones next to the target)?[code]
View 3 Replies
Mar 31, 2004
I have a made function to control the alpha of a few squares. The function looks like this:
[Code]....
I know that I can call that function for one mc with: [AS]fadeSq (square1, 0, 4);[/AS] But is it also posibe to call the function for let's say seven mc's at once. I mean without writing seven lines of scrip?
View 14 Replies
Sep 15, 2011
I want to control which DisplayObject is displayed on the front or on the back. I can control that with zIndex style in css.
View 3 Replies
Dec 5, 2010
I am very new to flex and have trouble capturing the text change event of my text control:
<mx:Text id="description"
text=""
textAlign="center"
[code].....
View 2 Replies
Oct 12, 2009
I am trying to manipulate (move up and down, enable/disable and launch a form) child controls inside a panel control. However I am unable to get the id of the child control on which the click event occurs. To illustrate, I am trying to create similar functionality as is available. I am trying to create the up-down buttons that you see in the image at http:[url].......
View 2 Replies
Mar 21, 2011
im trying to make a music/sound control and FX sounds control,so i have my FX volume level as a variable(FX_vol) and also the Music/sound volume level as a diffrent variable(M_vol),so i set them as sounds that i can use trough coding:
[Code]...
View 2 Replies
Nov 4, 2009
Is it possible to control a Flash movie from JS when you have no control over the source? I have decompiled the movie to see its inner workings, but I know nothing about Flash, so I'm mostly in the dark. I found this resource, Interaction with JavaScript, but it's not working for me (probably because I don't know what message to send to the movie).
View 1 Replies
Mar 21, 2010
I have a flex application and have embedded a flash (SWF) file into it using <mx:SWFLoader>. There is an "Exit" button on the Flash file. I want to be able to handle the button click event on the flex application.
So when that button in the flash file is clicked, I want to perform an action in the parent flex application.
View 2 Replies
Sep 13, 2009
I'd like to control a movie clips current frame by another movie clips action script.I realise the following controls the outside (root) frame time line:
on(release){
_root.gotoAndStop(1);
}
but I'm not sure how to apply that to my other movie clip. I'm guessing it would be something like this:
on(release){
_*movie_clip_name*.gotoAndStop(1);
}
View 1 Replies
Nov 1, 2010
I've got a Vector of ViewToActionMap objects, which have following constructor:
public function ViewToActionMap(_forModule:eModule,
_forAction:eViewAction,
_toFunction:Function,
[code].....
View 1 Replies
Jan 2, 2012
1) Passing a control itself as parameter into a function 2) Passing an id ( managed manually) of the control as a parameter into a function . Say for an array of controls I have ctrl_Array = [ my_btn, my_mc, my_dtg ] and corresponding id_Array[0,1,2] PS: If my question is difficult to understand, i just wanna know, if it is a good programming practice to pass control references among the classes as function parameters ?
View 1 Replies
Oct 9, 2010
I'm trying to get this one function to be able to call many functions (not at once, but call many possible ones)In other words, I'm trying to get this variable to be named as a function. That way, this one variable can create multiple functions.example:
actionscript Code:
class Thing extends MovieClip{ var funcvar; var othervar; function onLoad() funcvar = "YYY"; othervar = "ZZZ"; function onEnterFrame()
[code].....
View 1 Replies
Jan 29, 2003
is it possible to write a function to move an object and then call that function on a clip event for instance
function (bounce){
script;
script;
}
and then call it by saying
on(mouseOver){
this.bounce;
}
View 2 Replies
Jun 23, 2009
is it possible to store a list of params needed for a function in an array and then use that in a funciton call?
[Code]...
or something like that?? Prob have to iterate the array but how do i get the params into the function call? Is this even possible?
View 6 Replies
Apr 21, 2010
How do I execute callback functions dynamically by passing a function in as an argument to another function?
Look at this example:
Code:
package {
public class myClass extends MovieClip {
public function myClass(callback) {
[code]....
View 2 Replies
Nov 27, 2009
I have a set of Cue Points in an FLV I'm playing. It's an interactive quiz, so the idea is that flash will change a variable, theAnswer, to a different letter depending on which question it is. The answer to question 1 is B, question 2 is D, etc. Either the cue point event listener isn't working, or else it is working and Flash isn't declaring the variables. 1120: Access of undefined property theAnswer. I literally can't find a single problem with my code. I have an almost identical Event Listener further down which works.
[Code]...
View 4 Replies