Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




MovieClip Listener ?



I have several swfs I need to load these will all play on a cd the same swfs are also being used for the web so I don't want to change any code in the swfs unless I have too.

So I created a contianer_mc and placed it on the stage at 0,0 and set my code thus:

ActionScript Code:
container_mc.loadMovie("Culture_History.swf", 0)container_mc._lockroot = true

This loads the first swf, is there a way to set up a movieClip listener or other script to load the next swf when the first is done playing?

Each swf must play in the correct order with out any user interface. A menu maybe added later.

Thanks



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 12-14-2006, 03:18 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Listener For A MovieClip
have a quick question is it possible to add a eventListener to a movie clip to listen for mouse rollover?

I have the following code:

Any ideas? Thanks

Attach Code


Code:
my_mc.onRollOver = function () {
trace ("onRollOver called");
};
_______________________________
I want something like this to take place, is there any way to make it happen? i notice that it just doesnt trigger. So i dont really know if you cant make the movie clip listen for it. Anyone know a way?

Code:
var mouseListener_obj:Object = new Object();
mouseListener_obj.onRollOver = function() {
this.tween(["_xscale","_yscale"],[50,50],1,customEasing);
};

glass_mc.addEventListener("onRollOver", mouseListener_obj);

Is It Possible To Have A Listener Placed On A MovieClip?
Hello,

I wonder if it is possible to have a listener such as addEventListener be placed on any given MovieClip and when that movie clips is clicked upon or onRollOver()
it would trace a message. I can certainly do it by using a function and then passing the movie clip as a argument of that function like this:


PHP Code:

function ShowHello(target:MovieClip):Void
{
    target.onPress = function(){
        trace("HELLO");
    }
}

//Slider is a clip on Stage
onEnterFrame = function(){
    ShowHello(slider);
}



I would like to learn how to implement a listener on a MovieClip so whenever that movieclip is clicked or so, listener would sense it and fire a function. Appreciate all the help.

Thanks a lot.

this is what I tried with a listener and no show:


PHP Code:

function ShowHello(){
   trace("HELLO");
}
var myListener:Object = new Object();
myListeren.onPress = ShowHello;
slider.addListener(myListener);


At least this is what I have learned about listeners.

Movieclip Event Listener
I am trying to figure out a way to add a listerner event to a movieclip that will perform a function once the movieclip has stopped playing.

I have a movieclip that has two labels, the first is "displayImage", and the second is "hideImage". When the user clicks on a thumbnail, I use "movieclip_mc.gotoAndPlay("hideImage")" and then "movieclip_mc.gotoAndPlay("displayImage")"... the problem is that it doesn't wait for the first "gotoAndPlay" to complete before running the second one, so only the second one is visible on the stage. So I was thinking about splitting them up into two functions and if I could add an event listener to the movieclip_mc, then when it stops, the second movieclip could play.

Any ideas would be greatly appreciated.

Thanks,
Brian

MovieClip Listener Problem
I have tried to follow the example in the flash help files but my movieClip listener doesn't seem to be working. What am I not doing correctly?

ActionScript Code:
var container:MovieClip = obj_mc.createEmptyMovieClip("container", 999);//loadMovie("decals/chair.swf", container);obj_mc.mcl = new MovieClipLoader();obj_mc.mcl.addListener(mclListener);obj_mc.mcl.loadClip("decals/chair.swf", container);//var mclListener:Object = new Object();mclListener.onLoadInit = function(target_mc:MovieClip) { target_mc._x = Stage.width/2-target_mc._width/2; target_mc._y = Stage.height/2-target_mc._width/2; var w:Number = target_mc._width; var h:Number = target_mc._height; target_mc.lineStyle(4, 0x000000); target_mc.moveTo(0, 0); target_mc.lineTo(w, 0); target_mc.lineTo(w, h); target_mc.lineTo(0, h); target_mc.lineTo(0, 0); target_mc._rotation = 3; //};//obj_mc.onPress = function() { this.attachMovie("rotate_mc", "rotator", this.getNextHighestDepth(), {_x:25, _y:-50}); trace("test"); delete this.onPress;};

Movieclip Property Listener
I'd like to know when a property of a movieclip changes to fire a function, instead of having an onEnterFrame.

