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




InteractiveScene3DEvent Return Tye?



Im building a thumbnail gallery with papervision and cant seem to use e.target in the function triggered from the listener. See below:Code: private function onDown(e:InteractiveScene3DEvent) : void {         trace(e.target);                  Tweener.addTween(e.target, { x:-220, y:-200, z:700, time:1 ,  transition:"easeInOutSine"} );      }this doesnt seem to work, it traces out something like this: 2: x:77 y:-177 z:-24Im almost certain it just needs to be e.target.something instead of just e.targetHow am i able to work out what type of object e.target is?



Actionscript 3.0
Posted on: Sat Aug 09, 2008 4:51 pm


View Complete Forum Thread with Replies

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

Papervision 2.0 Interactivity Using InteractiveScene3DEvent
If there are any papervision users out there please help!

I have the most recent version of papervision src files from svn. But every tutorial or documentation I can find for interactivity with papervision uses the interactiveScene3DEvent to detect events. I even have the src .as in my classpath, but FLASH refuses to recognize it.

it says: 1046: Type was not found or was not a compile-time constant: InteractiveScene3DEvent.

AS3 - [Papervision] Passing Variables With InteractiveScene3DEvent
Hey all,

I'm currently trying to pass values via event listeners to my custom functions through interaction with Plane objects. I have no idea how to pass these values with the InteractiveScene3DEvent class. Now I have read up on creating my own custom events for passing values by means of normal AS3, but how can I do this with PV3D?

Just as an example, here is a custom event class (without any PV3D, just an example of how I understand custom events to work currently):

CustomEvent.as


Code:
package {

import flash.events.Event;

public class CustomEvent extends InteractiveScene3DEvent {

function CustomEvent(type:String) :void {
super(type);
}

public function addAsset(customAsset:*):void {
this.customAsset = customAsset;
}

public function get asset():* {
return customAsset;
}
}
}
CustomEventExample.as


Code:
import com.CustomEvent;

var urlReq:URLRequest = new URLRequest("http://www.lorenbednar.com/images/sineCompounds.jpg");
var ldr:Loader = new Loader();

ldr.contentLoaderInfo.addEventListener(Event.INIT,onInit);
ldr.load(urlReq);

stage.addEventListener("onComplete",onComplete);

function onInit(event:Event):void {
var customEvent:CustomEvent = new CustomEvent("onComplete");
customEvent.addAsset(ldr.content);
dispatchEvent(customEvent); // runs the event.
}

function onComplete(event:CustomEvent) :void {
stage.addChild(event.asset);
}
If anyone could point me in the right direction I'd greatly appreciate it.

Thanks,

John

AS2: What Datatype Should A Function Return, If It May Not Return *anything*?
The title of this post may not make much sense, let me explain...

I have a function:

findSurface(origin:Point, vector:Point, attempts:Number):Point {...}

The function has an obscure use, but the idea is thus: given those three arguments, returns a point IF the 'line' (created by the origin and vector arguments) intersects the object the function is called on. [but that is another story...]

More importantly, if there is no point of intersection at all, what should the function return? Void? Null? Undefined? Object? Or can I use one of those return types instead of Point incase the function does not encounter an intersection?

I'd be glad to try explaining better if anyone might know, thanks.

Return
Hi,

I don't know if it's possible but I'm going to ask anyway.
When the mouse is inactive for 20 sec. the movie goes automaticly to another scene where a 'screensaver' is showed. Now when you move the mouse, the movie should return to where he was. Is that possible?
Can anybody tell me please?
Thanks in advance
Greetings
Camme

Got The Return - But How About This?
Hi all, a little while back I posted a thread about a drag and drop action with a slow return on the draggable mc if it wasn't dropped on the target.

Well I have got a .fla file that does this but I have a couple of further questions.

Below is the scripting that goes on the first frame. How can I amend the scripting to add up to say nine or ten draggables?

And also how can I make to action (ie goto and play, load movie, tell target etc...) trigger when the draggable MC is placed on the target?

If you click HERE you will see the swf in it's current state.

And here is the code for the first frame:

// turn off that ugly pointer finger

MovieClip.prototype.useHandCursor = false;

// initialize our three clips, "ball1", "ball2", and "ball3"

