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




OnRelease, OnReleaseOutside Equivalent



Hi,

Could anyone help me in finding out Equivalents for onRelease, onReleaseOutside

thanks



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 07-15-2008, 10:59 AM


View Complete Forum Thread with Replies

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

[F8] OnRelease & OnReleaseOutside
I had a problem with this droptarget. It seemed that sometimes the mc that was moved didnīt get stuck even if it was over the target. I figured out if the onRelease was to fast so it was more like an onReleaseOutside. I tried to use both but couldnīt find the right way. I solved it in another way for the moment but want to know how to solve it.

Hereīs the code.

---

_root.vag.sak4.onRelease = function(){
this.stopDrag();
if(eval(_root.vag.sak4._droptarget) == _root.vag.skal1 ){
_root.s4a = 12;
_root.s4b = 0;
}else if(eval(_root.vag.sak4._droptarget) == _root.vag.skal2 ){
_root.s4b = 12;
_root.s4a = 0;
}else{
_root.vag.sak4._x = punk4x;
_root.vag.sak4._y = punk4y;
_root.s4b = 0;
_root.s4a = 0;
}
}

Use Both OnRelease And OnReleaseOutside ?
Is there an easy way to use two event handlers together without repeating a function like this:


Code:
movieclip.onRelease = function() {
_root.gotoAndStop(2);
};
movieclip.onReleaseOutside = function() {
_root.gotoAndStop(2);
};
This would really help me clean up my code and reduce repetition.

I thought maybe this would work, but it doesn't:


Code:
movieclip.onRelease && movieclip.onReleaseOutside = function() {
_root.gotoAndStop(2);
};
Thanks!

Use Both OnRelease And OnReleaseOutside ?
Is there an easy way to use two event handlers together without repeating a function like this:


Code:
movieclip.onRelease = function() {
_root.gotoAndStop(2);
};
movieclip.onReleaseOutside = function() {
_root.gotoAndStop(2);
};
This would really help me clean up my code and reduce repetition.

I thought maybe this would work, but it doesn't:


Code:
movieclip.onRelease && movieclip.onReleaseOutside = function() {
_root.gotoAndStop(2);
};
Thanks!

OnRelease And OnReleaseOutside Bugs?
has anyone had problems with onRelease and onReleaseOutside movieclip syntax's?

I'm dynamiclly creating a scroller and all the other code works fine. The problem arrises when calling a function on onRelease or onReleaseOutside. The problem is that it irratically calls the function and it pisses me off somewhat. But by calling the function from onRollOut it works fine. What the hell...??

here is the code


Code:

function needArrows(arrowSize, dist, h) {
if (path.scrollMask._width/*less than sign here */path.thumbs._width) {
if (runMeOnce != true) {
drawArrows(arrowSize);
placeArrows(arrowSize, dist, h);
runMeOnce == true;
path.arrows.arrowLeft._alpha = path.arrows.arrowRight._alpha=100;
}
//calling from below
path.arrows.arrowLeft.onPress = pAL;
path.arrows.arrowLeft.onRelease = rA;
path.arrows.arrowLeft.onReleaseOutside = rA;
path.arrows.arrowLeft.onDragOut = rA;
path.arrows.arrowRight.onPress = pAR;
path.arrows.arrowRight.onRelease = rA;
path.arrows.arrowRight.onReleaseOutside = rA;
path.arrows.arrowRight.onDragOut = rAR;
path.thumbs.onEnterFrame = scrollDirection;
}
}

// here are the functions

function pAL() {
path.thumbs.thumbsMove = -1;
}
function pAR() {
path.thumbs.thumbsMove = 1;
}
function rA() {
path.thumbs.thumbsMove = 0;
}
function scrollDirection() {
if (path.thumbs.thumbsMove == 1) {
path.thumbs._x -= scrollSpeed;
if (path.thumbs._x<-(path.thumbs._width)+(Stage.width-(2*thumbX))){
path.thumbs._x = -(path.thumbs._width)+(Stage.width-(2*thumbX));
}
} else if (path.thumbs.thumbsMove == -1) {
path.thumbs._x += scrollSpeed;
if (path.thumbs._x>-dist) {
path.thumbs._x = -dist;
}
}
}
any ideas anyone?...ever happened to you? I suppose i could dynamically draw a box in a new mc behind the arrows then but a caller on that for onRollOver to call the function but thats not really effective.

