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




Resetting Dynamic Interface



I am working on an all Flash site. I have it set up With main sections (about, media, forum, etc.). Then each (most) main section has some subsections. For instance, I see on my screen the interface for the about section, then at the bottom left I see my button for the subsections (history, bios, & equipment). I have each subsection button redirect the movie to a certain frame where my standard window comes up & then it loads an external movie (to display within the window). On the window itself i have a button that closes the window. I put actionscript with the close button to goto the first frame in that main section. (the window is inside a movie with the button inside the window so I used frame labels.) Also when the window is open, the associated sub-section button dissapears. (Which is how I want it). When I click the close button the window dissapears, but the associated button does not return. I am confused. I would appreciae any help.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 07-03-2004, 07:46 PM


View Complete Forum Thread with Replies

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

Resetting Dynamic Text Fields?
My apologies for asking this, as I am sure it has been asked before, yet the Flash Kit search function appears to be acting up, so I was not able to search on the topic.

I have this Flash Movie that, combined with 2 php scripts, allows you to send ecards from my website. This movie is based on the one available on www.flash-db.com. Anyway, to get to my question: the part of the movie where you get to choose a card and fill in the required text fields (name, email addy, message, etc), consists of 3 frames: the first one lets you pick a card, the second one is for filling in the information mentioned above, and the third one confirms that the card has been sent. In that second and third frame, I put a button that takes you back to the first frame (just in case you regret your choice of card suddenly, you know, or simply want to send another card). However, when you have sent a card, and go back to the card selection screen and pick another one, the text fields that were filled in when you sent that first card, will in any other card that you pick, still contain the text that you filled in for the first card. So, to put it really simple: (how come I always need so much text when asking a basically simple question) how do I refresh the content (ie reset it) of those dynamic text boxes? Thanks for reading, you have my full admiration if you made it all the way to here. If you want to see the card movie in action, go here: www.elinew.com/flashcards.html .

Thanks in advance!

oh by the way: I am using Flash 5.

Resetting A Dynamic Textbox And UI ScrollBar
using this code:
function ParseBooks(gettingStarted:XML):void
{
var Student:XMLList = gettingStarted.info.(@page == p);
var myStyle:StyleSheet = new StyleSheet();
myStyle.parseCSS(CSSLoader.data);
howPage.textContainer.myTextArea.styleSheet = myStyle;
howPage.textContainer.myTextArea.htmlText = Student;
howPage.textContainer.mySb.update();
}

i am accessing some xml data based on what the string p has been assigned.
however when i scroll down or highlight some text, when i load a different part of the xml in the scrollbar doesnt go back to the top and the text is still highlighted(the text that is in the same place as the previous highlighted text)

is it possible to reset everything when i load this piece of code?
thanks
dan

Resetting Dynamic Text Field
I have created a form that loads data to certain dynamic text fields. This form contains a "next" button that allows the person filling out the form to submitt the current data and then load more data into the dynamic text field. How do I make it to where when the person clicks "next" the dynamic text fields will reset so to reupload the correct data?


For example: A person is filling out form# 55 when they click submit the number 55 is written to a text file on a server. When the person clicks next that number is retrieved from the text file (1 is added in php script) and the number 56 is then loaded back into the same dynamic text field.

Thanks for any help.

Resetting Variables In Dynamic Boxes?
Is there a quick way of resetting all variable fields in a movie?

Ive got a wizard step form thing that when buttons are clicked the value of that button is entered into a dynamic text box, and the movie then goes onto the next wizard step. When it comes to the end of the steps, the user has the opportiunity to go through it all again if they want different results....so I need all previous dynamic text boxes that had values in them from the first go, to be reverted back to blank.

I say quick way rather than me having to put down all the dynamic txt box absolute paths like:

_root.thisMc.txtboxA = "";
_root.thatMc.txtboxB= "";

Hope that makes sense!

cheers

Dynamic Movement Interface
I would like to create a display that scrolls a movieclip (programmatic movement), but have the scrolled movieclip made up of duplicated movieclips.

For instance, if there were 3 elements in an array, duplicate a movieclip three times inside the "master" clip and scroll the whole thing incrementally (a fixed value) based on the number (in this case three). The buttons would be placed and assigned functions based on the number returned as well.

On paper it looks good and I'm ready to begin, but I wanted to find out if anyone has done this before I reinvent the wheel. If you've done this, what were your pitfalls? What approach(es) do you recommend?

Dynamic Interface To 1000 Different Files
pdf brochures available as a whole or as separate pages for different regions of the world.

i want to set variables in flash.

set region (country)
set language (few available per country)
set brochure name
set page

=name of pdf file for download

