ActionScript 2.0 :: First Trace Gives The Correct Coordinate, Second One Returns "undefined"?

Nov 27, 2007

why doesn't this work?! first trace gives the correct coordinate, second one returns "undefined",

function create()
{
createEmptyMovieClip("holder", this.getNextHighestDepth());
holder.createEmptyMovieClip("mc_1", this.getNextHighestDepth());[code]....

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Last Trace Gives Me Undefined While Trace(temp)?

Aug 8, 2006

var dane:Array = new Array();
dane_xml = new XML();
dane_xml.ignoreWhite = true;[code]....

and this last trace gives me undefined while trace(temp) gives me what I want

View 7 Replies

Actionscript 3 :: Trace Returns A Blank Function Rather Than A Number?

Aug 16, 2011

I have a simple code that seems to be giving strange results.

var startPoint:Point = new Point(x, y); // a point
var r:Number = path[i].row + (-Math.floor((length * 2 + 2) / 2)); // just some math
trace(r); // the math checks out and gives a 3
var tey = startPoint.y + r; //this gives a really strange return....

[Code].....

View 2 Replies

ActionScript 2.0 :: When Trace The Next Highest Depth At The Initial Frame Of SWF It Returns 9877

Dec 26, 2005

When I trace the next highest depth at the initial frame of my SWF it returns 9877. Is this due to the way I setup the objects and layers through authoring? The reason I ask is that this is somehow interfering with my attachMovie and unloadMovie (unloadMovie stops working after another 6 extra depths).

View 6 Replies

ActionScript 3.0 :: XML Returns Undefined Entries?

Aug 12, 2010

My AS3 class has some quirks. It's sort of a guestbook, so someone can add a 'question'under a certain category. When I publish the results in a dynamic textfield or when I trace the results I get the existing XML values and some undefined ones.This is my AS3 script:

Code:
//Class name is AddQuestionMenu
public function AddQuestionMenu()

[code].....

View 6 Replies

ActionScript 2.0 :: Load Xml - Trace The Correct Output

Aug 23, 2005

why this works

[Code]...

View 1 Replies

Flex - ExternalInterface.Call Always Returns Undefined

Feb 10, 2012

I am trying to get the value of a global variable from JS. The variable is defined in the HEAD section of my HTML document.
if(ExternalInterface.available){
return ExternalInterface.call("window.myVar.toString()");
}
As I debug my application this call keeps returning "undefined" but if I make the same call in firebug's console it returns a string as expected.

View 3 Replies

ActionScript 2.0 :: Array Returns Undefined In Output?

Nov 18, 2005

On the timeline, I set up an array with 'section' names. When the mouse is clicked, a listener traces the section name to output.

Code:
var pageName:Array = new Array();
pageName [0] = "newsHolder";
pageName [1] = "aboutHolder";
pageName [2] = "reelHolder";
pageName [3] = "printHolder";
[Code] .....

That works fine. But I also have a button on the stage:
Code:
on (release) {
trace ("testing "+pageName [0]);
}
But this returns "testing undefined".

View 5 Replies

ActionScript 2.0 :: Child MCs In Buttons - Returns UNDEFINED

Oct 2, 2008

I'm building a play/pause button for my movie, and here's how I have it setup: The main button object is playPause_btnThe first layer of the button has a movie clip with the pause graphic, named pause_mcThe second layer of the button has a movie clip with the play graphic, called play_mcOn the button's click event, I want to set one of the graphics to 0 alpha and the other to 100 depending on the state, so only one graphic will show through The problem is, for some reason ActionScript returns UNDEFINED when I try to reference playPause_btn.play_mc -- and when I do a dump of the movie's objects, I see entries for _level0.playPause_btn.instance12 and _level0.playPause_btn.instance13 instead of the play_mc and pause_mc objects. Why aren't the objects' instance names accessible??

View 1 Replies

ActionScript 3.0 :: Tracing An Array In MouseEvent Returns Undefined?

Feb 10, 2009

I have an 3 arrarys with names, if I trace them outside a MouseEvent it works fine, but as soon as I trace it inside a MouseEvent it returns as undefined.Here is my code:

ActionScript Code:
...
gallery["imageHolder_" + i].vote_btn.addEventListener(MouseEvent.CLICK, showVote);

[code]......

View 1 Replies

ActionScript 2.0 :: XML - Retrieving The Title Attribute Returns Undefined?

Nov 10, 2004

In the following XML doc my attempt at retrieving the title attribute returns undefined, what have I missed?

[xml]
<?xml version="1.0" encoding="iso-8859-1"?>
<storyLines>[code].........

View 2 Replies

Flex :: GetStudentName Function Simply Returns Undefined Every Time?

Jul 14, 2011

So, in my main mxml, i have a variable defined as such:

[Bindable] public var studentsListDict:Dictionary = new Dictionary;

I also have the following imported:

[code]...

Unfortunately, the getStudentName function simply returns undefined every time.It wasn't working b/c you can't have numbers as keys in a dictionary. Simply casting them to a string during the declaration and look up seems to work just fine.

View 2 Replies

ActionScript 2.0 :: Create Empty Movie Clip Returns 'undefined'

Jun 22, 2009

I'm new here and it's been a while since I've used AS I'm trying to create a MC inside another MC

[Code]....

The code mostly comes from a tutorial I found where the demo works fine. Just my code seems to not stand up to the test

View 4 Replies

ActionScript 2.0 :: Custom Function - OnRelease Event Returns Undefined

Oct 2, 2006

I have this code

[Code]...

Well i have some labels at my timeline and i pass them as an array. The problem is at the onRelease event. It returns undefined. I cant figure out how to solve it.

View 3 Replies

ActionScript 2.0 :: CS3 Maxscroll Returns Correct In Player 7, Not In Player 8+

Mar 13, 2009

I was re-using some old actionscript in a new fla. For some reason my scrollbar script didn't work correctly. After some debugging I found out the the maxscroll value was being returned as 2. Strange when there is only two lines of text in a 400px high textfield.

I published the same fla for flash player 7 in stead of 9 and the problem was gone??? Tried in 8 and there it was again. So something went wrong between Flash player 7 and 8, but what? Is this a known bug and are there any work arounds?

View 4 Replies

ActionScript 1/2 :: Trace "myTextBox.textWidth" And It Returns 154?

Dec 11, 2009

I've got a dynamic text field. It has text in it. I can trace "myTextBox.textWidth" and it returns 154. I'm publishing to Flash 6, but if I change to Flash 9, the trace returns 139. Any ideas why this is behaving inconsistently when changing publish settings? Any ideas how I can make this NOT happen?

View 3 Replies

ActionScript 2.0 :: Why Does Trace Give Undefined Value

Oct 26, 2002

mailObj = new LoadVars();
//send variables to ASP using POST
mailObj.sendAndLoad("sendmail.asp","this", "POST");
trace(mailObj.loaded);

why does this trace give me a undefined value?

View 3 Replies

ActionScript 3.0 :: Dynamic Variables - Undefined On The Last Trace

Mar 7, 2010

[Code]....

I do not understand why i am getting undefined on the last trace.

View 7 Replies

ActionScript 2.0 :: [MX2004] Array - Trace Always Comes Out To Be Undefined

Mar 10, 2005

Ive been trying to get this piece of code to work

[Code]..

But the trace always comes out to be undefined. Also, I have searched, and the basis for that code is (working) code from one of the results I found when I searched

View 5 Replies

ActionScript 2.0 :: Dynamic Text Will Not Load - Trace Undefined

Dec 19, 2003

I have a dynamic text box on my main time line with an instance name (NOT var name) of MCtxt. My textfiles have the variable of txtMC. I have a movie clip with a little ease bar on it. When the user mouses over the movie clip the ease bar goes to the mouse and, once it comes close to stopping, it triggers some AS to capture a number. Then I have a switch statement that does some stuff depending on the number.

So here is the code I have on that movie clip:
onClipEvent (enterFrame){
if (_global.stopped == true){
//trace(_global.j);
function textLoad(filename) {
loadText = new LoadVars();
[Code] .....

Tracing j returns the correct number and the _root.date.text works just fine. But the text is not loading and the trace on the success returns an undefined. I have tried moving all of the loading text code inside the case but it doesn't work there either. All variable names are correct (quadruple checked, at least) so it's gotta be something with my code.

View 2 Replies

Actionscript 3 :: Find Coordinate Of Child In Its Parent's Coordinate System?

Mar 31, 2010

I have 3 square. smallest square s3 is inside s2. s2 is in side s1. each is 10px larger [code]how can I find the coordinate of child in its parent's coordinate system?

View 1 Replies

ActionScript 3.0 :: How Ever Load Always Returns True And Write Always Returns False

Nov 4, 2011

I have a load file and a write to file method. We all know what they do. How ever load always returns true and write always returns false....Right there you know somethings wrong. Because The forums have an issue with me posting code...I posted it here: [URL] Based on this code what is the issue here? why is write always returning false and why is load always returning true? (even for files that do not exist). My understanding is that if flash cannot find the file it should write to it will create it and if it cant load said file, then that method should return false.

View 6 Replies

ActionScript 2.0 :: Movieclip Name Is Undefined "despite Having The Correct Linkage And Instance Name"

Feb 8, 2004

I'm trying to attach a movie clip to the main stage using:

[CODE]...

However, it ain't showing up. Trace said the movieclip of that name is undefined, despite having the correct linkage and instance name. Anyone know why a movieclip might be MIA?

View 4 Replies

ActionScript 2.0 :: Trace "xmldoc" Object Undefined After It's Loaded Successfully?

Feb 20, 2007

Why is when I trace my "xmldoc" object undefined after it's loaded successfully? I don't get it???

[Code]...

View 1 Replies

ActionScript 3.0 :: When I Trace AdvertObject From Swfdisplay Its Empty... "undefined"?

Jul 13, 2010

i have this class...

Code:
package com.Advertising {
public class AdvertisingBlock {
public var troot[code]......

I then want swfDisplayer to extend from AdvertisingBlock But because AdvertisingBlock expects stage,troot,constant, I have to use super in swfdisplay?? Does that sound right?? so something like....

Code:
package com.Advertising.Renders {
import com.Advertising.AdvertisingBlock;[code]....

when I trace advertObject from swfdisplay its empty... "undefined" But tracing from advertisingblock obviously shows it as being the object that was written to it.Is it because "supering" basically creates a new instance of advertblock? but one that you can access?What I have been doing in the past is just not extending at all and just creating a new instance of SwfDisplay that doesnt extend.

View 12 Replies

ActionScript 2.0 :: _global Variables Disappear - "undefined" In The Trace?

Jul 2, 2009

I loaded and then trace my _global variables for three screens and they follow me fine until,. then on the the screen i have tiny bit of code:

[Code]...

Could it be the level 99 I use. I tried using 0 and it did not work? I have tried doing this for way too long,

View 0 Replies

ActionScript 2.0 :: Use Variable And Test It With Trace, The Variable Shows As Undefined?

Jan 13, 2004

we have this variable from the internet, val(0), in a dynamic text field we can see a digit from this variable. but when we use this variable in actionscript and test it with trace, the variable shows as undefined.how can we make this work without it coming up as undefined??

View 12 Replies

Actionscript 3 :: After Shuffling Array - Variable = Array[index] Gives 0, Trace(array[index]) Gives Correct Number

Aug 16, 2011

I think it would be simplest to explain it like this:

[Code]...

View 1 Replies

ActionScript 2.0 :: Menu Navigation System - Dropdown Appears And Returns When The Dropdown Returns

Jul 15, 2004

I'm having with a menu navigation system. I'm using Flash MX. I have created a menu system for the site I'm building ([URL]) where one of the buttons "Choose photographer" drops down a list of names. All the other buttons just jump to another page. The drop down is currently using tweens also the logo moves to the left as the dropdown appears and returns when the dropdown returns. All working fine apart from its a bit jerky.

It's I just wanted to get away from tweening and use action scripts instead, as I'm a newbie to all things Flash I trawled the net for tutorials and examples so that I could cobble together the exact same effect. I have managed to get the drop down work and return using the action script and it does seem smoother and works slightly better. But can I get the logo to move to the left and back in time with the drop down...no.

View 1 Replies

ActionScript 3.0 :: Get The Depths Of All The Blocks To Be At The Correct Levels At The Correct Times

Dec 30, 2009

I'm trying to get the depths of all the blocks to be at the correct levels at the correct times so that the 3d effect is maintained. I've tried many things, but have had little success. All the instances of the blocks are stored in an array, but since it's adding them in accordance with when they're added to the stage, it doesn't help me locate them to swap depths. Is there a way to arrange them by location on the board?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved