ActionScript 2.0 :: [CS3] Involves For Loop Making MCs Hidden Then Visible?

Feb 20, 2009

On frame level, frame 1 populate the layout (to deal seven cards to a player as selected):

Code:

playerA_cards=["dealt_card_a1", "dealt_card_a2", "dealt_card_a3", "dealt_card_a4", "dealt_card_a5", "dealt_card_a6", "dealt_card_a7"];
playerB_cards=["dealt_card_b1", "dealt_card_b2", "dealt_card_b3", "dealt_card_b4", "dealt_card_b5", "dealt_card_b6", "dealt_card_b7"];
playerC_cards=["dealt_card_c1", "dealt_card_c2", "dealt_card_c3", "dealt_card_c4", "dealt_card_c5", "dealt_card_c6", "dealt_card_c7"];
playerD_cards=["dealt_card_d1", "dealt_card_d2", "dealt_card_d3", "dealt_card_d4", "dealt_card_d5", "dealt_card_d6", "dealt_card_d7"];
playerE_cards=["dealt_card_e1", "dealt_card_e2", "dealt_card_e3", "dealt_card_e4", "dealt_card_e5", "dealt_card_e6", "dealt_card_e7"];

[code]....

It should work. It doesn't. Similarly does not work on buttons which are also too numerous to mention, so making them visible one at a time would be an untold hassle. I would love these five arrays to be bunched in a subarray but right now getting it to work, period, is job one.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Visible / Hidden Scrollbar For Dynamic TextField (XML File)

Aug 18, 2010

I am currently creating an online portfolio using Slideshowpro [URL]. For some of my pictures I am using (external) captions from a XML file, inserted into a dynamic textfield. As some of the captions contain a lot of text I decided to add a UIScrollBar. However, when there is no text (no caption) available, I want the scrollbar to be hidden. Also if there is not enough text to warrant a scrollbar it would be great if it could be hidden!

Code below, note that "t_txt" is the instance name of my dynamic textfield:
import flash.text.TextField;
import net.slideshowpro.slideshowpro.*;
import fl.controls.UIScrollBar;
XML.ignoreWhitespace = true;
//remove scrollbar from stage, scrollbar component must be in library
var sbContent:UIScrollBar = new UIScrollBar();
[Code] .....

View 1 Replies

ActionScript 1/2 :: Making Something Visible And Not Visible?

Mar 4, 2010

I want to make a little thing pop up when I put press a button... Would the best way to do this by doing a - movieclipname._visible = true/false

View 3 Replies

ActionScript 2.0 :: Making An Instance Hidden

Jan 27, 2011

I have 20 indtances in my scene..named 1, 2, 3, 4 etc..and i am loading some variables pc1, pc2, pc3 etc plus more for other things.I know the variables are loading cause other bits work, but what i am trying to do thats not working is make the relative instane hidden if the corresponding variable is empty.

View 1 Replies

Actionscript 3 :: Canvas Total Width (visible Width + Hidden Scrollable Part)?

Apr 19, 2010

It's probably a no brainer, but I've spent the last 40 minutes or so looking for it to no avial.

I have a Canvas control with a fixed width and a horizontal scrollbar.I'm trying to find the actual width of the control.The .width (fixed width) + the part being revealed by the scrollbar.I tried explicitWidth, width + maxHorizontalScrollPosition, and some other combos but non of them hit the spot.

View 1 Replies

ActionScript 2.0 :: Movie Starts Playing And The Button "play" Is On The Stage (it Should Be Hidden, Not Visible)?

Sep 15, 2009

well, I got this for my Play/Pause button (on stage):

Code:
import mx.transitions.Tween;
btn_play.onPress = function(){

[code].....

View 3 Replies

Professional :: Making Things Visible One At A Time?

Jun 22, 2010

I have one button, that when clicked should display several images, one at a time. At the minute they are all just coming on together, how do i seperate the functions so they come on individually, for example like bullet points, e.g click once and image1 appears, click again and image2 appears etc... so eventually all of the images are on screen, but they don't all just appear together, if that makes sense!

View 4 Replies

ActionScript 3.0 :: Array Of Movieclips; Making Everyone Visible At Same?

Sep 18, 2010

Can I make an array of movieclips, and then make all of them visible? some-thing like:

ActionScript Code:
myArray[1] = new MovieClip();
myArray.visible = true;

[code].....

View 2 Replies

Flash :: Making Content Visible To Search Engines?

Feb 1, 2012

When I was using Flash CS4, it published a HTML file that showed the text content of the movie, which made it easy for search engines to index the site. However, in Flash CS5.5, I notice it doesn't appear to do that anymore.
 
What do I do (step-by-step) to make my movie content visible to search engines?

View 2 Replies

ActionScript 3.0 :: Making A Button Visible When Timeline Is Playing

Sep 12, 2010

Is there any way for AS3 to register when a timeline is playing?I want to make a button visible when the playhead is moving, (and invisible when it's not)

View 2 Replies

IDE :: Making A Global String Variable Visible To MovieClips?

Jun 4, 2009

I mostly use flash for the animation, so my action script tends to be mostly functional.

I am now however having an issue, i am using a variable called language which I am setting in frame one as "dutch", "english" , "german" etc... Im then using this to set dynamic text as appropriate in each frame as necessary.(and yes i may switch this to case statements )

if (language == "dutch")
{ tcMC.peasantBubble1.peasantSpeech.text= "Bescherm je een schat?"};

My problem is however that one Movieclip does not see the language variable.

Is there anway in CS4 i can direct it to where it is, or define the varibale instead to be global (perhaps id have to change it from a string though)?

View 2 Replies

ActionScript 3.0 :: Making Menu Visible When External SWF Loaded?

Jan 5, 2011

I have my main menu movieclip placed on the main stages and I use it to load some external swfs. However when I load them, the menu disappears because it is covered by the loaded swf. How can I set the depth of my top menu so that will always be visible when the external swfs are loaded? Should the depth be set on the main time line or inside the main manu movie clip? This is the code in my main menu that I am using to load the swfs but my main menu is a movie clip placed on the main timeline...

Code:
var swf:MovieClip;
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest("swfs/welcome.swf");
loader.load(defaultSWF);
stage.addChild(loader);
[Code] .....

View 10 Replies

Actionscript 3 :: Making Scroller Of Spark List Visible By Default?

Oct 6, 2010

I have a spark.components.List component on which I would like the vertival scroll to be visible by default.

View 1 Replies

ActionScript 3.0 :: 2D Lighting Shader - Making Stuff Near Player Visible

Oct 25, 2011

How would I go about making a 2d lighting shader, that only made the things near the player visible?

View 3 Replies

ActionScript 3.0 :: Create A Website Which Involves Uploading Video?

Jul 21, 2010

We are planning to create a website which involves uploading video.The issue is this video must be edited (cropped, resized and shortened) by the uploaded. Does anyone know of a solution/set of apis, where this can be accomplished?I had a look at the YouTube apis but there are no editing or uploading methods that I could find.

View 0 Replies

ActionScript 3.0 :: Create An Animation Which Involves Play And Pause Buttons?

Apr 15, 2011

I'm trying to create an animation which involves play and pause buttons, i've tried following the tutorial but because my animation is on many different layers it won't work.

View 1 Replies

ActionScript 3.0 :: Project Involves Loading Data And Movie Clips Dynamically In Certain Arrangements

Jul 3, 2009

I am undergoing a huge flash project at the moment and as wondering whether or not an approach would work for something. Basically everything in the project involves loading data and movie clips dynamically in certain arrangements etc. I have built everything already bar a couple of things to create demos including dynamically loading mcs from the library etc all with as3, but now I am moving on to loading data dynamically and before I immerse myself completely I was wondering whether or not something is possible. Basically as I mouse over an mc i want a couple of things to come up which would be held in a database, such as a question and an answer, but this data will change quite frequently when the demo is up and running, is it possible for the data to be updated in the dynamic text boxes without mousing out and mousing over again? That is one of my concerns ( I have a couple ).

I had thought of maybe using a timer to query the database every 2 to 3 minutes and use php and mysql with as3 to then load the data into the text boxes, hopefully without having to mouseover the mc again and simply leaving the cursor over the mc the whole time. My main concern is whether or not I can query the database on a regular basis... using a timer method as described above, or is this simply stagnant data? i.e. can i use php and mysql in as3 to continuously query a database?

View 2 Replies

ActionScript 2.0 :: Making The Movieclip Loop?

Aug 31, 2010

I have got this example of drag and throw its working fine..But i need to add some more feature what code should i add to make this in loop and besides that i want this slide to scroll through numbered buttons..like in this example [URL]

View 11 Replies

ActionScript 3.0 :: Variable Making Loop

Sep 7, 2010

[Code]...

so what i want it to do is making 10 varibles named Name1 - 10

View 9 Replies

ActionScript 2.0 :: Making A Movie Loop 3x

Jun 27, 2011

I'm trying to make a movie loop only 3x. On the first frame I have:

Code:
var loop==1;
then, on the last frame, before I send the movie to frame2, I have
Code:
loop++;
if (loop==3){stop;}

But the movie continues, then goes to frame 2 again.

How can I make the movie loop only 3x?

View 2 Replies

ActionScript 2.0 :: Making A For Loop To OnEnterFrame?

Jan 24, 2005

im making an image gallery and have a for loop that plots the thumbnail grid. converting it to onEnterFrame so that the thumbnails are created one by one... heres my as:

[AS]
gridx = 21;
//x spacing[code]...

View 8 Replies

ActionScript 2.0 :: Properly Loading XML And Making For Loop

May 21, 2009

I'm loading XML, but I'm having trouble making a for loop so that I can output into text fields my xml info. I use this to load and put into the output window. Eventually I will put it into a text field. What I want really to do is for flash to output a list. This is what I want it to look like.

PHP Code:
var newsXML:XML = new XML();
newsXML.ignoreWhite = true;
var output:String = "";
newsXML.onLoad = function(success) {
if (success) {
var news:Array = newsXML.firstChild.firstChild.childNodes;
[Code] .....

If you look at this XML you will see that there are many different Tournaments. What I want is to have them all in a list. I also want to have scrolling bar.

View 6 Replies

ActionScript 3.0 :: Making MovieClips Invisible With For Loop?

Dec 22, 2011

I have twenty movieclips on stage with these names:
g1
g2
g3
g4
....

How can I make invisible with a for loop, like
for (i = 1; i < 20; i++) {
g+i.visible=false;
}
This that not work.

View 1 Replies

ActionScript 3.0 :: Making New Variables With New Names In A For Loop?

Jan 24, 2010

I can't create new variables within a for loop:

ActionScript Code:
for(var i:int = 0; i<numBtn; i++) {
var this['menuBtn'+i] = new Sprite();
}

This doesn't work, saying I need an identifier before 'this'.

What I am trying to do is to make a dynamic menu, and the number of buttons depend on how many files there are in a directory, as each button links to each file;I get this value (numBtn in my example) from a php script, and I need to make a menu depending on it, but I can't seem to make it so that when I add a new file into that directory, a new button comes up on the menu and I don't have to change my flash file.

View 9 Replies

ActionScript 2.0 :: Making A For-loop With Button Variable?

Jul 31, 2002

The situation is like this:I have Five buttons named button1 to Button5.What I want is to make one button invisible.To to this I have a for 1 to 5 -loop and I want to make one button invisible if it meets certain criteria.Is this possible without make an if-line for each button or not??

View 4 Replies

ActionScript 2.0 :: Using MovieClipLoader And Making A Loop To Find The End Of A Loaded Swf?

Feb 16, 2009

I'm using MovieClipLoader to load in external swfs so that I don't need to include a preloader on each one. I'm really unfamiliar with this technique, including how to use and implement listeners and follow the functionality after using it, I've just been playing with borowed code.basically i've been trying to use this code:

Code:
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);

[code].....

View 4 Replies

ActionScript 2.0 :: [FMX] Create Those Antenna Waves As In Making Alpha Go To 10% Or So In A Continuous Loop?

Jun 25, 2003

posting after a long while, so i thought i'd actually follow the rules for posting,.. I am trying to get this waves thing done, here is the sketch [URL]I am trying to create those antenna waves as in making alpha go to 10% or so in a continuous loop....

View 3 Replies

ActionScript 2.0 :: Make A Preloader For A Little Flash Project That Involves Re-assembling A Load Of Rectangles To Make Up A Pattern?

Aug 4, 2007

I'm trying to make a preloader for a little flash project that involves re-assembling a load of rectangles to make up a pattern.Idea is that instead of the usual load bar i wanted to make use of this pattern that is relevant to the project and have it rebuild it self with these rectangles flying in from the side. So far I have got the tweening sorted using the tween class and staggered the 42 (yes took a little while, probably an easier way so let me know on that also) rectangles using 'setTimeout' so it releases each 100milliseconds after the one one before it. This probably the wrong way to do it but i wanted to check how it looked and this was the one way i knew how to do it.

I want to make it so that these rectangles fly in a complete the pattern once the loading has finished, but on a fast connection I don't want it to rush the animation but for a slow connection I obviously want it to adjust the release time and maybe even the travel speed to compensate.

I had an idea of maybe working out the percentage loaded divided by 42 and then run an if statement to see if that percentage for that segment had been reached before 100millseconds had passed, if 100 had passed then release the rectangle, if not then hold the rectangle until 100 m/s had passed. Not sure if that is the best way to do but that's why I'm looking for some suggestions from more experienced developers.

Code:
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
// declare variables

[code]....

View 1 Replies

ActionScript 3.0 :: In-visible Sprite With Visible Children?

Sep 28, 2011

My question is: Set parentSprite.visible = false will make all children in parentSprite all invisible, right? And is there any way to just make parentSprite itself invisible without effecting it's children?

View 2 Replies

ActionScript 3.0 :: On Click Object Visible Not Visible

Aug 8, 2010

I want to click on an object and make it appear and disappear. As the object is rectangular, I figured putting a white button the same size on a white background on a layer underneath the object would do this, but I can't seem to make it happen.I'm a complete novice, frustrated as I've been trying to achieve this all day and I'm sure it should be pretty simple, but could you give me the idiots guide. I know how to name an instance, make an object, script in actions on a separate layer. I would like to draw the button myself and give it an instance rather than drag it off the button component (as I can't work out how to make the component button white, change its size etc.!)

View 5 Replies







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