For example knowing when _width changes and moving another movieclip according to the new _width value.

I've googled and no one seems to have this problem in any forum...

I don't know how to set a listener to a variable or a property...

I've tried with object.watch with no results...

The manual says

Quote:




Generally, predefined ActionScript properties, such as _x, _y, _width, and _height, are getter/setter properties and cannot be watched with Object.watch()




I know get/set are OOP concepts but I don't really understand how can get/set help me with that. (I'm a designer...)

Any help is appreciated. TIA!

Listener, Movieclip Alpha
hello - is there a way to set a movieclip._visible=0; when an alpha fader has finished?

I've got an mc with buttons inside that i need to deactivate when its _alpha becomes 0.

How would a listener pick this up?

many thanks. D.

AS3 - Listener And Movieclip Interaction
I have a movie clip that has a dynamic text field nested.

sai_btn.btnlabelTxt

i have an event listener
sai_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverFunc);

but when I rollover it , the button only works on he outer edges of the sai_btn.

I dont get why it doesnt work if I touch any part of the sai_btn movieClip

MovieClip Subclass Listener Problem
I noticed a problem with MovieClip subclass instances that are created via associating the class to an mc symbol from the library. Attached code and files below.

EDIT: I think I located the problem... is it because onMouseDown is a built in method of the MovieClip class... are all MovieClip instances automatically added to the Mouse's listener list? ... if yes, I assume the line "Mouse.addListener(this);" a redundancy... I am assuming this because when that line is removed everything works correctly.

The problem is this... when I attach an mc to the stage and that mc's class adds it as a listener to let's say the Mouse, all event calls are made twice. This poses a major problem.

Anyone have any suggestions? ... is there a way to reference the symbol that represents a class from within the class api?

Code:

.as file:

Code:
class Test extends MovieClip {
public var counter:Number;

public function init():Void{
counter = 0;
Mouse.addListener(this);
}

public function onMouseDown():Void{
trace("MouseDown event recorded");
counter++;
trace(counter);
}
}
.fla file is attached to the post

Event Or Listener For A Movieclip Resizing?
I'm having trouble with the following script. Its using Macromedia... err Adobe's Javascript proxy class to interact with javacsript. The part works great. My problem is that I'm changing the height of the stage to basically match the height of my movieClip(dyn_mc) that contains a textField(dyn_txt) and the stage. Well if I hard code a height instead of "dyn_mc._height" it works great...


Code:
import com.macromedia.javascript.JavaScriptProxy;

var proxy:JavaScriptProxy = new JavaScriptProxy();

btn_btn.onPress = function() {
dyn_mc.dyn_txt.autoSize = "Left";
dyn_mc.dyn_txt.textColor = "0xFFFFFF";

content = new XML();
content.ignoreWhite = true;
content.load("http://www.scotech.us/Joomla/");
content.onLoad = function(success){
if(success){
dyn_mc.dyn_txt.htmlText = content;
proxy.call("changeStageHeight", dyn_mc._height, new Object());
}
}

}
so I'm guessing I'm just not giving it enough time to load the text so the height hasn't changed. I need to know if there is some way to have an event or listener of some sort to fire when the text is not only loaded (already have that with XML) but is fully displayed in the textField.

Does something like this, dyn_mc.onResize, exist? Also if there is an event is there some way to load it at a slower pace... like as growing effect instead of it all just loading at once?

Move A Movieclip With Mouse Listener
Howdy folks!

I have a movieclip name:bg, width:4000, height:2000.

What I want/trying to do:
When you hold down the mouse over the movieclip bg and move the mouse
bg will move aswell. Similar to the startDrag function, however i want to
add some animations to it (when you release the mouse the movieclip will
still slide a bit before it stops) and therefore startdrag is not an option this time.

worth mentioning is that stage will always be 100% of the browser window
and bg should always cover the whole stage

this is what i got so far:


ActionScript Code:
package code
{
    import flash.events.*;
    import flash.display.*;
    import caurina.transitions.*;
   
    public class Bakgrund extends MovieClip
    {
        var MouseOnPressX:Number;
        var MouseOnPressY:Number;
       
        function Bakgrund()
        {
            stage.addEventListener(MouseEvent.MOUSE_DOWN, _mouseDown);
            stage.addEventListener(MouseEvent.MOUSE_UP, _mouseUp);
        }
       
        function _mouseUp(evt:MouseEvent)
        {
            //Remove the mouse-move listener
            stage.removeEventListener(MouseEvent.MOUSE_MOVE, _mouseMove);
        }
       
        function _mouseDown(evt:MouseEvent)
        {   
            //So whe know where the mouse were when the mouse-down event fired
            MouseOnPressX = evt.stageX;
            MouseOnPressY = evt.stageY;
           
            //Add a listener so we know when the mouse change position
            stage.addEventListener(MouseEvent.MOUSE_MOVE, _mouseMove);
        }
       
        function _mouseMove(evt:MouseEvent)
        {
            var newX:Number;
            var newY:Number;
            var evtX = evt.stageX;
            var evtY = evt.stageY;
            var changeX:Number;
            var changeY:Number;
           
            //How many px the mouse been moved
            changeX = MouseOnPressX - evtX;
            changeY = MouseOnPressY - evtY;
           
            //Do the math here - this is where i need help
            //Really i have no idea what i should do here
            newX = (stage.stageWidth / bg.x) - changeX;
            newY = (stage.stageHeight / bg.y) - changeY;
           
            //Will add tweener when newX, newY got right values
            bg.x = newX;
            bg.y = newY;
            //Tweener.addTween(bg, {x:newX,  time:0.2, transition:"linear"});
        }
    }
}

Thanks in advance

Movieclip Event Listener Not Working
Hey, I got this movie clip that is a menu that drops down on a ROLL_OVER EventListener and scrolls back up on a ROLL_OUT EventListener. Inside this Menu movieclip are more movieclips serving as buttons like pause and play. Here's the code for the button that is working fine.

mstart.addEventListener(MouseEvent.MOUSE_DOWN, start_down);

function start_down(evt:MouseEvent):void{
mstart.gotoAndStop(2);
}

here's the code for the pause movie clip.

mpause.addEventListener(MouseEvent.MOUSE_DOWN, pause_down);


function pause_down(evt:MouseEvent):void{
mpause.gotoAndStop(2);
}

The clip IS defined as mpause in all keyframes... BUT
the pause movie clip is un-clickable... As if there's no code for it at all... Why?

Nested Movieclip Event Listener
I'm trying to build a dynamic drop down menu that will eventually be populated with XML. The problem I'm having is once the sub menu has dropped, I can't get it to move back up after I roll off of the sub menu. What am I doing wrong?








Attach Code

import flash.display.MovieClip;
import caurina.transitions.Tweener;
import com.utils.CallArg;

stop();
var menuData:XML;

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
//loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
loader.load(new URLRequest("menu.xml"));

function onComplete(evt:Event):void{
menuData = new XML(evt.target.data);
var menuCount:Number = menuData.Nav.subnav.length();

var subNav:MovieClip = new MovieClip();
subNav.height = 180;
subNav.width = 180;

var navBar:MovieClip = new MovieClip();
addChild(navBar); //Container for button

for(var i:Number = 0; i < menuCount; i++)
{
var txtFld:TextField = new TextField();
txtFld.textColor = 0x000000;
txtFld.selectable = false;
txtFld.mouseEnabled = false;
txtFld.text = "hello" + i;

var linkMC:MovieClip = new LinkContainer();
linkMC.y = i*30;
txtFld.y = i*30;

navBar.addChild(linkMC);
navBar.addChild(txtFld);

linkMC.addEventListener(MouseEvent.MOUSE_OVER, CallArg.create(onMouseOver, txtFld.text));
}

navBar.addChildAt(subNav, 0);
addChild(navBar);

subNav.addEventListener(MouseEvent.MOUSE_OUT, CallArg.create(moveUp, navBar));

navBar.y = -150;

var drop:MovieClip = new Drop();
addChild(drop);

drop.addEventListener(MouseEvent.MOUSE_OVER, dropDown);

function dropDown(evt:MouseEvent):void{
evt.target.buttonMode = true;
Tweener.addTween(navBar, {y:20, time:.5, transition:"linear"});
//trace("drop");
}


function onMouseOver(evt:MouseEvent, txt):void{
evt.target.buttonMode = true;
evt.target.alpha = 0.4;
//trace(txt);
}


}


