Professional :: Adding A 'if' Statement?

Mar 1, 2011

i have created a comment box with a scroller but i do not want scroller to scroll unless a user adds more text so therefore i will like to add a if statement on this code.

Action script 3
var dragRect:Rectangle = new Rectangle(drag.x,drag.y,0,bar.height - drag.height);drag.addEventListener(MouseEvent.MOUSE_DOWN, dragMouseDown);[code]....

View 5 Replies


Similar Posts:


ActionScript 2.0 :: PHP Hit Counter - Adding If Statement

Jun 8, 2005

I'm working with the php hit counter here on the Kirupa site and wondered if there was a way to test the data in the txt file during the loop to determine playback of a movieclip.... in other words, when the loop starts, a variable is created storing the number in the textfile... the next time the loop repeats, the textfile is checked and matched against the variable... if the variable differs from the textfile, the variable value is changed to match the textfile, and a movieclip plays to signal that this change in the textfile has occurred.

View 8 Replies

ActionScript 2.0 :: Adding || To An If Statement Stops Function Working?

Dec 10, 2005

I have a movieclip with the instance name information_mc. I am trying to get this movieclip to move up and down, depending on its y co-ord or in what direction it is tweening at the moment it is clicked.I have the following AS:

Code:
information_mc._y = 240;
var curMovement:String = "goingup";

[code]......

View 2 Replies

Professional :: Put Doctype Statement At Top Of Html Only Top Of Swf Displays

Jun 22, 2010

I used cs4 to create the swf. I published with html output. I noticed I was running in quirks mode so to fix that I put a doctype statement befor the html tag. This is the doctype:[code]the swf still diplays at it's full width but only about the top 1/5'th of the output displays.

View 1 Replies

Professional :: If Statement To Check If Boolean Is True?

Aug 28, 2011

i want my if statement to check if boolean is true so here is my code.
 
name:Boolean = new Boolean();
mc1.addEventListener(MouseEvent.CLICK, myMouseEvent);function myMouseEvent(event:MouseEvent):void{    name:Boolean = true;        if(name:Boolean = true)    {        //code to run....      
}

Syntax error:expecting right paren before colon.
 
probably a simple explanation that i cannot this of.

View 3 Replies

ActionScript 2.0 :: First Requirement Of The If Statement When Type In The Proper Input And Go Straight To The Else Statement

May 14, 2009

Having a few problems with what I thought was a simple if statement. Here is the code:

[Code]...

I can't quite figure out the small problem with the code. It seems to just bypass the first requirement of the if statement when I do type in the proper input and go straight to the else statement.

View 7 Replies

ActionScript 1/2 :: Execute Code In Previous If Statement If Second If Statement Is Executed?

Aug 31, 2011

if (variable == 1){
//code
//Execute this code.
} else if (variable == 2) {
//code

[Code]...
 
I dont want to copy the code from the first into the second and the first and second into the third.
 
My mind isn't working and there is probably an extremelly simple way to get this working.
 
I know I could used functions but for some reason it stops the instance referencing working: _root["bullet"+j] doesnt work in a function.

View 7 Replies

ActionScript 2.0 :: Loading Data From XMl File And Uses It To Run An If Statement. If Statement Fails?

Oct 10, 2008

The Flash movie contains 2 Text files, one Component button, and 1 component checkbox.The purpose of the application is to load an XML file(works)Populate 2 text fields with information from the XML file(works)Compare the two text fields, if they contain the same information then the checkbox, via AS is told to be selected. (Heres the problem);

Heres the code:

Code:
runCode_btn.onPress = function() {
data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = function(success) {

[code]....

The idea behind this app is that its an electronic form. The user fills it out, the information is then sent to a newly created XML file, months later the open the XML file in flash, and Flash fills out text fields and check and or unchecks Checkboxes based on the XML data.CheckBoxes are mandatory.But I don't see how I'll be able to use them if i can't create and condition statements based on the loaded Data.

View 1 Replies

ActionScript 2.0 :: If Statement Inside If Statement Won't Work

Mar 30, 2011

why this code won't work

[Code]...

I'm sure you can put if statements inside other if statements, seriously I can't figure it out

View 4 Replies

Professional :: Flash Professional Adding Swf Files?

Dec 19, 2011

i am new with adobe flash and i have made 2 swf files that need to link to one main one, i am not sure what the actions should say. so far my programming for my main swf where i want all the other swfs to open from are:
 
var movieLoader:Loader = new Loader();function addMovie(event:Event):void {var movieRequest:URLRequest=new URLRequest ("slideshow.swf");//define a loader to load a movie to the stage//Set the loaders load property to the the var movieRequestmovieLoader.load(movieRequest);//add the image to the stageaddChild(movieLoader);//set its x and y positionsmovieLoader.x=0;movieLoader.y=0;}PictureSlideshow.addEventListener (MouseEvent.MOUSE_DOWN,addMovie);
function activateButtons() {  removeChild(movieLoader); }

[Code]...

View 1 Replies

ActionScript 3.0 :: Another 'if' Statement Inside An 'if' Statement?

Sep 22, 2010

I need to write an if statement inside an if-else statement. But no matter how I write it it keeps giving me a syntax error.The syntax error is "1083: syntax error: else is unexpected".[code]No matter how or where I place the braces, it keeps giving me errors.

View 13 Replies

ActionScript 3.0 :: Use A For Statement To Create An If Statement

Jul 12, 2010

what I'm trying to do is create an else if argument for each object in an array based on a user set number

Code:
for(var i:int=0; i < numberOfElseIfs; i++){
GENERATE AS3 CODE
}

to which I want it to GENERATE THE FOLLOWING CODE:

Code:
}else if(baskets[i].used == false){
baskets[i].used = true;
drawButton(i);
}

the problem is obviously that the compiler reads this code rather than understanding I'm trying to regenerate the code within the for loop...does that make sense :S? So basically I need as3 to read the code between the for statement as if it is going to echo that out later. Is this even possible?

View 4 Replies

Professional :: Adding A Hyperlink To XML For Use In A SWF?

Jan 14, 2010

you can see the SWF here:I'm trying to make some of the text in the SWF hyperlinksBelow is some of the XML -- how and where do I add the code to link?

<?xml version="1.0" encoding="utf-8"?><root difference="10"><node><year>1970</year> <text>Stephen Galvano installed as pastor at 421 Child St. </text> <pic>1</pic></node>
<node><year>1971</year> <text>The Inaugural International Missions Convention. </text>

[code].....

View 3 Replies

Professional :: Adding Xml Or Other Files?

Aug 12, 2010

i was woundering at the moment my website only has flash objects like navigation bar and ive just madea post saying il pay 20 pound for people to fix my errors

but while i wait for people to reply to that. i was woundering, on my flash site i want a login page relam status but i have been told i can't make them in flash, cause flash just isn't good, its only good for website images etc, not for login details etc

so how would i go about mnaking my realmlist status and login on there?

View 1 Replies

ActionScript 3.0 :: Write Another "if Statement" Inside Another If-else Statement?

Sep 22, 2010

I have a script which is giving me a lot of trouble since I have no idea how to write another "if statement" inside another if-else statement. I keep getting errors, I guess I don't know where to put the braces exactly...

example:
if(bla == bla) {
<------------how would I write another if statement here?
}else if (bla == bla){
}

View 3 Replies

Professional :: Error When Adding Keyframe

Jan 7, 2010

So I'm getting a memory error when I try adding a keyframe to a rather large flash file that says "Not enough memory available" but I know I have plenty.

I'm running a 3.0ghz Quad core with 8GB of ram and about 100 gigs of HD space free on every drive (save the one where flash is installed, it has 16gb).

I've increased my virtual memory to 4096 - 8192 on my C drive and to 2048-4096 on the drive flash is installed to so it shouldn't be a page file issue either.

View 3 Replies

Professional :: Adding Control Bar To SWF Video

Jan 15, 2010

I need to add a control bar (play, pause, progress bar) to a SWF video in Dreamweaver. It can be very simple, the look and feel is not that important, it just needs to be functional. The only way I can figure out to add one is to import a FLV file into Dreamweaver instead. The problem with this is that I can't figure out how to export a FLV file directly from Flash CS3, and using a converter program to create a FLV file nullifys the links in the menu at the end of the video. Any help would be great! This seems like it should be really simple to accomplish, but I have been pulling my hair out over it all day now.

View 6 Replies

Professional :: Adding Frames With JSFL?

Mar 29, 2010

I have a bunch of fla files with a sequence of frames that need to be readjusted due to a change in frame rate requirements. How can i add frames to specific frame numbers using JSFL script? Or at least what API can i use? Is there one in one of the properties and methods of the DOM object from fl.getDocumentDOM?

View 2 Replies

Professional :: Adding Animation To Video?

Apr 5, 2010

I've searcehd but haven't found anything similar. I am trying to add animation to an educational video that I produced. I am new to Flash but already love it - have used for several presentations at work with my higher students and it's been really, really effective so far.

I have done two things: Imported an .flv of the video that I am trying to add animation to but only see the first and last shots in my timeline. How can I add text and tweens throughout the movie using flash? Or can't I?

View 1 Replies

Professional :: Adding Frame To FLA File

Apr 16, 2010

I am trying to add a photo to a Flash file that we had created for  us: URL...I am kind of sort of new at Flash. I can edit these files but I can't figure out how to add a new photo. I thought you could just add a new layer but that's not working.URL...

View 1 Replies

Professional :: Adding Text To A Template?

May 6, 2010

I am using this template: [URL]
 
I would like to add text as it opens, going across the flag, something like this....
 
Sam Young. Not Uncle Sam, but here to serve you!
 
Now, obviously, that's not what I want it to say, but it's an example, of how I want it to move across the page, on the flag, before it opens to the first page. I've tried everything I know to do. I'm sure I'm just missing something silly.

View 1 Replies

Professional :: Adding A URL To SWF (so That It Opens Webpage Without Pop-up)?

Jun 5, 2010

i have this flash object which i'd like to make linkeable i don't know how to bundle a URL into the SWF to do this.. 'd like to be able click the object and be taken to another webpage, without the other page page opening as a new window or triggering pop-up blockers on peoples browse

View 10 Replies

Professional :: Adding Graphics To Cards?

Jul 21, 2010

I'm creating a card game where the cards flip and are draggable. At the moment, I'm trying to add graphics to my cards using the addChild method, but I'm not having any luck. My cards flip and drag around properly, but I can't seem to get graphics on them. I have the graphics linked for use in action script. I have my cards in memory.fla and am using two external .as classes (DraggableClip.as and MemoryGame.as). Here's the code for both.

[Code].....

View 8 Replies

Professional :: Adding A Datagrid To The Library?

Jul 24, 2010

After adding a datagrid to the library in layer3 frame 15 the inputTexts x2 in frame 1 are not editable (cannot input) not even by using Tab. when i remove the dataGrid from the library everything is OK again

View 1 Replies

Professional :: Adding A Music File?

Sep 21, 2010

just created a slideshow that loops because I want it to continuously play. I added another timeline layer and inserted my music file which is 4:03 minutes long which I set to loop as well. However after it has been playing for about 15-20 seconds it sounds like it is layering another music file on top of the existing one and so on and so forth, so a couple of minutes

View 20 Replies

Professional :: Instance Name When Adding From Library?

Nov 11, 2010

When addressing nested movieclips like so: _root.movieclip.movieclip.variable they need to have an instance name set, otherwise they count as undefined. So I can set that in the properties no problem, but when deleting it from the stage and then readding (manually or by actionscript) the instance name is gone thus I can not address nested clips by action script.
 
I don't understand how this will work then, since every time I add a clip by code it will have no instance name. The only alternative for me so far was keeping the clip on the stage the whole time, just out of bounds or invisible so I can still do stuff like _root.movieclip.movieclip.variable or _root.movieclip.movieclip.gotoAndStop(2).

View 8 Replies

Professional :: Adding Data To XML Objects?

Dec 20, 2010

how to add completely new data to XML data I'm holding in a var.
 
I'm importing XML data into an editor I'm creating.  The XML looks like this:
 
<itemList_120>
<mediaFile order="1" playTime='2' transIn='1' transOut='9'>gif.gif</mediaFile>  <mediaFile order="2" playTime='1' transIn='6' transOut='8'>jpg.jpg</mediaFile>

[Code]....

Rather than change existing XML data, how do I add completely new data?  ie, if the above var held two "mediaFile" lines of XML, how do I add or insert a third?

View 1 Replies

Professional :: Adding A New Scene #5225 Instead Of #2?

Dec 25, 2010

I currently have only one scene, but when I insert a new scene (insert->scene) it is labeled #5225 and not #2.Why is that? BTW, I'm using Flash CS4.

View 2 Replies

Professional :: Adding Scene To A Button

Mar 21, 2011

I want to trigger a scene to play (well, stop technically) when the play game button is clicked but I keep getting error messages.[code]

View 8 Replies

Professional :: Adding Volume Controls?

May 16, 2011

I've inserted an audio file into my flash movie and I wondered if there was an easy way to add some volume control and/or an on/off audio button to the movie? Or would this have to be scripted using actionscript?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved