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




Hey Give Me A Break



Hi Folkz

My problem is:

just want to know what code I can use for the actionscript stop for time and then continue

Like this

Command command command;
wait some seconds;
Command command command;


is there a sintax to give this break???

tkxxx

[]s



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-18-2004, 05:23 PM


View Complete Forum Thread with Replies

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

Could Somebody Please Give Me A Quick Break Down...
Hi there guys,

i'm new to Flash so apologies but i am a seasoned user of photoshop, illustrator and indesign so i'm not completely inept at Adobe packages.

Anyway i really want to learn Flash and have been dabbling a little, i've found a site that works similar to the way i envision my new site to look, i'm not going to rip it off, just taking inspiration from it.

Could anyone please break down how they'd go about creating the fold out square effect that is on Periscope.

I've tried using the 3-d rotation tool to flip the squares over but there must be a simpler way instead of repeating that over and over? if anyone could please help it would be very much appreciated. Breaking it down as simple as possible would be a great help.

Thanks

Give Me Some Spice And Ill Give You Some Sugar
i need some help,


wats an action script so i can skip to a pecific scene, i just cant seem to do it im trying the on (press) gotoandplay and it wont work


as i said before give me some spice and ill give you some sugar

Add "-" To Break A Word At Line Break
is it posslbe to add a "-" to break a word at the end of the line, if the word is longer and need to be broken?

Break... How?
ok big problem... not really it probably has a simple answer. ok, i made a "title page" and when I'm working on my flash, it works, cuz I click on the first page, but when I publish or when I just hit play it continues through my title page even I have a button that it's supposed to break at until I hit that button. so how do I stop the video at the button?

Break Apart?
I was wondering if someone could explain to me the function of the Break Apart option in Modify. Thank you.

Could Someone Break This Down For Me
Hello all,

