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




MyAcc.childA.move(); Doesn't Work



Context: Accordion component with children.

Objective: Position (move) children.

Problem: myAcc.childA.move(); doesn't work. Accordion children do not have the move() method. How can I move the accordion's children within the master accordion? I've achieved this positioning while working on the scene, so I figure it's possible through AS...right?

TIA,
Michel



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 04-26-2007, 10:03 AM


View Complete Forum Thread with Replies

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

Drop Menu : Rollovers/GetURL In A Movie Don't Work...and The SWF Doesn't Work In FF
My links/rollovers don't work in Mozilla and the dropdown menu part don't work (the rollovers and the getURLs) in any browser.

What's wrong with this??? I think it's something simple.
I've already tried:

Code:
this._lockroot = true;
I also tried writing the AS as:

Code:
one.title.text = "The Text";
one.onRollOver = over;
one.onRollOut = out;
function over () {
this.gotoAndPlay(2);
}
function out () {
this.gotoAndPlay(11);
}
one.onRelease = function(){
getURL("http://www.thelink.com");
}
...didn't work...

I hope someone can help!

Download the: Source File


(Lately I've gotten no help off this site and it's been very depressing because this site people used to be very helpful...I hope someone can change my mind)

If This Doesn't Belong Here Move It...
wasn't there a webpage editor that was made by macromedia? if so what was it's name, and where can i get it. i have no time to go looking for it at the moment otherwise ide do so, thanks

Preloader % Doesn't Move
i'm almost done a site, but this lil problem is driving me nuts... the preloader for my main movie works in the sense that the loadbar progresses and goes to the main movie, but the percentage # sits at 0%...i'm using the same preloader for an intro for the same site and it works perfec...i'm using mx2004 professional.....the intro (which werks fine) is here and the broken one is here thanks for any answers....

PS...site has to be viewed on IE..i think

My Preloader Doesn't Seem To Move
Hi, i have a problem with my preloader, the problem is that the loadbar doesn't seem to load and the percentage text doesnt seem to change either, i followed the kirupa tutorial on creating a preloader, but it doesn't work. I created the preloader within a movie in one of my external flash files, can anyone help me solve the problem?

The Ball Doesn´t Move?
I am a newbie to Flash MX 2004 but not to scripting languages
( I´ve been working a little with Live Stage Pro before).
I have a function taken from Colin Moock´s book "Actionscript
the definitive guide".

On frame 1 of Layer one of the main movie timeline:

_global.mainTimeline = this;

function moveBall() {
mainTimeline.ball._x += 10;
mainTimeline.ball._y += 10;
}

moveBall();

Nothing happens. Someone please enlighten me!
( I have a movieclip with the instance name: ball on the same layer)

This._lockroot Doesn't Work (combobox Components Won't Work)
I have a preloader (preloader.swf) which loads a form (offerte.swf).

I've put the this._lockroot on the "application" timeline on the first frame of the "Flash form application" (offerte.swf).
But the combobox components still won't work.

I had it working before, but suddenly it seemed to stop! Now I can't get it get to work again.

Preview: www.blaak.nl/flash/

This._lockroot Doesn't Work (combobox Components Won't Work)
I have a preloader (preloader.swf) which loads a form (offerte.swf).

I've put the this._lockroot on the "application" timeline on the first frame of the "Flash form application" (offerte.swf).
But the combobox components still won't work.

I had it working before, but suddenly it seemed to stop! Now I can't get it get to work again.

Preview: www.blaak.nl/flash/

Movie Clip Doesn't Move
hello, i returned to flash but have some elementary problems, so much time. ehh.

I created movie clip with some motion tween. In edit mode it's moving nice, but when play this movie on scene 'top level' it doesn;t. There are other symbols in scene and they're moving how I want (they have defined motion tweens in main timeline).