for (i=1; i<4; i++) {

tmp = _root.attachMovie("myClip", "ball"+i, i, {ID:i});

tmp._x = (i-1)*148+(38+tmp._width/2);

tmp._y = 30+tmp._height/2;

// set the x & y origins as where the clip was first placed (before any dragging)

tmp.xOrig = tmp._x;

tmp.yOrig = tmp._y;

// init attached mc on the correct frame

tmp.gotoAndStop(i);

tmp.onPress = function() {

this.startDrag(true);

};

tmp.onRelease = tmp.onReleaseOutside=function () { this.stopDrag();if (this.hitTest(dropRing)) {this._x = dropRing._x;this._y = dropRing._y;for (i=1; i<4; i++) {if (i != this.ID) {_root["ball"+i].resetClip(_root["ball"+i].xOrig, _root["ball"+i].yOrig);}}} else {this.resetClip(this.xOrig, this.yOrig);}};

}

// this prototype eases the mc calling it back to returnX and returnY

MovieClip.prototype.resetClip = function(returnX, returnY) {

this.onEnterFrame = function() {

this._x -= (this._x-returnX)/2;

this._y -= (this._y-returnY)/2;

// This if deletes the onEnterFrame when the clip gets back to its origin (or very

// close to the origin) The Math.abs serves to allow the the checking to be coordinate

// independent.

if (Math.abs(this._x-this.xOrig)<.5 && Math.abs(this._y-this.yOrig)<.5) {

delete this.onEnterFrame;

}

};

};

Anyone able to put me right?

Diggz

Got The Return - But What About This?
Hi all, a little while back I posted a thread about a drag and drop action with a slow return on the draggable mc if it wasn't dropped on the target.

Well I have got a .fla file that does this but I have a couple of further questions.

Below is the scripting that goes on the first frame. How can I amend the scripting to add up to say nine or ten draggables?

And also how can I make to action (ie goto and play, load movie, tell target etc...) trigger when the draggable MC is placed on the target?

If you click HERE you will see the swf in it's current state.

And here is the code for the first frame:

// turn off that ugly pointer finger

MovieClip.prototype.useHandCursor = false;

// initialize our three clips, "ball1", "ball2", and "ball3"

for (i=1; i<4; i++) {

tmp = _root.attachMovie("myClip", "ball"+i, i, {ID:i});

tmp._x = (i-1)*148+(38+tmp._width/2);

tmp._y = 30+tmp._height/2;

// set the x & y origins as where the clip was first placed (before any dragging)

tmp.xOrig = tmp._x;

tmp.yOrig = tmp._y;

// init attached mc on the correct frame

tmp.gotoAndStop(i);

tmp.onPress = function() {

this.startDrag(true);

};

tmp.onRelease = tmp.onReleaseOutside=function () { this.stopDrag();if (this.hitTest(dropRing)) {this._x = dropRing._x;this._y = dropRing._y;for (i=1; i<4; i++) {if (i != this.ID) {_root["ball"+i].resetClip(_root["ball"+i].xOrig, _root["ball"+i].yOrig);}}} else {this.resetClip(this.xOrig, this.yOrig);}};

}

// this prototype eases the mc calling it back to returnX and returnY

MovieClip.prototype.resetClip = function(returnX, returnY) {

this.onEnterFrame = function() {

this._x -= (this._x-returnX)/2;

this._y -= (this._y-returnY)/2;

// This if deletes the onEnterFrame when the clip gets back to its origin (or very

// close to the origin) The Math.abs serves to allow the the checking to be coordinate

// independent.

if (Math.abs(this._x-this.xOrig)<.5 && Math.abs(this._y-this.yOrig)<.5) {

delete this.onEnterFrame;

}

};

};

Anyone able to put me right?

Diggz

What Is Return(); ?
I've never had to use "return" before in AS, but I'm sure I am going to need to later on. Could one-na-ya guys post a simple function in which 'return' is used? I have the description of it in ASDG2, but no example.

Thanks.

Steveo

Return
On my main movie (which is a projector) I made a button that loads an external .swf, here is the script attached to the button, it works properly:

************************************************** ***
on (release) {
if(this == Number(this)){
loadMovieNum("mc_01.swf",this);
} else {
this.loadMovie("mc_01.swf");
}
}
************************************************** ***
On the, now loaded, external movieclip (mc_01.swf) I have a button that, when pressed, will return to the original projector. I cant seem to make this happen!

I tried this code attached to the button (on the external .swf):

