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




Path Related Problem...



Hi,

I have a button, inside a mc on the root timeline, that controls several labeled frame actions on the _root timeline. The problem is the code will play the initial action but not the second

Here's my current code:

on (release) {
_root.gotoAndPlay('stamp', 'rotation'); <--- works fine
_root.folder_movement_01.mission_statement.gotoAnd Play('sound_off');
}

The second line of code will not work, I suppose it's my code. Thanks for the help.

Yoshy357



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 04-09-2004, 02:48 PM


View Complete Forum Thread with Replies

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

Path Problem - Not Actionscript Related
I have tried every way I can think of to define a path to a .swf file. The output is from CS3 and it works on my home system. Here is an test page with all of the path types: http://www.sdwingchun.com/test/scott.asp and http://www.intraflux.com/scott.asp. What am I doing wrong?

I Am Using Flash MX, But This Is Mainly Action Scripting Related/XML Related Help ME
Hi.
I have a Flash menu that reads info from an XML file.
But I do not know how to make the links in the menu go to a certain url.
Here is my example:
http://www.digitarium.net/dnd/test/

and here is an example of the xml


menu
value id="1"
title News /title
disc Current News and 0wnage /disc
url index.asp /url
/value

I want the links to work and access the url.
Can anyone help me?
Here are links to the files.
http://www.digitarium.net/dnd/test/new.fla
http://www.digitarium.net/dnd/test/menu.xml
http://www.digitarium.net/dnd/test/xml.swf

Using Eval Function And Variable In A Path (target Path)
Hello,

I have to reprogram some of my website and it calls to conjugate strings in a way that's beyond my understanding. Please help me with some suggestions. Kind regards.

the original code is:

code:
if (_global.useCount<10) {
//hide
var diff = 10-_global.useCount;
for (diff; diff>0; diff--) {
eval(String(11-diff))._visible = false;
}
}

There are buttons named 1 to 10 and this turns off the ones that are not used. Now I want to nest those buttons in subclip "buttonsRow", instead of having them on main timeline. How do I rewrite that code to make it work with new path?

I have already tried the "associative array" method, but it don't really know how to pack the whole eval function in there. I've tried many combinations, like:

code:
this.buttonRow[eval(String(11-diff))]_visible = false;
//or
this.buttonRow["eval(String(11-diff))"]_visible = false;
//or
buttonRow[eval(String(11-diff))]._visible = false;
//or
buttonRow["eval(String(11-diff))"]._visible = false;
//or
buttonRow[eval(11-diff)]._visible = false;
// or
buttonRow[8]._visible = false;
//the last one at least turns off button 8, lol

Some of those return syntax error and some just don't work. Anyone have any ideas? Thank you again.

Cannot Export An Avi Of Motion Along A Path When Path Is Specified With Action Script
Hello!
I have the following problem: I am using Flash 8 Professional to produce a series of avi files showing the motion of a dot along different paths. Whenever I use the drawing tools to draw the path everything is all right: I can export both a swf and an avi file showing the motion. The problems start when I use action acript to specify the path: then a swf can be exported, but not an avi file (Flash acts as if it is exporting but the avi file produced shows only a stationary dot). Can anybody help me?

Its All Related
I know this is not a direct flash problem but i hope someone can advide.

I have a browser containg a link which opens my flash site in the centre of the screen...no problems there...

however! what i would like to do is make my browser containing my link to the site go straight to full-screen...any ideas...

but also i have a title on the screen...say it says "My Site.com". what i would like to do is position this title so that it always appears above my centered website regardless of screen resolution just for cosmetic looks. I assume that part will have to do with tables and alignment...so my main problem is the full screen...

if someone can advise on all or part of my problem i would be exteremly grateful.

Hex To Dec (not RGB Related)
Hi

I'm doing a simple hex converter with a input window(hex) and output window(dec)

Currently i'm using a simple script on a button to covert the hex to dec

on (release) {
outputBox = parseInt(inputBox, 16);
}

This is ok if you want to convert one hex number at a time, what i want to do
is input lots of hex values (in the input window) and convert them to dec (to
the output window) in one go.

All help is appreciated

4Real

Related To .flv
I am working at a flex project . There are variuos vide files and variuos .swfs , suppose any user choose a video file and put some effects over that video file (.flv) effects are in .swf format , now i want save all that effects and a .flv video file in a single .flv file . Is it poosible? if yes how? please reply me as soon as poosible

thanks

Hex To Dec (not RGB Related)
Hi

I'm doing a simple hex converter with a input window(hex) and output window(dec)

Currently i'm using a simple script on a button to covert the hex to dec

on (release) {
outputBox = parseInt(inputBox, 16);
}

This is ok if you want to convert one hex number at a time, what i want to do
is input lots of hex values (in the input window) and convert them to dec (to
the output window) in one go.

All help is appreciated

4Real

_root.path="http://www.sitename.com/path/FlashSite/"; Script Issue While Online
Hi there,
I inserted _root.path="http://www.sitename.com/path/FlashSite/"; in the beginning of my action script (2.0). This script accessing contents from an access database, which is working fine, when I tested from my local system folder. But no content from database is displaying while it tested from my localserver (127.0.0.1/path/FlashSite) or from online server.

From a search I found it might be the issue with "Network Access Warning". Is there any other reason? If this is the reason, then how can I resolve it?
For example, how should I replace this -

setTimeout( function(){ _root.content01.content02.gotoAndStop("cont_a");}, 1000 );

Thanks in advance
Shine

Variable Path Name --> Path=_root
instName="inst1";
path="_root";

Element.prototype.setVisible = function(){
[path+"."+instName]._visible=true;
}

I am trying to build a variable path to an instance. Normally I would do something like this[var]._x, but this doesn't work with _root.

Any ideas?

_root.path="http://www.sitename.com/path/FlashSite/"; Problem While Online
Hi there,
I inserted _root.path="http://www.sitename.com/path/FlashSite/"; in the beginning of my action script (2.0). This script accessing contents from an access database, which is working fine, when I tested from my local system folder. But no content from database is displaying while it tested from my localserver (127.0.0.1/path/FlashSite) or from online server.

From a search I found it might be the issue with "Network Access Warning". Is there any other reason? If this is the reason, then how can I resolve it?
For example, how should I replace this -

setTimeout( function(){ _root.content01.content02.gotoAndStop("cont_a");}, 1000 );

Thanks in advance
Shine

A Related Question
i have a related question... i was wondering about this the other day, and i think i am talking about the same thing here, but once a person fills out a form and clicks a submit button, where does that info go? where can you retrieve it? can you set it up to go to a specific email address or anything? any explaination available here? thanks.

Not Exactly Flash Related But~
correct me if I'm wrong, but I heard that flash takes in math equations/formulas and displays that graph into the flash player as shapes...
if this is true, is there any way we can export the equations? or am I just dumb ^^;;

OnMouseEvent - Related
I made buttons in flash, and I gave them 3 events...
OnMouseOver
OnMouseOut
OnMouseRelease
The Over and Out commands work, however, I can't get the release event to work properly. It for some reason, instead of going to 10, goes back to frame 1. Any ideas why? Anyone know the correct scripting? I am honestly, very new to Flash Mx, and I am trying to teach myself. So any input is greatly appreciated! Thank you!

Help With Zooming On Two Related MCs
Hi,

I tried posting this question a bunch of times in the MX forum but got no response, so I'll try here since I'm a total NOOB!

My flash file is here:
www.humboldt.edu/~mgk9/Test2.fla

Here is my situation:

When you use the zoom slide a frame appears in an inset that corresponds to the zoom level on a big map. The frame can be dragged and the view updates on the big map.

Here is my problem:

If you click anywhere in the frame that is NOT the exact center and start dragging, then the frame jumps to center in on the mouse. So the big map doesn't correspond to what is viewed in the frame. In general, the view in the frame doesn't seem to match the view on the big map. It's almost as if the frame covers more "ground" than the big map, especially when zoomed or dragged.

Thanks in advance to anyone that can help!

Not Related But Interesting
http://costofwar.com/

Imagine how many Flashers could of been helped!

Maze Related
Hi all,
I need a help from you flashguru's.
I have a maze. Now in that maze, I have a MC. That MC should move anywhere whithin the maze. It will not move on a key press but on enterframe.
So for example, if the MC hits any maze border, it should move in another direction. It can move up, down, right or left.
So how do I tell my MC to move within the maze, and when it hits any border, how do I tell it to move the other way?
Plz help as this is urgent.
Thanks

Got Some MC Related Problem...Help Me, Please:)
Well, what follows is the code I made, and the clips are well generated...still, thereis a problem: it does not generate the textfields inside the MC's...could any of you, gods of ActionScript show me the way this problam can be solved?
By the way, the variables are well passed, and the matrix exists(proved).

matriz = new Array();
myStr = results.toString();
matriz = myStr.split(";");
matriz.pop();
var pos = 0;
for (i=0; i<_root.contador; i++) {
_root.holder.attachMovie("square", "square"+i, i);
this.mc = _root.holder["square"+i];
this.mc._x = 0;
this.mc._y = _root.pos;
this.mc.createTextField("texto"+i+"o", 1, 0, _root.pos, 120, 25);
contenido = "texto"+i+"o";
contenido.text = matriz(i);
contenido.html = true;
contenido.background = true;
myformat = new TextFormat();
myformat.font = "Arial";
myformat.bold = true;
myformat.url = "";
contenido.setTextFormat(myformat);
_root.pos += 24;
}

Internet Related
I am wondering how to make pop-up windows for my movies or games that are the same size as my swf. files (550 by 400 pixels)... If you've seen pop-up windows, like on newgrounds, thats what I'm aiming for...

I am using Flash MX 2004 Pro.

If there is actionscript or javascript, please tell me how to use it and paste the code in your response.. Thank you.

Drawing Related
How to draw Rectangle or Oval, so that it starts from center (the point where I click the mouse) but not by the edge.

Not Sure If This Is Actionscript Related
Hi,

I'll get right to the point, as I have said in the topic name, not sure if this is AS related. But im working in AS2.0 CS3.

I've run into a problem. My project has keylisteners, so pressing letters activate certain functions. But there is one area where I need to put an Input Text box.

My question is, how do I make it so, when im in the text box and typing, the key listeners wont activate. Second part, how do I get out of Text box mode when im done?

Thanks in advance.

Another Xml-related Question..
I have this script:

var temp:String;
var config:XML = new XML();
config.load("config.xml");
config.onLoad = function(success) {
if (success) {
temp = config.firstChild.firstChild.firstChild + "";
trace("temp parsed from config.xml:"+temp);
}
};
trace("temp:"+temp);

The problem is that the second trace statement executes first and then executes the other in the onLoad method body. I thought that code execution would freeze until xml has completely loaded and then it would go on processing the rest statements. Is there any way to achieve that?

IMG Related Question
Hi, I know this doesn't have much to do with Flash. But my purpose does. How can I convert a bitmap image to jpeg?

Thanks in advance

Related Object
Hi all
i am new in AS3 and in flash generally, i am trying this code, but it fails and give me an exception.

var Container:Sprite=new Sprite();
Container.x=200;
Container.y=280;
var color:Array=new Array(0xFF0000,0x00FF00,0x0000FF,0xFFFF00);
for( var i=0;i<4;i++)
{
var ellipse:Sprite=new Sprite();
ellipse.graphics.lineStyle(3,0x000000);
ellipse.graphics.beginFill(color[i]);
ellipse.graphics.drawEllipse(0,0,60,100);
ellipse.x=i*30;
ellipse.y=0;
ellipse.addEventListener(MouseEvent.CLICK,clickEll ipse);
Container.addChild(ellipse);
}
function clickEllipse(e:MouseEvent)
{
Container.setChildIndex(e.relatedObject,Container. numChildren-1);
}
addChild(Container);

and the exception is
TypeError: Error #2007: Parameter child must be non-null.
at flash.display:isplayObjectContainer/setChildIndex()
at sprite_fla::MainTimeline/clickEllipse()

plz i need help to overcome this problem.

A/S + HTML Related Q's
Without much ado...I want my webpage to open in a new window without any scroll bars, the status bar or any other tool bars - Just the header line at the top with the minimization and close buttons still active. I am using the Java Script button code generator and can figure out most of what is there.

What I wanted to know was what is the size of the screen (minus the bar at the top) in which my webpage would be displayed if I had a resoution of 1024 x 768? I want my page to cover the whole screen and I figured this may be an everyday thing for web designers here!!

Thanx for reading!! (And for replying, if you do)

Regards.

Related Macromedia...
can annyone gave me the link from where i can gate the action scripts.. in Macromedias webpage...



pls help me on these. need tam soo much..

the live codes or what thay r called..

What's The Best Way To Search For Help Related To 'XML'?
Hi, I tried to run search for messages re use of XML in flash. Instead I got this:

Sorry - no matches. Please try some different terms.

The following words are either very common, too long, or too short and were not included in your search : xml

What's the best way to look for XML related subjects?

Printing Related
Hi,
I have a flash game of 1024 X 744 size and a single framed movie clip of 1024 X 786 size inside it. When the movie clip is printed in A4 size paper, the black background color is also get printed along a side( bcoz movieclip is proportinately scaled automatically in some machines). How the bgcolor can be avoided.(Code attached).

Also please explain how can i print a 1024 X 786 movieclip with PrintJob( ) in portrait orientation.My main doubt is about xMax,Xmin... etc. given in addPage( ).

Thanks in advance,

Manu







Attach Code

attachMovie("mc_finalCertificate","mc_finalCertificate",0);
mc_finalCertificate._visible = 0;
this.btn_print.onRelease = function() {
print(mc_finalCertificate, "bframe");
};
//#b added in frame

Not An XML Related Post
i have a flash file which has a sound on the over state... what i need to do its tone down the volume of the sound as it is quite ermmmmm loud.. see for yourself.. link here to site

do i need to get a sound editor? / or can i just alter the file inside flash to be quiter? / or do i need some actionscript that does the same job?... help?

Related To Buttons
Hi Friends,
I Have A Problem With The Buttons.I Make Button And Using getURL() Link To A Site.It Work. But I Inseart this .swf In Front Page The Link Not Work And Get An Error.How I Solve This Problem.If Any Script Is Need.Please Solve This Problem......

Quries Related To 3D
Hi,
I want to use 3d flash, but i don't know anything about it.

Actually i have a image & i want to get the view of the image from different angles.
How can i acieve this? Is there any 3D software that i can use.
Please give details.

Thanks in advance
- Shreyasi

Some Serious Actionscript Help, Related To MX...
Hi everyone. I'm new. I've been seeking ehlp with this for a week at Flashkit. Maybe someone here could/would be willing to help. I asked a how to at Flashkit and someone coded it for me. Efforts to contact this person regarding explanation of how it works and to help make a few more changes have been in vain.

It's a disappearing menu, created with actionscript, and I want to understand HOW it works and how to make it do what I want (which is load an MC that corresponds with which button was pressed AFTER the menu animation is complete).

Maybe this is a more insane challenge than I thought? My efforts to decode the actionscript and rebuild it have been in vain as I don't undertand what some of the variables mean. I'm not new to flash, but new to complex actionscripting.

