Setting Visibility Based On The Load?

Jul 23, 2009

so i have some thumbnails for a gallery and im trying to make them only appear if the user has loaded a thumbnail for it. i will let the code speak...

if (_root.mainarea.six.galleries[thumbnail].blank.myBytes <= 100) {
_root.mainarea.six.galleries[thumbnail]._visible = true;
} else {

[Code]....

i cant seem to get the operator or the measuring correct. is there some glaring error in the "<=" or something ?

View 9 Replies


Similar Posts:


Flex :: Setting Visibility Based On Slider?

Apr 6, 2012

I have an image gallery app that has a slider to control the width of the thumbnails that ranges from 80 to 1024. As you move the slider the thumbnails width changes to effectively scaling the image between 80px and 1024px. Below the thumbnail is some information about the image such as the name, size, dimensions, etc. There is also a set of icons that do various tasks (delete, edit, copy, etc). All of this information is located within a VBox.The problem I am having is I would like to have the VBox hide when the width of the thumbnail reaches 150 px or below. This I have been able to accomplish with the following code:

<mx:VBox visible = "{thumbnail.width &gt; 150}">The issue is that while the information within the VBox is now not visible, the real estate it takes up is not released. In other words, there is now a blank space the exact size of the VBox. What I'd like to do is to be able to release this space. I know this is probably something simple that I'm overlooking, but today my brain is just not working,

View 1 Replies

ActionScript 2.0 :: Setting Visibility For Next/Prev Buttons?

Apr 1, 2007

I have pages of info I'm pulling from external files. I want my btn_next to not be visible when the last page loads and my btn_prev to not be visible when the first page loads. The btns are actually moviclips with instance names btn_next and btn_prev Here is my code:

//Stage Scale
Stage.scaleMode = "exactFit";
width_txt.text = Stage.width;

[code]....

View 6 Replies

ActionScript 2.0 :: Setting Alpha/visibility Of Multiple Movieclips?

Apr 3, 2011

What I am trying to do I think is pretty simple.

Consider this code:

ActionScript Code:
var imageContainter:String;
var fileName:String;

[Code]....

This code appears to be working. I'm dynamically creating a bunch of movieclips that each contain an image. The also code stacks each clip on top of each other.

I'd like to be able to now set the alpha or visibility of all of those movieclips to 0 or false, except for the first one. I have other code that will set specific movieclips to display based on mouseEvents.

How do I refer to all of them? And should I be using arrays as well?

View 7 Replies

ActionScript 2.0 :: Switching Sounds Based On Visibility

Jan 4, 2011

I haven't been using Flash long enough to know if I'm using Flash 8 Actionscript or Flash MX 2004 Actionscript, etc. I don't really know the difference or where to look so an explanation about that would also be helpful.I do know I'm using Actionscript 2, in CS4.Basically I'm needing help switching between sounds based on visibility of other items.I've got 15 buttons; buttons 1 to 5 making one of objects 1 to 5 visible and turning the others off, and buttons 6 to 10 and 11 to 15 doing the same for items 6 to 10 and 11 to 15 respectively.I'm trying to make three sounds play when a point on the timeline is met. Sound 1 is dependant on which of object 1 to 5 is visible, etc.Everything I've tried has either not worked or ended up with sounds overlapping/playing oddly. I can't find anything on the internet specific enough to help, so I thought I'd ask specifically.As I've said, I'm relatively new to Actionscript.

View 3 Replies

ActionScript 3.0 :: Simple Target MovieClip - Setting Visibility True?

Feb 11, 2010

Just new to As3. I can't set visibility of movieclip inside another movieClip
ActionScript Code:
player.vidImage.visible = true;
trace(player.vidImage); // shows - [object SimpleButton]
tracing player.vidImage show [object SimpleButton]. But can't set visibility true.
VidImage is physically placed inside player MovieClip.

View 5 Replies

ActionScript 3.0 :: Control TextField Visibility Based On Segment Of Timeline?

May 9, 2011

I have 3 text fields that display weather conditions from the Weather.com XML web service.  The 3 text fields need to be visible only during a certain segment of the Flash Video that is set as the application's background.  Do I use AS3 to specify visiblity?  If so, how do I reference a certain range of frames in which the fields should be visible?

View 1 Replies

ActionScript 2.0 :: String / Variable - Get The Visibility Button On The First Swf To Affect The Visibility For The Column On The Second Swf

Jul 12, 2010

I have created a timeline with visibility button against each column. The timeline.swf is loaded into two empty movieclips to create a two-screen operation. Everything works fine except, I cannot for the life of me get the visibility button on the first swf to affect the visibility for the column on the second swf.

[Code]...

View 5 Replies

Flex :: Setting DataGridColumn's DataField Based On XML Node With Same Name

May 24, 2010

[code]I am trying to define a DataGrid such that the row nodes will represent new rows in the DataGrid and the column nodes will be used to auto-populate the DataGrid's columns. I am having a problem setting the dataField for each of the DataGridColumn ojects created.The DataGrid is created but the cell values for row 1 are all 0.51 and row 2 are 0.61.

View 1 Replies

ActionScript 3.0 :: Setting A Variable Based On The Response From A Server

Nov 11, 2010

I'm making a game that is tightly integrated into a rest service. I want to set variables based on what the server tells me the variable should be.

[Code]....

but then the parseUserRank() method can't directly return the value to userRank, so there would have to be an event dispatched when its available, then update then finally update the variable value....

View 1 Replies

ActionScript 2.0 :: Setting Dynamic Text Based On A Variable?

Jul 13, 2007

I have 8 dynamic text boxes in my scene. What I need to accomplish is setting the value of the text in the text boxes to "Ready". The number of dynamic text boxes that need to have their value set to "Ready" is based on the variable "myVar1". Which dynamic text box to begin with is based on the variable "myVar2". In the scenario below mytextbox4, mytextbox5, and mytextbox6 should all be displaying "Ready" when done.

Code:
var myVar1:Number = 3
var myVar2:Number = 4

[code].....

View 1 Replies

ActionScript 3.0 :: Setting XML Based Exam To Where There Are Two Correct Answers In A Question

Apr 9, 2009

I have an exam which pulls in questions from an XML file and to indicate what the correct answer is you would indicate in the XML as such:

[Code]...

There is one question, that is structured so there are two right answers, but when I add correct="true" to both answers I want as right only one is calculated correctly in the scoring. I thinking I need to make an adjustment in the code that pulls in the XML, but not sure where. Here is the AS code.

[Code]...

View 11 Replies

ActionScript 3.0 :: Setting Movieclips Width Dynamically Based On Text In It?

May 11, 2010

for each (var link:XML in settingsXML.links.link) {
menuItem = new MenuItem();
menuItem.menuLabel.text = link.@name;

[code]......

View 1 Replies

ActionScript 1/2 :: Setting Time To Load Mc?

Aug 19, 2010

i am creating a game that will load mangoes with numbers on it....i'm using numbers -9 to 9 i  would like to set the time of each mango to load...for example: #2  mango loads every 48th and 15th second of the time, #-5 mango loads  every 38th, 15th, 3rd second of the time left....how do I code that???
 
i have a code that loads the mangoes in random x position...but when the character caught the mango, it doesn't load again... here's a jpg of what i'm trying to do...
  
this is the code i'm using: this code is attached in the (-2) mango
 
onClipEvent (load) {
//if (_root.time == 50) {   ----------------> i tried to put an if statementto determine the loading time but doesn't work

[Code].....

View 15 Replies

Flex :: SelectedDate Not Setting Properly On Load In It

Mar 31, 2010

[code]....

I am setting my seletedDate in my DateChooser like this. The format i am getting from the Database is 2009-12-30

View 4 Replies

ActionScript 2.0 :: Load Different SWF Based On URL?

Sep 15, 2009

I was curious if it's possible to load a certain SWF file based on the URL that is viewing file. Basically it's an embedded file, so I would think that it'd need to be in the actionscript.

View 1 Replies

ActionScript 2.0 :: Setting-up Thumbnail Grid Load Order?

Oct 2, 2006

I am trying to get my thumnails to load in rows, 22 across, and up to 3 rows down. However, I can't seem to get my math right. I can get them to load up and down 3 rows, but not across first. Can anyone explain the math required to accomplish this?

View 4 Replies

Load A Set Of Cue Points Based On Which Flv Is Currently Loaded?

Jun 15, 2009

I want to load a set of cuepoints into my flv player, I have 5 flvs and I want a particular set of cues to load depending on which flv is currently playing,

View 8 Replies

ActionScript 2.0 :: Load Movie Based On Different URL?

Apr 6, 2011

I wanna make a swf movie which changes according to the page that published. I have a wordpress page and it has different (8 languages). On each language page my swf looks the same... I want that it changes in each language page for example it calls a behavior on and it calls another action oni tried this code:

function getURLhttp() {
var urlPath = ExternalInterface.call("window.location.href.toStr ing");
urlActions();

[code].....

View 0 Replies

ActionScript 3.0 :: Load SWF Into Level And Setting Height/width/location?

May 30, 2011

I gave up on Flash heavy coding when it switched to AS3. Always thought it was less intuitive, longer, and a brand new language and I got tired of trying to keep up when most of my clients did not want to pay for a full flash site. But I got this client...
 
Here's the problem, I can load a swf into my main stage or into an MC , but I cannot find out anywhere how to set parameters or load into a level so it doesn't replace the current material or fix to a size that doesn't block my other material.[code]...

View 5 Replies

ActionScript 2.0 :: Cannot Load An XML-based SWF In A Flash Project?

Feb 6, 2008

My problem seems fairly simple, however, due to my limited experience with Flash I'm having some difficulty with it. Anyway, here is my problem: i'm trying to use a Photo Gallery written in Flash. The source files for it could be found in the link below:

[Code]...

it's just so strange that merely calling the .swf from the same directory in a different Flash project is totally making this application, useless. As I mentioned earlier, I'm a beginner or less, at Flash, so please bear with me if my problem seems dumb. Nevertheless, my deepest gratitude for anyone that can help me out with this problem.

View 3 Replies

ActionScript 3.0 :: Load Video Based On URL Parameter?

Nov 20, 2009

So I downloaded this as3flvplayer script, but it hasn't been updated in over a year and has no documentation. It is based off loading the video from XML, but I would like to change it to where I can specify a URL parameter instead.

like: example.com/player.swf?v=video1.flv

Here is the original: [URL]

View 1 Replies

ActionScript 3.0 :: Load OOP SWF Into Main (timeline Based) SWF

Jan 15, 2010

I have a main swf which has as3 code on the timeline. I have created a new small swf (a picture gallery) using external .as files (OOP) that works well on its own. I want to load the small swf (through a button on an array) into the main swf. When I click on my button in the main swf, it does not load the small swf (or I think, it cannot read the classes formed through OOP). I get the following error message:TypeError: Error #1009: Cannot access a property or method of a null object reference. at classes::Script()TypeError: Error #1009: Cannot access a property or method of a null object reference.

[Code]...

View 1 Replies

ActionScript 2.0 :: Alpha Value Based On Load Status?

Mar 31, 2006

I am trying to make a buttons alpha value change if my movieclip is loaded. i've tried adding things to the buttons but couldn't get this to work, so I added this to the first frame of my movie but it doesn't work.[code]

View 9 Replies

ActionScript 2.0 :: Load Movie Based On Url Page

Apr 5, 2011

I wanna make a swf movie which changes according to the page that published. I have a wordpress page and it has different (8 languages). On each language page my swf looks the same... I want that it changes in each language page for example it calls a behavior on url...and it calls another action on url...

View 8 Replies

ActionScript 2.0 :: Timline Based Instruction To Load New .swf?

Oct 19, 2011

I just can't find the script required to automatically load another .swf when the (already) loaded movie reaches the end of the timeline.Context: 1st swf has been inserted into an html doc with a div tag. I want to add the script to the timeline of this movie.

View 1 Replies

ActionScript 2.0 :: Load Certain Jpg Files Based On A Variable

Nov 1, 2003

trying to make this load certain jpg files based on a variable, but I can't make it loop through?

[Code]...

View 4 Replies

Flash - Actionscript 3 Load PNG Onto Stage Based On Web Service Value?

May 10, 2011

I have the first two values going to separate text fields on stage, and that's working great. However, I'm now trying to implement a switch statement such that the current condition icon value in the XML is read by my script and the corresponding PNG becomes the UILoader source value. First and foremost, is UILoader the best component for use in displaying a PNG on stage?Here's my code thus far:

var src: UILoader.source=uicondicon.source;
switch(src){
case "0 PNG":

[code].....

View 1 Replies

ActionScript 3.0 :: Load XML Data Into Class-Based Model?

Feb 12, 2009

I'm new to FLEX.I've a requirement where i do have to load the data into Class Based Model(VO) from an Employee.xml which has got employeeName,departmentName,address & projectId tags.

View 0 Replies

ActionScript 3.0 :: Load Alternate SWF Based On Primary SWF's Time?

Jun 29, 2010

I need to load alternate flash content based on the end users bandwidth/ load time of pre-loader. for example:

User 1 enters home page. pre-loader SWF loads in 4 seconds or less, so the high bandwidth SWF is loaded.

User 2 enters home page. Pre-loader SWF loads in more than 4 seconds, so low bandwidth SWF is loaded.

View 2 Replies







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