ActionScript 2.0 :: Delete A Button If A Certain Frame Is Entered
Aug 13, 2007i want my button to delete if a certain frame plays...how would i do this?
View 2 Repliesi want my button to delete if a certain frame plays...how would i do this?
View 2 Repliesso im makeing this wheres waldo type game and I have this code timer where when 15 seconds go by it goes to a keyframe where it says "you lose"and I have this other code where when you click a button it goes to a different keyframe where it says "you win"now the problem is if you click on the button in say 13 seconds you'll go to the "you win" frame but when 2 more seconds go by (makeing it 15 seconds) it'll take you to the "you lose" frame so i was wondering if theres a action where you can delete another action once you enter the "you win" frame or something like that
View 9 Repliesiam loading in jpg's thru xml -- now when they load in they are fading in so i have this
holder_mc is my movieClip they are loaded into
[CODE]...
I got these four errors when I tried to create a button on the stage that would delete the text I inputted in the inputtext(ti). Based on the scripts I have and the errors, what should I write to create the delete button?
[Code]....
This is for a website with seven frames (one page per frame)
I can load the gallery .swf in background but I only want it to show up on frame 7 (gallery button). Then if the user goes anywhere else (eg. home button - frame 1) the loaded gallery .swf disappears.
I can load it and make it invisible, and can make it visible on frame 7 but then it's visible when you navigate anywhere else.
This is the load code on entering frame 1:
stop();
//make gallery invisible in this frame
stage.addEventListener(Event.ENTER_FRAME, invisible);
function invisible (event:Event):void
[Code].....
I need to a keyframe to pause (for say 20 seconds) when the frame is entered (i.e. not a button press, etc). After the 20 seconds is up, i need the timeline to continue playing to the next keyframe. I've searched and searched for setinterval and the like, but i could not find a clear answer.
View 14 RepliesI want to have a movie load and play in the timeline, when a frame is entered. I know about the enterFrame function, but don't know how to apply it.
View 9 RepliesI've got an object (an instantiation of my own class that extends Sprite) being created in the actions for a frame, like this:
Code:
import Scripts.CFoobar;
var foobar:CFoobar = new CFoobar();
[code]........
I want to make a file that that has a register button where the user can put in their name, username and password. Then I want the user to be able to be logged in with the username and password they put in.
View 9 RepliesI have a simple script that rewinds a movieclip I made. In the movieclip there are two stops. The movie plays fine and stops at my stop();s when it's going forward. But when it moves backwards, it doesn't respond. What do I need to ad to make this stop at my stop();s?
Code:
function playBackwards(mc){
mc.onEnterFrame = function() {
[code].....
lets say i have a bunch of AS in a frame and i want to delete all of it when you leave that frame or change frame
View 6 RepliesI am working on xml-flash entegration. I have a one problem I connect to xml file and load all data into the xmlLoader variable. xml file contain below codes.
<page1>
<textArea x="150" y="10" weight="200" height="100" bold="true" font="arial" size="10" color="0x00ff00" content="page 2__sira0_textArea">
[code]....
okay, in my game, at the end of a level, the player runs into a finish movieclip, the problem is, when the player goes to the next frame, it brings the finish movie clip to the middle of the stage, i tried to remove the movieclip but it dident work, also i have the finish movieclip in the next frame, just in a different place
View 1 RepliesFlash will automatically remove the objects that you added onto the stage when the frame changes, but leaves all the objects created by actionscript. cleaning them up/removing from stage when the frame changes?
View 8 Replieshow to Remove/Delete Frame Using ActionScript.. im creating a random Question Using Flash CS4, and i want that after the question it automatically deletes to avoid question redunduncy
View 3 Repliesi have a little application that you can add numbers and friends email too. i would like to add a minus selection/entry button?
stop();
//create a new sql connectionvar conn:SQLConnection= new SQLConnection();[code]...........
how come this isn't working?
Code:
on(release){
_root.terrain.clear = true;
}
"terrain" is the line that is drawn by the mouse and i want to make a button with AS to delete the lines when pressed.
I have created a delete button and have linked it to a text box along with another button that displays "1" in the text box when clicked. I need a button that will then delete this "1" out of the text box when clicked.
View 2 RepliesI am implementing a flex auto-suggest combobox - as the user types in each character: Consider the string 'Stackoverflow' and user input = 'st'
1) the data provider is filtered to show all items starting with 'st'
2) text is set to auto-suggest string such that the un-typed part is highlighted.
So for instance, the combobox text may contain st'ackoverflow', where 'ackoverflow' is highlighted using setSelectedIndex()When I hit back-space or delete, and check the 'this.text' value, I expect that the last un-highlighted character ('t' in the above case) gets deleted and the data provider is filtered to show all items starting with 's'. However the text property contains 'st', as before
its strange but one time this code works in a few minutes suddenly i get error #2032. I am just start to learn AC3 and obviously doing something wrong.and explain me?
<![CDATA[
import mx.containers.Canvas;
import mx.containers.Panel;
[code].....
I have created a delete button, and when the user clicks it.. I want it to delete the selected movie clip. I have created a variable selecteddrawing to store whatever movie clip is currently selected.
when i call the event listener, and tried removeChild(selecteddrawing) it gives me this error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/removeChild()
at SendLove/deleteListener()
Here is the code that i just wrote for the delete button. I will attach the entire AS3 file as well.
ActionScript Code:
create.delete_btn.addEventListener(MouseEvent.MOUSE_UP, deleteListener);
private function deleteListener(event:MouseEvent):void {
[Code]....
i have the following code:
var str:String = "blablabla"
var fontDescription = new FontDescription();
fontDescription.fontName="Arial";[code].....
How can i delete the Textfield pushing a button?
I have some radio buttons that are all created dynamically and range from maybe 1-4 or more. Is there a way when I click submit button I can wipe out all of those buttons?
View 1 RepliesI have a line that is being drawn following a route when a play button is pushed. At the end of the movieclip the whole route is shown with the beginning and end. How do I clear that line if the user hits play again? Right now it connects the beginning and ending points and creates another line on top of the old one.
Actionscript Code:
var shape : Shape = new Shape();shape.graphics.lineStyle( 4, 0x9C1E26);shape.graphics.moveTo( arrow.x, arrow.y );addChild( shape );addEventListener( Event.ENTER_FRAME, loop );function loop( event : Event ) : void{ shape.graphics.lineTo( arrow.x, arrow.y );}
I works with Flex 4.5 and I like to create a custom dropdownlist. Indeed, I'd like to show in each line on my dropdownlist a label and a delete button. The goal is to delete the line on click to delete button. This look like simple, but I don't found how to do that.
View 1 RepliesI have a for loop that adds 5 movieClips to the stage at a random position every time I click the enterBtn, what I want to do if the enterBtn is click again remove the movieClips previously generated and leave only the new ones on the stage.
Oh, the number "5" in my for loop will be dynamically created so it may be different if the enterBtn is click again (I just used 5 for simplicity).
enterBtn.addEventListener(MouseEvent.CLICK, calculator,false,0,true);
function calculator(event:MouseEvent):void {
for (var i=0; i<5; i++) {
[Code]....
I want to delete a row of my datagrid when someone click a button part of that row located below Delete Column. I tried many different way one of those were to
<mx:DataGrid id="userGrid" dataProvider="{userGridData}" width="800" height="500" itemClick="userGrid_itemClickHandler(event)" creationComplete="userGrid_creationCompleteHandler(event)">
<mx:columns>
[Code].....
The item render ev.renderers.UserGridEditRender has a delete button listing for click event it basically do userGridData.removeItemAt(userGrid.selectedIndex);
(UserGridData = Data provider of grid with id "userGrid") But whenever I click the button an exception is throw
RangeError: Index '-1' specified is out of bounds.
How do I delete/remove a movie clip after the wrong answer button is clicked?
View 16 RepliesI can't find a delete post button.
View 1 RepliesWhat I'm trying to do - remove/delete a movie-clip once a button has been pressed (Selling a tower)My problem - Is that from my limited knowledge none of the following work.
removeChild(myTower);
Turret.removeChild(myTower); - (trying to reference the class of the turret so that it can access the movieclip)
Turret.parent.removeChild(Turret)
Turret(root).removeChild(Turret)
This function is placed in the first frame of the source.fla where all main functions are.The turret has its own class defining its properties and such.Basically what i want to happen is when the button function is activated to remove the movieclip Turret and the class from running.