function moveUp(evt:MouseEvent, clip):void{
evt.target.buttonMode = true;
Tweener.addTween(clip, {y:-120, time:0.5, transition:"linear"});
trace("navBar");
}

Listener For Checking Resize Of Movieclip?
Hi

I got a very short question but I can't seem to find it on the internet (might be because I'm using the wrong terms).

Is it possible to listen with a listener when a movieclip has been resized?
I know there is a listener to do this with the Stage object.

If this is not possible: do I have to make an interval that constantly checks if a movieclip is resized?

Greetz
Arcko Drazen

Show Hide A Movieclip With A Listener?
Hi,

wondering if you can give me an example of a show/hide a movieclip with a listener. That is, i was planning to have a boolean flag variable showSubMenu and if it's true the submenu will be visible and if false it's hidden???

Can I Have An Event Listener For A Movieclip's StartDrag Function?
hey. lets say i have a movieclip of a beach ball, and i have it startDrag() on mousedown like so:

beachball.addEventListener(MouseEvent.MOUSE_DOWN, moveBall);
function moveBall(event:Event):void {
beachball.startDrag();
}

i want it so while the beachball is being dragged around, it trace()'s the ball's X and Y coordinates out. how do i make an event listener for when the beachball is under a startDrag() status?

Removing A Event Listener From Parent Movieclip
Is it possible to remove an event listener from a parent movieclip within the child of the parent?

How To Talk To Main Timeline From Movieclip Listener
I'm working on on animated navigation. Each button is an instance of a PrimaryButton class. When each button is rolled over, I want it to trigger a function on the main timeline, but I'm having trouble doing so. I tried:


Code:
private function trigger(evt:MouseEvent)
{
root.testParent();
}
but that gives me an error of:
1061: Call to a possibly undefined method testParent through a reference with static type flash.displayisplayObject.

What is the appropriate way to let the main timeline or Document Class know when an instance on the timeline has had its MouseEvent triggered?
Thanks for any help!

Remove Event Listener Until Another Movieclip Is Clicked
Here is my current code. I want to removeEventListener until this button has been clicked (mc_altogether.mc_imac.mc_backdesk.) How would I code that in?

Code:

mc_altogether.mc_imac.addEventListener(MouseEvent.CLICK,imacin);

function imacin(e:Event):void {
mc_altogether.mc_imac.gotoAndPlay(10);

mc_altogether.mc_imac.removeEventListener(MouseEvent.CLICK, imacin);


mc_altogether.mc_imac.mc_backdesk.addEventListener(MouseEvent.CLICK,imacout);

function imacout(e:Event):void{
mc_altogether.gotoAndPlay(15);

mc_altogether.mc_imac.mc_backdesk.removeEventListener(MouseEvent.CLICK, imacout);
}
}

Is it just a case of adding the EventListener again? If so where? I've tried a few things, not got it to work as yet.

Problem Adding Listener To Movieclip Grabbed From Stage
Hello people i'm have a issue with this errorTypeError: Error #1009: Cannot access a property or method of a null object reference.

The error occurs from a display object i assign to a variable in my class using:

submitBtn = this.getChildByName('submitButton') as MovieClip

then i add Eventlistener

submitBtn.addEventListener(MouseEvent.CLICK,submis sion);

On click of it returns that error. Any suggestions


Thanks

Event Listener To Hear When A Movieclip Is Complete To Apply GotoAndPlay
This may be an obvious answer or I'm probably doing things the hard way... but here goes.

I'm trying to make a button send the playhead to the second half of a movie clip nested on root and then go to a different movieclip upon completion of that one. I need to know what type of eventlistener to create within the first event listener that will send the playhead to the second movieclip.

I'm trying to employ what i'm calling an "intro out" animation.

Setting Up An Event Listener To Listen For An Event Inside Of Another Movieclip.
I'm trying to set up an event listener on the stage that will listen for a mouseEvent.CLICK on a certain button inside a movieclip on the stage, but i cant seem to figure out how to target that specific button. Any help would be greatly appreciated.