END RESULT: one dynamic interface rather than pages of links (which won't update easily).

Flash Interface For Dynamic Asp/.net/php Website
Hi,
I came accross one Flash/php solution where an author crated a very nice Flash interface for designing cards and fliers.
It looks almost like MS Publisher. After you add & format all text, pictures and background you can send your card directly from this solution via email as jpg.

I asked the author if he will be able to add more features like generating high quality multi-page PDF newsletter but he told that he is too busy with other projects.

I'd like to know how hard it would be for me starting this project by myself?
I know VB, ASP, PHP & some .NET & JavaScript.
What would be the best place for the appropriate action script tutorials and the best book on this subject?

I already have some action script books but maybe someone has something that is very close to what I'm trying to accomplish?

Thanks

Admin Interface For Dynamic Content Loading
I'm trying to create an easy to use admin interface with the ability for the client to log in and update text and pictures. I've seen how text files can be read in. What needs to be done for this type of interface to be created?

Problem With External Interface And Dynamic Image Loading In Firefox
Hi Guys,

Was just wondering if any of you have ever come across this before, I'm trying to build a flash interface that would read data from the Javascript/XML off the page it's embedded in, and while it works in Safari and Internet Explorer, it won't pass the url in Firefox.

It's pretty straight forward, I have this on the HTML page:


Code:
<script>
function thePageData() {
var xmlData = "<pagedata><title>Apple</title><image>apple.jpg</image><cost>2</cost></pagedata>";
document.getElementById("banner").loadThisData(xmlData);
}
</script>
and the code that's supposed to read it in Flash is:


Code:
import flash.external.ExternalInterface;
ExternalInterface.addCallback("loadThisData", this, loadThisData);

var appleImage:String;

function loadThisData() {
xmlDataStr = arguments[0];
xmlData = new XML(xmlDataStr);
xmlData.ignoreWhite = true;
xmlData = xmlData.firstChild;
appleTitle = xmlData.childNodes[0].firstChild.nodeValue;
appleImage = xmlData.childNodes[1].firstChild.nodeValue;
appleCost = xmlData.childNodes[2].firstChild.nodeValue;
if (!mc_image.imageHolder) {
mc_image.createEmptyMovieClip("imageHolder", 1);
var imageLoader:MovieClipLoader = new MovieClipLoader();
imageLoader.loadClip(appleImage, mc_image.imageHolder);
}
}
ExternalInterface.call("thePageData");
I've basically no clue why it isn't working in Firefox. I see no reason for it not to. I've even set the <param name="allowScriptAccess" value="always" /> in the object parameters.

Any help would be appreciated.

Thanks!

Generating Buttons, And Other Interface Piecies Dynamic Based On User Input?
What I am looking to do is create a flash interface generator much like www.flashbuttons.com sort of....


my ultimate goal is to send out flash emails where the content is input dynamicaly

one other question.. is it possible to populate flash through the html of the page its on through embed or param tags?

is this where Generator comes in or can MX do this?

Closing Tabs And Moving Interface Interface
before i start HERE is the design i am working with,

What i want to do is when you click on a menu item i want to close the tabs that are allready open and move the interface across the screen to a different position and than open certain tabs (sections) at the new position.

What i want to know is is there a way of finding out which tabs are open and need to be closed and closing them and which are allready closed and bypassing them and than moving the interface to a different position.

If there is a way of doing this could anyone point me in the right direction of where to go to learn how?

I hope i am making some sense i am prettty new to flash and this is one of my first big adventures with flash.

any help would be greatly appreciated.

ancora

Resetting
How do I reset a movieclip after it passes a certain Y axis position back to its original position before it moved?
Thanks

Resetting A Var
Frame one contains this:


Code:

XML.prototype.ignoreWhite=true;

oXML = new XML();
oXML.onLoad=function(){
buildVariables(this);
}

buildVariables=function(oXML){
for (var oNode in oXML.childNodes){
if (oXML.childNodes[oNode].nodeType==1)
buildVariables(oXML.childNodes[oNode]);
else
_root[oXML.nodeName]=oXML.childNodes[oNode].nodeValue;
}
}
oXML.load("http://stats.planetsidegaming.com/15/273380/stats2.xml");



Frame 2 contains this but it does not work.


Code:

//To filter ANT
if (certification8 == "Advanced Nanite Transporter"){
certification8 = "ANT";
}



Later in the .fla I have to use _root.certification8 but I've tried that here and it does not work either. How do I reset the var to return "ANT" later as opposed to "Advanced Nanite Transporter"?

Thank you kindly,
Herk

Resetting MC's
I have a movie clip called "enemies" and with in it are several other movie clips of the enemies in my level that I have drug onto the stage. Each enemy has a script that tells it to move (ie. _x = _x + 8). Well, when the player dies, I want the enemies to reset back to their original positions (without restarting the whole scene). Is there a simple way to do this, or do I have to keep a list of all their original positions?

Resetting A MC
I basically have 3 MC's submarine, cursor, and ocean clip.

Basically the problem I'm having is that after you destroy the sub it sinks to the bottom and doesn't reset. And when I alter the code a bit to do a "_root.submarine.gotoAndPlay(1);" the sub plays again but stays at the bottom instead of being set to the middle of the stage again.

Can anyone help me with this please?

Thank you.

1.) Submarine