What I need to do, if the movieclip needs to play (like it's defined in its internal timeline) in main timeline ?

greets.

Movie Clip Doesn't Move
hello, i returned to flash but have some elementary problems, so much time. ehh.

I created movie clip with some motion tween. In edit mode it's moving nice, but when play this movie on scene 'top level' it doesn;t. There are other symbols in scene and they're moving how I want (they have defined motion tweens in main timeline).

What I need to do, if the movieclip needs to play (like it's defined in its internal timeline) in main timeline ?

greets.

Preloader Works, But Doesn't Move To Frame 2
For some reason, my preloader seems to be working fine, but is not advancing to frame 2 to start the movie.. Yet, when I reload the page, or click on another link, the animation starts, as if it was preloaded. I can only see the animation after clicking on another link.
Anyone have any idea why?

AS on the preloader, on frame 1 of main timeline:

onClipEvent (enterFrame) {
framesLoaded = (Math.ceil (( _parent.getBytesLoaded() / _parent.getBytesTotal()) * 100));
gotoAndStop (framesLoaded);
info.text = framesLoaded + "% completed";
if (framesLoaded >= 90) {
_root.gotoAndPlay (2);
}
}

Then my mc is on the second frame of the main timeline.

Any ideas out there? This has been driving me crazy!

Mouse Out Doesn't Register If You Move It Too Quick?
Hi there

I'm working on a scrolling gallery / navigation. It's supposed to scroll with a certain speed, but when the mouse is over it, it's supposed to slow down.

So the problem is, if I move hte mouse out of the flash too quickly, the gallery keeps crowling slow instead of returning to the previous speed. If I don't do it too fast - everything works fine.

So in the root, I give the coordinates of the "over" area:

_root.b = new Object();
_root.b.xMin = 4;
_root.b.yMin = 4;
_root.b.xMax = 766;
_root.b.yMax = 77;

(please note, I gave it extra 4px on each side to register that the mouse is out - which is still I feel like it's too much. If possible, I would like to make it work with no margins.)

And in my gallery Movie clip, I have this:

onClipEvent(enterFrame) {
if (_root._xmouse>_root.b.xMin && _root._xmouse<_root.b.xMax && _root._ymouse>_root.b.yMin && _root._ymouse<_root.b.yMax) {
this.onEnterFrame = myScroll("over"); // if mouse is over
} else {
this.onEnterFrame = myScroll("free"); // if mouse is not over
}
}

myScroll function is defined inside the gallery movie clip itself.

Can anyone advice something to fix this problem?

Thank you in advance!
Anastasia

Pan--why The Customed Mouse Doesn't Move When OnPress?
Does anyone know why?
Please help, thanks!

Smoothing Doesn't Work It Oughta Work
Hello!

I am trying to develope this website:

http://anarchy.primalinsanity.com/~villain/nma.rar

Its smoothing effect, however, has mysteriously disappeared. It is only enabled in authoring mode, not if I export the movie. I've tried everything to re-enable it:

1) Changed formats from JPG to PNG
2) Library > Bitmap Properties > Allow smoothing
3) File > Publish Settings > Smooth

But nothing seems to work

Thanks everyone,
Johann

New Instance Button Doesn't Work, No Apps Listed, But Apps Work
In my admin panel if I click on the New Instance button it doesn't do anything. I've seen other posts about this and they all end up being caused by people having no applications to load, but that's not the case here. My apps are installed and they work fine, but the new instance button doesn't list them and they don't show up in the applications list of the admin panel, even when they're running.

This has to be something pretty simple, but I'm not having any luck figuring it out. Any ideas?

Loader.close Doesn't Work In Flash But Does Work In Flash Player
When testing a movie in flash with simulate download the Loader.close() function doesn't seem to work when trying to cancel a load but it does work in a browser! You'll need to try to load a movie that has sound. The loader looks as if it stops but then the sound that's in the loaded movie will play, proving it hasn't stopped loading

add a button with instance name btnCancel









Attach Code

function onClickbtnCancel(e) {
// damn thing doesn't work in Flash but works online
ldr.close();
/* this stuff isn't even needed
ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, onCompleteHandler);

for (var i:uint=0; i < container.numChildren; i++) {
if (container.getChildAt(i) is DisplayObjectContainer && container.getChildAt(i).name == "movieclip loader") {
container.removeChildAt(i);
}
}
*/
}
btnCancel.addEventListener(MouseEvent.CLICK, onClickbtnCancel);