[shared Object] [listener] Attach Listener To SO?
Hi everyone,

I'm trying to build a simple sound control panel for voice-overs in an e-learning project.

I want to use one button to control whether or not users want sound played throughout the lesson.

Right now I'm using that button to write an SO that each audio file reads before playing anything. My problem now is if a user wanted to hear the audio after he or she has already entered the page. If a user clicks the audio-on button, it's simply changing the SO, not to be read until the next page and swf loads.

My initial thought was I could attach a listener to the SO, allowing Flash to interpret a change from OFF to ON and then start up the necessary sound files.

Would this work? I've searched and haven't found documentation for attaching listeners to SOs.

THANKS

Mouse Listener And Key Listener Problem..
Hi;

I used key listeners to detect the block in my crossword application but I have a focusing problem going on. I've tried everything but still couldn't find a solution. By the way I used a code that uses mouse listener to highlight the area I want to use but it sometimes craches the flash player. My .fla file is included in the message. Please help before I go mad.

.fla file :http://rapidshare.de/files/26952935/...2006_.zip.html

Thanks...

Listener Or ?
I have an interface that loads all other swf's and php into it.

My delemma is I want to set up one variable that is loaded from the php db after a user is logged in called "reg".

If "reg" has a value inserted in it from the db; Then have all the affected butons, mc's and swf's goto their registered mode.

I don't know how to set up the first part; I don't know the proper name for what I am trying to do. So I'm having trouble finding a tutorial on this subject. Which is making it hard to setup the second part.


Please Help;

Thanks

Listener Help
Had posted this in the MX room, but it's an Action Script ques, so here goes:

Been having trouble w/ a button and some movie clips:

Used to be, default movie wouldn't stop when secondary movie played (onMouseDown & rollOut).

Added a listener, works -- problem is, once listner is activated, anytime anyplace on the stage is clicked, default & secondary movies toggle.

Really annoying, 'cause 1) secondary movie is scroll text and 2) have like 4 of these buttons, so movies play on top of movies.

Any way to deactivate listener once mouse is rolled out of button?

I thought that bec code is in the button timeline, button would be hit area, not entire stage. Is a listener not the way to go??

Here's code:

----------------------

on (rollOver) {
gotoAndPlay("1open");
_root.mainStage.gotoAndPlay("stop");
_root.SuperPlay.gotoAndPlay("SuperGo");
}
on (rollOut) {
gotoAndPlay("1close");
_root.SuperPlay.gotoAndPlay("SuperStop");
_root.mainStage.gotoAndPlay("stop");
supListener = new Object();
supListener.onMouseDown = function() {
gotoAndPlay("1close");
_root.mainStage.gotoAndPlay("stop");
_root.SuperPlay.gotoAndPlay("SuperStop");
_root.SuperText.gotoAndPlay("SuperText");
};
Mouse.addListener(supListener);
}

----------------------

really appreciate it!

Key Listener
Ive read the AS dictionary and searched other posts
And still dont understand
I want a menu to ease in every time I have the M key pressed. And it to ease out ewhen I have the M key released.

I understand the easing, and have that code set up, but no matter what I just cant get the listener code to work, and I'm assuming this IS what I need

Key.Add Listener()
Hi,

does anyone know why Flash does not respond to the decimal and comma buttons on the keyboard.

function onKeyDown () {
var k = Key.getAscii();
trace (k);
}

while running this function, there is no response to these keys. Every other key works. I'm building a UI and really need these 2 keys.

thanks

With Or Without Listener
Hi,
How to return default value of List component to null i.e. List1.index = 0;?
Means if i scroll down scrollbar and with button (on (release) {bla bla})make a list component back to first item ... I ASSUME I WOULD NEED LISTENER BUT I WOULD LIKE TO TRY WITHOUT OR I'M WRONG ?
thanks in advance

Listener
I want to use a listener for to trigger a function.
Lets say the duration of a mc was 50 seconds.
When it reaches the 50 second mark I want the listener to call another function.

