ActionScript 2.0 :: Remember Which Frame Was From?
Dec 3, 2010I want to let the button remember the previous frame where I was from:
For example , btn.onPress = function (){go to the previous frame I was from}
I want to let the button remember the previous frame where I was from:
For example , btn.onPress = function (){go to the previous frame I was from}
i'm trying to remember a selected state on frame 5 and when i return back to that frame i want it to still be selected. here is my code so far:
Code:
var back:Object = new Object();
back.click = function(oEvent:Object) {
oEvent.target.selected = oEvent.target.selected;
};
q1.addEventListener("click", back);
i know its probably a little bit wrong but yeh i have this code on my back button in frame 20.
i need to stop a flv from playing again until the next day ( needs to be AS3).
View 2 Repliesi have designed button which will change position after press on it i have used the script :button1.onPress=function(){button1._y=-300;action1._y=110;}that is working but the problem is whenever i give a link to it like go to another frame or go for some url. it work but after comming back to its previous stage it shows no difference that means i need a button which will indicate that it have been pressed.
View 1 RepliesIn AIR, I'm create a nativewindow component that will generate a set of togglebutton, as each time the code below is run whether I open a nativewindow, the togglebutton will be reset to the default state. How do I make the state persistent?
for(var i:int=0;i<10;++)
toggbtn.label = "Power "+1;
stage.addElement(toggbtn);
}
I have this code for sharedobject:
var mySharedObject = SharedObject.getLocal("republicofcode");
mySharedObject.data.clientID = my_vars.clientID;
mySharedObject.data.question = my_vars.question;
[code].....
I have some rectangulars movieclips each filled with different colors and a function that changes their color when the mouse is over them. How can i remember the initial color of the movieclip so that when the mouse is not hovering the movieclip it return to their initial color.
View 3 RepliesI have seen similar threads, but I am trying to recreate something I saw on a similar site where the user can record actions such as clicking buttons to produce sounds and stop the recording and then replay what the notes that they played.
I realize that I will need an array of some sort, but I am trying to work it out and I can't seem to get my head around how do replay actions such as the site example above.
I have a map of my country (Greece) and i want to place pins on it to point out the places i have been, links to photos etc, files etc. how to make my programm to remember where i've placed those pins. Should i save the x,y location of the every pin to a table at a database for example and fetch them at loading?
View 3 Repliesjust wondering if it is possible to be able to remeber the timelines position:example:
- the user is say on frame 5 or whatever frame the user is up to (its a quiz senario);
- the user then clicks a link which takes them to frame 15
- when the user clicks on the back button this will take them back to the page which they were viewing whatever that may be for each user.
is this possible or is there any tutorials about it where i can learn this?i have seen one example of it being done where it remebers what level you where at but i ca't remeber where i saw that example/tutorial
I have this code.
for (i=1; i<6; i++) {
this.attachMovie("myMovie","unit"+i,i);
this["unit"+i]._x = i*100;
this["unit"+i].onRelease = function() {
trace("Unit number " + i + " was pressed");
};}
I want to trace the number (i) of the button that is pressed. But no matter what button I press, I always get the value '6' on my trace. Isn't there a way to store the a value for i in each movie clip attached?
I am just trying to create a simple escape the room game. I have a main frame with all the objects and another layer with different views. What I want to accomplish is, e.g.If a panel with buttons is clicked you go to the next frame, which shows a zoomed in panel with buttons. Then you enter a code and if it is correct you go back to the main frame. As the code was correct a drawer, which was previously closed opens and a new item is added to your inventory.This is my code for the room with the drawer:
Code:
drawer3_mc.enabled = false;
drawer3_mc.addEventListener (MouseEvent.CLICK, foundObjectScrewd);
[code].....
I am making a game for the university I attend. I am having students choose between college and high school by two buttons to see if they choose the correct answer. Then I want it to display the number correct on a result page I will have them print out for the instructor of their freshman seminar class.Can flash remember if a specific button was clicked? I have each button with a unique name and could it tell which one was clicked to help me figure out results?
Otherwise, I was wondering if there was a way I could have flash keep track of "points" so I can display the number correct. Would it be possible if I gave each button a numeric value and somehow added up the numbers from each button to put over a total score of 12 (that's how many questions there are)? Could it be done in a dynamic text field?
IShockwaveFlash and cointerfaces have not any way to
1) programmicaly allow use camera and remember choice
2) disable context menu?
when a user inputs some text and if it comes back as an Undefined Error i want it to show what the user typed in so they can see if they misstyped,
Dynamic text feild is called = remember and the Text Input box is = vrm_ti
CODE:
remember.text = vrm_ti.text;
I cant remember the URL to a site with actionscript class resource. Had a look in Sen's lists but couldnt find it.
it had a red and grey rocket in the top right corner with the classes and examples listed underneath and something like locos.tweens in the title
I have a working shared object. The visitor types a password into an input text field and hits go. The next time they go to the log-in it pulls the shared object out and prepopulates the input text field. How can I add a "checkbox" (Remember Me) option to the process. I'd like the visitor to have the option of whether or not they want to be remembered.
My current code looks like this:
On frame 1 Actions Keyfame:
pw_babytalk = SharedObject.getLocal('babytalk');
if (pw_babytalk.data.pword != undefined) {
password_txt.text = pw_babytalk.data.pword;
}
stop();
Imagine a strip of film, where each square of the film is an object in flash, and one of those squares are displayed at any one time. Remember Viewfinders? yeah, that.
Let's say the bolded square is the object you are currently viewing. If I click a button that travels to a square on the left, I want the program to remember that my original frame now lies on the RIGHT side of the stage even though it isn't seen. So when the user clicks back to that original object, it will fly in from the right. And vice versa.
I'm very new to ActionScript. I've taken C++ and know HTML. I would imagine you do something like create an array and make every object assigned to a number in that array. And then you assign starter values for each object. i.e., everything on the left gets the variable "left" and everything on the right of the stages gets "right" for some variable named "Position" or whatever. And when the position changes, so too will that variable change.
All the walkthroughs I've seen specify either desktop, local files as the initial view when calling browseForOpen.
Is there a way to have the air application remember the last location a file was loaded from and default back there?
If necessary I suppose the path could be written to the local db, but even still, I do not know how to get the filepath of the loaded file.
As we all know SuperTabNavigator is an open source component from the flexLib which gives an advantage over Flex Tab Navigator that we can close the tabs from the close button on each tab with the use of SuperTabNavigator. Additinaly there is a button to the right of the tab navigator which shows a list of all tabs which are open at one time and we can select any tab from that button which is a PopupButton.
Now what happens is when we close a tab, it disappears from the PopupButton drop down list as well. But in my case I want the drop down to remember the closed tabs even so that when I click on that closed tab it opens again in the tab navigator. I am relatively new with Flex and ActionScipt
I want to be able to create and place objects on the stage dynamically and remember their location. I'm guessing the best way would be saving the object type and location in an array? Just wondering if there is a better way before I start coding.
View 1 RepliesI am trying to make my buttons do this (<-- Link). What I can't figure out is how to make the button stay red after the user clicks it and then go back to white when the user click on another button. Here is my file (<-- Link) so far. and here is my Code:
[Code]....
when I do linkage on a symbol and export it for AS3. Then I edit the symbol, for instance go in and modify anything inside, a shape, etc... the next time I try to publish flash, i get an error multiple constructor definitions found. constructor may not be defined in <Script/> code.I think may be it's because flash does not remember to delete the previous export and creates another one. The only way to resolve this, is to delete the entire symbol and re-create it.
View 1 Replieshow i can make a draggable movie clip remain in the position it was dragged to, when moving to another frame, then returning to the first.
here's an example,
say on frame one i have a circle movie clip and an image of a square, to begin with the circle is nowhere near the square, but I've added code that means it's draggable, so you drag it next to the square then click a button that takes you to frame two
then when you've done whatever you can do on frame two and want to return to frame one the circle would be back where it started (as in nowhere near the square).
How could I make it so when you click to go back to frame one, the circle is where you dragged it (e.g. next to the square)
How about make the Flash Player remember window position after exit? So that it opens in our preferred position everytime?
View 1 RepliesI request my user from mic and camera setting on my website with Flash, but the remember checkbox does not show, so every time my user logs in he's requested once again for permissions, how can I make the checkbox show to avoid this?
View 1 RepliesDoes an AIR app built with Flex have something similar to a browser cookie? I want the app to remember a simple value, like date when the app was last opened. I'd rather not create a SQlite database just for this.
View 1 RepliesI would like a Flash application to remember the settings that a user on a specific machine or specific browser has earlier set. This is possible, right? What's the most neat way of doing this? Using some kind of a flash cache?
View 3 RepliesI am trying to get the Privacy Settings Tab to show in our flash/flex4 video chat application we are building.I have 2 systems with latest Flash installed (currently 11.1.102.62). However, the player always shows this (privacy popup question) instead of this (privacy settings tab) when loading the app.The reason i want the settings tab to show is because i need the end user to easily check the "remember" box. I have tried to call Security.showSettings(SecurityPanel.PRIVACY); before as well as after the getCamera/getMicrophone calls but all that happens is we get 2 popups instead of 1.and still no "remember" option.Actually it doesnt show the privacy tab at all!Searched tons of forums but have come up empty.I have also searched the adobe docs but all I find is a paragraph stating"if your computer or device doesn't support audio or video recording using Flash Player, you don't need to allow or deny access, and this panel doesn't appear".Which is hardly true since one of the systems we are testing with is a new Macbook Air running latest OSX.Does anyone have any insight into why this might be happening and how to display the "Privacy Settings" and not the "Privacy pop-up question"?
View 1 RepliesI am using xml to create my flash menu . Now , i want that when i open a link it should remain highlighted , but right now the menu just refreshes on the next page. I am attaching the file . Attachment not working here is the link = [URL]
View 1 Replies