Very new to Flash and trying to get my feet wet (feel like I'm drowning). Anyway took the tutorial with Flash MX and now want to create something like the templates I found on this site: http://www.flash-mx-template.com/lib...ex.php?tcat=RP

Could someone break this down for me. Specifically my questions are-
1. All the graphics that load are seperate layers?
2. How is the Dynamic text changed with the click of the buttons.
3. There are continous moving elements i.e. Lines that are moving in
header, how is this done?
4. How much of this site is "sitting and making the movie in Flash"
and how much is coding?

In advance thank you for any help.

Dave

Break Apart
Hi - trying to cut some corners here!

I want to "distort" (ie skew) a string of text. I type in the text and then do a break apart. However this only breaks each letter into individual text strings. Ideally I do not want to then have to do a break apart on each letter to make them into distortable shapes. Is there a quicker way of doing this than one-by-one?

Thanks.

Ig

Break Out...
Hey I am having a problem with a game like break out, that i am making... I made the game, and i made cheap physics... but anyways... the game works ok, but then i added powerups... a random box that appears when you break the bricks... When it falls down you are supposed to be able to catch it with the bar, or avoid it(whether it is good or bad)...but sometimes when the ball breaks the brick, the power up shows up then dissapears quickly... Having been used but not by catching it with the bar... I will send the fla through aim if anyone is willing to help... and i will get it uploaded if you want to download it from a site... the URL will be http://www.geocities.com/billsstorager/Brickgame.fla ... I will have it up shortly after I post this...

Break It Down
into smaller problems. i am using dynamic images, thumbnails, in my site. i want to try this with dynamic images so i can easily reuse the site for other gallery type sites. is there a way to preload the jpegs so that by the time i get to the nav, they are ready to roll?

-----> % And Non Break Gap How?
I have dynamically loaded text in my flash file.
I have styled the external .txt filefile using HTML.

My question is how can I put % symbol and non break gap in my sentence?
What is the html code for it?
Is this not supported in flash?

How To Use Break Apart
Hello, I am new to Flash and was wondering how to use the Break Apart. I put my bitmap on the stage, then my shape (a square drawn with the line tool). I put the square on top of the bitmap and ask break apart from the menu and then nothing. How to use break apart so that a small part of the picture is included in the square ?
thanks.
Michael.

Using Break
how do "break" works?

I have some nested (2) "for" wich Im sure are causing me some bugs.
So, I want to stop these loops, whenever a variable is set, lets say, true.
The "for" are like this:

Code:
failed=false;
for (i=0; i<=5; i++) {
if (failed == true) {
break;
}
dosomethings();
for (z=i; z<=10; i++) {
if (failed == true) {
break;
}
if(condition){
dosomeotherthings();
failed=true;}}
So, when (condition) is true, I dosomeotherthings() and leave both for. Is this what Im doing this?
Oh, I made a search for "break" inside this forum and found that "braek is a considered bad practice". Why?
Thanxsalot

I Can Break Anything
Hello. I am totally perplexed as to why I can't seem to get a simple button to bring me to another Scene. I have followed tutorials (to the letter.. so I assumed anyway) to create a button and create a new scene. The button works fine but it still will not go to Scene2
Here is the setup
Scene1;
layer 1 has "Text"
layer 2 has "shape" converted to symbol (button)
on "shape" layer in frame 1 the following action script is typed
on (release) {
gotoAndPlay("Scene2",1);
}
I know this is action script to button because in action script window it indicates Action-Button.


I have imported to library a Quick Time Movie and converted to Movie Symbol
Scene 2;
layer 1 Movie (dragged onto stage)
Frame 1 of movie in layer 2 following code in action script window is placed.
stop();


Now... I know the movie is OK and plays well because I had previously tested the movie symbol in Scene 1 and it loaded fine and played all the way through.

Problem now is,On test movie, button works as it should (changes color and pays sound file on 'release') but does not go to Scene 2 and play movie symbol.

Where have I gone wrong???

Break Apart
OK i have a problem with some text... I am making a website and am using a font u would not normally have, so the break up the text so that it is embeded in the site, but when I do this the text becomes blury, if you know how to fix this without putting the text into Photoshop and then saveing and importing it into flash please tell me.

Thanks!

Oh yeah, if you dont know what im talking about look at the attachement

Can Anyone Break This Down For Me?
Someone had posted this tutorial at sitepoint. I am to figure out the code but am confused about these two lines of code. I do understand the functionality but cannot seem to understand where is this section. Any help be highly appreciated.

Thanks.

These are the lines don't make sense...

1. _root.section
2. loadMovie(_root.section, _root.content);


I am also attaching the tutorial zip file.

This Is A Hard One To Break
Nobody seems to know how to detect the functions keys like F4 F6 F7 F11.

if i use on keypress/keycode detect it sure detects it en works fine off-line.

when operating in a browserwindow (IE) the functions keys interact with the browser instead of the SWF.

REALLY NEED HELP - the only solution i got now is to make a keyboard image and make buttons of the F keys wich the users needs to click on. not much of a software simulation huh :-/

Can You Break A Script?
Is it possible break a script in Flash? Say i'm running about 20 lines, halfway something happens and I want the script to stop at line ten and exit. Is this at all possible?

Line Break
let's say I want to enter this into a variable:

hello,
I'm em00guy

How to I tell flash to recognize the line break?

example:

variable="hello (what goes here?)I'm em00guy"

Thanx ahead of time.

Break Apart Text
is there a way to automatically convert each letter to a symbol of a 'broken apart' word(s), whereas, if there were two letters the same the symbol name would for example be appended with an incrementing number?

it'd be a neat feature.

it's so tedious having to convert each letter one by one, for those are really into creating text effects.

any help appreciated. thanks.

Script For Break Apart
Is anybody aware of an script to "Break Apart" an item(Under Modify on the menu)

Break Apart An Image
If I type a word, then go to "Modify", "Break Apart", I can then "Distribute To Layers" and modify each letter as I wish. As an example, I can do a motion tween so that the word splits apart (or comes together) into seperate letters, with each letter moving to wherever on the stage I wish along the timeline.

My question is, is this possible with an image?

What I am trying to do is to take a photo of a face, split it apart into very small pieces. When the timeline first sees the image, it is in it's "split apart" stage. As the timeline progresses, the image comes together.

Is this possible? If so, how?

Thanks in advance.

Using Break In Expressions
Hey I was just wondering if I can ues a break function, I have he following code:

onClipEvent (enterFrame) {
_parent.itemlist = (Firstitemname[0]+Firstamount[1]);
}

I want the itemlist variable where this appears to make a break (return, enter, etc) after the Firstamount array part, but I only know how to do that within the quotes using
, I would REALLY appreciate help.
Flash MX Btw

Break Apart Your Fonts
Just thought I'd post to remind anybody to break apart their static text if the fonts you are using are not 'standard'. I recently made a big mistake in nearly publishing a movie that used a rare font.

If a movie is published like this it will use fonts of the internet user's machine, and not the one intended.

Cheers.

Can Ya Break A URL Into Bits And Add Var?
I want to make a url to load var but i want a var in the middle of the url so i can load dif ext text files.

The line is so far but no workies.
loadVarsText.load("http://www.website.com/folder/"+fileNameVar+"txt");

Obviously the fileNameVar var is what i want to pass and test.
Then to pass it i want to be able to go.
fileNameVar=textFile1;
or
fileNameVar=textFile2;
or
fileNameVar=textFile3;

I'm going about writting a function so far so good but getting the syntax right im not sure about the URL and the passing the new var.

fileNameVar=textFile1;
function loadExtText(fileNameVar,varName){
loadVarsText = new LoadVars();
loadVarsText.load "http://www.website.com/fold/"+fileNameVar+".txt");
loadVarsText.onLoad = function(success) {
if (success) {
scroller.html = true;
scroller.htmlText= this.varName;
} else {
trace("did notload any");
}
}
}
loadExtText(fileNameVar,varName);

Can anyone Help me with this , anyone done this before and can shead a bit of light on it?

Line Break
How can send a line break to textbox *without* using <br>

For example,

_root.myTextbox = "Line1<br>Line2"


The reason why I can't use <br> is because I'm using XML...

Does GetURL Break?
Ok..this is going to seem incredibly idiotic...but, I am using the getURL function from a .swf which is in the same directory as the .html files it is trying to get. When I click the flash buttons it just sends me back to the index.html page. it never loads the correct page. I have tried with absolute and relative linking with trying to use a target window and not...I feel like I'm grasping at straws...my code looks like this.

on (rollOver) {gotoAndStop(5);

}
on (release) {getURL("http://www.sketchesbypaul.com/Gallery-Churches.html");
}

or like this

on (rollOver) {gotoAndStop(5);

}
on (release) {getURL("Gallery-Churches.html");
}

or like this

on (rollOver) {gotoAndStop(5);

}
on (release) {getURL("Gallery-Churches.html", "_self");
}

I can't for the love of pete figure out what the deal is. And here is the kicker. I've been able to accomplish this task successfully before...

Somebody?? Anybody??? Can you hear me??? Please???

XML Break Tags
hey guys,
how do you add a break tag to the xml so that when it is loaded into flash it will display it properly?
i used [br] tags, and it worked fine, but then when i made a new entry into the XML the entry after, would not display. Because the XML is thinking that the [br] tags are XML tags.
is there any other way to have a line break in XML?
bLIndchILd

Break Apart, FPS, Resources
Hiya,

im using the pageFlip script to create and online menu.

the more I add to these pages the ruffer the page flip animation becomes.

im using alot of text. its has been cut and pasted out of word which has made it all broken up but still editable. not my problem.

but

is it best to select all the text and break it apart then reform it as a graphic symbol to make things run smoother or lower file size?


or will this have little effect?

thankyou.

quick responses will be grand!

cheers

Line Break Help Please
hello,

I have a problem. Its probably really really simple.

I have a dynamic, multi-line text box, that keeps adding text to it. How can i create a line break after every bit of text added. I tell it what to write so its probably as simple as i dont know the code for a line break.

help???

is there a way for it to understand <br>?

Why Does Text On Top Of A Png Cause The Png To Break Up?
I am using png's that I created in PhotoShop as the background for buttons...but I am adding the text on the buttons in Flash 5.0. But...the text on top of the png is causing it to break apart...which I don't understand. I could add the text in PhotoShop...but don't want to because I am using 3 different colored buttons for the background and would have to add text to every single one...instead of adding it once in Flash. What am I doing wrong?

Break The Code
Hey was wondering if someone could help me figure out how this site made its image gallery navbar, the elements and such...

http://www.studiocportrait.com
click gallery on left, then one of the galleries

Basically wanna know how they got each image button to be a preloader, how to preload each image seperately, and how to change the image button appearance once the image is loaded.

Thx

Break Apart Via Actionscript?
Hi,

A quick question: is it possible to 'simulate'/'execute' the Break Apart functionality via Actionscript?

So, suppose I load an external image into a movie, is it possible to break that image apart via AS?

Thx in advance!

Regards,

RF

How To Break A Loop
I am having a major brain roadblock. I haven't scripted in a couple of months, and I guess I'm rusty again, but I can't remember how to do this.

How can I run an onEnterFrame function, then when the "if" statement inside finally says "finished" - have it break without deleting the code?

In PHP, there is a simple "case... break". I can't think of what the equivalent is in actionscript.

Basically, I just want to have a button, which has both a color image and the same image greyscale on it. Greyscale shows up on load, but when you rollover it, I want the color to fade in, by raising the alpha like +10 onEnterFrame. However, I have alot other stuff going on in the stage, and I don't want it to check onEnterFrame constantly when I don't need it to, saving processor memory, so that the rest of the movie doesn't lag.

So far I have
code:
on(rollOver, dragOver){
this.imageColor.onEnterFrame = function(){
if (this._alpha < 100){
this._alpha += 10;
}else{
STOP ONENTERFRAME!!!!!
}
}
}

on (rollOut, dragOut, releaseOutside){
this.imageColor.onEnterFrame = function(){
if (this._alpha > 0){
this._alpha -= 10;
}else{
STOP ONENTERFRAME!!!!!!
}
}
}


Am I going about this all wrong, or have I just forgotten the correct keyword to use to break an onEnterFrame loop without deleting it?

Thanks in advance.

How To Break Up A 4mb File
Hi,

I am trying to get my portfolio online. Ive uploaded the .fla .swf and .html files but when I view it online it takes a very long time to load, it seems like it gets so far then ceases any further action.

Im using broadband (512k) and Im not doing anything else online. The flash file itself (.fla) is 4mb. I have made a movie with a preloader and the preloader works great, but then it doesnt stop as the movie is still trying to load.

I have two scenes (one is the preloader), Im not using loadMovie, I simply link to other frames that contain animations/jpgs.

I've read about breaking up flash files and that this helps to reduce the file size but I have no idea how to do this - does anyone know of any tutorials that could help me make my file smaller?

Any other tips on making the load time quicker?

Any help will be greatly appreciated.

You can view the movie WITH the preloader here:-
http://carly.users.digital-crocus.co...portfolio.html

Or you can view the movie WITHOUT the preloader here:-
http://carly.users.digital-crocus.co...ortfolio2.html

Array Break ?
Is it possible to add a break in the middle of an array that the lineTo method would recognize as a "not draw" symbol?......

myArrayX=[1,2,3,break,4,5,6];
myArrayY=[7,8,9,break,10,11,12];

for(i=0;i<myArray.length;i++){
lineTo(myArrayX[i],myArrayY[i])
}

Break Aprt Pic
does anyone know how to break apart a 100x100 movie clip to 10 10*10 squares. It doesnt even have to be in flash, just any bmp,jpeg,gif....

there has to be some program outthere that does this...

[F8] Can Flash Break?
This is just a general question. Why is it that everything will be working fine in your flash but when you come back to it the next day, script that was working, isn't working properly anymore? Does Flash have problems with script breaking?? I've noticed this in my projects, I'm pretty sure I'll have my coding right and everything will work fine, but if I come back to it say the next day it won't be working properly. Anything maybe i'm missing?? Or is it maybe something with the way I script? Any help would be appreciated. Just trying to solve my mystery.

Cheers!!

I Want To Break My Movie Apart
I created & uploaded my Movie which has a total of 13 Scenes. Everything works just fine but now I have a very different kind of problem that only
being able to modify in HTML can solve. There are things I'd like to do with each page so I'm thinking, I'd like to Break the Movie into sections whereas each Scene would then become a single Movie w/1 Scene connected by links to the next.

Is there an easy way to accomplish this? It doesn't appear that you can Save individual Scenes in Max or prior versions. All that i can think of is creating another Movie and basically Copy & Paste the content onto the Stage for each one.

Break Up Video
Ok, is there a way (in Flash 8) to put a video in, but break up the actual frames in the video into Flash frames, so that in each frame there is an image that corresponds to the video segment?

Is there any other program that might be able to do this? I want to be able to manipulate individual frames in a movie.

Break From A Loop...
Hey guys, developing a car-wash (top down view) game. Wrote this function to move the vehicles onEnterFrame.

PHP Code:



function moveVehicles() {
    for (i=0; i<=vehicleNum; i++) {
        var vehicle = this["vehicle"+i];
        switch (vehiclesInPlay) {
        case 0 :
            vehicle.targetX = washpos._x;
            vehicle.setAction = "wash";
            break;
        case 1 :
            vehicle.targetX = waitpos._x;
            vehicle.setAction = "wait";
            break;
        case 2 :
            vehicle.targetX = queuepos._x;
            vehicle.setAction = "queue";
            break;
        }
        if (washFinished && vehicle.action == "wash"){
            vehicle.targetX = finpos._x;
            vehicle.setAction = "leave";
        }
        if (vehicle._x<vehicle.targetX && vehicle._x !== undefined) {
            vehicle._x += vehicleSpeed;
        } else {
            vehicle.action = vehicle.setAction;
        }
        if (vehicle._x>=finpos._x && vehicle._x !== undefined) {
            vehiclesInPlay--;
            removeMovieClip(vehicle);
            washFinished = false;
        }
    }
}




Seems to be a problem in that when a "wash" is finished the vehicle in the wash position (defined by the objects "action" variable) should drive away.

The first vehicle will, but none thereafter. I think it's because when the vehicles _x target is defined at the beginning of the function, it sets it to the first vehicle in the loop, but then continues to do it to the rest of the vehicles which it shouldn't do. Instead it should start over and set this to each individual vehicle accordingly.

I think I may need to break out of the loop in order to do this. Tried using the break and/or continue statements but when I do, vehicles just don't move at all.

If anyone spots that this may not be the problem please do tell! Thanks for your help chaps - Chris.

[F8] Break Out Tutorial -_-
Well I guess I actually needed a break out tutorial not a pong >.> If anyone knows any breakout tutorials post them please ^^ Thanks a lot ^^

How To Break SetInterval ?
Hi,
For an example i've got such action under my button


Code:
on (press) {
setInterval(goup, 30);
}
how can i break the setInterval after releasing the button?


Code:
on (release) {
????
}
Thanks

Line Break In XML?
Hi
I have some thumbnails that are loaded into a movieclip from an XML.
They load in fine but they all load in a horizontal line.
I want to have 4 thumbnails then a line break.

Heres my xml:


Code:
<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<image title="Title 1" main="images/age.jpg" thmb="thumbnails/age.jpg"/>
<image title="Title 2" main="images/bars.jpg" thmb="thumbnails/bars.jpg"/>
<image title="Title 3" main="images/beams.jpg" thmb="thumbnails/beams.jpg"/>
<image title="Title 4" main="images/begin.jpg" thmb="thumbnails/begin.jpg"/>
<image title="Title 5" main="images/found.jpg" thmb="thumbnails/found.jpg"/>
<image title="Title 6" main="images/helm.jpg" thmb="thumbnails/helm.jpg"/>
<image title="Title 7" main="images/knight.jpg" thmb="thumbnails/knight.jpg"/>
<image title="Title 8" main="images/lost.jpg" thmb="thumbnails/lost.jpg"/>
<image title="Title 9" main="images/newwings.jpg" thmb="thumbnails/newwings.jpg"/>
<image title="Title 10" main="images/primate.jpg" thmb="thumbnails/primate.jpg"/>
<image title="Title 11" main="images/quartz.jpg" thmb="thumbnails/quartz.jpg"/>
<image title="Title 12" main="images/sanc.jpg" thmb="thumbnails/sanc.jpg"/>
</gallery>


I tried putting in <BR> every 4 but it just doesn't show any of the images after the <BR>

Any ideas?

How To Not Break Your Preloader?
I remember i had this problem before.

i was breaking my preloaders when using attachMovie().

the solution some one gave me was something like, when you go to the linkage window... do NOT select "Export in first frame". and something weird like actually having one instance on the stage someone. Which seems silly.

so would be best practice be, to never check "export in first frame" and have a container Movie Clip on the main timeline that I throw instances of all my linked symbols into. and then use _visible = false inside that container to make sure none of that stuff shows up?

is there a better way? what do you guys do?

thanks!

How To Break Out From OnEnterFrame
Hey all,

I have a bit of a problem, what I want to do is to use onEnterFrame to call a function that will scan for key presses. This works fine, but I want to use a key that will be pressed once to pick up something and again to drop it. However if
I use onEnterFrame it will detect it for every single frame, which will make the person pick up and drop the object a load of times and become uncontrollable.

Is there any way to set it so that it stops polling a certain key after the first press for a second or two? Ive tried using setInterval but it didnt work. Any ideas on how to fix this?
Cheers!

Anyone Know How To Break Down This Idea?
Hey all,

I'm just starting out with flash (i've done some stuff, i have a feel for timeline, etc, and can pick stuff up pretty quickly), and i was just looking for input from some professionals about an idea i'm having (it's probably been done before, but i want to make one just as a sort of mental exercise):

