ActionScript 3.0 :: Making A Universal Variable As A Counter?

Aug 19, 2009

I've got an animation that plays, and then at the end of the timeline plays a movieclip. This movieclip displays a piece of text, which is extracted from an XML file, the piece of text is selected at random currently out of a list.

Then when the clip is pressed (button), it goes back to the previous timeline, and then plays through again, including the movieclip, and now a new piece of text is picked at random and displayed.I now want to make the pieces of text display sequentially, but am having some trouble.

put in a counter, and the text that is displayed from the array corresponds with the number on the counter, unfortunately, this gets wiped every time it plays, because the counter gets remade. Is there any way to create a variable outside of the timeline maybe, in a actionscript file maybe, so that I can just add to this. I have been running a trace, and can't seem to get it to not wipe.

View 3 Replies


Similar Posts:


Sql :: Counter Variable In SQLite

Jan 5, 2010

I'm working on a simple todo app that has a column for each day of the week. On startup, the app checks to see if there are any incomplete tasks from before the current date. If so, they're moved to the top of the current date's column. The app is cloud-based, but the tasks are backed up for offline mode with an SQLite db. I can easily move the tasks by updating their date property, but I need the order property of each task to increment starting at 0 to place them at the top. I need to be able to define a count variable in SQLite alone and increment it with each update that's performed. I know this code doesn't work, but it's an easy way of explaining what needs to be done:

[Code]....

View 4 Replies

ActionScript 2.0 :: Increment The Counter Variable From Within The Function?

Dec 9, 2008

I want to import a new image ever 5 seconds but how can I increment the counter variable from within the function?

PHP Code:

count=0;
function loadimage(count) {
trace(count);

[Code]....

View 1 Replies

ActionScript 3.0 :: Counter Variable - Round To Number From Range

May 24, 2010

I'm trying to syncronize an audio and some text by highlighting it. In the main movie I have counter variable which calls charCounter3.as and timeVars variable which calls timeSettings.as I have onEnterFrame function that highlights the text while sound is playing.

My code is:
function onEnterFrame(e:Event):void {
pos=soundChannel.position;
var minutes:uint=Math.floor(soundChannel.position/1000/60);
var seconds:uint=Math.floor(soundChannel.position/1000)%60;
debug_txt.text='position: '+pos;
[Code] .....

Highlighted text needs to be updated on audio forwards and backwards. I think onEnterFrame isn't being able to catch the timeArr values.

View 2 Replies

ActionScript 3.0 :: Image Loader Slideshow With Variable Counter

Nov 11, 2010

I want when someone clicks the prev_btn for it to load imageCounter-1".jpg", but I do not know how to propperly code this. Also, is there a way to have a fixed positon for the loader's Y and also have it's X centered? The images are all the side hieht, but the widths are different.[code]

View 7 Replies

ActionScript 2.0 :: Use A Counter Variable To Increase The Depth Each Time?

May 23, 2009

I am using the attachMovie script in as2 and I want to use a counter variable to increase the depth each time so it doesn't replace the last one. Every tutorial i've seen for attachMovie mentions this but I can't find any information on how.

Also is it possible to use a different counter variable to change to y position of the attached movieclip, so that it adds another beneath the last every time.

View 2 Replies

ActionScript 2.0 :: Create A Variable That Concatenates Some Text With Loop Counter?

Dec 22, 2006

I want to create a var that concatenates some text with my loop counter, this doesn't work:

[Code]....

View 6 Replies

Java :: Is There A Universal Language

Dec 8, 2011

We're designing an app that will run on Windows, OSX, iOS, and Androids. It would be really nice to at least have most of the code in a single language rather than having to use Objective C for the Apple versions, C# or C++ for Windows, and Java for Android.We were looking at Flex (with all of its problems) as a way to avoid having to use a different language for each version, but Adobe has thrown in the towel and in the long run that's not going to do the job. Java used to promise to be universal, but it looks like Apple no longer supports it as a part of the distributed OS, and as far as I can tell Microsoft never supported it. We don't want our users to have to download and install something just so they can use our app.Is there a solution? Or are we stuck with building the app in multiple languages?

View 9 Replies

ActionScript 3.0 :: Use A Universal ClickTag ?

Oct 25, 2010

use a universal clickTag in AS3? I usually use this,

Code:

function clickThrough(e:Event):void{
trace("click through");
var destination:String = root.loaderInfo.parameters.clickTag;[code]....

but I have a site telling me they use 'clickTAG'.Is there any easy way to programmatically check and use either?

View 6 Replies

ActionScript 3.0 :: Universal Event Handler?

Nov 11, 2010

I have classes that need to communicate with each other, but are instantiated at different times.Therefore I feel I need to create a universal Event Handler that my classes can add event listeners to,and can receive dispatched events from.

View 9 Replies

ActionScript 3.0 :: Accessing Universal Time?

Oct 9, 2009

Not the OS Local time to work a couto be specific I wouold like to get hold of GMT and count from there, thus avoiding the issue where users might have the wrong date and time settings.any pointers or sites that will provide this data feed.from there I will use the UTCDate class to do the rest of the work.

var nowate = new Date();
trace(now.getUTCMonth());
trace(UTCMonthLabels[now.getUTCMonth()]);

[code]....

View 1 Replies

Media Server :: FMS With Universal Content Management (UCM)?

Dec 27, 2010

I need some advice integrating our content management system with FMS. We are currently using Oracle's Universal Content Management 10g and FMS 3.5.

I am able to get the test video to stream by creating a VOD streaming application in Flash (drag/drop FLVPlayback component and setting the content path to rtmp://serveraddress/vod/TestVideo). However, when I try to incorporate it into UCM the video doesn't load. I have tried checking the .swf skin, .swf video, AC_RunActiveContent .js file, and even the .html file (I have edited the .html file to reflect the new path for the uploaded .swf and .js files) and I still get nothing. I suspect that the .swf video file that creates the connection to the FMS server has something encoded into it that can't be called correctly once it's uploaded to UCM. If this was a traditional website where I could simply drag and drop the files generated by flash into the site's hierarchy, there would be no problem.

View 3 Replies

Flash To Make Letters Come From Around Globe Just Like On Universal Intro?

Oct 10, 2011

Is there a way in flash to make the letters come from around the globe just like on the Universal intro? [url]...

View 1 Replies

ActionScript 2.0 :: Keeping Flash Movie Size Universal?

Jan 19, 2008

what im interested in doing is, i want to create an all flash site but i want it so that whatever the screen size the user is viewing it on, that certain components on the scree stay in certain places. for exampke i want to 'bleed' the flash on the screen but whatever screen res the user has his monitor set to, that it adjusts to his size, so the name and buttons etc arent moved when the person resizes......

View 2 Replies

ActionScript 3.0 :: Video Player - Adding Universal Tooltip?

Aug 23, 2010

I've got an application (video player) that has many different interactive pieces spread throughout a handful of different classes throughout the display tree hierarchy (all children/grandchildren/great-grandchildren/etc of the same View class). I'm trying to add a universal tooltip to use throughout [URL].
Basically, the primary problems I want to solve are:
-Ideally called from or channels through a single place (for ease of updating etc).Must show above all other display objects (for instance, a tooltip that shows for a player controls button shouldn't be obscured by a menu display object that might be above it).
-Add the object once in a container/holder that's added above all the other View objects.Dispatch a custom event for every ROLL_OVER and ROLL_OUT event that needs to show/hide the tool tip.In my main (logic) class, listen for the event, and then call the method in the view class that shows/hides the tooltip.

View 2 Replies

Flash :: Professional - Exporting Animation Into A Universal Video Format?

Oct 12, 2010

Flash newbie here, using CS5 on a Mac. I've created several Flash animation files, all about 25 seconds long. The animations are fairly simple, about 6 layers each, but all contain a lot of movement. I need to turn the animations into videos that can be played on computers that don't have any Adobe programs, i.e. Quicktime. This is where my issue comes in. The published .swf files work wonderfully, but when I export the files to Quicktime video (.mov) the motion seems to leave a "trail" of images behind it. The static remnants go away after a few seconds but are replaced by new remnants of the current movement. I've played around with the quality and size of the videos, but nothing seems to have helped. I've tried used Xilisoft video converter to convert the .swf files into .avi or .mp4, but the files couldn't be uploaded. Does anyone have any recommendations as to what steps I could take to export my .fla or .swf files into high-quality video files?

View 3 Replies

ActionScript 3.0 :: Universal Video Player Which Runs On FP9 And Uses FP10 Features When Possible?

Apr 7, 2011

As in subj. Is it possible to make a video player which will run on FP9 and when FP10 is detected use some of its features as Stage video API or pixel bender shaders?.I've tried to access FP10 classes via getDefinitionByName but it doesn't work

View 2 Replies

ActionScript 2.0 :: Making A Variable With X And Y Position?

Feb 12, 2009

I am working on a client who wants a "Game-like" tour of their facilities on their website. I can use flash and do some very basic actionscript ..especially cutting and pasting

At any rate, I have character that moves on the main tour map and he starts in the parking lot...he can go from one screen ( scene ) to another. But when the character returns to the main tour map he always starts at the same location. As opposed to starting where he just came from. Such as if he just went into the "Process Plant" he should start on the main map at the "Proccessing plant" ... Can I set the X Y coordinates in some type of variable that remembers where he came from when he exits another scene and returns to the main map...?

View 6 Replies

ActionScript 3.0 :: Making A Variable Name With A String?

Jan 12, 2010

I've moved to actionscript 3.0 from PHP, and there are some things I just do not get. For example, making a variable name with another variable.Let's say I have movieclips called object1, object2, object3 and so on. I used Math.round() and Math.random() to get a random integer number, and I want to select one of my movieclips according to this number I get.
In php, you can do this:

PHP Code:
<?php
$objectNumber 1;//Let's say this is a random number

[code].....

View 8 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 :: [FMX] Making A Random Variable?

Dec 24, 2002

Making a random variable?

View 9 Replies

ActionScript 2.0 :: Making A Variable Available Outside A Function?

Feb 20, 2006

Basically I'm trying to load a variable from an external file and then make that variable available for anything.

Code:
var where;
locSource = new LoadVars ();
locSource.load("source.txt");[code]....

I've tried all the variations of this I can think of. I've defined "where" as a global variable both outside and inside the function, tried to define a separate global value within the function (and changed the syntax of the trace accordingly in either case), nothing works. Basically, the function is being loaded properly; if I put the trace inside the function it shows up perfectly, but the variable isn't available for anything else, which is what I need to happen.

View 4 Replies

ActionScript 2.0 :: Making Filename A Variable

Apr 21, 2006

it's possible to have AS take the filename of itself and make it a variable. I need it to be done by AS only. I know it's possible in PHP, but I'm not sure about AS. I'm guessing if it's possible it's one line of code. I'm using Flash 8 but publishing at Flash 6, AS 2.

View 2 Replies

ActionScript 3.0 :: Making A String Contain The Name Of Another Variable?

May 3, 2010

var myNumberArray:Array = new Array;
myNumberArray[1] = new Object;
myNumberArray[1].myProperty = 10;

[Code]....

This obviously traces out the string "myNumberArray[1].myProperty", completely disregarding that there's already a variable/property called myNumberArray[1].myProperty, which has a value of its own.

Tracing out this[myStringVariable] just gives an 'undefined'.

Is there any way to get it to trace "10", using only the 'myStringVariable'? In other words, to make AS understand that myStringVariable contains the name of another variable/property?

View 4 Replies

ActionScript 3.0 :: Making One Variable Available To Multiple Classes?

Jan 15, 2011

I'd have thought this to be simple, but nothing works. I have a game I'm working on, and in it, there will be a speed stat. The fast you are going, the faster everything else has to move to make it look like you are moving faster.The problem is, the speed stat (obviously not called speed) is one of the upgradable stats, and needs to be available for the class handling upgrades for it to be changed, and it needs to be read by the class handling moving objects.The second class however, has absolutely no idea the variable even exists. I've tried for weeks to look up a tutorial on it, but there doesn't seem to be any at all that I can find. (I am using public variables, and have tried various ways of trying to point at the class it's from but apparently I must be using the wrong syntax)

View 12 Replies

Making Something Happen After A Variable Has Been On The Stage For A Certain Time?

Dec 13, 2011

I'm making an Elder Scrolls type game and I want my enemies to hurt me after a certain time.So pretend like 5 seconds after they come on the stage they would take 5 hp off me.Then when one of the enemies die it stops until another enemy comes on the stage then it counts how long its been on the stage.This is what I have so far:

Actionscript Code:
var tmr1:Timer=new Timer(2800); var tmr2:Timer=new Timer(5000);

[code]...

View 1 Replies

Professional :: Making And Loading Variable Classes

Feb 13, 2012

AS3 says you need to load variables into a class?my variables look like this... (the whole point of playing around with variables was that if I had to make a change I could access one place and change them but now I realse that I can't access or call them outside the movie clip they are in.[code] The Wholesale price. A wholesaler is usually a big shed where goods are stored.

View 7 Replies

ActionScript 3.0 :: Making A Local Variable Global?

Sep 7, 2011

I have a problem where I make a variable in one class and change it using the constructor method in another.Is there anyway that I can make that variable available in all methods in this class? Here is the code:

[Code]...

View 3 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 :: Making An Imported Variable ( From Php ) Into A Number

Nov 2, 2004

im importing a few variables with this [code]but now how do i make a variable say root.cash into a a number which can be used in equations or used for logical compariosons such as < > ==

View 2 Replies







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