Line Continuation In Actionscript?
Is there a line continuation character in actionscript, so that if I have a variable text= some long string, I can continue the string over multiple lines?
G
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 01-02-2004, 12:04 PM
View Complete Forum Thread with Replies
Sponsored Links:
Continuation Of Last Part Of Post
ok it works fine when loaded externally into the movie clip but that swf which it has been loaded into has alos been externally loaded into
another swf files.
if u need a diagram i sorta do sumiit here
Main interface
Externally loads this file here
thats file then laods another file into another movie clip (no probs so far)
but then that file also loads an external file and using the code i was given it loads the file into the main interface lol
I have tried to resolve this myself by first changing the name of the last movie clip to Content1 so the script became
on (release) {
_root.Content1.loadMovie("War_conflict.swf");
}
I have a feeling the problem lies in the _root part of the code.
Im not very good with actionscript so I don't really have any idea on where to go myself.
any advice would be great, Thx in advance for help.
View Replies !
View Related
Is Actionscript Processed Sequential (line By Line)?
Ok, so long story short, I have a loop that fills three different arrays. As soon as the loop finishes, on the next line, a function is called that loads dynamic images into movie clips. However, this isn't working as I thought. Instead, the function is being called at the same time as the loop is running. Therefor, the first few images don't show up and I get undefined errors. However, if I delay the function being called by 50ms, I don't get the error. This means that it is a timing problem and that flash is executing the loop and the function call at the same time.
Does anybody have any experience/advice on what or why this might be happening?
Thanks in advance.
Edit: Also, my entire movie is implemented using actionscript in the first frame of the movie.
Edited: 07/18/2007 at 02:27:48 PM by nateyboy044
View Replies !
View Related
This Is A Continuation On "advanced Question"
i finally did it but it works funny, look
Code:
onClipEvent (load) {
var maxNum = 10;
var num = 1;
for (a=1; a<=maxNum; a++) {
for (b=1; b<=maxNum; b++) {
_root.jaap.duplicateMovieClip (""+num, num);
_root[""+num]._x = a*100;
num++;
}
}
}
and
Code:
onClipEvent(load){
picpath = "images/picture";
picnum = this._name;
picext = ".jpg";
pic = (picpath+picnum+picext);
loadMovie (pic,this.holder);
}
the second code loads the .jpg and the first code does the duplicating. in the first code you see "maxNum = 10;",this sets the amount of clips duplicated. when i set it on 2 it loads 2 .jpg's on 3 it loads 3 .jpg's but on 5 it loads 1 or 2 so it doesn't work 100% right.
does anyone see what i'm trying to do.
can anyone help out.
thanx
View Replies !
View Related
What Does This Actionscript Line Mean?
Hello,
I'm trying to create a txt effect, but there's one line in the sample movie which I do'nt understand:
set (c add "/2type:letter", substring(text, c, 1));
Can somebody tell me what's done here?
It's a line from flash 4, converted to flash 5. I just can't get out.
Please help me..
Sorry for bad English
Greets DrakaN
View Replies !
View Related
Help Actionscript For New Line
Hi
I have actionscript for a text effect. All the text I write is put on one line. How can I make the actionscript divde the text into more than one line?
The code I have is: -
text = "Hello! How are you doing today?"
which gives me: -
Hello! How are you doing today?
I want: -
Hello!
How are you doing today?
I have tried these but it does not work:-
text = "Hello!" /n"How are you doing today?"
text = "Hello!"
"How are you doing today?"
text = "Hello!" <br>"How are you doing today?"
Any ideas anybody?
View Replies !
View Related
Draw A Line From X To Y With Actionscript?
Hi there new friends!
Is it possible to add a snippet of code which draws a line from point 1 to point 2, according to variable coordinates.
I want a funcion looking like this, kinda;
drawLine(p1_X,p1_Y,p2_X,p2_Y,COLOR_GREEN, WIDTH_2px)
Or something like that.
Or can you stretch a piece of graphics between those points? It sure would be great, sorry if this is a n00b question.
Cheers and thanks in advance.
/Hoffe
View Replies !
View Related
Line Movement With Actionscript
How do I make a movie (of a horizontal line going down the screen) start playing backwards (ya know, going back up?) when it gets to the last frame and keep looping? I thought I could do this by setting a variable at the beginning equal to 1 and at the end equal to -1 and then just have the actionscript Go to and Play (_currentframe + framenum); (framenum is the variable I created)....but it doesn't seem to work...what did I do wrong? I know it's something stupid.
Alright alright, I know i can do this by doing a simple motion tween with 3 keyframes to make the line go down and up and rinse and repeat and whatever, but that's not the point. The point is...I'm stubborn and I want to do this with actionscript.
View Replies !
View Related
Using /r To Move To The Next Line In ActionScript
I am trying to move to the next line in a dynamic next box that is set to multiline. Here is my code.
if (whichPic == 1) {
picturetext.text = clear();
picturetext.text = "Step 7 Software:"
"Under Configuration check the health of the entire system.";
}
I would like the results in the text box to look like this:
Step 7 Software:
Under Configuration check the health of the entire system.
Bill
View Replies !
View Related
Line Drawing With Actionscript
hi there
i saw that i can draw lines with actionscripts lineto
i want to make an animated gui that is drawn out of only one point
i suggest i need a kind of timer/delay function to draw little steps.
but how can i built up round edges or circles
does someone have any suggestions ?
by the way, is there any possibility ,to set the hotspot of a movieclip with actionscript after the object was drawn. , e.g: normally when i rotate, everything is rotating around 0,0
thanx jakob
View Replies !
View Related
Get Rid Of Line Break In Actionscript?
I have an input called sourceURL.
I have it put together a string in a button like so, to make a url:
Code:
on (release) {
generatedCode = "<img src='"+sourceURL+"'>"
}
The dynamic text field that i have that spits it out works fine, except that it always includes a line break just after where the sourceURL inserts. WHats up?
View Replies !
View Related
Line Extending With Actionscript
Can anyone please show me how to animate a line stretching from one point to another point.
I attempted use different tweens on the line by changing its _height and also changing the _xscale properties of the line, but that it scales the width when the line grows, so I get a fat line, so scaling is not the answer.
I know there a workarounds like masking to make it appear to grow dynamically, but is there anyway in actionscript to make the line stretch.
Hope you can help me.
View Replies !
View Related
Help With Editing One Line Of Actionscript Please.
Hello. I'm using a public web template. The header navigation menu uses flash and the template came with the source .fla's. I only have Macromedia Flash 5 and the newer flash files don't work with it. I used a program called "Decompile Flash" to edit the image and text, but I can't edit the actionscript with this program.
Could someone kindly edit one line of actionscript for me? The button that says "Gallery", which I believe "Decompile" says it's "button88". After clicking the button, it sends the user to "hardcoregamerz.us". If someone could just change it to "index.php", that would be great.
I've included the source .fla and .swf files in a zip. I will need the final file put into .swf as I can't do anything with .fla's.
Here's a link to the zip file: LINK TO ZIP FILE
Thank you in advance to anyone that could take a couple minutes and do this. I'm setting up a gaming clan website and as of earlier today, "hardcoregamerz.us" was redirecting to a list of "xxx" sites and that wouldn't be good for the youngsters. As of this post, looks like the redirect is gone, but who knows when it will be back up.
View Replies !
View Related
Actionscript To Start A New Line
Do not worry, as I have solved my own problem.
I asked how to use actionscript to start a new line in a dynamic text box and the answer, which I found by trying the obvious, is the following:
Code:
Var_Name_of_Dynamic_Text_Box += newline + "What you want to be displayed on a new line goes here";
Thanks to anyone who tried to help, anwyay.
View Replies !
View Related
MC Time Line In ActionScript
I have 3 the same MCs in my main time line but with diffrent instance name.
and I want that when I press A key the MCs time line will go to the next frame.
how can I do that?
the name instance names of the MC is: A1,B2,C3.
and in my library the name of the MC is: Main.
View Replies !
View Related
Continue Actionscript To A New Line
Hello Everyone,
Does Anyone know what the syntax might be if I wanted to continue a line of code to the next line down?
ActionScript Code:
var str:String = "text1=" + someMovie.someTextArea.text + -->
"&text2=" + someMovie.someTextArea.text.....
View Replies !
View Related
What Is The End-line Command For Actionscript?
I haven't programed flash for years so this is going to sound stupid:
What is the end-line command for actionscript? so if i have a line of text and i want it to wrap onto the next line, what is the command? (i think it's /n or something like that) Someone help me out, it's killing me to not know. Thanks
D
View Replies !
View Related
Line Animation Using Actionscript
hey all, I have what seems like a rather easy effect to acheive here, but I'm having troubles with it.
Basically, I want a line to scale from the left side of my movie to the right. When I use "this.line._width = 20", it scales on both sides. I want it to only scale to the right. Is there a way to do this with actionscript? I'm going to make the line scale at a variable rate in the future, so it starts out scaling fast, then slows down as it reaches its destination. If anyone has any suggestions, I'd appreciate it.
Gene
View Replies !
View Related
Curving A Line In Actionscript?
I am very new to actionscript and am trying to figure some things out. Is there a way, via actionscript 2.0, to make the sides of a shape such as a triangle curve on rollover. I know that I could do this on the timeline but it would be more adaptable for future projects if I did it in code.
I am looking for a slight bulging effect that is subtle.
Thanks in advance for any help
View Replies !
View Related
Actionscript Arrowhead On Line
Hi,
I am creating a program in which XMLbased X/y coordinates are extracted to draw lines from one movieclip to another using the createEmptyMovieClip method and lineTo. There is a line for every childNode, gathered in a for loop.
What I would like to be able to do is attach an arrowhead at the end of the arrow, hopefully pointed in a straight line with the angle of the arrow line.
Anybody with any insight shall be most praised, here's the code for the creation of the arrow line. I've gotten rid of all the variables and the for loop here because its not important, and would only add hassle.
Code:
createEmptyMovieClip("line_mc", 10);
line_mc.lineStyle(1, 0x000000, 100);
line_mc.moveTo(200, 25);
line_mc.lineTo(450, 105);
So that draws a diagonal line and I would like to cap the line with an arrow head following the aim of the line.
Thanks in advance for any suggestions!
GC
View Replies !
View Related
Need A Little Help With Being Adventurous [line Drawing In Actionscript]
Hey everyone,
I want to be a little different; well actually, I need to be in order for me to achieve what I want. In the Flash help files, you can 'draw' using ActionScript with commands like lineStyle(), moveTo() and lineTo(), but in all the examples provided, you always draw to a new empty MovieClip. I want to draw straight to the stage using actionscript as you do when you use the draw tools. Is this possible?
Why do I want to do this? Because I want to create a mask layer and when you place a MovieClip on the mask layer, it does not seem to work. If there is a better way of doing what I want, I would like to hear about it.
Thanks for your time, and I would appreciate all replies. Does anyone have any experience with this sort of thing?
Greenham.
View Replies !
View Related
Actionscript 2 Curved Line Moving...
hi all, I'm creating a high jump game with AS 2.0. I need to replicate the bend of the pole, and then the steps taken to bend the pole back again, depending on the speed of the jumper. Anybody got any examples or ideas? I found a great example in AS 1.0 but I really need to get on to 2.0 instead. I can create a line with a bend, but can't get my head around the maths to do anything with it. All help really appreciated.
View Replies !
View Related
Creating Line Break In Actionscript
I am trying to create a line break in a dynamic text box using actionscript. my code is this
Code:
bgMusak.onID3 = function() {
trackInfo.text = "track : " + bgMusak.id3.TIT2+ " | album : " +
I want the "track" text and "album" text to be on seperate lines. any help is much appreciated. thanks!
View Replies !
View Related
[F8] Adding A Line Break With Actionscript
i am trying to format the information taken from the mysql db so that it makes it easier to read the results displayed on the screen. i am setting up a simple content management system which displays news articles on a website. the code i have for populating the page with the information is as follows
Code:
var theXML:XML = new XML();
theXML.ignoreWhite = true;
theXML.onLoad = function() {
var nodes = this.firstChild.childNodes;
for(i=0; i < nodes.length; i++) {
theTextBox.text += nodes[i].firstChild.nodeValue+newline;
}
}
i need to add a line break after each time it loops through the for loop so that these is space between each story. any help with this would be great. i have tried to use
and
in a number of differetn place's but eachtime i get the same result. no line break is entered.
View Replies !
View Related
Can I Draw A Animated Line By ActionScript?
Can I draw a animated line by ActionScript? i made three buttons. 1 is blue, 2 is orange & 3 i green.what i want....when i click on 1 button after that i click on any other second button,at that time i want to animated line bitween two button which i clicked. curve line must be move 1st button to 2nd button.if there is more then 50 buttons then how can is work.
i want to mak like this http://www.emirates.com/routemap.htm but i need animated line bitween 2 destination.
if u have any idea?plz let me know in details.
Thank u.
View Replies !
View Related
Drawing A Curved Line W/ Actionscript
I'm having a tough time trying to dynamically figure out what a control point should be between a start and end point. I would like to consistently get a soft curve between the two points. The ideal curve would look something like this:
http://www.actionscript.org/resources/content_images/4/steps.gif
My problem comes in when I need to figure out the math to get the control point (p1 in that graphic). I see a lot of code out there drawing a sine curve or something more detailed, but I'm getting lost when it's just one curve. Ideally, I think what I'm looking for is a function along these lines:
Code:
function drawCurvedLine(target_mc,startX,startY,endX,endY,curveAngle){
...
}
The "curveAngle" argument would be a degree like 30, 45, etc...
If anybody can help, I would appreciate it greatly. If I'm not thinking about this correctly, let me know.
Edited: 11/26/2007 at 06:03:47 AM by n00ge
View Replies !
View Related
Coloring A Line With Actionscript? PLEASE HELP ASAP
Im working on some actionscript drawing, right now Im drawing a curved line on a map to show a route for a shipping company, the line is red but I would like to color a portion of the line green for the completed portion of the journey. How would I do this?
If you have anymore Questions please ASK!
Thanks
Fidelity88
View Replies !
View Related
Elastic Vector Line W/ Actionscript?
Hi Guys,
I am interested in creating the effect used on this site for the mouse CORD...
http://dontclick.it/
The mouse follow effect is kind of a no brainer... but I am going after the effect they are creating with the cord. I am sure it is quite simple, I could just use a bit of help in figuring it out. Links to other examples or TUTORIAL would be great too...
Thanks!
View Replies !
View Related
Actionscript 1 (fp6.0.65) -- Command Line Compile?
I've been searching for a way to command-line compile (opensource-wise) AS1 code. The reason I need to do so is I've got a project that has a SWF that is compatible with the FP6.0.65 player to expose the ExpressInstall functionality, but I want to be able to let people re-compile the SWF without needing a copy of Flash.
I've looked at Ming, mtasc, and mxmlc. I couldn't really figure out what I needed to do with Ming. mtasc gave me errors (but I wasn't entirely certain that it couldn't work, I just didn't know how to get it to recognize the AS1 style code -- kept complaining about "System...", etc). mxmlc couldn't understand anything not in packages.
So, I was wondering if anyone can help me out. Is there a way to command-line compile a simple, single .as file (AS1) code into a SWF targeted for FP6?
View Replies !
View Related
Coloring A Line With Actionscript? PLEASE HELP ASAP
Im working on some actionscript drawing, right now Im drawing a curved line on a map to show a route for a shipping company, the line is red but I would like to color a portion of the line green for the completed portion of the journey. How would I do this?
If you have anymore Questions please ASK!
Thanks
Fidelity88
View Replies !
View Related
Actionscript Editor Line Break
Hi everyone,
This problem has plagued me, and I can't seem to find the answer anywhere...
I have a string that I would like to break into multiple lines in the Actionscript window, but I get compile errors after I do. There is a carriage return symbol you can insert after the line of text to prevent this problem, but I can't remember how. Can anyone hook me up?
thanks!!!
View Replies !
View Related
Define A Type For A Line From Actionscript?
Hello,
i used MovieClip.lineStyle to define width, color and opacity for a line that i will create point to point with MovieClip.lineTo.
But i also want to define a type different that "solid" for it ("Dashed" for example),
the same that we can do when we create a line from the tool panel,
is this possible to do this from actionscript, or must i define this line from the scene?
Thanks!
View Replies !
View Related
Writing A Multi-line String Using Actionscript
Howdy,
How do you write to a multi-line text field variable using actionscript?
I would like to write the words "Hello" five times into a text field on screen so the text field looks like this when the actionscript has finished.
Hello
Hello
Hello
Hello
Hello
I tried this:
On (Release)
Set Variable: "N" = 1
Loop While (N < 5)
Set Variable: "TextField" = "HELLO"
Set Variable: "N" = N + 1
End Loop
End On
And it only writes one line, of course it writes all 5 but I only see the last one.
Any suggestions?
thanks,
rise4peace
View Replies !
View Related
:: ActionScript Text Animation -- Line Breaks?
I'm using the text effect I found in
ActionScript Text Animation , and the script works great.
My question is, is it possible to have line breaks? I tried adding spaces to end a line, but you'd have to wait for the script to read through the added spaces before the next line begins.
Thanks!
-zap
.:.·.:.·.:.·.:.·.:.·.:.·.:.·.:.·.:.·.:.
CARLO ERWIN V. ZAPATOS
Website Designer
SUYEN CORPORATION
Tel +63 2 887-2311, local 159
www.benchtm.comActionScript Text Animation
View Replies !
View Related
Drawing A Line In Actionscript Using A Movie Clip
Drawing a line in actionscript using a movie clip
is it possible to take a small image file, turn it into a movie clip and then use that to draw a line?
I know how to use lineto to create a single color line and beginGradientFill to create a gradient color but can you use an image file to create a line?
View Replies !
View Related
Drawing Using Actionscript: Getting A Line To Follow The Cursor
So I'm working on a project for school and I need some help. In my file, I've replaced the cursor with a custom cursor of a pencil. It roams around the screen and on mouse over, triggers various actions. While it moves, I'd really like it to draw, so the user has more of an active role in the narrative. Is there a way to do this?
Thanks in advance for your advice.
View Replies !
View Related
Actionscript Line Graph Using Bezier Curves
I am trying to take a set of points that I am passing in via an xml file and plot them to a graph (easy enough). My problem that I am having is the ability to draw a line to each point and curve it using the curveTo() method.
My question is what kind of formula would give me a smooth curve no matter what data points I send to the app.
I have been looking for a week for code samples in actionscript and Java and have found nothing.
Thanks in advance for your help.
View Replies !
View Related
|