a digital, flash based sampler. you record a whole bunch of .wav files that are played at the same tempo, and can be mixed with one another, change them to mp3's, then assign them to buttons via actionscript. the sounds would all start together once the sampler was fully loaded, so that syncing wouldn't be a problem. they would all be looped, and continuously playing as soon as they get to that fully loaded point; all the buttons would do would be to effectively unmute them until the user clicks the button again, which just mutes the sound, but lets the sound keep playing. i guess there are a few controls i would need; anyone else know what else i would need in addition to:

learning how to make a loading screen
learning how to sync and loop all sounds to work together
learning how to make the buttons unmute the sounds at a click
learning how to make a volume knob


and is there an easier way to do this? does anyone know of any examples of this type of thing? any input would be greatly, greatly appreciated.

thanks much.

BREAK An IF Loop?
hey guys,

I am running the following function and it checks what gallery you are on, then goes to the next or previous one..however, I want to use BREAK to finish the loops after I change so they dont change again when it checks the variable below...

Is it possible to break an if loop? if not, how would u suggest not changing the gallery u are on, then re-changing it later down the loops when it was meant to change NEXT time around?


ActionScript Code:
public function changeGallery(varz:String):void {
            if(varz=="last"){
                if(galleryOn==1){
                    var loadImage1:Loader = new Loader();
                    var loadImage2:Loader = new Loader();
                    var loadImage3:Loader = new Loader();
                    var loadImag4e:Loader = new Loader();
                    loadImage1.load(new URLRequest("photos/gallery4_1th.jpg"));
                    loadImage2.load(new URLRequest("photos/gallery4_2th.jpg"));
                    loadImage3.load(new URLRequest("photos/gallery4_3th.jpg"));
                    loadImage4.load(new URLRequest("photos/gallery4_4th.jpg"));
                    container_mc.media_mc.thumb1_mc.holder_mc.addChild(loadImage1);
                    container_mc.media_mc.thumb2_mc.holder_mc.addChild(loadImage2);
                    container_mc.media_mc.thumb3_mc.holder_mc.addChild(loadImage3);
                    container_mc.media_mc.thumb4_mc.holder_mc.addChild(loadImage4);
                    galleryOn = 4;
                    break;
                }
                if(galleryOn==2){
                    var loadImage1:Loader = new Loader();
                    var loadImage2:Loader = new Loader();
                    var loadImage3:Loader = new Loader();
                    var loadImag4e:Loader = new Loader();
                    loadImage1.load(new URLRequest("photos/gallery1_1th.jpg"));
                    loadImage2.load(new URLRequest("photos/gallery1_2th.jpg"));
                    loadImage3.load(new URLRequest("photos/gallery1_3th.jpg"));
                    loadImage4.load(new URLRequest("photos/gallery1_4th.jpg"));
                    container_mc.media_mc.thumb1_mc.holder_mc.addChild(loadImage1);
                    container_mc.media_mc.thumb2_mc.holder_mc.addChild(loadImage2);
                    container_mc.media_mc.thumb3_mc.holder_mc.addChild(loadImage3);
                    container_mc.media_mc.thumb4_mc.holder_mc.addChild(loadImage4);
                    galleryOn = 1;
                    break;
                }
                if(galleryOn==3){
                    var loadImage1:Loader = new Loader();
                    var loadImage2:Loader = new Loader();
                    var loadImage3:Loader = new Loader();
                    var loadImag4e:Loader = new Loader();
                    loadImage1.load(new URLRequest("photos/gallery2_1th.jpg"));
                    loadImage2.load(new URLRequest("photos/gallery2_2th.jpg"));
                    loadImage3.load(new URLRequest("photos/gallery2_3th.jpg"));
                    loadImage4.load(new URLRequest("photos/gallery2_4th.jpg"));
                    container_mc.media_mc.thumb1_mc.holder_mc.addChild(loadImage1);
                    container_mc.media_mc.thumb2_mc.holder_mc.addChild(loadImage2);
                    container_mc.media_mc.thumb3_mc.holder_mc.addChild(loadImage3);
                    container_mc.media_mc.thumb4_mc.holder_mc.addChild(loadImage4);
                    galleryOn = 2;
                    break;
                }
                if(galleryOn==4){
                    var loadImage1:Loader = new Loader();
                    var loadImage2:Loader = new Loader();
                    var loadImage3:Loader = new Loader();
                    var loadImag4e:Loader = new Loader();
                    loadImage1.load(new URLRequest("photos/gallery3_1th.jpg"));
                    loadImage2.load(new URLRequest("photos/gallery3_2th.jpg"));
                    loadImage3.load(new URLRequest("photos/gallery3_3th.jpg"));
                    loadImage4.load(new URLRequest("photos/gallery3_4th.jpg"));
                    container_mc.media_mc.thumb1_mc.holder_mc.addChild(loadImage1);
                    container_mc.media_mc.thumb2_mc.holder_mc.addChild(loadImage2);
                    container_mc.media_mc.thumb3_mc.holder_mc.addChild(loadImage3);
                    container_mc.media_mc.thumb4_mc.holder_mc.addChild(loadImage4);
                    galleryOn = 3;
                    break;
                }
            } else {
                if(galleryOn==4){
                    var loadImage1:Loader = new Loader();
                    var loadImage2:Loader = new Loader();
                    var loadImage3:Loader = new Loader();
                    var loadImag4e:Loader = new Loader();
                    loadImage1.load(new URLRequest("photos/gallery3_1th.jpg"));
                    loadImage2.load(new URLRequest("photos/gallery3_2th.jpg"));
                    loadImage3.load(new URLRequest("photos/gallery3_3th.jpg"));
                    loadImage4.load(new URLRequest("photos/gallery3_4th.jpg"));
                    container_mc.media_mc.thumb1_mc.holder_mc.addChild(loadImage1);
                    container_mc.media_mc.thumb2_mc.holder_mc.addChild(loadImage2);
                    container_mc.media_mc.thumb3_mc.holder_mc.addChild(loadImage3);
                    container_mc.media_mc.thumb4_mc.holder_mc.addChild(loadImage4);
                    galleryOn = 1;
                    break;
                }
                if(galleryOn==3){
                    var loadImage1:Loader = new Loader();
                    var loadImage2:Loader = new Loader();
                    var loadImage3:Loader = new Loader();
                    var loadImag4e:Loader = new Loader();
                    loadImage1.load(new URLRequest("photos/gallery4_1th.jpg"));
                    loadImage2.load(new URLRequest("photos/gallery4_2th.jpg"));
                    loadImage3.load(new URLRequest("photos/gallery4_3th.jpg"));
                    loadImage4.load(new URLRequest("photos/gallery4_4th.jpg"));
                    container_mc.media_mc.thumb1_mc.holder_mc.addChild(loadImage1);
                    container_mc.media_mc.thumb2_mc.holder_mc.addChild(loadImage2);
                    container_mc.media_mc.thumb3_mc.holder_mc.addChild(loadImage3);
                    container_mc.media_mc.thumb4_mc.holder_mc.addChild(loadImage4);
                    galleryOn = 4;
                    break;
                }
                if(galleryOn==2){
                    var loadImage1:Loader = new Loader();
                    var loadImage2:Loader = new Loader();
                    var loadImage3:Loader = new Loader();
                    var loadImag4e:Loader = new Loader();
                    loadImage1.load(new URLRequest("photos/gallery3_1th.jpg"));
                    loadImage2.load(new URLRequest("photos/gallery3_2th.jpg"));
                    loadImage3.load(new URLRequest("photos/gallery3_3th.jpg"));
                    loadImage4.load(new URLRequest("photos/gallery3_4th.jpg"));
                    container_mc.media_mc.thumb1_mc.holder_mc.addChild(loadImage1);
                    container_mc.media_mc.thumb2_mc.holder_mc.addChild(loadImage2);
                    container_mc.media_mc.thumb3_mc.holder_mc.addChild(loadImage3);
                    container_mc.media_mc.thumb4_mc.holder_mc.addChild(loadImage4);
                    galleryOn = 3;
                    break;
                }
                if(galleryOn==1){
                    var loadImage1:Loader = new Loader();
                    var loadImage2:Loader = new Loader();
                    var loadImage3:Loader = new Loader();
                    var loadImag4e:Loader = new Loader();
                    loadImage1.load(new URLRequest("photos/gallery2_1th.jpg"));
                    loadImage2.load(new URLRequest("photos/gallery2_2th.jpg"));
                    loadImage3.load(new URLRequest("photos/gallery2_3th.jpg"));
                    loadImage4.load(new URLRequest("photos/gallery2_4th.jpg"));
                    container_mc.media_mc.thumb1_mc.holder_mc.addChild(loadImage1);
                    container_mc.media_mc.thumb2_mc.holder_mc.addChild(loadImage2);
                    container_mc.media_mc.thumb3_mc.holder_mc.addChild(loadImage3);
                    container_mc.media_mc.thumb4_mc.holder_mc.addChild(loadImage4);
                    galleryOn = 2;
                    break;
                }
               
            }
        }