Combining OnRelease + OnReleaseOutside?
How do you combine actions like you used to be able to? for example:


PHP Code:



on (release, releaseOutside)

OnReleaseOutside
I have been searching and searching and trying different things but this still wont work.

I have my class which is imported, where I create sprites and place them on the main stage. Now when I click on the sprite everything works well, but I need the onReleaseOutside for As3, so I have tried a ton of different methods but nothing seems to be working, so I am now trying the stage ident off of the SPrite, but I just get a null reference error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at LoZGC.source::lozTilelayer/::layerup()


So I have this:

layerStage.stage.addEventListener(MouseEvent.MOUSE _UP, layerup);

Where layerStage is my sprite in the class, which was added to the stage with addChild, and layerup is a function within my class, but when this is triggered I get that error... any help please!!

Help With OnReleaseOutside For AS3
I am making a drag/drop file and if I am not over the clip I began dragging, it wont release. I added an event to the stage for MOUSE_UP, but then when Im not over the clip I am getting an error:

http://ronnieswietek.com/boxas3.swf


Code:
ReferenceError: Error #1069: Property stopDrag not found on flash.display.Stage and there is no default value.
at com.ronnie::DragAndDrop/upHandler()[E:\__AS3com
onnieDragAndDrop.as:46]
Here is my code right now

PHP Code:



package com.ronnie{    import flash.display.MovieClip;    import flash.events.*;    import gs.TweenLite;    import gs.easing.Expo;    public class DragAndDrop extends MovieClip    {        private var p:MovieClip;        private var m:MovieClip;        private var boxes:Array = new Array();        public function DragAndDrop(parentClip:MovieClip)        {            p = (parentClip as MovieClip);            m = p.mH;            addEventListener(Event.ADDED_TO_STAGE, initBoxes);        }        private function initBoxes(e:Event):void        {            for (var i:int = 0; i < 4; i++)            {                var b:Box = new Box();                b.y = i * 50;                b.id = i;                b.txt.text = "Hello, I'm box number " + (i + 1);                b.txt.mouseEnabled = false;                                m.addChild(b);                boxes.unshift(b);                                b.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);                b.addEventListener(MouseEvent.MOUSE_UP, stopDragging);            }            removeEventListener(Event.ADDED_TO_STAGE, initBoxes);        }        private function startDragging(e:MouseEvent):void        {            var top:Number = 1;            e.currentTarget.startDrag();            e.currentTarget.alpha = 0.7;            stage.addEventListener(MouseEvent.MOUSE_UP, stopDragging);        }        private function stopDragging(e:MouseEvent):void        {            e.currentTarget.stopDrag();            TweenLite.to(e.currentTarget,0.5,{x:0,alpha:1,ease:Expo.easeOut});        }    }}




I need help so when I release on the clip or outside the clip it stops dragging.

OnReleaseOutside
Hi. I'm needing an onReleaseOutside. The workaround is to add a listener to the stage. I can get that to work in a test environment, but not in my app. It compiles ok, but when my constructor function is called and it tries to add a listener to the stage I get:

Cannot access a property or method of a null object reference.

Here is the part of my code that is not working:


ActionScript Code:
package window{

    import flash.display.*;
    import flash.events.*;
    import window.CursorManager;
   
    public class Win extends MovieClip{
           
        public var windowWidth:Number;
        public var windowHeight:Number;  
        public var windowType:String;
        private var borderWidth:Number;
        private var borderTolerance:Number=7;
        private var cursor:Number=0;
        private var resizing:Boolean=false;
        public var minHeight:Number;
        public var minWidth:Number;
        private var resizingCursor:Number;
        private var winManager:MovieClip;
               
        public function Win(p:MovieClip){
            winManager=p;
            windowWidth=200;
            windowHeight=200;
            resizeable=true;
            type="win98";
           
            CursorManager.windows.push([this,0]);
                       
            refreshWindow();
           
            /*
            addEventListener(MouseEvent.MOUSE_DOWN,myOnMouseDown);
            title.addEventListener(MouseEvent.MOUSE_DOWN,clickTitle);
            addEventListener(Event.ENTER_FRAME,myOnEnterFrame);
            */
            //stage.addEventListener(MouseEvent.MOUSE_DOWN,myOnMouseUp);
            stage.addEventListener(MouseEvent.MOUSE_UP,aListener);
           
           
            borderTop.mouseChildren=false;
            borderRight.mouseChildren=false;
            borderBottom.mouseChildren=false;
            borderLeft.mouseChildren=false;
           
        }
        public function aListener(e:Event):void{
            trace("hit");
        }

hmm. I miss onReleaseOutside. Any ideas?

AS3: How Do We Get Around Not Having OnReleaseOutside
Whats the new way of figuring out "onReleaseOutside" in AS3? Currently when I drag something and relase outside of the designated rectangle the object is not dropped using stopDrag().

Onreleaseoutside
Hi I am just working through some texts and altering the methods used to capture events.

In AS3 I am using the addEventListener - fine quite happy with that. however amongst the listed mouse events there doesn't appear to be an equivalent to onReleaseOutside. Before I embark on updating my media player to AS3 could anyone please advise what action I shoudl take in the case where I need onReleaseOutside or does the MOUSE_UP still handle it regradless?

Many thanks fro your time.

OnReleaseOutside In AS3
So I'm having a bit of trouble understanding how to replicate the onReleaseOutside method within AS3.

I'm trying to create a custom slider, so there's a MovieClip restrained to a thin rectangle, and it's very easy to move your mouse off of the slider MovieClip while dragging and release the mouse, but when I release outside, I'm stuck permanently dragging the MovieClip.

I've looked through tutorials but none seem to cover specifically dragging something that's been constrained. Any help is much appreciated.

OnReleaseOutside In AS3.0
What does onReleaseOutside become in AS3?

OnReleaseOutside
what's the as3 equivalent of onReleaseOutside? Because the event MOUSE_UP doesn't quite function like it..

Help With OnReleaseOutside For AS3
I read senoculars post on this but cant figure it out

I am making a drag/drop file and if I am not over the clip I began dragging, it wont release. I added an event to the stage for MOUSE_UP, but then when Im not over the clip I am getting an error:

Code:
ReferenceError: Error #1069: Property stopDrag not found on flash.display.Stage and there is no default value.
at com.ronnie::DragAndDrop/upHandler()[E:\__AS3com
onnieDragAndDrop.as:46]
Here is my code right now

ActionScript Code:
package com.ronnie{    import flash.display.MovieClip;    import flash.events.*;    import gs.TweenLite;    import gs.easing.Expo;    public class DragAndDrop extends MovieClip    {        private var p:MovieClip;        private var m:MovieClip;        private var boxes:Array = new Array();        public function DragAndDrop(parentClip:MovieClip)        {            p = (parentClip as MovieClip);            m = p.mH;            addEventListener(Event.ADDED_TO_STAGE, initBoxes);        }        private function initBoxes(e:Event):void        {            for (var i:int = 0; i < 4; i++)            {                var b:Box = new Box();                b.y = i * 50;                b.id = i;                b.txt.text = "Hello, I'm box number " + (i + 1);                b.txt.mouseEnabled = false;                                m.addChild(b);                boxes.unshift(b);                                b.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);                b.addEventListener(MouseEvent.MOUSE_UP, stopDragging);            }            removeEventListener(Event.ADDED_TO_STAGE, initBoxes);        }        private function startDragging(e:MouseEvent):void        {            var top:Number = 1;            e.currentTarget.startDrag();            e.currentTarget.alpha = 0.7;            stage.addEventListener(MouseEvent.MOUSE_UP, stopDragging);        }        private function stopDragging(e:MouseEvent):void        {            e.currentTarget.stopDrag();            TweenLite.to(e.currentTarget,0.5,{x:0,alpha:1,ease:Expo.easeOut});        }    }}


I need help so when I release on the clip or outside the clip it stops dragging.

OnRollOut And OnReleaseOutside
While I was writing this question, It occurred to me that I could try my occurrence before posting, and It turned out true. so I'll share my "discovery" with all of you who doesn't know this.

You can use something like this:


ActionScript Code:
asdf.onRollOut = asdf.onReleaseOutside = function () {
to duplicate the script in various event handlers...

as an anecdote, I leave the incomplete (and a bit redundant) question:
simple question...
is there a way to "duplicate" the onRollOut and onReleaseOutside so the execute the same script, without using a function?
example, something like this:

ActionScript Code:
asdf.onRollOut = asdf.onReleaseOutside = function () {
asdfasdfasdf
}

MOUSE_UP Vs OnReleaseOutside
We've created a new media player with a scrubber bar so you can move forward and backwards through videos and mp3s. When we grab the scrubber, it works with the MOUSE_DOWN MouseEvent... but if your mouse isn't over the MC, and you release it, it won't call the MOUSE_UP listener.

In the past, we just added an onReleaseOutside event to the MC, but we can no longer do that..

whats the work around?

OnReleaseOutside Not Working
Hi. When I run this nothing happens when I release outside myButton. asdfasdf! Can you help? Thx.

Code:
var my_mc:MovieClip = this.createEmptyMovieClip("myButton", 1);
myButton.attachMovie("circle", "circle1", 2)
myButton.onRelease = function(){
trace("inside")
}
myButton.onReleaseOutside = function(){
trace("outside")
}

AS3 Problem OnReleaseOutside
hello,

I'm creating a drag(scroll) it is OK.

Have addEventListener and so on for MOUSE_UP(AS3) = onRelease(AS2) and MOUSE_DOWN(AS3) = onPress(AS2). Here my problems start want to make onReleaseOutside. I read http://livedocs.adobe.com/flex/201/l...migration.html, but there is wrote that for onRelease and onReleaseOutside is the same event => MOUSE_UP, but i can't catch onReleaseOutside event. Any idea how to do it?

Button With 2 Functions? Onrelease=true, Onrelease=false
I have a button that uses a function to set the visibility of an mc. BUT it's called with an 'onrelease' and I would like the button to change the visibilty back to false on the next onrelease. Understand?
Here's my code:

list_btn.onrelease = function() {
playlist._visible = true;
}

Now I want to press the same button and have the mc (playlist) go back to false. I tried using some 'if' statements but just couldn't seem to get it right. My brain is just not working today.
Need some help please!

How Do I Make OnReleaseOutside Work?
I have a movieclip "myClip" that is working as a button, (please don't tell me to use a button :-) I am sure it is a way to do it with a MC) Well this clip calls another clip (PopUp1) to move to _Y position 380. I want it to go back to _Y=600 when I click on the PopUp or at another element on my stage. The PopUp1 is working as a menu so when I click on that menu I want it to go back to it's origin. The first part(to get the clip to position 380) works, But when i "release outside" noting happens.

I have tried to type "_root.myClip" instead of "this" but it shouldn't make any difference ant it does not :-)

Please help anyone. This is the code I have now, could anybody tell me what's wrong?



Code:
onClipEvent (enterFrame) {
this.onRelease = function() {
_root.PopUp1._y = 380;
};
this.onReleaseOutside = function() {
_root.PopUp1._y = 600;
};
}
Metaman

Drag And Drop (onReleaseOutside) Help
I have a drag and drop movie going to 7 hit areas. I would like it to stay on which ever one it is draged to then hit submit to test.

How do I get it to bounce back to the orignial place if it is not dragged to a hit area. When I use (onReleaseOutside) it snaps back if it doesn't hit the correct hotspot. if I remove (onReleaseOutside) it will remain on all the hotspots, but it will also stop anywhere you drop it.


Quote:




attachDragDrop = function () {
this.onPress = dragStarter;
this.onRelease = dragStopper;
this.onReleaseOutside = dragStopper;
};
//apply drag and drop function for the square
attachDragDrop.apply(drag01_MC);
drag01_MC.onRelease = function() {
this.stopDrag();
delete this.onMouseMove;
if (this.hitTest(_root.dropZone1Aa)) {
drag01_MC.tween(["_x", "_y"], [591.0, 143.1], 1);
}
if (this.hitTest(_root.dropZone1A2)) {
drag01_MC.tween(["_x", "_y"], [591.0, 186.1], 1);
}
if (this.hitTest(_root.dropZone1A3)) {
drag01_MC.tween(["_x", "_y"], [591.0, 231.1], 1);
}
if (this.hitTest(_root.dropZone1A4)) {
drag01_MC.tween(["_x", "_y"], [594.0, 276.1], 1);
}
if (this.hitTest(_root.dropZone1A6)) {
drag01_MC.tween(["_x", "_y"], [598.0, 367.7], 1);
}
if (this.hitTest(_root.dropZone1A7)) {
drag01_MC.tween(["_x", "_y"], [599.6, 410.1], 1);
}
if (this.hitTest(_root.dropZone1A5)) {
drag01_MC.tween(["_x", "_y"], [596.0, 322.1], 1);
trace(_root.score);
_root.score = _root.score+1;
trace(_root.score);
//this.gotoAndStop("empty_MC");
if (_root.score == 7) {
trace(_root.score);
_root.gotoAndStop("winner");
} else {
this.onTarget = true;
_root.correct_sound.start();
}
} else {
drag01_MC.tween(["_x", "_y"], [254.7, 95.5], 1);
_root.wrong_sound.start();
}
};
function dragStopper() {
this.stopDrag("");
delete this.onMouseMove;
}
drag01_MC.onReleaseOutside = function() {
this.stopDrag();
delete this.onMouseMove;
drag01_MC.tween(["_x", "_y"], [254.7, 95.5], 1);
};
attachDragDrop = function () {
this.onPress = dragStarter;
//this.onRelease = dragStopper;
//this.onReleaseOutside = dragStopper;
};

Define OnRollOut And OnReleaseOutside Together
is there a way to define both onRollOut and onReleaseOutside in one line?

maybe something like...


Code:
myMC.onRollOut, myMC.onReleaseOutside = function()
{
//actions go here
}
i don't know if that's correct at all.
i know you can do this...


Code:
function rollOutFunc()
{
//actions go here
}
myMC.onRollOut = rollOutFunc;
myMC.onReleaseOutside = rollOutFunc;
I am pretty sure I have seen my dad define multiple things at once. He just started actionscript, but knows C++ really well, and used all kinds of strange syntax that i didn't know was avaiable to actionscript.

OnReleaseOutside - Alternative? Slider
I have a slider that changes the value for a variable and it works fine but it was updated from Flash MX to Flash 8 and I've read that they disabled the OnReleaseOutside command.

Now when you drag the slider and release the mouse on the screen outside of the slider then the release funcion doesn't work.

Anyone know of a quick workaround for this?
thanks

Generic OnReleaseOutside Emulation?
Late comer to the AS3 party, hope no one minds if I drag this one up again.

I've read through quite a few solutions for emulating the old onReleaseOutside event, but what I haven't seen is a generic reusable method. They all seem to work by hard coding the button reference into the stage triggered mouse up event.

The only way I can think of communicating what button was being pressed to the stage is to have another variable floating around keeping track of it (which is a bit of a crap solution).

Am I right in my thinking or am I missing something? (the latter is probably more likely!)

Create Border To Disappear OnReleaseOutside
Hi all

I was wondering how can I create border around movie clip that disappear when the mouse clicked outside and appears when the movie clip is selected.

Someting similar to this :http://www.harboarts.com/shirtdesigner/
When you click on any image its border is drawn where you can remove the image,resize it and rotate it as well.

Thanx

OnReleaseOutside And Stage Security Dependant
In order to solve the missing onReleaseOutside event in AS3, everybody seems to use the stage MOUSE_UP event. However, this is not a solution in the following situation:

movieA.swf loads movieB.swf from a different security domain.
movieB.swf wants to register stage events like MOUSE_UP or MOUSE_LEAVE but trying to access movieB.stage throws a security error because stage is in movieA's security domain.
Also loading movieB into A's security domain, or allowing access to movieB's domain is not an option.

can anyone please suggest a workaround or a way to implement (the taken-for-granted, most loved) onReleaseOutside in AS3?
thank you

StartDrag, In Class, Loos OnReleaseOutside Event
Allright,

I have created a class that set the action on a movieClip.

onPress
onRollOver
onRollOut
onRelease
onReleaseOutside

When i click the onPress, i start dragging:


PHP Code:



this.startDrag(false,0,100,300,100); 




I can drag the movieclip.

When i use lock Center = false for some reason, i loose the onReleaseOutside event.

I need the lock center of the drag to be set to false and i need the onReleaseOutside event.

Does someone have seen this problem before... ?

On (within) Equivalent
I was wondering if anyone knows of a mouse event equivalent to the within event in director. I am trying some advanced layering to get to mouse position and need to check to see if the mouse pointer in with a given button or instance.

Thank you!

Equivalent To Set() In AS3
Im pulling data out of a xml config file. As such I need to dynamically set the varialbes and values in a global manor.

How should I go about re-writing the set method in AS3?
Thanks!


PHP Code:



set(data.key[row].@id, data.key[row].@value);

.jar Equivalent?
Hello,
I am fairly new to Flash and Actionscript, and I am having trouble finding the answer to a basic question. Is there the equivalent of a .jar file for actionscript code? Essentially, I am building a set of classes and interfaces that I want to package and distribute as a binary (no source code), so that another developer can import classes from my package for use in a swf. My code has nothing graphical, sprite, or timeline-related. It is purely for socket communication. Thanks for any help.

As2 Equivalent
Is there a similar function in actionscript to is_array or printr? I'm having trouble knowing what the return type for many functions is going to be. Is that just something that you have to learn or is there some way of being able to tell the return type programmatically?

- b

C# Equivalent Of This?
I've got some actnioscript that I need to emulate in C#. Unfortunately I
can't quite work out what type the variables are (as you don't seem to have
to declare them in actionscript).

This is the actionscript, which is to choose an rgb colour based on a input
'a'. Can anyone help?

getNewColor = function(a) {
var r = (45+a*90) & 0xFF;
var g = (180+a*135) & 0xFF;
var b = (230+a*71) & 0xFF;
var min = 60;
if (r<min && g<min)
{
r += min;
g += min;
}
else if (r<min && b<min)
{
r += min;
b += min;
}
else if (g<min && b<min)
{
g += min;
b += min;
}
return ((r << 16) | (g << 8) | b);
};

Looking For Flash 4 Equivalent........
How would I redo this code do that I could export my movie as flash 4?
_parent.gotoAndStop("guitarmenu")

Does Actionscript Have An Equivalent.....?
Javascript has the setTimeout() method. Does Actionscript 5 have an equivalent? It would be nice so I can control a couple movie clips.

Thanks!

Does Actionscript Have An Equivalent To...?
Javascript has the setTimeout() method. Does Actionscript 5 have an equivalent? It would be nice so I can control a couple movie clips.

Thanks!

An Equivalent Of Php's Explode() ?
Does FlashMX Actionscript have a function that works like explode() in php. I need to explode a variable at 1 point and thus create two variables. Any ideas?

Thanks.

Keyboard Equivalent
Flash 5 Action Script. What script would allow a "button" to perform the same action as a keypress? In other words, I would like to create buttons that can be used to enter text. What string does Flash see when, for example, the "a" is pressed?

I understand getKeyCode...I'm trying to do the opposite I guess...send keyCode.

Thanks

On EnterFrame Equivalent
Hi all,

I'm trying to get a mc to load into a container on enterFrame (lingo)

Is there an actionscript equivalent and if so what may it be?


Cheers

Danny

Is There Are Flash Equivalent--
to the .html standard of "Save Target As.."? I ask this because .pdf's and .mpgs exist on my website, and the typical relative address of getURL:/mypage, "bigmovie", _blank gives less than stellar results. Using the absolute address in the actionscript window would be a headache because my files exist deep in my hosts' server. Is there some actionscript or command I'm missing that would allow the user to save a file to their desktop - just as they would be right-clicking within an .html document?
Thanks for your help,

[F8] Finding The Most Equivalent Value
I've an array of integer value for example

arrVal = Array(1002,1005,3000,600,50000,5500....thousands of numbers);

and the selectedVal receive as input is input = 900

when the selectedVal is pass to the function,the function must return the value = 1002 if we search it from the example array (above) to get the nearest value..

i already wrote a function using for loops and i think its not efficient when the array is large

does anyone has such function or idea to share?

CS3 Equivalent To LoadMovieNum()?
I want to be able to load an external SWF in the same window as the original files. Basically, I want to just call the next slide, think like a powerpoint presentation. In AS 2 I believe I used loadMovieNum() to perform this, it odes not appear to work in CS3. Does anybody know how to do this action is CS3? Thanks alot

AS3 Key.isDown Equivalent
Hey guys, this ones got me stumped

In as2 to get keypress information you could use actionlisteners OR check the function Key.isDown(asciivalue);.
But this has been depriciated in AS3, now Im making a game and you have a ship that turns left and right, and you can furl and unfurl the sails by hitting w and s, (left and right is a and d). Now if you hold a the ship starts turning left, but you hit w to unfurl the sails and the game stops detecting that you are pressing a and while the w works the ship stops turning left (can post example if needed).

Checking for Key.isDown every frame got around this, is there a way to check if a key is down in as3? or to make the listeners work for this?

Thanks,
Ian

FLV OnSoundComplete Equivalent?
I know there's a way to do this, but I'm feeling a bit under the weather and my fever could possibly be frying my brain, but I need to get this thing done by Monday, so I was hoping for a bit of help.

I know that with a dynamically loaded mp3 file you can tell Flash that when that mp3 is done, to move on and do something else. Is there a way to do that with an FLV as well? I've got about a 15-second long FLV that, when it reaches the end, should trigger several events to happen in other movieclips. I'm currently using the following scripts to load the movies into a Flash 6/7 instance of a MediaDisplay (a tad old school, but it works):


ActionScript Code:
vid.setMedia("test.flv", "FLV");
vid.play();

Is there a way to detect when I reach the end of the FLV and then trigger events elsewhere in my file? I'm pretty sure it has something to do with an event listener, but that's the extent of my knowledge on the subject.

Any help would be greatly appreciated!!

ActiveX Equivalent For Mac OSX
If you want to incorporate the Flash player into a windows C++ application, you can use the COM interface on the ActiveX control to set properties and call methods. Unfortunatley, ActiveX is only allowed on Windows, is there an equivalent on a Mac? I heard that ActiveX may have been slightly supported on Mac's version of IE, but is there some equivalent interface to the flash player in the mac that I can access within a C++ program?

AS Equivalent Of * For Strings?
Is there an AS equivalent of the * operator that other languages have to represent any string? Like for example, if I wanted to check if someone's input was a valid email, something like this:

if (email.text == *+"@"+*+"."+*)

Any help would be much appreciated! Thanks

PHP Sprintf Equivalent?
Hi guys,

I don't know how to output a preformatted string in actionscript, says, if I want the result of 2/3 displayed as 0.67 or 0.6 or 0.667 not 0.6666666667

How can I achieve that without having to write my own formula?(shortcut)
Is there a sprintf or printf function in actionScript?

Thanks

Kwong

FileReference Equivalent?
Is there a way to mimic the FileReference class from Flash 8 in MX 2004? I suspect I will need to upgrade to do the following, but I'd love some input from you guys first.

Basically, the concept is to build my friend a site that she can update herself - with a password protected area, I want her to be able to upload images to her server, and for the Flash movie to detect these new images in a gallery (with thumbnails preferably). Also some kind of blog and gig diary functionality would be nice.

I suppose the upload section could quite easily be done outside of Flash if anyone has thoughts on that?

Equivalent Of GetHighestDepth
Probably this is due to my failure of fully understanding how the display list works, but I can't seem to figure out how to put a sprite in the highest "depth".
I know AS3 works with indexes, but I'm a bit dumbfounded that there's not a displayObjectContainer.getHighestIndex or something like that.

What's the proper way to do this, if you want to create a custom cursor for instance?

Left, Mid, & Right Equivalent
Hi what is the Left Mid & Right Equivalent in action script.

I have a dynamic text box that has the value 12V in the box, I just want the value of 12 to use in a maths routine.

In VB I could find the length (3) and extract the left 2 char.

Re B

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