How would I use a listener for this?
I don't want to use setInterval or enterframe as there is far to many of them been used already and it is eating away at the cpu.
I don't know if this is true or not but I heard listeners are not hard on the CPU.
The only trigger when there called.
Or maybe I’m wrong. I'm new to listeners.

This is what I’m after but I want to use a listener or maybe someone has a better idea.


Code:
var dur=55
var position=timer.
if (position>=dur){
triggerFunction();
}

Help With Listener?
can anyone break down this code for me, i mean can someone please refrase the code to where i can make sense of it, and how i would use it? "laymans terms"

thank you as always:


Code:
var listenerObject.eventName = function(){
// your code here
};

Code:
broadcasterObject.addListener(listenerObject);

Code:
broadcasterObject.removeListener(listenerObject);

Listener
Can any object like a button or movie clip have a listener event so you can use it in the main timeline frame 1 if you like?

I am confused about what can be a listener event and what can't to use.

I am just talking about converting an object where you convert to a symbol, not a component.

I am confused ablout events and listener events as they appear to do the same thing. Can a button have an event and alisterner event in actionscript main frame (not in the actionscript for the button).

Listener
deleted

[F8] How Would I Add A Listener To This?
With the code below the function executes before I even call a start() on my fuse object. How can I avoid this? I imagine I need a listener of some sort but I have never used one before.

Here's what my code looks like now: code:
var lar1:Fuse = new Fuse();
lar1.push({target:_root.mc_1, Blur_blurX:25, Blur_blurY:5, seconds:.5, ease:"easeInBack", scope:_root.mc_1});
lar1.push({target:_root.mc_1, Blur_blurX:0, Blur_blurY:0, seconds:.25, ease:"easeOutBack", func:rollovertxt(), scope:_root.mc_1});

_root.mc_1.onRollOver = function(){
lar1.start();
};

function rollovertxt(){
_root.mc_1.txt1.setTextFormat(txtbg);
}


I would like the function to be called once the fuse tween is complete. How should I do that?

Key Listener
Hi guys,
I need to have the user to type (enter) in an input text field and then hit the enter key to go to another page. I'm trying to do it, but I'm stuck for some reason. Any help please?
See the attachment please!

[as2]Key Listener
Im using the following key listener to trigger a login function:
code:
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
login();
}
}
Key.addListener(keyListener);

However this triggers the login function twice, which causes the user to get a error saying they are already logged in. I have a button on the stage which triggers the same function.
code:
login_btn.onRelease = login;


And this works fine. Anyone have any ideas how I can ensure that the keylistener only triggers the login function once?

Thanks for any suggestions,
Harro

Listener Help
Hi,

I've got a function thats placing movie clips on the stage, and I need to make separate movie clips move to the next frame when you click them, but I'm not sure how to make them do that if the Delegate is inside a for loop, is it possible? do I need a listener or something?

here's my code:

public function setCubes ()
{
xArray = new Array ("10", "130", "250", "370", "490");
yArray = new Array ("15", "115", "215", "315");
memory.createEmptyMovieClip ("cubes", memory.getNextHighestDepth ());
while (lineNo <= 3)
{
memory.cubes.createEmptyMovieClip ("line" + lineNo, memory.cubes.getNextHighestDepth ());
memory.cubes.line0._y = yArray[0];
memory.cubes.line1._y = yArray[1];
memory.cubes.line2._y = yArray[2];
memory.cubes.line3._y = yArray[3];
memory.cubes.line4._y = yArray[4];
while (cubeNo == lineNo)
{
for (i = 0; i <= 4; i++)
{
memory.cubes["line" + lineNo].attachMovie("cube", "cube" + i, memory.cubes["line" + lineNo].getNextHighestDepth());
memory.cubes["line" + lineNo]["cube" + i]._x = xArray [i];
memory.cubes["line" + lineNo]["cube" + i].onRelease = Delegate.create(this, rotateCube);
}
cubeNo ++;
}
lineNo ++;
}
}
public function rotateCube()
{

}

Thanks
princess_b

Listener Help
I am having a problem, I have a var that gets set if my listener get fired off to tell me that it has been fired. So I put a while loop because I don't want anything to happen until my listener has been fired. Only problem is that locks up the movie. Is there something that I can do that lets me know that the listener has been fired?