ActionScript Code:
onClipEvent (enterFrame) {
    if (_x<345 and !_root.attached) {
        _root.attached = true;
        _root.sonarSound();
    }
    if (!_root.sunk) {
        _x -= 8;
        _y += vd;
        if (_x<-100) {
            _x = 400;
            vd *= -1;
            gotoAndStop(1);
        }
    } else if (!_root.sink) {
        if (random(2)) {
            rot = 1;
        } else {
            rot = -1;
        }
        _root.sink = true;
        _root.stopSonarSound();
    }
    if (_root.sink and !_root.shook) {
        _x -= 3;
        _y += 4;
        _rotation += rot;
        if (_y>240) {
            _root.ocean.play();
            _root.shook = true;
        }
    }
}
onClipEvent (load) {
    x = _x;
    y = _y;
    r = _rotation;
    vd = 1;
}

2.) The Mouse Cursor


ActionScript Code:
onClipEvent (mouseMove) {
    _x = _root._xmouse;
    _y = _root._ymouse;
    updateAfterEvent();
}
onClipEvent (load) {
    Mouse.hide();
}
onClipEvent (mouseDown) {
    if (!_root.shooting) {
        _root.shooting = true;
        _root.explosion._x = _root._xmouse;
        _root.explosion._y = _root._ymouse;
        _root.explosion.gotoAndPlay(1);
        _root.blastSound();
        if (_root.submarine.hitTest(_root._xmouse, _root._ymouse, true) and !_root.sunk and _root.submarine._x>0 and _root.submarine._x<300) {
            if (_root.submarine._currentframe == (_root.submarine._totalframes-1)) {
                _root.sunk = true;
                _root.submarine.nextFrame();
            } else {
                _root.submarine.nextFrame();
            }
        }
    }
}

3.) The Ocean


ActionScript Code:
_root.sunk = false;
_root.shook = false;
_root.congrats.gotoAndStop(1);
_root.submarine.play(1);