var container = new Sprite();
var ldr = new Loader();
ldr.name = "movieclip loader";
container.addChild(ldr);
var urlReq = new URLRequest("file.swf");

function onCompleteHandler(e) {
addChild(e.currentTarget.content);
}
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);

ldr.load(urlReq);

stop();

//--------------------On another note. Anyone know why I can't add text format styles to List components?

import fl.managers.StyleManager;

// set style for all components such as the List
var tf = new TextFormat();
tf.color = 0x000000;
tf.font = "Verdana";
tf.size = 14;
//StyleManager.setStyle("textFormat", tf); // <- this works but that's not the point
StyleManager.setComponentStyle(List, "textFormat", tf); // this works fine for a TextArea, just not a List??

























Edited: 07/11/2008 at 10:08:19 AM by Cine-Med

Move Art Work Over In .fla Doc. W/o Messing Up Tweens
I have a bunch of layers w/ tweens in them. I want to reposition all of the layers in the layout. When I select all my layers and move them over, my tweens get messed up!

Is there an easy way to select all layers to reposition them on the layout???

Please help! Thanks

When I Move Code To Next Frame, It Does Not Work
I have a long stretch of AS in the 3rd frame of my main movie. I would like to start some more code in frame 4 (for preview purposes, I can use a gotoAndPlay action for that frame so I don't have to watch entire movie each time)

The code works fine when placed at the end of all code in the third frame, but when I move it to the fourth it does not work at all. (right now it is just attaching a testMC) I have been trying adding stops and anything else I can think of which may be the cause for this but I cannot figure it out.

I feel as though it is something really simple I must be overlooking or possibly just don't know. Earlier in the movie, I have content in frame 2 and it moves to the content in frame 3 just fine???

Here is the actual movie so that it can be opened to look at the code, though if it is played there are many loaded movies which will cause a lot of errors.

I would really appreciate if someone could see what I am or am not doing!

Clip Event Moese Move Won't Work
i have put a movieclip in scene_1, this movieclip i gave the instance name "1".
i have put an action on the movieclip:
___________________________
onClipEvent (mouseMove) {
x = x+15;
}
___________________________

and on the first frame of the scene_1 i have put the action:
_________________________________
setProperty ("1", _rotation, x);
_________________________________

Why is there nothing happening when i move my mouse?

Why Won't This Movie Clip Code To Move Work?
I have a movie clip nested within a movieclip called "Upper". I am trying to move UPPER across the screen. OnClipEvent(enterFrame) works fine to move the clip so long as it is an instance of upper on the stage. (in other words a nested movie clip containing Upper and the movie below it.)
I want to be able to make the movie clip UPPER move across the screen, but have the action script within the UPPER movie clip and not the instanced Movie Clip. This is my code:

onClipEvent(load) {
Move = this._x;
if(Move < 810) {
_x = _x +5;
}
}
When the movie plays, UPPER remains stationary however the nested movie inside of UPPER plays fine. Why isn't the movie clip traversing the screen?

I Know This Should Work, But It Doesn't
in a game i'm making i've put this scrip in a movie clip:

onClipEvent (enterFrame) {
for (i=1; i<6; i += 1) {
if (this.hitTest(_root["shot"+i])) {
removeMovieClip (_root["shot"+i]);
this.play();
}
}
}

its just a for loop see if a shot hit the movie clip the shot is removed and the movie clip plays, the clip plays fine but the shot isn't removed (the shot is a duplicated movie clip)

i also tryed to remove the movie clip the shot hit (it was also duplicated) by after the explosion takes place it is removed with this script:

removeMovieClip (this);

but that doesn't work either. can any one help? or has my copy of flash lost the ability to use the "removeMovieClip" command?

With () -- Doesn't Seem To Work
Here is the structure:

movie Clip _level0.ColorBoxX.Highlight (where X is an integer)

and there is a button on the _level0.ColorBoxX

from the 'on (release)' action of a ColorBoxY I want to modify the _visibility of the Hightlight mc on ColorBoxX

so here is my with statement.
Note: _parent.currentColor = the X of the ColorBoxX

with ("_parent.ColorBox" + _parent.currentColor){
Highlight._visible = false;
}

I know that "_parent.ColorBox" + _parent.currentColor evaluates to the proper mc name via doing a trace but the mc visible doesn't go to false (i.e. the mc still shows up)

what am I doing wrong?

Still Doesn't Work
i want to load extra swf file to a defined location of my flash movie, I made an empty MC with instance name "location" and put it into location i want my extra swf to be at. my swf file outside named "introduction.swf", so i did as a friend told me:
on (release) {
loadMovieNum (introduction.swf, _root.location);
}
i put my main movie file and the extra file in the same folder,but it doesn't work, when i press the button , it just open another IE window with "http://introduction.swf/" in the address blank and get " The page cannot be displayed". So strange, could anybody tell me where is the mistake? Thanks!

Why Doesn't This Work?
I want to launch an .exe file from a flashmovie:


Why doesn't this work:

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


(I have the .exe application in the same directory as te my swf...I've tried it with an .exe projector (instead of a .swf) too...)

Can anybody help me ..please!!!

It Has To Work, But Doesn't...
hi,
I have a movie with two scenes.First scene has just one frame with lots of layers.And there is a mc on top layer which contains 200 frames in.I have 6 special frames in that 200 framed mc.When playhead goes any of them 6 times totally,I want the main movie go to next scene.
So what did I do:

I put an empty mc in 200 framed mc(call it mc A).and add that script to it;

onClipEvent (enterFrame) {
hit = 0;
}

then I add this a/s to empty mc in those special frames;

onClipEvent (enterFrame) {
_root.hit++;
if (_root.hit == 6) {
_root.gotoAndPlay(2, 1);
}
}


BUT IT DOESN'T WORK,what is wrong ,can anyone help me about it?You can offer some other way also.

Thanks for your time.

#%@&* Why - Doesn't - This - WORK ?
i have a chat room that works using php and flash5

note the "that works" bit of that last statement and replace it with "doesn't work". doesn't work that is if you load it in on a seperate level or target. (hummpph!!!)

i need, need, n-EEED! this to work on a seperate level.

why won't it???

tnx

Why It Doesn't WORK
Ok this script should giveme a progresive resize of the x and y Scales. Instead it resizes the movie instantly to 100 =(

onClipEvent (enterFrame) {
this.onRollOver = function() {
while (this._xscale<100) {
this._xscale += 1;
this._yscale += 1;
}
};

Still Doesn't Work
I NEED THE POPUP WINDOW TO "POPUP" IN THE CENTER OF THE SCREEN AND NOT THE FAR LEFT HAND CORNER.

Why Doesn't This Work?
i have this code in my main movie for a preloader that works just great...

onClipEvent (enterFrame) {
t = _root.getBytesTotal();
l = _root.getBytesLoaded();
percent = int ( (l/t)*100)+"% loaded";
if (percent=="100% loaded") {
tellTarget ("_root") {
gotoAndStop (5);
}
}
}


inside this movieclip is just a textfield that displays the percentage loaded. now, i am loading seperate swfs into this main movie into a movieclip called "loadClip1" using a slightly modified version of this script and the percentage loaded script will not display but the movie loads when it is complete. why can't i see the percentage loaded information???



onClipEvent (enterFrame) {
t = _root.loadClip1.getBytesTotal();
l = _root.loadClip1.getBytesLoaded();
percent = int ( (l/t)*100)+"% loaded";
if (percent=="100% loaded") {
tellTarget (this) {
gotoAndStop (5);
}
}
}

Why Doesn't This Work? Please Help
I have this script attached to a button. On the Main timeline it works fine:

-----------------------------
on (release) {
_root.next = "about";

if (current != "") {
if (next != current) {
this[current].play();
}
} else {
this[_root.next].play();
}
}
-----------------------------

But when I place this button INSIDE a Movieclip, it doesn't work. On the debug, it sets var 'next' equal to 'about' (another MC), but it never is able to get _root.next to play.

Does anyone know if I'm usoing the wrong syntax here?

Still Doesn't Work
If I export the file as a swf I still get it without spinning logo. What I do when I see it spinning is go to the menu under test movie and it spins but when I export as swf or avi it doesn't spin. any more suggestions.

Thanks
Jamie

Why Doesn't This Work ?
Hi, I'm just trying to dynamically generate my menu with an array but it doesn't seem to work:


myMenus = new Array("accessories","view", "print");


for (i=0; i<=myMenus.length; i++) {
_root.myMenus[i].onRollOver = function (){
trace("hello");
}
}

Can anyone tell me why assigning this rollover doesn't work?

My instances are named "accessories","view", "print"

Thanks

Php Doesn't Work
I have a Dynamic text box that is supposed to connect to a php page. It works when I run the Flash page from my computer (locally), but the same Flash page when running at our ISP (live) can't find the php. Does anyone have any ideas about why this would happen?

Doesn't Work
yes i know, but it doesn't

OS X Work But OS9 Doesn't
Please, someone help me!!!

I had a website publised by flash MX then it works perfect on OSX or
Explore5.2 but some script doesn't work at all when you see it by OS9 or Explore 5. I published them as flash 5 but maybe 5 doesn't support script of flash MX?
But then again if I publish it as flash 6, a lot of OS 9 users won't be able to see the site, right?


please take a look
@ www.kistudio.info
by both osx and os9.
portfolio page is the one the script doesn't work...

thanks,

tototo

Why Doesn't This Work? Please Help
I have a banner that will repeatedly flash across the screen in a loop of about 15 frames, and at the beginning of this loop, frame 77, I have this code: (This is the title screen for a corny little RPG thingy)

;
stop();
random = random(3);
if (random=0) {
banner = "Press ENTER to start";
gotoAndPlay(78);
}
if (random=1) {
banner = "Forget the princess, Get the gold!";
gotoAndPlay(78);
}
if (random=2) {
banner = "Level up by killing bad guys!";
gotoAndPlay(78);
}
if (random=3) {
banner = "What are you waiting for? START!!";
gotoAndPlay(78);
}


The problem is, the banner always assumes the value of the last condition, even if I had random=random(2), it would still be the value of "What are you waiting for? START!!"

My goal is to have the value of the banner be a different string every time it goes by the screen, but for it to be random.

And THEN, in frame 78, I have this code:

if (Key.isDown(key.ENTER)) {
gotoAndStop(108);
}


But THAT doesnt work, either.

It just keeps on looping with the same banner text.


And one more question:

How would I ultimately create a graphic that moves around the screen in response to directional key presses??

(I have Flash MX 6.0)

It Doesn't Work (?)
For everyone:
take a look at this and, please, tell me why the clipmovie "Produzione_struttura"
don't execute the action I gave to the 2 buttons inside...Please, tell me how to make it work . By the way, I use Mac.
Thanx in advance
(Big thanx MophoAl, u know why)

Why Doesn't This Work?
Code:
str_button = mainTag.childNodes[i].childNodes[1].firstChild;
_root["navbutton"+i].txt_button = str_button;
this works, but I want to change the text to uppercase - I tried

Code:
str_button = mainTag.childNodes[i].childNodes[1].firstChild;
_root["navbutton"+i].txt_button = str_button.toUpperCase();
but that didn't work - doing a trace on it gives "undefined"
Can anyone tell me what's wrong?

ps - I posted this first in the XML forum, but have found I tend to get quicker answers here - sorry for the crosspost!
Cheers

JennyJ

Why Doesn't It Work? :(
I'm making a scene which is started with stream sound; when the stream is over, I connected it with an 'even' Sound and a stop(); action. It worked properly, but when I tried to connect more another sound (with another stop(); action) it didn't stop the movie at all, it continued to play again (from the begining). I couldn't understand why...??

Explain:
Frame (1): Start sound A, stream mode, loop=0.
Frame (1+n): end stream (the A sound's gone out)
Frame (1+n+m): start B sound with 9999 loops ('Start' mode) + stop(); action.
Last frame: stop B sound (use 'Stop' mode) + start C sound ('Event' mode) with 0 loop + stop(); action.

>> The movie doesn't stop at any frame with stop(); action... (!!??!)

Please help me, I don't get them, why... 8-}

Why Doesn't This Work?
Code:
on (release) {
_root.score = _root.score+10;
}
on (release) {
if (_root.score==100) {
gotoAndStop(2);
}
}
i have a dynamic text box var=score in the same frame as the button with the above script..
before the button is pressed the text box reads _level0.score
after it is clicked it changes to NAN and remains there

also is there a way to change this so it works with a movie clip coming into contact with another mc, to add 10 points to the score box, and remove that mc from the stage?

Still Doesn't Work
I thought that might solve the problem but I have looked at other sites of mine that don't use the wmode transparent parameter and they are still just white empty spaces on NS 6.2. Also some sites I made with Flash 5 are fine. I have exported these movies from flash mx as flash 5 but that doesn't fix the problem. Any advice???

Why Doesn't This Work?
Code:
cursor.onLoad = function() {
Mouse.hide ();
startDrag(cursor,true);
}
???
doesn't hide mouse and doesn't drag Cursor

Why Doesn't This Work?
I took 1 of the tutorials and followed it just like it said and the preloader is suppose to come up right away, but it stays at a white screen until the whole thing is loaded then the preloader come up for like 1 second, please help me with this. http://mp7.zapto.org
click the weekly best song.

Why Doesn't This Work?
hey,


I followed this tutorial...

http://www.kirupa.com/developer/mx/p...transition.htm

I am getting close, but my "doors" don't close when i click a button, they start openning???


thx,
Baljinder

Why Doesn't This Work?
alright, just need a little help with a bit of action script...
making a movieclip play using if... and variables....

var clicks = 0;
click.onPress = function() {
clicks++;
trace(clicks);
};
if (clicks == 20) {
ab.gotoAndPlay("b");
}

any help would be appreciated

Thanks
Maikel

Why Doesn't This Work ?
I've made some little animated buttons - they are movie clips - but i can't make them take me anywhere , tried doing the _root. command in the line but still doesn't work

can someone tell me why
i know its probably just me missing something but its starting to annoy me now

Why Doesn't This Work ?
I have this file that when i try and load the swf into another movie online it just doesn't come in - if i remove the 2 first frames that are the preloaders it works fine - trouble is in the future some big files are going in there so i could do with a preloader.

Is there some piece of code in there that shouldn't be or have i missed something ?

Why Doesn't This Work?
mysiteclip is already on the stage.

a = 1;
newmysitesclip = "mysitesclip"+a;
mysitesclip.duplicateMovieClip(newmysitesclip, a);
newmysitesclip._y += 30;
newmysitesclip._x += 30;

Why Doesn't It Work?
basically my problem is this, i have this picture, and when you click it i need it to assign 2 variables: varX and varY, heres the code:

on (release) {
place = "images/1";
loadMovie(place+".jpg", "size");
varY = getProperty("/size", _height)*.273333;
varX = getProperty("/size", _width)*.16375;
gotoAndPlay(4);
}

-this code is on the thumbnail-

What's happening, is you click on a thumbnail of image 1, an offscreen movie "size" loads the full picture, and i'm trying to get the width and height of movie "size" and multiply it by those numbers, and set them to there according varX or varY. It just doesn't function like it should, and i feel like i'm missing something obvious....

This Doesn't Work
trying to make this work but it doesn't.

1. have the scroll work when .swf movie is loaded in movie clip (loader) on main movie page.

2. when clicking policy button from main movie... the swap depth command needs to only works ONCE. Right now, it swaps depths back and forth...one is the correct one, the second time is not. I need some kind of if command or something.

check it out guys, .fla posted below.

http://www.angelfire.com/games2/gamersglory/MX6.fla
http://www.angelfire.com/games2/gamersglory/POLICY.fla

this is in flash MX format. I have flash mx 2004 pro if needed to switch.

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