IF Or LISTENER?
Hello all once again I am in a dilemma. First, thanks to Sophostikat for the help with the Tween/Transitions Class. I have definitely gotten what I wanted with that code help!

Now my issue:

I have three clips in my scene that move around the stage based on x and y positions. Now, what I need is a way to continually track when that clip has reached its destination so that I may fade in my album.

Do "if" statements continually run and evaluate? Or do I need to attach a announcer to tell a Listener to start the fade in animation once the clip has reached his destination?

Thanks in advance for the help!

¬badnewsblair

Key Listener
Hello Everyone

I need help!

Can anyone help me understand KeyListner functionality.

What I want to do is very simple.

I key value in the Textfiled and press Enter Button.

I should be able to trace the value enterned in my textfield.

For many in must be simple. So pls help

thanks in advance

Listener
Every object have events that you can simply code in the main frame1 eg object.onPress for a button.

I read the listener events are for object to communciate with each other as the main difference, but some objects i see have listener events but only deal with itself.

I am confused as to what a listener event is basically.

Should I Add A Listener?
I have a toggle button in my scene controlling audio levels. I also have a navigation bar movie clip, with nav buttons. When I hit any nav button, I want the toggle button also to react by executing the fade volume out function, if audio is playing. IOW, I want 2 buttons to react as if they are both being pressed at the same time.

Excuse my ignorance, but is this a potential job for a Listener object?

What Listener Mean ?
hello all,


if anyone understand what Listener mean please explain to me ?

i know how use it and i read many explanation but i can't understand it

any help well be great

Regards
Crimson

Would I Use A Listener Here?
Hey everyone,

I have a somewhat complex button that when I rollover it performs a couple different animations. When all of these animations are completed I want another movie clip to perform an action

Here is my code
Code:
btn.onRollOver = function(){
_root.tab01.dep = _root.tab01.getDepth();
_root.tab01.swapDepths(_root.tab01.getNextHighestDepth());
_global.startMove.call(tabBtm, 12, -18, 142, 85)
_global.startMove.call(tabTop, 12, -193, 142, 211.8)
_global.startMove.call(dropShadow, 0, -19, 142, 26)
_global.startMove.call(image, 12, -18, 142, 85)
_global.startMove.call(tabText, 12, -190, null, null)
_global.startMove.call(description,12,-140,null,null)
}
}
The last item with description as the target is what I want to happen last. I thought if I could somehow track the postion of 'tabText' so that when its _y is = -190 my last animation would execute.

Does anyone have any suggestions?

What Exactly Is A Listener
Im guessing that a listener is a invisible object in a frame? Is that correct. Im also guessing that in order to create a Function to be called You have to first create a listener like below

listener = new Object();

Listener.KeyUp = Function() {
Your Code......
}

?? Am I correct. Or In order for a function to respond to a users reaction. You have to create a listener like above. And a regular Function can be created but only behind the scenes. Someone help me out here

What Is A Listener
Do anyone in here know whats Listener? I would like to know more about it.

Key Listener
I am using a key listener to get the space bar to control a movie within a movie. I can see the (32) is the space bar and (16) is the shift key. Is there a reference for what number controls what keys? I have others that I want to use, but I don't know what controls what key.

Thanks,
Rich

Listener On Ftp
I know this is not the best place to ask, but since it's the best forum I know I'll try.
I have a flash upload function. How can I create a listener on my ftp that sends me a mail or whatever when a new file has been uploaded to the ftp folder..? Can I make one myself, and which language is it done with? Can't find any basic info on the net.

Listener Help
I ahve several button objects on stage and I am looking for a way to have them return their instance names or other properties without having to write a code for each. for example, for the button gaur_btn, I have

gaur_btn.onPress = function ()
{
trace(gaur_btn._x);
};

which return the x position of the button. How do I make it generic so that I do not ahve to write this for each button? Otherwise I will have tor epeat this 100 times for the 100 buttons I have which just doesnt look right. Help appreciated.

Key Listener
I'm a bit new to actionscript and does anyone know how to make a function for a button like the E key or something? cause everything I made before was with the arrow keys or the enter key or something

Copyright © 2005-08 www.BigResource.com, All rights reserved