Anyway, here are the pertinent links.
http://www.seedrecords.net/clock-UG.swf (The animation currently happens too soon. Also the console is just a rough one at this point).
http://www.seedrecords.net/clock-UG.zip (the FLA file).

Drop me a line if you can/are willing to help.

J

This Question Is Not ASP Related, Did Not Know Where I Could Get Help
Does anyone know where I can purchase a lot of images to use on a comercial website? We have some but they are not royalty free.

"A Successful man is one who can build a firm foundation with the bricks that others throw at him"



Cursor Related
Ok this is what i wanna do.

In my portfolios section what I want to happen is when the cursor is over a button i want the title of the work to appear where the cursor is. I'm not good at explaining things so go to

?http://66.46.176.151/66.46.176.151/.../flashindex.htm

and in the portfolio part if you go over the big thumbnails it says "click to zoom" thats what i want.


can u help me out?

Gotoandlearn Related Q
Hello all, I'd like to know if the tutorial "Sending Mail with PHP" from gotoAndLearn.com can be used with FlashMX? I use the fore-mentioned and I haven't had the chance to compare it's actionscript with actionscript2. Thank you in advance.

New YouTube API And Related Changes.
In case you haven't heard, YouTube has released a new API to make it easier for Flash and JS developers to use YouTube content.

Without even touching the API I have already seen some benefits. The old youtube player used to get stageWidth and stageHeight and attempt to scale itself. This worked fine for people who were simply enbeding the player into their HTML pages but obviously posed a problem for people trying to put the player on their Flash pages.

I just fired up an old file I was working on and the new YouTube player swf works exactly as you'd expect it to, namely, the player constrains itself to the dimensions of it's parent clip.

Some of the other changes allow you to import a chromeless video (even the controls are stripped) and then control the video through your own code.

For people who where already taking flv's from YouTube's website, non of this will change anything. But for people who where unsure about whether or not it was kosher to pull the flv's, and by extension refrained from doing so, these changes will be much welcomed. It provides all the benefits of directly pulling the FLV while simultaneously bieng blessed/endorsed by YouTube.

They've also given the ability to upload videos from your own site.

Not Related To Actionscript But Pls Read.
ok my problem is not related to actionscript but please read on to see if u can solve my problem.

last time whenever i open picture files (those with .jpg .gif ones) it will be open using internet explorer.(just double click on the file and it will be open in internet explorer)

But dunn know since when, whenever i open pictures files, it will be open using mircosoft photo editor which i dunn wann. I had tried open internet explorer, click file then open from internet explorer, it will still be open using mircosoft photo editor.

So how do i make back to open pictures in internet explorer
if u gyus know can please help me coz i cannot see gif files(those with animations) using mircosoft photo editor which internet explorer can.
please help if u know wat should i do to allow me to open pictures in internet explorer.
thanks a million in advance.

Another Preloader Related Question
How do I get the preloader to begin playing right away?

What happens with mine is that it plays a bit too late. It will begin to play when most of the movie is already loaded. It almost defeats the purpose of a preloader...

Countdown Related To Time Of Day
Hi everybody,

Got a question. I managed to get a countdown working, starting from 750 (counting down with the rate of a second).

Code looks like this:
------------------------------------------------------------
_root.onEnterFrame = function() {
time = Math.floor(getTimer()/1000);
displayTime = 750-time;
if (displayTime<=50) {
delete _root.onEnterFrame;
}
};
------------------------------------------------------------
Now here comes the tricky part.
I would like to make 4 different countdown rates depending on the time of day.

What I mean is:
- 1 countdown rate, counting down every second playing between 09.00 hours and 15.00 hours
- 1 countdown rate, counting down every 2 seconds playing between 15.00 hours and 21.00 hours
- 1 countdown rate, counting down every 3 seconds playing between 21.00 hours and 03.00 hours
- 1 countdown rate, counting down every 4 seconds playing between 03.00 hours and 08.00 hours

Is there any way to check the time and make some kind of if/else statement in order to get the right function working at the right time???

Maybe splitting it into 4 different MC's.., (replacing the onEnterFrame with onClipEvent) and calling them on the specified time..?


Would really appreciate it if some one could tell me how to get this working.

Thanks in advance!

Eva

Non -Flash Related Question
Sorry if this shouldn't be asked here, but I don't know where else to go.

What would cause a mouse to stop working? I use a Logitech cordless mouse and it simply just stopped working. I've replaced the batetries and that didn't help. I even replaced the mouse entirely (with just a standard IBM mouse) and that didn't help.

Any ideas?

Thanks

Query Related To BeginGradientFill
hello,

beginGradientFile has 5 parameters
movieClip.beginGradientFill(fillType, colors, alphas, ratios, matrix);

I am having problems understanding the last parameter i.e. matrix;

Can someone explain me this line of code:

matrix = { matrixType:"box", x:100, y:100, w:200, h:200, r:radians }

Dragon Related Design
Hello!
I am looking for a Dragon or Dragon related ornament design, can anyone help me finding it?


thanks

Can I Return Get A Value Related To # Of Scenes?
Hello all,

Hope you can help. I'm trying to find a way to get the number of scenes in my movie put into a variable. I can't just hard code it in either. The application i need it for must move from movie to movie, each containing a different number of scenes.

Matt

Simple Xml Related Question?
yo. thanks for any of you who can help.
i have an xml file. when running the sfw file, i can make it import the xml file, change the nodes n stuff. but then i want to send the whole lot back to the xml file. being everything. if this is possible, please please let me know how. if it isnt possible, im sure one of you wont mind helping me later on. thankyou you nice people.
-marc

2 Mouse Related Questions.
Hello,

i am trying to do 2 things:
1. i want a MC to move up/down when the mouse moves up/down
2. i want a MC to rotate so one of its ends allways point to the position where the mouse is.

Could somebody help me with this 2 effects?

Thank You,
Miguel

Time-related Scripting
I am working on a 5 min short video animation which should look like rain fall. The main way of how it should be build is that it starts from nothing, after 1/2 min the first drops start, then continously the drops get more until it peaks at minute 2.5 and then decreases again until minute 5.

Is there a way of scripting the time related action and also the increasing and then decreasing amount of rain drops (some way of a counter or i don't know)? each rain drop represents a movieclip so it should work with the duplicate movieclip function - but maybe there is a different way of doing it??? Or is there any other way of doing it except frame to frame animation?

please, please help - it's really urgent and i don't know what to do!

Thanks!!!!!!!

Array Related Questions...
for (i = 1; i <= _root.designmenu.length; i++) {
designmenu[i] = designmenu[i].toUppercase()
}

that code made an infinite loop and crashed my script... why is that?? _root.designmenu is an array of strings that was preveiously assigned (i traced its length and returned 7)... i want to convert the strings in the array to uppercase...

and how to you reference to individual variables by constructing names out of a loop? like...

for (i = 1; i <= 5; i++) {
target+i = i;
}

i want to name 5 variables target1, target2, target3, etc by using the loop... how~~?

Sorta Flash Related..
OK, this is sorta flash related. Well, I amde a catalog right in flash, a simple thing. OK, but now I want to put on a Cd and have it be .exe and launch when the cd is put in. Cna soemone help me with that? Well, my real question is I wanna have them on mini Cds eith stuff printied on the Cds, and i need alot, so where can get I get CDs like that made? SOmewhere whre Ic an give them the flash file and they'll give me like 1000 of them with a logo on the ini CDs.
ANy help on stuff like that would be great.

2 Mouse Related Questions
Hello,

i have 2 MC's on my stage and i want one of them to be all the time over the mouse pointer and the other to follow the mouse with easing.

Can somebody help me out with this?

Thanks,
Miguel

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