************************************************** ***
on (release) {
gotoAndPlay("_parent",1);
{
//is the original considered the parent?
************************************************** ***
that didnt work...

Way To Return A Value?
I have five different masses on screen and I need a way to be able to first assign a number for their mass values. Then I need to be able to return that value when I ask for it so that I can assign it to a variable.

I'm still fairly new with this stuff, and am learning as I go along. If anyone could hlpe me with this it would be much appreciated.

TIA

Return
function makeMove(row, col){
var buttons = [[B00, B01, B02], [B10, B11, B12], [B20, B21, B22]];
trace("in makeMove");
if (board[row][col] != "E") return;
board[row][col] = turn;
}

Do anyone know what the purpose of return in these statement? Whether return true or false, what the effect of the following statement?

Why Would This Return NaN?
This worked in another swf but when I pasted it into this new one it returns Nan. Could it be a scope thing? The image loads fine.

Thanks.


Code:
fullListener.onLoadProgress = function() {
loadStatus_txt.text = "Loading image...
" + Math.floor((bytesLoaded / bytesTotal) * 100) + "% of image loaded";
};

'return' Won't Return
Does anyone know why a return statement would not return a value?

First take a look at the following two functions:



PHP Code:



function goFirstClip() {
        trace("
DATABOOK GETTING FIRST CLIP: "+this.nodeID);
        var fc:String= this.getFirstClip(this);
        trace("...found clip final: "+fc);
    }
function getFirstClip(object):String {
        trace("...looking at: "+object.nodeLabel+" - of type: "+object.nodeID);
        if (object.nodeID.toLowerCase() == "clip") {
            var nl:String=object.nodeLabel;
            trace("...found clip: "+nl);
            return nl;
        } else {
            getFirstClip(object.children.goFirst());
        }
        
    } 




As you can see, the first function calls the second. The second function is recursive.

Basically, I have an object tree called DataBook. Each branch has a Collection of child objects called, 'children'. My Collection class is a wrapper for the Array class and it has a method, 'goFirst()', which returns the first element of the Collection.

Ultimately I will be returning the actual child object, but for this example I'll deal with one property of the object, 'nodeLabel', a String.

Everything works fine until it comes time to return the found value to the original function.

You can see that I have two trace functions in place, '...found clip' and '...found clip final'. When the recursive function finds the object in question, it traces '...found clip: ClipName'. It should then return the found value to the original calling function. However, by the time it gets there, it's undefined. The original function traces '...found clip final: undefined'.

So, to restate the inquiry, does anyone know why a return statement would not return a value? (...or return the value as undefined?)

Return Of Nan
Hi, posted thread a few weeks ago regarding a NaN issue. Followed the advice with no resolution to the problem. Since then I have found the cause, but not the solution ... is there someone who is not a math dummy like me who can show me the best solution please?

Three input text boxes:

costlitre
tanksize
fillcost

Code:
if (fillcost== "") {
fillcost= 0;
if (tanksize== "") {
tanksize= 0;
costlitre = (Number (fillcost))/(Number(tanksize));

This always results in a NaN result in the "costlitre" text at the beginning of the MC. Once values are put into the "tanksize" input, the NaN dissapears.

If I use:
costlitre = (Number (fillcost))*(Number(tanksize)) it returns "0"
costlitre = (Number (fillcost))+(Number(tanksize)) it returns "0"
costlitre = (Number (fillcost))-(Number(tanksize)) it returns "0"

all of which are good.

If I use:
costlitre = (Number (fillcost))/0 it returns "0"

It only occurs when an input text is divided by another input text.

Any ideas?

Thanks,
Glen.

Return Url?
Just curious if it is possible to return the HTML doc name that the flash resides in?

so if the swf is located in "0001.htm" actionscript can retrieve that string.

Return To There
I have a draggable click that I want to return to a specific x and y when the user releases the clip. The trick is, I want it to happen over time (say 5 frames) so the clip doesn't simply blink to the original x and y, but moves to it.
I'm completely baffled!

Why Use Return?
I'm trying to understand the purpose of using return in functions. I'm reading Robert Penner's "Programming Macromedia Flash MX" and there is a good example of how to apply functions using the prototype feature:

// Code start

MovieClip.prototype.spin = function (angle) {
this._rotation += angle;
return this._rotation;
}

result = _level5.box.spin(10);

// Code stop


I created a second movieclip called box2, and rather than call it through a variable, I simply called the function this way:

box2.spin(10);


They both produce the same result. I'm just wondering what the purpose is for using return in this particular case. I unfortunately can't seem to find more information on this simple idea. I am reading ahead but I am afraid if I don't understand this concept now, I'm going to miss something very important in the future!

Any tips would be greatly appreciated.

Why Use Return?
I'm trying to understand the purpose of using return in functions. I'm reading Robert Penner's "Programming Macromedia Flash MX" and there is a good example of how to apply functions using the prototype feature:

// Code start

MovieClip.prototype.spin = function (angle) {
this._rotation += angle;
return this._rotation;
}

result = _level5.box.spin(10);

// Code stop


I created a second movieclip called box2, and rather than call it through a variable, I simply called the function this way:

box2.spin(10);


They both produce the same result. I'm just wondering what the purpose is for using return in this particular case. I unfortunately can't seem to find more information on this simple idea. I am reading ahead but I am afraid if I don't understand this concept now, I'm going to miss something very important in the future!

Any tips would be greatly appreciated.

Return To Top
I have made a scrollable static text area that works fine, however once leaving that movie clip to read another section I would like that text field to return to the top. This is where I am having trouble. Basically so when the viewer returns to that section it's at the beginning again. What action do I need to write on a button to return the text ( movie clip) to the top.

I have a movie clip on main stage called 'AboutClip', inside this are 3 layers, one containing a movieclip called ScrollBar, which is a button with

'on (press)' {
startDrag (_root.AboutClip.Content, false, 300, 200, 300, 400)

and a stop drag action on release.

The content clip is just a text area inside a movie clip ( Content) with a mask.

The third layer contains the actions: Two frames: Ist frame:

Scrollpos = getProperty ( _root.AboutClip.ScrollBar, _y);
p = number((Scrollpos*-1));
setProperty ( _root.AboutClip.Content, _y, p);

Second frame

gotoAndPlay (1);

Any help here would be great. Thanks in advance

Return
I've got function:

ActionScript Code:
checkPos = function(trg,end){
    this.createEmptyMovieClip("czek",1);
    czek.onEnterFrame = function(){
            pos = trg.getPosition();
            if (pos >= end) {
                return true
                delete this.onEnterFrame   
                } else return false
    }
}


(function getPostition() work gr8)

I want to force function checkPos() to return true if position of trg will be equal to "end", but there is problem with onEnterFrame function :
when I remove onEnterFrame, return in checkPos() function work fine, how can I transfer "return" from czek clip to checkPos() func ?


sorry 4 my eng I hope U understant me

XML Return
I have seen in most tutorials functions return nothing ie function():void. It seams like a lot of people are struggling with xml getting undefined errors cause they can't call it out of the load xml function. Could you return the XML in the function and be able to work with it from there?

Return To Sender Help
I have two search fields triggered by either a mouse release or the return button, but hitting return only triggers one search field! Is it possible to get around this?

Return Function
Can somebody tell me how can I use return function for my film:
I have a large movie with 20 scenes and in every scene I have a webservice from where can user going to sitemap. But if user choos nothing, can he click return button, and appear again in the same scene and in the same position(I mean keyframe) from where he went.
If someone know return function, please tell me....

Please Help How Can I Go To A Scene And Return?
Hi!

I'd like to know how can I jump to a scene from different scenes and after printing a text, return to the original scene and frame.

Please help me!!!

Return Variable
I am trying to use a return in a variable in Flash 4.

The problem is I have several variables input by user then Flash combines them using NewVariable= var1 &" "& var2 roughly. So I can create a space between each variable even several spaces however if I place a return in the " " Flash removes it.

Any Ideas

Macdivitt

Adding A Return
how do you add a return in a textfield?
this is my code:
var = "hello there"

textfield.text = *hard return* + var

so i want the hello world to appear on the second line. what do i put for the *hard return* ?

Hit Return To Submit
can someone please tell me how to assign the return button to act as though i've clicked on a submit button?

Return Action
how can I do a return action on to a button?
ie. on rollover it grows and I would like it to slowly return back to smaller after roll off.
stupid question, I know, but this is important. thanks.

Return Array Value: FMX
hello

I have an array that's created from a stripped down string of user defined variables. The array returns numeric values in the form of 22,0,5,31,5 etc based off the position in the array.

What I want to do is then query these values against another array containing data, so that I get a return of the corresponding values in the new array. So, for example, with the numbers returned above, I'd get a further trace of whatever's in position22,position0,position5 in the 2nd array.

is that clear?

I've tried something like:

Code:
trace("new output = "secondArray+[firstArray]);
but I just get undefined messages.

thanks

IndexOf(<return>)?
Is it possible to detect a return? something like:

string.indexOf(<return>);

thanks for any help!

Return In String
is there a way to write:

"The dog ran fast.

The dog ran slow."

using a string? What I mean is is there a way to skip a line between a given amount of text? Like a return key.

-thanks

Double Return?
How do I insert returns in my the text files that I load into dynamic textfields? If I create a hard return in the txt file it creates a double spaced document how to I have it make a single spaced one?

Return To Intro
I have a problem.

I have created a presentation for CD. The intro is Director Projector (which has an AVI file running) and the main application is a FLASH projector. I need to have a button that can return to the Director Intro and close the Flash App. I was going to use the following code: -

on (release) {
fscommand("exec", "intro.exe");
}

but of course that then looks for the intro in the fscommand folder. I could put the intro in the fscommand folder, but that leaves me with problems trying to get back to the root folder of the CD when I want to launch the FLASH application.

Is there anyway of launching an external application not from the fscommand folder. Or anyway to use a .inf or.bat file to launch it.

Return Depth As Var
Depths have been covered but I have not seen code that can just tell me what depth a movie clip is on.

How do you get a MC's depth and return it as a variable?

DS

Function =>return Value ?
hey,

I wonder if anyone has any ideas how to do this :
I have a function written

Code:
javascript.openConfirm = function(message_str){
responsSet_bol ="false";
getURL("javascript:var respons = confirm('" + message_str + "');void(0);javascript:window.document.popup.SetVariable('respons_str',respons);javascript:window.document.popup.SetVariable('responsSet_bol','true');");

return respons_str;
}

what i want to accomplish is a confirm window(ok, cancel) and I want the answer to be returned
I call this like so:

Code:
respons = javascript.openConfirm("wilt ge dit?");


the problem is that the string is returned, before an answer is set by the confirm window.

does anyone have any ideas how to do this?

Disabling Return
In a input text area is it posible ti disable the return key to stop it adding a new line?
I want to put a character limit on a ox but it not to be affected by a return?
cheers ol

Mc Return Button
hi, i have a dragable window in my swf, which has a button to reset the position if the user wishes to do so, here is the code in my return button

onClipEvent (load) {
speed = 10;
_root.target = 75;
_root.target2 = 14;
}
onClipEvent (enterFrame) {
if (_root.back == true) {
_y += (_root.target-_y)/speed;
_x += (_root.target2-_x)/speed;
}
}

now this works fine but the text goes all blurred and jumpy when its moving back, i heard you can use Math.round to move this one axact pixel at a time but cant seem to get it working.

can anyone help

thanks brian

Text Return
Hello,
I have a piece of text appear on screen as part of an actionscript, is there anyway I can make the text 'break' and return to the next line, as at the moment it just runs off the edge of the screen?

I'm not looking for a scrolling box, thats too complicated. Can I just use a special character(s) within the text variable that are interpreted as a carriage return and not displayed onscreen?

Thanks in advance!

Lee Tempest

www.tempestphotography.com

GotoAndPlay And Then Return Here...
Is there a way to have something gotoAndPlay a specific frame range and then return to where it came from?

I want to have an animation branch to play an animation that will get reused over and over and then when that reusable animation is finished, return the playhead to where it was before it branched.

The complicated part is that there are multiple branch points, so I can't just tell the playhead to gotoAndPlay a label once the reusable animation is finished.

Make sense?

Carriage Return
I have two buttons and when they are clicked they insert two different words into a text box.

The problem I have is that when I click ome button and then the next the words are displayed next to each other. What I would like is the two worrd seperated by a carriage return!

Any help would be grand!

Cheers

Jemes

The Variable Known As 'return'
I have a button in my movie that has the following code:

----------------------------------------------------------------
on (release) {
goLinkThree();
}
----------------------------------------------------------------

The function that this button calls looks like this:

----------------------------------------------------------------
goLinkThree = function() {
item_name = "12 Month Membership";
item_number = "MEM12";
amount = "4.95";
return = "http://www.website.com/index_success.html";
getURL("https://www.paypal.com/cgi-bin/webscr", "", "POST");
}
----------------------------------------------------------------

So the problem I am having is that the variable return seems to have a built in property in Flash. However, I need to send this variable with the name of return

Does anyone know a way around this ?

Thanks,
Stephen.

X And Y Coordinate Return
In the code below, I have a button named "rmc" within a mc named "redmc". In the rmc button code on the second on release (if) statement is true, (the target is not hit), the "rmc" does not return to the exact same location as it is initially set. Whats up with that.

Thanks for the help!!!!


on (press) {
startDrag(_root.rmc, true);
}
on (release) {
stopDrag();
if (_root.rmc._droptarget == "/rtarget") {
_root.correct.gotoAndPlay(2);
}
}
on (release) {
if (_root.rmc._droptarget !== "/rtarget") {
_root.rmc._x = "75.9";
_root.rmc._y = "224.8";
}
}

Moviecliploader And Return
I have made a function (loadImage) in my _root movie which handles all the loading of my movies. This function is being called from several different submovies which all require different handling of the loaded movie.

Currently I'm calling my loadImage-function with parameters about which file to load and which function to call onLoadInit. However this requires me create functions in the submovies solely for the purpose of receiving the movie after it has been loaded.

What I would like to do is to somehow use the return-statement. Is there any way to do this? Where do the return-statement return to when in an onLoadInit-function?

I'm currently doing like this:


Code:
function loadImage(file_to_load, movie_caller, function_to_call){
var mcl:MovieClipLoader = new MovieClipLoader();
var mcl_listen:Object = new Object();
var clip_id:Number = movie_caller.getNextHighestDepth();
var clip:MovieClip = movie_caller.createEmptyMovieClip("imageClip"+clip_id, clip_id);

mcl_listen.onLoadInit = function(target_mc:MovieClip){
function_to_call(target_mc, movie_caller);
}
mcl.addListener(mcl_listen);
mcl.loadClip(file_to_load, clip);
}
What I would like to do is this:

Code:
function loadImage(file_to_load, movie_caller){
var mcl:MovieClipLoader = new MovieClipLoader();
var mcl_listen:Object = new Object();
var clip_id:Number = movie_caller.getNextHighestDepth();
var clip:MovieClip = movie_caller.createEmptyMovieClip("imageClip"+clip_id, clip_id);

mcl_listen.onLoadInit = function(target_mc:MovieClip){
return target_mc;
}
mcl.addListener(mcl_listen);
mcl.loadClip(file_to_load, clip);
}

Scrollbar Return To Top
Hi

I'm using a dynamic textfield with a scrollbarcomponent,
but in various frames with various contents. But
my problem is that when navigating from one
frame to another, the scrollbar stays at the same position.

Is there a way to make the scrollbar return to top
when navigation to another frame?

In advance

H

Carriage Return
I actually created several textbox called"

name_txt
companyname_txt
telephone_txt
email_txt
message_tx

I have written this code:

getURL("mailto:chris_nrrs@yahoo.com" + "?subject=Norris_Associates_Business_Consultants_I nquiry" + "&body=" + message_txt + "Name=" + name_txt);

I have not written in the other 4 testboxs yet. I am trying to have the results go to a new line. I have tried "newline", "chr(13)", and escape. none seem to work. In the above code, it runs the message_txt and "Name" together. Is there anyway to have the "Name" and result go to the next line?

thank you

Return Url Location
How do I get flash as1 to return the current browser location?

ex:
http://localhost/ma3/index.html?home

thaks in advance..

Return(x) Not Returning Anything
Does anyone have any idea why the following code doesn't return anything? This is really easy - what did I miss? My brain hurts! I am trying to remove spaces from the beginning of any string using a nested loop and common function.


Code:
var vName:String = " hi there";

function spaceRemover(txt:String):String {
if (txt.charAt(0) == " ") {
txt = txt.slice(1);
spaceRemover(txt);
trace("loop results in = " + txt);
} else {
trace("loop results out = " + txt);
// traces correct string
return(txt);
}
}

vName = spaceRemover(vName);

trace(vName); // returns undefined

GetMinutes() Return 01,02 Not 1,2
I am using getMinutes() to get current time. But it returns 1 when I need it to return 01. Is there any funcntion or parameter I can set to do that or do I just have to write a switch statment to deal with this?

ComboBox Return To Top
I have a combo box that i want to return to the top value after click. Is there a simple function or script for this?
Thanks in advance

Automatic Return?
Client asked me if I could rig a music page so that, once the .mp3 finishes playing, the viewer would be automatically returned to the main page.

Assuming a return took at least a mouser-over, I told him no--but then I realized there's hardly any "no" in flash, so I thought I'd ask here.

I'm in flashMX (vanilla, not 2004).

Thanx in a trance,
M

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