How Do I Break Up This String?
I am creating an application using SCORM(unfortunately) and I am using scorm's suspend_data to store two things. I want to store questions the user has already answered as well as videos they have already watched.

When I make the call:
scorm.get("cmi.suspend_data");
It returns a string.

I am formatting it like this:

Code:
answered=1,2,3,4&watched=1,3,4,6
How can I break that kind of string up into two separate arrays?

Break Function
the function doesnt stop on rollOut

ActionScript Code:
on (rollOver) {
    //when mouse is on the button: k, which is in this case a circle object
    //is constantly incrising its width and height
    k._visible = true;
    k._x = gumb._x;
    k._y = gumb._y;
    function krug() {
        k._height += x;
        k._width += x;
        k._alpha -= 2.5;
    //until it gets here
        if (k._width>=(x*10)+4*(x*10)) {
            k._alpha = 100;
            k._width = k._height=x*10;
    //and then because i dont have clearInterval() here
    //the whole thing starts over
        }
    }
    a = setInterval(krug, 20);
}
on (rollOut) {
    //until i rollOut
    //but when i rolOut function doesnt breaks immediately
    //what i want to do is:when i rollOut, i want the function to break    //immediately
    //i tryed hitTest, but it didnt worked
    k._visible = false;
    clearInterval(a);
}

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