Help With Resetting
To help me with learning to program AS3 (I'm a complete newb), I am making a photo album with a button that rotates the images. The problem I'm having is, the button's numbered click event is repeated so it I get a warning about a duplicate:

stop();

hb_btn.addEventListener(MouseEvent.CLICK, click1)
hb2_btn.addEventListener(MouseEvent.CLICK, click2)
hb3_btn.addEventListener(MouseEvent.CLICK, click3)
hb4_btn.addEventListener(MouseEvent.CLICK, click4)

function click1 (evt) {
var url = "http://www.URL1.com"
navigateToURL(new URLRequest(url))
}

function click2 (evt) {
var url = "http://www.URL2.com"
navigateToURL(new URLRequest(url))
}

function click3 (evt) {
var url = "http://www.URL3.com"
navigateToURL(new URLRequest(url))
}

function click4 (evt) {
gotoAndPlay (47)
}

Frame 47 rotates the images and stops with this code:

stop();


hb_btn.addEventListener(MouseEvent.CLICK, click1)
hb2_btn.addEventListener(MouseEvent.CLICK, click2)
hb3_btn.addEventListener(MouseEvent.CLICK, click3)
hb4_btn.addEventListener(MouseEvent.CLICK, click4)

function click1 (evt) {
var url = "http://www.URL4.com/"
navigateToURL(new URLRequest(url))
}

function click2 (evt) {
var url = "http://www.URL5.com"
navigateToURL(new URLRequest(url))
}

function click3 (evt) {
var url = "http://www.URL6.com/"
navigateToURL(new URLRequest(url))
}

function click4 (evt) {
gotoAndPlay (54)
}

So, because of the duplicate error, I gave each new set a new set of click event numbers. That fixed the error. Problem was, when I loop back to the beginning from the end frame, it won't play and just loops the last frame.

What I need to do is find a way to reset the numbered click event so I can reuse the click1, click2, click3 and click4. Is there a way to reset the value so I can reuse it?

Resetting A .swf
I have a large .swf that dynamically loads other .swf onto the stage. Once these smaller clips are finished, I'd like to "replay" them. Here's the problems though: Cannot just _root.gotoAndPlay(1) because I have actionscript tweens that aren't reset by setting the timeline. Also, I have locked the root down, so I don't know if I can simply tell the larger .swf to just re-load the smaller ones.

Resetting Variables
Okay to anyone who can help, here is the deal. I have a main swf file that i use as a template for a flash course. Now this template has a series of buttons that control the course, like play pause and all that. It also has a replay button. Here is the tricky part though, the actual course files are other swfs that load underneath the main swf with the buttons. These files contain text box question and answer problems, but i since there is a replay button on the main swf, this causes a problem cause now if i type in an answer and hit replay the text box answer remains. How can i make it so that i can set the variables to reset when i hit the replay button. Note once again that the replay button is in another swf in another level.
This sounds more complicated than it really is, i know.
Thanks

Resetting Variables
Hi guys,

Quick question ...

If on drag and drop detection, I am setting the variables of various MC's , how ... when I replay the animation (via a button saying replay - not manually), do I reset the mc's variables back to the original state?

Thanks.
Adele

Resetting Variables
Is there any simple little command in flash that will reset all variables in the movie?
If so, what is it?

Variable Resetting
Is there a way to reset the values of all the variables in a movie at once? In the movie I'm working with everything starts out blank, so it wouldn't seem too difficult assuming I can access all the variables with one statement.

Resetting GetTimer ?
I'm using getTimer(); in a countdown. When it reaches 0, it goes to a 'end game' scene. In this scene there is a button to play again, which uses gotoAndPlay (Scene 1,1) to start again.. but the countdown now starts from 0, going to -1, -2 etc.

Does getTimer() find the elapsed time of a MOVIE ? I thought so, so replaced "gotoAndPlay (Scene 1,1)" with:

unloadMovieNum (0);
loadMovieNum ("04cardriver6.swf", 0);

which I thought would work, but doesn't...
Does this mean getTimer() uses the elapsed timne of the opening of the FLASH PLAYER?

Resetting A Scrollbar
Hey all

I have a guestbook with a dynamic text box with a scrollbar and scroll up/down buttons in an MC. The guestbook is set to display 5 entries at a time, there are buttons for next/previous 5 entries also. A user can scroll up/down thru the current 5 entries using the scroll up/down btns or the scrollbar. The problem is when the user clicks for the next 5 entries and they are displayed in the text box, the scrollbar does NOT jump back to the top. But if you click the down btn it jumps to the top before starting to scroll down. I would like the scrollbar to reset to the top when the user first clicks for the next/previous 5 entries. This is the script attached to the MC:
onClipEvent (load){

scrolling = 0;
frameCounter = 1;
speedFactor = 3;
numLines = 7;

origHeight = scrollbar._height;
origX = scrollbar._x;
needInit = false;

function initScrollbar(){

var totalLines = numLines + GuestBook.maxscroll - 1;
scrollbar._yscale = 100*(numLines)/totalLines;
deltaHeight = origHeight - scrollbar._height;
lineHeight = deltaHeight/(GuestBook.maxScroll - 1);
}
function updateScrollBarPos(){

scrollbar._y = lineHeight*(GuestBook.scroll - 1);
}
}

onClipEvent (enterFrame){

if( needInit ){
if(GuestBook.maxscroll > 1){
initScrollbar();
needInit = false;
}
}
if( frameCounter % speedFactor == 0){

if( scrolling == "up" && GuestBook.scroll > 1){
GuestBook.scroll--;
updateScrollBarPos();
}
else if( scrolling == "down" && GuestBook.scroll < GuestBook.maxscroll){
GuestBook.scroll++;
updateScrollBarPos();
}
frameCounter = 0;
}
frameCounter++;
}

onClipEvent (mouseDown){

if(up.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if(down.hitTest(_root._xmouse,_root._ymouse)){
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
if(scrollbar.hitTest(_root._xmouse,_root._ymouse)) {
scrollbar.startDrag(0,origX,deltaHeight,origX);
scrolling = "scrollbar";
}
updateAfterEvent();
}

onClipEvent (mouseUp){

scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
stopDrag();

updateAfterEvent();
}

onClipEvent (mouseMove){
if(scrolling == "scrollbar"){
GuestBook.scroll = Math.round((scrollbar._y)/lineHeight + 1);
}
updateAfterEvent();
}

onClipEvent (data){
needInit = true;
}
Any help with this is greatly appreciated. Thanks in advance. Much respect.
---
Bryce
phunkyphresh@hotmail.com

Resetting Variable
Hello,

I got a script wich is resetting a variable by itself?

The first trace(a); gives the correct value, the second one (in the tellTarget function) allways gives a zero. I'm getting desperate here

in an other function a is set to 1

topnav.contact.onRelease = function() {
if(a != 5){
if(a != 0){
trace(a);
tellTarget("nav" add a){
trace(a);
gotoAndPlay("nav" add a add "Back");
}
}
tellTarget("nav" add a){
gotoAndPlay("nav" add a "Start");
}
}
}

Thanks for reading!
Frans-Jan

Resetting MytextFormat.url ? ****
hello,
i'm working on a flash-text-editor but i have a problem when i want to use links (or mails) with (mytextformat.url)
i can set the url to a piece of text like:
mytextformat.url="http://www.url.com"

Does anyone know how i can reset this url ?
when i use "mytextformat.url=false" then the link is gone but i still see the "hand-cursor" over my text. Does anyone know how to get rid of this. It seems the link is empty and it links to an empty urlPage.

thanks!!!

Resetting MC _width ?
I'm trying to change an MC's _width with the following code:


Code:
mcpreload.loadBar._width = 1;
But I'm not having any luck. This code works on a previous line on my script:


Code:
mcpreload.loadBar._width = per * 2;
Is there another way to write this code? Or to 'reset' the loadBar mc's width back to it's original width size (1).

Thanks

Foochuck

Resetting An Mc's Posistion
I'm having a problem with something which would usually seem simple. I have a game with a few levels, and it's the game where you destroy blocks with a ball. Well the problem I'm having, is getting the ball and paddle to reset their posistion when the movie goes onto the next level. I have given my ball and paddle a keyframe on each level, which should be working already, but as it's not I decided to add:


Code:
this._x = 221.8;
this._y = 269;
that to the load event of my ball, but for some reason it still wont work! Could someone please help me out, thanks.

Resetting An EventListener
I've got an addEventListener attached to a mediaPlayback component and it needs to be reset so that the video that is being played can play again when the user goes back to it.

I am using cuepoints for the eventListener and everytime I return to the video after it has reached it's cue point nothing plays the second time around.

Here is the code I am using:


player1.removeAllCuePoints();
player1.addCuePoint("part2",23);

myObj=new Object();

myObj.cuePoint=function(p){
stopAllSounds();
gotoAndPlay("part2");
}

player1.addEventListener("cuePoint", myObj);



Player1 is the instance name of the MediaPlayback component.

Help would be greatly appreciated.

Resetting _x,_y,_ And Scale?
Hello All,

Long Long time lurker. Anywho, I know my way around mx alright for most things but when it comes to code it's all just annoying to me, but Im dying to become proficient in it. FlashKit and Kirupa have always been a great resources for me, and Ive searched through the posts, but everyone codes so differently I get confused.

My issue is simply resetting the _x,_y, and scale of a movie clip after it's been changed through AS. I am using loadMovie to load external SWF's then adjusting placement of the loaded movie through a submenu using actionscript. My issue is how to reset the _x,_y and scale to 0,0,100 when you select the next portfolio piece.

Attached you'll find my nasty test movie with horrid code any help getting this to work will be greatly apprieciated. The positioning isn't set exact in this file but you'll get the gist. If I wasn't a poor human being I'd offer money but as I have none all I can offer is an illustration or custom illustrated desktop to whoever can help this wanna-be.

Take Care,
ID

Resetting Gettimer
I'm using gettimer in a game to determine what some variables are set to. When the game is ended, I need to have gettimer reset to 0 and have the game restart. Restarting the game is easy enough, but how do I reset gettimer?

Thanks.

Resetting Rotations
I'm creating an animation for the mechanisms section on my website. - File attached. The top pulley is an MC which is supposed to turn 345 degrees clockwise in 24 frames however it now seems to be turning almost two full turns.
Is there a way of finding out out how much it turns in the length of the movie clip?
Is there a way of reseting the rotation?
TIA
www.flying-pig.co.uk

Resetting A Cookie?
I have a cookie which is set using AS, but is there a way of creating a reset. So I can reset the cookie with just a button.

Any suggestions would be appreciated.

Thanks.

Resetting X And Y Properties
Hello, wondering if you guys could help me out here, ill try to describe this as best as i can.

whats happening with my movie is i have 4 images loaded into 4 created MC's within a MC already created. then ive made a mask to be called from the library, and it applys itself to each MC.

now with the problem:

i have four buttons four images stacked ontop of each other. so the 1st image is showing say i want to see image four with out seeing two and three. i just click on btn 4 and it goes there. (so that works) however what ive done is ive told each MC to move away. what i want but dont know how to approach, is reset the _x cords of each MC, after theyre hit....

here my code, also ive provided a link to my swf to make it easier to understand what i mean. thank you everyone whom can help out!
http://www.teksunstudios.com/_misc_p...slideshow.html




PHP Code:




function moveImage(clipName, speed, xDist) {
    clipName.onEnterFrame = function() {
        this._x += (xDist-this._x)/speed;
        if (Math.abs(xDist-this._x)<1) {
        return;
        }
    };
}


//-------------BUTTON 01-------------
btn_01.onRollOver = function() {
    this.gotoAndPlay("start");
};
btn_01.onRollOut = function() {
    this.gotoAndPlay("end");
};
btn_01.onRelease = function() {
    moveImage(img_hold.img_2, 10, -310);
    moveImage(img_hold.img_1, 10, -310);
    moveImage(img_hold.img_0, 10, -310);
};
//-------------BUTTON 02-------------
btn_02.onRollOver = function() {
    this.gotoAndPlay("start");
};
btn_02.onRollOut = function() {
    this.gotoAndPlay("end");
};
btn_02.onRelease = function() {
    moveImage(img_hold.img_3, 10, -310);
    moveImage(img_hold.img_1, 10, -310);
    moveImage(img_hold.img_0, 10, -310);
};

MC Button Not Resetting...
Hey Folks,

I have a problem that has been driving me absolutely
nuts. I have a MovieClip that is acting like a button - it
has an on(release) action applied to it. When I press the
button, the action occurs, but in order for me to make 'it'
happen again, I must first move the mouse just a bit
before I click. If I don't move the mouse, nothing
happens when I click the button.

Let me clarify... Imagine a button that zooms in on a
picture each time it is clicked. Idealy, I would be able to
click twice really fast, and the picture would be zoomed
in twice. Not in this case. I click twice, and there is one
zoom. If I move the mouse slightly I can zoom in again.

Again, the MovieClip has an on(release) action.

Has anybody come across something similar to this?
It seems to me like the on(release) action is not being
released until I move the mouse.

I'd sure appreciate any assistance ya'll have.

Thanks.

Swf Keeps 'resetting' Itself Within The Movie
hi
i have a problem with the galleries that i'm building for this:
http://www.bigredbutton.tv/digby7/
site. if you go inside to the sections within the 'portfolio' section you'll see galleries with thumbnail images. if you browse for a while and move the mouse around suddenly the whole gallery will reset itself to its beginning image/thumbnail position. no idea why this is happening -- any ideas?
emma.

Resetting Timer
I'm making a game with a timer that countsdown for 60 seconds. I want it to repeat because the game is about collecting resources once each minute, but everytime it goes back to frame 2, the seconds go down in intervals of 2 because the part in the code where the "time -= 1;" goes down by 1 each time the frame is revisited (first time: 60, 59, 58, 57, 56... |second time: 60, 58, 56, 54, 52... |third time: 60, 57, 54, 51, 48.. and so on)


Code:
stop();
setInterval(countdown, 1000);
time = 60;
function countdown() {
time -= 1;
if (time<=0) {
_root.wood += 25;
gotoAndPlay(2);
}
}



I've spent long hard hours working on this so help is much appreciated

[F8] Resetting Scroll Bar
I have been working on a project that has about 15 frames. Each frame has a photo and a scrolling text field. I have used the scroll bar component with these text fields. On a few of the frames - if you read to the bottom of the text and click to the next frame the scrollbar stays positioned at the bottom even though the text in the next field starts at the top. It doesn't happen on each frame though. Does anybody have any ideas?

[F8] Resetting Colors
I'm trying to get a map to highlight a user's zip code when they enter it into a textInput field. Once they enter it they click a component button and the zip code lights up. That all works fine.

My problem is that I can't get the colors to reset when a new zip is entered. The previous one stays lit up and the new one lights up as well.

Any help is appreciated,
Layne


Code:
function clicked() {
if (zipCode_ti.length == 5) {
//I thought keeping track of a previous zip and issuing it a different color before colorizing the next one would work. But it did not.
trace("Previous Zip = "+previousZip);//<-----Undefined, even on second click
var previousZipColor:Color = new Color(_root["z"+previousZip]);
previousZipColor.setRGB(0xDDDCCC);

var zipColor:Color = new Color(_root["z"+zipCode_ti.text]);
zipColor.setRGB(0xBF0000);
var previousZip:String = zipCode_ti.text;
trace("Current Zip = "+zipCode_ti.text);//<----This works fine
}
}
findZip_btn.addEventListener("click",clicked);

Resetting A Movieclip
Hello all,

I've got a menu and when clicking on a menu item the menu disappears and a movieclip opens. The user can do several things in this movieclip. When done there is a button that removes the movieclip and opens the menu again. Now when I open the movieclip again is still on the same frame as when it was closed. How can I reset the movieclip.

Thanks

Resetting My Variables
hey there. ive made a little thing where im clicking points for score, ive then let flash play a movie clip on a different frame and then at the end the app returns to frame 1. When i do this, if i have clicked on anything before hand it all resets to 0. How do i stop this from happening

[F8] My Boolean Is Resetting Anybody Know Why?
Hey guys I have the following code. For some reason the if statements are setting my 'myKey' boolean value to true every time. Any clues why? The intial trace works fine it shows both false and true so I know my previous code is working.


Code:
trace(myKey);

if (myKey=false){
gotoAndPlay("square");
trace(myKey);
}
if (myKey=true){
gotoAndPlay("circle");
trace(myKey);
}


Thank you!

[CS3] Resetting An Array
Hello,

I was wondering if there was any way to reset an array to no value? I got it at no value at the start of my program, but I can't get it to no value when pressing a button for example. I tried putting "myArray = null" but that didn't work too well. I also tried "myArray = new Array();" but that didn't reset it either. Do I have to splice all the values?

Thanks in advance!

Resetting A _rotation
Hey,

Im have an object roating back and forth and when I roll over a btn, Im wanting it to spin to its original state. Here is the code if anyone wouldnt mind taking a look that would be ideal! Also Im sorry if its a little messy... Im not the greatest writer yet.


PHP Code:



function btnName() {
    var resetSpin = 10;
    btn.onRollOver = function() {
        globe.onEnterFrame = function() {
            if (this._rotation == 90) {
                resetSpin = -10;
                //this._rotation == 0;
            }
            if (this._rotation == 0) {
                resetSpin = 0;
            }
            this._rotation = this._rotation+resetSpin;
        };
    };
}
function globeSpin() {
    var halfSpin = 1;
    globe.onEnterFrame = function() {
        if (this._rotation == 90) {
            halfSpin = -1;
        }
        if (this._rotation == 0) {
            halfSpin = 1;
        }
        this._rotation = this._rotation+halfSpin;
    };
}
globeSpin();
btnName(); 

Resetting Movie
Is there a way I can have a movie reset and go to frame 1 (as though it were just loaded into the browser)? I'm having problems when I simply gotoAndPlay(1) - is there a way I can just 'wipe the slate clean' so to speak and start from the beginning again when a button is clicked?

MC Resetting To Frame 1
Hey All,

The issue I am having is that I have a MC that in on the main scene. This MC is controlled by buttons which scroll it left and right. The MC also has buttons within the movie which, when pressed, jump the user to a different part of the main timeline.

Sounds simple, but the problem is that the MC is resetting back to frame 1 once the user clicks one of the buttons. I need that MC to stay on whatever frame the user ends it on, so when they return to the main scene, they don't have to scroll back to where they left off.

Thanks for your help!

Jeff

Hot Object Not Resetting
I created a quiz using the template. All my questions are using hot objects. The game works well but the hot object from the previous question stays on for the next question until the reset button is pressed. I have not changed any of the code.

When the next question is pressed, the previous hot object is still lite, the new answer has to be pressed but the 'Click on check answer is highlighted' . Then the reset button has to be pressed, a new answer picked and then check answer.
This happens for each question
Any ideas.

Resetting The Whole Movie
I'm wondering if there is a nice easy way to call a function that will essentially act the same way as closing the .swf and opening again... except without actually having to do so. I need to make a program that handles a lot of data clear all of the data and just load fresh upon hitting a button. I could make a function myself that clears everything, but that probably will leave a bunch of junk in the memory. Is there a nice function call to reload? Please say yes :-)

Help Please Resetting A Listener
Hi,
Im trying to create a game for my 1 year old in flash that shows a letter on the screen. He has to press that letter on the keyboard to move on to the next letter.

So far Ive got this...(for letter a)

Code:
stop ();
var myListener:Object = new Object();
myListener.onKeyDown = function() {
if (Key.getCode() == 65) {
play();
}
};
Key.addListener(myListener);


the problem is, when I get to letter b and put this...

Code:
stop ();
var myListener:Object = new Object();
myListener.onKeyDown = function() {
if (Key.getCode() == 66) {
play();
}
};
Key.addListener(myListener);


"a" still works. How can I make it so the listener, "resets" or "forgets" any previous letter?

Thanks!
Rich

Help With Resetting Movie
Hello all,

I'm new here and just recently I've started training on flash. I've got a movie up and running that may be introduced into a new site that my company is working on, but I can't figure out why this keeps happening. I have 4 buttons at the bottom of 300x300 box. Each button has an "onRollOver" event attached to it that sends the playhead to another frame. The button on the bottom right works most of the time, but there are occasions that when rolling in and out in different patterns, it sends my movie back to the beginning. Now while I'd rather it didn't go back to the beginning at all, there are times that it even alters the way my movie plays when it resets it such as preventing something from fading in that was fading in previously.

I'd love to attach the fla file, but I'm not sure how. I'll attach the code that is contained in the 4 frames that each button links to.... be gentle if I've done something in a roundabout way.... I'm pretty new at actionscript...

Basically, the movie opens up with 4 different backgrounds fading in and out using a setInterval command with "5000" as the interval. Each background has dynamic text (updated using 4 text files) and a picture that appears with it (this is just a mock up, so the pictures are crap). There are 4 buttons at the bottom that are there throughout the entirety of the movie. Now, when a button is rolled over, it then links to these other frames and STOPS the interval fading and only moves between frames through the rollover options. Frames 50-54 are the fading frames and frames 70-73 are the rollover frames.

I've attached the code for 70-73, and the sample from frame 53 will be basically the same for all of frames 50-54 except for a few different instance names and such (I actually labeled it frames 50-55 below but it only goes through 54).

I would be very appreciative of any suggestions specifically on why it might be doing this. Any other suggestions on how to clean up my code, or something that could condense the amount of code I'm using would be welcomed also, but most importantly I'd like to figure out the problem at hand.

Thanks for everything guys.

EDIT: I'm using flash professional 8 and AS2
EDIT #2: Sorry, I don't comment or use any kind of documentation in my work very often.







Attach Code

---------------------Frame 70 code-----------------------
stop();
clearInterval(MyInterval);
pic1_mc.alphaTo(100,1,"linear")
bleedThrough_mc.colorTo(0x127CC2, 1, "linear");
announcementsPicture_mc.alphaTo(10, 1, "linear");
essentialsPicture_mc.alphaTo(0, 0, "linear");
rgbaVantagePicture_mc.alphaTo(0, 0, "linear");
webTutorialPicture_mc.alphaTo(0, 0, "linear");
essentials_btn.onRollOver = function() {
gotoAndPlay(71);
};
rgbaVantage_btn.onRollOver = function() {
gotoAndPlay(72);
};
webTutorial_btn.onRollOver = function() {
gotoAndPlay(73);
};
myData = new LoadVars();
myData.onLoad = function() {
introText_txt.htmlText = this.content;
};
myData.load("BlueText.txt");
---------------------------------------------------------
---------------------Frame 71 Code----------------------
stop();
clearInterval(MyInterval);
pic2_mc.alphaTo(100, 1, "linear");
bleedThrough_mc.colorTo(0x01A302, 1, "linear");
announcementsPicture_mc.alphaTo(0, 0, "linear");
essentialsPicture_mc.alphaTo(10, 1, "linear");
rgbaVantagePicture_mc.alphaTo(0, 0, "linear");
webTutorialPicture_mc.alphaTo(0, 0, "linear");
announcements_btn.onRollOver = function() {
gotoAndPlay(70);
};
rgbaVantage_btn.onRollOver = function() {
gotoAndPlay(72);
};
webTutorial_btn.onRollOver = function() {
gotoAndPlay(73);
};
myData = new LoadVars();
myData.onLoad = function() {
introText_txt.htmlText = this.content;
};
myData.load("GreenText.txt");
----------------------------------------------------------
----------------------Frame 73 Code-----------------------
stop();
clearInterval(MyInterval);
pic1_mc.alphaTo(100,1,"linear")
bleedThrough_mc.colorTo(0xFF711F, 1, "linear");
announcementsPicture_mc.alphaTo(0, 0, "linear");
essentialsPicture_mc.alphaTo(0, 0, "linear");
rgbaVantagePicture_mc.alphaTo(10, 1, "linear");
webTutorialPicture_mc.alphaTo(0, 0, "linear");
announcements_btn.onRollOver = function() {
gotoAndPlay(70);
};
essentials_btn.onRollOver = function() {
gotoAndPlay(71);
};
webTutorial_btn.onRollOver = function() {
gotoAndPlay(73);
};
myData = new LoadVars();
myData.onLoad = function() {
introText_txt.htmlText = this.content;
};
myData.load("OrangeText.txt");
-------------------------------------------------------------
---------------------Frame 74 code-----------------------
stop();
clearInterval(MyInterval);
pic2_mc.alphaTo(100, 1, "linear");
bleedThrough_mc.colorTo(0xFC4D30, 1, "linear");
announcementsPicture_mc.alphaTo(0, 0, "linear");
essentialsPicture_mc.alphaTo(0, 0, "linear");
rgbaVantagePicture_mc.alphaTo(0, 0, "linear");
webTutorialPicture_mc.alphaTo(10, 1, "linear");
announcements_btn.onRollOver = function() {
gotoAndPlay(70);
};
essentials_btn.onRollOver = function() {
gotoAndPlay(71);
};
rgbaVantage_btn.onRollOver = function() {
gotoAndPlay(72);
};
myData = new LoadVars();
myData.onLoad = function() {
introText_txt.htmlText = this.content;
};
myData.load("RedText.txt");
----------------------------------------------------------------------


-----------------------Sample code from frames 50-55--------------------------
//Red Background
clearInterval(MyInterval);
bleedThrough_mc.colorTo(0xFC4D30F, 1, "linear");
webTutorial_mc.alphaTo(10, 1, "linear");
rgbaVantage_mc.alphaTo(0, 1, "linear");
pic2_mc.alphaTo(100,1,"linear")
myData = new LoadVars();
myData.onLoad = function() {
introText_txt.htmlText = this.content;
};
myData.load("RedText.txt");
announcements_btn.onRollOver = function(){
gotoAndPlay(70);
}
essentials_btn.onRollOver=function(){
gotoAndPlay(71);
}
rgbaVantage_btn.onRollOver=function(){
gotoAndPlay(72);
}
webTutorial_btn.onRollOver=function(){
gotoAndPlay(73);
}
MyInterval = setInterval(function () {
gotoAndPlay(54);
}, 5000);
stop();
-------------------------------------------------------------

























Edited: 05/24/2007 at 10:52:30 AM by Taidaishar

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