ActionScript 2.0 :: Function Doesn't Work According To Path
Jun 10, 2008
I'm programming a dinamic flash/xml website. up until now I've kept the info for the menus and the one for the gallery (the site has a gallery that displays both text and images) in separate xml files. but I'm trying to make all of it work out of a single xml file. I've managed to make the menus and the gallery all go get the info correctly to the xml (text and images), but then I came up with a problem that jeopardizes the whole show: a path inside the xml's onLoad function refuses to work! the code that bears the function has to be placed into the same clip as the clips that contain the text fields to wich info will be passed or it won't do a thing.
supose this is my actionscript code:
Code:
var contentSubMenu = new XML();
contentSubMenu.ignoreWhite = true;
contentSubMenu.load("example.xml");
[code]....
no information is passed to that clip. If the path targets that clip one should expect it to, right? even if all this code is placed on _root, right? well, it doesn't happen...I tried tracing for info that comes from the xml, but nothing is displayed in the output window.
I've attached a zip file that contains a fla file, an xml file, a txt file with the full chunk of actionscript code and the fonts you'll be needing should you decide to take a look (they're only two).
The fla file has been built in the following manner:
_on the right side, the clips that hold the text fields to wich the contentSubMenu.onLoad function will pass info to are directly placed upon _root (so, following the code example from above, it would be like having var buttonList = _root;)
_on the left side, the clips that hold the text fields are down into buttonListSlide_mc and the contentSubMenu.onLoad function is there as well, only commented so it doesn't display anything.
View 1 Replies
Similar Posts:
Feb 1, 2011
I have a flv that is loading from a subdirectory off my flash swf.Everything works fine when I load the video from [url].....However, when i start the video from mysite.com, the video is not located.What can i do to remedy this? I'm not using an absolute url in the component parameter inspector.For example
myVidDirectory/myvideo.flv
should I use a different path?
View 3 Replies
Mar 29, 2009
So, I'm using this Path Class to make a path and then draw it. I'm having a problem where there are some positions that I draw the path, the entire line does not draw.You can see an example of this here as the dot moves. The line flashes at a few coordinates. Just a small concept example I made. The path is there, it's just not being drawn.
The code :
Code:
import com.senocular.drawing.Path;
// create a path instance that draws in _root
var myPath:Path = new Path();
[code].....
View 2 Replies
Sep 25, 2009
I am trying to link a button via AS but I need to use a function that is on a different time line for it to work. I have no idea how I am going to do.
[Code]...
I am trying to use the "var flvControl" but that function is located on a different timeline.
View 7 Replies
Nov 27, 2009
I have a set of Cue Points in an FLV I'm playing. It's an interactive quiz, so the idea is that flash will change a variable, theAnswer, to a different letter depending on which question it is. The answer to question 1 is B, question 2 is D, etc. Either the cue point event listener isn't working, or else it is working and Flash isn't declaring the variables. 1120: Access of undefined property theAnswer. I literally can't find a single problem with my code. I have an almost identical Event Listener further down which works.
[Code]...
View 4 Replies
Apr 10, 2009
I'm making an educational software by AS3.I call "part1Act()" from frame1 and everything works very well.But when I call the same "part1Act()" from the frame 58, flash throw me this error.
TypeError: Error #2007: パラメータ child は null 以外でなければなりません。 at flash.display::DisplayObjectContainer/addChild() at L_oni_fla::MainTimeline/loadSnd()[L_oni_fla.MainTimeline::frame2:699] at L_oni_fla::MainTimeline/part1ActT()[L_oni_fla.MainTimeline::frame58:6 7]
I only called the same function from different time frame.The script I wrote is following.
//--------------------- code ---------------------------------//
var progressBar:progressBarL=new progressBarL();
var context:LoaderContext = new LoaderContext();context.applicationDomain=appDomain;var ldSnd0:Loader = new Loader();var ldSnd1:Loader = new Loader();var ldSnd2:Loader = new Loader();var ldSnd3:Loader = new Loader();
[code]....
View 9 Replies
Sep 10, 2007
my problem is that my onPress function doesn't want to work. Here�s the script: PHP Code:
[Code]...
the hilite function should let the buttons disable or not, but it just will not work.....
View 1 Replies
Oct 2, 2010
I am trying to stop a function in as3, I tried: delete.functionName - but it didn't work, I tried to achieve the same things using addEventListener and then removeEventListener, but that is not what I need that function has caurina tweener inside it and it has multiple tweens with multiple delays seconds, so all of the tweens are started and the seconds continue to tween but what I want is to simply stop that by stopping the function which holds the tweener so it should stop everything what is inside that function for example it could stop that function when it is mouse hovered on any object
View 11 Replies
Dec 14, 2009
I have a function ("advance_slideshow()") that ticks a slide show up by one, then it loops back at the end. It works when called from the key listener I set up for debugging. However it does not work when called from setInterval. I added a trace to the function to confirm that it was being called, which it is; it just doesn't work when called via the interval
Code:
//////////////////////////
/* IMPORTS AND INCLUDES */
[code].......
View 1 Replies
Jan 14, 2010
Here is my scenario
1: I am using custom hand cursor in my application
2: When the mouse leaves the stage I am making my hand cursor invisible
3: Further I am using PV3D for animating plane.When the mouse moves in the stage the camera rotation is changed
4: When mouse moves out of the stage.the camera rotationY is set to zero
Problem:I am using
ActionScript Code:
stage.addEventListener(Event.MOUSE_LEAVE,hideMouse);
stage.addEventListener(MouseEvent.MOUSE_MOVE,moveMouse);[code]....
There are other animation added to this function also.So the function works well but sometimes when I move the mouse out of the window from middle of stage to its out,the function doesn't work.Meaning it works for some fraction of time and then hand cursor is shown and camera rotation is not set to zero.Is there any trick that must be done to force Event.MOUSE_LEAVE work properly.
View 3 Replies
Aug 4, 2011
In fact, when i publish my FLA with player 9, there is no prob. When i publish with selecting player 10, there is this problem.
I paste my code :
var leng:int = MovieClip(root).program.websiteXML.pages.titlePage.length();
trace ("leng"+leng);
setInterval(function () : void {
[Code]....
View 11 Replies
Aug 18, 2006
Code:
_global.picWmax = 436;
But when I call the imageSize function with the if statement it doesn't work.
Code:
function image(){
[Code]...
View 3 Replies
Jul 10, 2008
I made a motion tween that works great on it's own, but won't tween at all inside of a frame. Why not?Here is the code as a function. What's up?:
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
fadeIn(myMC);
fadeIn = function(mc) {
var myHoriTween:Tween = new Tween (mc,"_x",Back.easeOut,900,0,1.1,true);
}
View 1 Replies
May 6, 2007
whenever I try to call the removeMovieClip function in a callback handler, it just doesn't work! Maybe I'm tired, or I've just missed something this is apparantly obvious. In my code exert below, is just a simple script that attaches a movie clip to stage (square_mc) and creates a duplicate instance. When the component button is clicked, I want the original movie clip to be deleted, but nothing happens!
Code:
this.attachMovie("square", "square_mc", this.getNextHighestDepth());
square_mc.duplicateMovieClip("square_mc2", this.getNextHighestDepth(),
{_x:50}) var listener:Object = new Object;[code].............
View 3 Replies
Oct 2, 2009
In my class i've got something like this:
[Code]...
So Every time when I click left mouse button, the setClickedTrue function should be triggered. And that's what happen normally. But when I make a fast move with a mouse, and in the meantime i click left mouse button, or i make a fast move and finishing i will click left mouse button, the function is not triggering. Something like MouseEvent can't hear this Event. I'm making an avoid game, and it's very important. I'm using Timer class with delay = 30; I'm also have got 30FPS on Flash Proporties.
View 3 Replies
Apr 17, 2012
I am using in AS3 "External Interface ". When I call the JS function that is on the same page as swf everything works fine.
I added a link in the html page to an external JS file, when I move the JS function to the external JS file the website crushes.
I would prefer to have all my JS functions on an external file so I can use them in the future in other project and it also makes it easier for me to update the site.
how to call a JS function that is on an external file from AS3?
View 6 Replies
Oct 7, 2004
I was wondering why my current code for calling a setInterval on a function doesn't work inside my class.I have this code inside one function, calling a second function.
intID = setInterval(selfReferential, dupe, 30, 0x000000);
The selfReferential keyword refers to the current class,but was defined previously (selfReferential = this; ).I get no errors, but the dupe() function is never called.and I had the selfReferential variable replaced with the this keyword at one point as well.
View 5 Replies
Oct 15, 2011
One of the the most annoying errors to get is the "duplicate function definition" error! Flash doesn't want to see the same function twice... But what about the same function used in two different sections (labels) of one site? I've got two different slideshows in two different sections of my site, and I need the same function called out for each. The function is function nextImage():void If I remove it one, that slideshow doesn't work (remains fixed on image 1 of the slideshow).. if I keep it in, nothing works! I had wanted to use the same script for both slideshows, but forget that! So, I found another script for a different type of slideshow.
View 4 Replies
May 20, 2011
my align function has stopped working. I am using CS4, so I tried downloading the trial CS5, but it doesn't work there either. So, what am I doing wrong?
View 10 Replies
Nov 10, 2002
This works:
_global.loadJPG = function (name, mc, x, y) {
createEmptyMovieClip(mc, m++);
_root.[mc].moveTo( x, y);
loadMovie (name, mc);
}
This doesn't work:
[Code]...
View 6 Replies
May 24, 2007
I'm using Flash 8 (in case you need know what version I'm using).There's three flvs I have assigned a cuepoint, "complete". The goal is to make a graphic visible when "complete" cuepoint is detected, but this function seem doesn't work, any feedback on function?:
Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);[code]....
View 1 Replies
Oct 16, 2009
I decided to try to use setInterval for myanimation, which is just a mouse trail.However, I'm trying to get teh mouse trail to be a dynamic mask.In my previous swf this was achieved by using a holder mc with the animation inside and then using this as the mask. But this time I just canpt seem to hit on the right way to get it to work. The code I am using for the mouse trail is:
Code:
var i:Number = 0;
var myInt:Number;
var t:MovieClip;[code].....
in the function, but now the trail doesn't resize and the mask still doesn't work.
View 1 Replies
Apr 21, 2010
I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.
I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.
Code:
navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410
View 4 Replies
Dec 26, 2010
I am a weird problem when an swf file is communicating with the localhost server. the application runs perfectly well through the flash player of the compiler. however, when I try to execute it through the browser - it seems as if the application doesn't connect to the localhost path at all.
View 2 Replies
May 6, 2004
i have a problem adressing or targetting a attached mc when i target de mc directly it works fine but when i try it trough a variable it doesnt recognise its path anymore??? hopefully a part of the code is gonna explain the situation a litle better... this piece works fine:
[Code]...
View 3 Replies
May 6, 2004
i have a problem adressing or targetting a attached mc when i target de mc directly it works fine but when i try it trough a variable it doesnt recognise its path anymore???
[Code]...
View 3 Replies
Jun 4, 2005
I've got an empty MC called "picture". This MC has the following path:
Code:
_root.container.picture
So, it's an external SWF (photography.swf) loaded in thru the container MC.When I make button at the first frame of photography.swf everything works fine. BUT, when I place the same button inside a MC (called "allphotos") I cannot get this to work.I use he following code for the button:
Code:
tb1.onRelease = function() {
_root.container.picture.loadMovie(image[6],6);
gotoAndStop(1);
}
It seems to "semi-work", because it loads blank. So at least the current photos disapears.I've used _parent, _level0 etc. Nothing.
View 3 Replies
Sep 5, 2010
I want to make a simple frame by frame path branching game. The problem is that I know that writing in and filling in EVERY FRAME going all along for EVERY CHOICE PATH would be an insanely tedious amount of work. My basic project is reminiscent of japanese visual novels, and I've been looking for turtorials to help me with this style of role playing games, but all of the tutorials concentrated on the adventure RPGs. : Being a novice at Actionscript, past working buttons to make it go to the next frame and stopping it, I was wondering if its possible to make a choice you make earlier in the game affect it later. Such as, you keep following the game normally afterwards, but depending on your choice you'll go to a different scene later. basically, this way I'd like to eliminate the need to make two duplicate paths with only minor variances to show the changes for some choices. Another thing that I would like to know if its possible to do, though this is less important, as I have yet to look for these things and I'm sure I can find them but a save/load system, easy to find I'm sure. And an unlocking system. Something so that once they hit a certain CG I can unlock it in a 'memories' menu on a main screen.
View 9 Replies
Jan 24, 2011
I have a strange problem: When I type the absolute URL to my SWF file it works fine; however, only the background image appears when the SWF is embedded in the home page.
View 3 Replies
Jul 18, 2010
So I've created a script where a mc is clicked on and the player can draw a path using the mouse. I'm trying to figure out how I can get the mc to follow the path drawn out by the player's mouse and when the player clicks again, it erases all of the path.my code is below
Code:
import flash.display.Sprite;
import flash.events.MouseEvent;[code].....
View 14 Replies