ActionScript 3.0 :: Output And Respective Target Should Be Matched With The Question

Oct 28, 2009

i have created two arrays i.e questArray=("identify movieclip car","identify movieclip cycle","identify movieclip bus"); answerArray=(car_mc,cycle_mc,bus_mc); here when ever the question is displyed the user has to click the correct movie clip.. i.e if the question is displayed as "identify movieclip cycle" then the user has to click the cycle movie clip. here the questions will be shuffled when ever we run for output and respective target should be matched with the question. can any one give the code for my above logic

View 1 Replies


Similar Posts:


Regex :: AS3 - Getting X And Y Value Of Matched String In TextField

Jul 13, 2011

I have a text field within Flash that contains a block of (obviously) text. What I want to do is perform a search on the content of the text field that returns the x & y coordinate and the width & height of the found text. The result will be used to place a visual element over that portion of the text box.

For example:
var pattern:RegExp = /d+/g;
var found:Array = box.text.match(pattern);
var i:String;
for each(i in found) {
/**
* Find the x, y, width, height of the matched text in the text field
* Use result to place transparent yellow box around text
*/
}
Which visually should result in something like:

View 1 Replies

ActionScript 3.0 :: Check When Any String Of An Array Is Matched?

Jan 28, 2010

I am looking for a way to check if any sting of the Array is matched to the string that in the TextField. In the code it should be something like that [code]...

View 2 Replies

ActionScript 3.0 :: Check If Any String Of An Array Is Matched?

Jan 28, 2010

I am looking for a way to check if any sting of the Array is matched to the string that in the TextField. In the code it should be something like that:

ActionScript Code:
var TestString:Array = new Array ("chicken", "cat", "dog");
function LookStringArray(){

[code].....

View 4 Replies

ActionScript 3.0 :: How To Reference Respective Video From Different Class

Oct 23, 2009

I have a buttons class that puts 9 pictures on the stage and each one represents a different movie and leads to that movie when clicked (or will lead there once I figure out how to reference it to the specific movie). I have 9 movies referenced through XML. And I am using flvPlayer. Currently I can only have one movie loading. I am not sure how to get each one to play upon click of the respective btn.

Here is some of the code I think is pertinent if figuring how to go about this:
ProjectOneButtons class
//I have each picture loaded through an array and each button is waiting for the right code through a Switch statement:
public function onButtonClick(e:MouseEvent):void {
var releventImageAray:Array = this["rowOfImages" + MovieClip(e.currentTarget).row];
var imageWanted:String = relaventImageArray[MovieClip(e.currentTarget).column];
switch (imageWanted) {
case "Video1" :
[Code] .....

The reason I included a bunch of code is to show that there is a play/pause button that is supposed to play the movie. But the thing is I only have the one movie referenced and I am not sure how to have it variable as to which movie is played and make it depend on the button that is clicked from the button class above. All of this code works as it is and I am getting no errors.

View 23 Replies

ActionScript 2.0 :: Each Button To Access The Respective Image?

Aug 3, 2006

I have a series of mc's on the stage: but1, but2, but3 and I have an xml file which leads to an image. I want each button to access the respective image.
This is the code:

[code]...

I think this is the line with the problem var mc = "but"+(i+1);, because when I place but1, the but1 works.

Does anybody know which is the problem, or does anybody know a tutorial?

View 5 Replies

ActionScript 3.0 :: Timeline Which Will Display Its Respective Information?

Apr 2, 2009

the website that im working on has 5 main buttons which then navigate you to a certain frame on the timeline which will display its respective information. but within one of those pages/frames i have 3 more buttons that i want to be active and take you to another frame on the timeline.

but when i try activating them with the same as3 code that i used on the other 5 main buttons, they do not work.

View 1 Replies

ActionScript 2.0 :: Formatting XML - Roll Over On The Respective Regions?

Jul 25, 2010

I have a fla wherein when I Roll Over on the respective regions some text and images are displayed in the respective position ( text loaded in a dynamic text field). Now all these info are from XML file. I want to format it but have no idea how to do this one. I like to make it underline, want to make some paragraph , like to make some text bold and so on ...........

[code]...

View 2 Replies

IDE :: Pointer Cursor To Turn To Custom Mc When It Mouse-over Hit Area Of Respective Buttons

Jun 24, 2009

I'm working on my personal portfolio site and desperately need help with some AS3. my knowledge about AS3 is very rudimentary. Hope anyone who's I want to change the pointer cursor to custom movieclip when mouseover different invisible buttons. These buttons are mainly forward & backward button for my gallery. I got some help from other site but still unsolved. Please take a look at my fla attachment to point out what's wrong with the coding. To elaborate a little bit more as what I wish to achieve you can take a look at the sample URL...I just need the pointer cursor to turn to custom mc when it mouseover the hit area of the respective buttons.

View 6 Replies

ActionScript 2.0 :: Make A Movie Object Move Up & Down When Click On The Respective Buttons

Feb 19, 2004

I want to make a movie object move up & down when I click on the respective buttons. Now I can do this, thats easy... but what I want is when I hold down on the buttons that it moves on its own? And I don't have to go "*clicky* *clicky* *clicky* *clicky*" (thats the sound your mouse makes) To move the object up and down. Is this even possible? (enter newbie joke here)... Heres the code I got: on (press, release, keyPress "<Up>") { _root.block._y = _root.block._y + 4;} Now the other thing I want to do is have it stop at a certain height. Both at the top and the bottom of the screen. The idea being that someone can't scroll the object off the screen online tutorials? new career move?

View 1 Replies

ActionScript 3.0 :: Trace Doesn't Output Anything In The Output Window Anymore?

Nov 20, 2009

I'm quite new to AS3 (coming from php/c#) and like it very much. My problem: trace doesn't output anything in the Output window anymore?!

View 2 Replies

ActionScript 3.0 :: Trace Doesn't Output Anything In Output Window Anymore

Nov 20, 2009

I'm quite new to AS3 (coming from php/c#) and like it very much.My problem: trace doesn't output anything in the Output window anymore?!

View 3 Replies

ActionScript 3.0 :: Check If Any String Of An Array Is Matched To The String?

Feb 3, 2009

I am looking for a way to check if any sting of the Array is matched to the string that in the TextField. In the code it should be something like that:

Code:
var TestString:Array = new Array ("chicken", "cat", "dog");
function LookStringArray(){
if (TestArrayTextfield_txt.text == (anyString.TestString)){

[code]....

View 2 Replies

ActionScript 3.0 :: Load External SWFs - Parent Document Which Essentially Loads One Of The Ten Child Documents Onto The Respective Key Frame

Apr 29, 2011

I've got this interactive poem I've been working on for a class. I've basically finished each "episode" seperately. I made a parent document which essentially loads one of the ten child documents onto the respective key frame. Here's a sample of the code for the first key frame of the parent document:

stop();
import flash.net.URLRequest;
import flash.display.MovieClip;
import flash.events.Event;
stage.addEventListener(Event.ENTER_FRAME, LoadSWF2);
[Code]....

Well Two things are messed up about it, well my "ChildTimeline2" variable will off and on assosciate itslef not with the main time line of a child document, but of a nested symbol inside said child document. Even worse, the "gotoAndStop();" command I will give sometimes applies to Parent document... yaay! but often it will apply to the child document. The end result being this horrible looping moment where you are stuck in one child document for all time.

I wish I could attach the documents but they exceed the 300KB. how I can get Actionscript to listen fro the last frame of the maintimeline of the child document, or tell flash to gotoandStop for the parent document

View 4 Replies

ActionScript 2.0 :: Dynamic Text Curve (bend) And Spacing In Between The Text Through Their Respective Sliders

Oct 25, 2009

I am looking for some sample fla files in AS2 where i can see a running example of dynamic text curve (bend) and spacing in between the text through their respective sliders.

View 0 Replies

ActionScript 3.0 :: Embedded Video - When I Click A Button On The Tree, It Runs The Respective Frames Then Returns To The Tree?

Jul 5, 2010

I have a intro to a picture of a tree which has buttons on it. The intro is an embedded flv video (not using the FLV component). The video starts on frame one and runs to frame 2. The tree is on frame 3.When I click a button on the tree, it runs the respective frames then returns to the tree. When the tree appears, the sound of the video is playing in the background.How can I make this stop?

Code:
stop();
MovieClip(lion_mov).stop();
//video Mouse Click[code].....

Frame 3 just includes all the mouse clicks for the tree.

View 1 Replies

ActionScript 2.0 :: Link Input Text To A Variable And Output That Text To The Output Window Using Trace

Jul 22, 2005

I'm teaching myself ActionScript and the book I'm reading just got into input text capabilities. The book shows me how to link input text to a variable and output that text to the output window using trace. My question is: how can I display the text that the user input onto the actual movie. For example... if I wanted the visitor to type their name into the input text box and click Submit and then a phrase shows up with their name such as "Hold on Name, my site will be done soon." How do I reference that variable and have it actually display in my movie?

View 5 Replies

Data Integration :: Php Data Correct On HTML Output But Output To Flash Is Incorrect?

Jun 22, 2006

var nextY = 0;
var nextY2 = 18;
for (var count = 0; count < result_lv.typeCount; count++)
{

[code]....

The type count is correct but the information for the project is wrong.

View 1 Replies

ActionScript 2.0 :: Stop Further Items Being Dragged Onto A Target When The Target Box Is Full?

Sep 29, 2003

On the attached exercise, is it possible to stop further items being dragged onto a target when the target box is full?

View 1 Replies

Flex4 :: Difference Between Target And Current Target

Nov 28, 2011

What is the difference between target and currenttarget in flex?What is the difference between Target and Current Target in Flex especially in mouse events.

View 2 Replies

ActionScript 3.0 :: Target Movieclip With E.target?

Aug 30, 2010

qi have a movieclip which is added to the stage:

var profileholder:profileHolder=new profileHolder ;

inside of profileholder is another movieclip(infoBtn) that acts as a button.when the mouse is over profileholder i want to do something with infoBtn like:

//profOver is the over state of profileholder
function profOver(e:Event) {
e.target.infoBtn.alpha=1;
}

this doesn't work and brings up this error:ReferenceError: Error #1069: Property infoBtn not found on flash.display.Loader and there is no default value.
at main_fla::MainTimeline/profOver()

i also tried:
function profOver(e:Event) {
var item:profileHolder=e.target as profileHolder;
item.infoBtn.alpha=1;
}

and get this error:TypeError: Error #1009: Cannot access a property or method of a null object reference.

View 1 Replies

ActionScript 2.0 :: Error - Target Not Found: Target="whoweare" Base="_level0.instance20.instance48.instance49"

Mar 14, 2005

i don't know why this isn't working.i got a button. and when it's pressed, i need it to go and play a frame in a movie clip. i'll test it and then when i click on it, i get this:

Target not found: Target="whoweare" Base="_level0.instance20.instance48.instance49"

this is the code that i am using:

on (press) {
tellTarget ("whoweare") {
gotoAndPlay (51);
}
}

View 14 Replies

ActionScript 2.0 :: Target Not Found: Target="_root.icon01" Base="_level0"

Feb 16, 2005

so, i'm making an animated rollover, and i get an output error that says this:

Target not found: Target="_root.icon01" Base="_level0"

i have no idea what the base="_level0" means.

View 1 Replies

Php :: XML Output Is Different On IE?

Jul 28, 2010

I have been trying to output XML with PHP but encountered a strange(!) error in Internet Explorer. The expected xml output is this:(simplified)

<root>
<match_id>12</match_id>
<stadium_id>43</stadium_id>

[code]....

I have set the PHP header for XML output, and changed lots of other things but could not make it work.The $match->getId() part is just returning an integer but IE always shows this value as 0. If I set <fan_id> and <match_id> manually, IE shows the values correctly. By the way, I am using this XML output in Flash (AS3) and this also shows the same result with IE.

View 3 Replies

ActionScript 3.0 :: Output To Be One After Another, But Right?

Oct 17, 2009

alright, i want the output to be one after another, but right now it just overwrites a previous output in the loop. how would i get it to output one after another?

package {
import flash.display.*;
import flash.text.*;
import flash.events.MouseEvent;

[Code]...

View 2 Replies

IDE :: AS3 Compilation - Cannot Get Any Output

Jul 26, 2009

How would I go about compiling just AS3 in CS3? I tried having my .as files in a folder then creating a new .fla from within CS3 in the same folder but I cant seem to get any output.

View 3 Replies

SWF Output To LCD Projector As Presentation

Jul 22, 2010

I am still running Flash MX (04). Because I find flash a little more useable than other progs, I am using it to create a presentation. I am creating a project that I intend to only use as a standalone SWF (not uploadable to a site or anything). I intend to play the SWF full screen on a laptop and output to an LCD projector as a presentation. I have the stage set at 1024 x 768 and am using movie clips imported/embedded (which arent the full 1024x768 but slightly smaller ), text, photo's and audio. I am nearly 2/3rds the way through and the SWF file size is growing (currently at 16 meg). I expect it to be in the region of 90 meg + or so as some audio yet to be loaded and still photos are quite size heavy. Is there any way i can get the audio to sound a little clear as when the SWF is published the sound seems to lose a little quality in the compression. Also, what is the maximum size you would recommend a standalone SWF in this scenario should/could be?

View 21 Replies

ActionScript 1/2 :: Get Txt Output In A Column?

May 2, 2009

how to get output in a column in a dynamic textfield
 
instead of getting the output i.e.
 
output1, output2, output3, etc
 
I would like to have it as
 
output1
output2
output3
 
but I don't know how to make returns in flash - in php /n

View 4 Replies

Professional :: Dynamically Output A Swf?

Apr 18, 2010

if it's possible to dynamically output a swf from a playing swf? For example, if a user was running a swf movie and clicked a button, a swf could be dynamically published of a particular area within the swf.

View 9 Replies

AS3 :: Professional : Output 0# Instead Of Just # In Flash CS4?

May 5, 2010

I was wondering if there is any way to get an number output always in a two digit number, for example time:What my code does right now:

0:1
0:2
0:3
0:4

[code]....

View 2 Replies







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