ActionScript 2.0 :: Loading Specific Movieclip Based On Var
Mar 28, 2011
I have a text box which when submitted will action a specific task depending on what its contents is, so for example, you type "one" in and it will bring up a picture of a boat where as if you type in "two" and press enter it will bring up a picture of a car. Now thats all working fine, what I have an issue with though is that with several of the tasks I want it to open the same window but load different content within that window depending on what word was typed.
So if you type "one" it will load a grey window and load within that a picture of a boat, but if you type "two" it will load the same window but load a picture of a car inside it. Now the way i can see this working is when you submit the box it sets a variable and when the window loads, depending on what that variable is set to it will load the relevant info.
[code].....
I have also tried placing that last bit of code within "window" instead of "winbod" but it still doesn't work. I'm pretty new to variables so I know it will be to do with me not placing them right. Where abouts am i going wrong here?
View 4 Replies
Similar Posts:
Oct 3, 2006
Is there a way to load a MC based on an internal clock (or if that's too complicated, a digital clock based on the Digital Clock tutorial)? I also read up on the Loading Random MC tutorial, which is helpful but rather than it being random is there a way to set it so that the MC loads, for instance, everyday at noon? And it would keep this MC generated for 24 hrs until the next one that loads 24 hrs later.
View 14 Replies
Apr 13, 2011
I have a video that plays for 1.30 secs. After it has finished playing I would like to automatically load a MovieClip onto the stage, how do I create a timer element to this?
View 5 Replies
Mar 30, 2009
I looped my buttons just fine. However, I am trying to load a movieclip based on what button is clicked. the code loads the same movie everytime though.
View 13 Replies
Aug 16, 2009
I'm trying to load an external swf file into a specific sized movieclip. This is what I have written:
loadMovie("example1.swf", "pane_mc");
It doesn't work when I test it. Do I have to specify the dimensions of the movieclip? If so how do I do that?
View 1 Replies
Feb 18, 2011
Our site will be built in Actionscript 3.
1. A navigation menu that, when a button is clicked, will scroll the site quickly to a specific Y position using swfaddress.
2. The entire site is controlled by a flash scroll bar, which will be scrolling a single movieclip.
2A. The movieclip will load content corresponding to the navigation categories, all which is organized into zipped files (using this to extract the contents of each section, example: about.zip for the about section of the site)
2B. The movieclip will load multiple zipped files one by one that correspond to the navigation, in order, making the site appear to be very tall.
What we are in need of is understanding how to load multiple zipped files into a movie clip, in a specific order, and having them scroll between one another through the navigation. The separate navigation categories can be in movieclips instead of zipped files if that is easier.URL...
View 2 Replies
Feb 18, 2011
We are trying to build a site with these features:
Our site will be built in Actionscript 3.
1. A navigation menu that, when a button is clicked, will scroll the site quickly to a specific Y position using swfaddress.
2. The entire site is controlled by a flash scroll bar, which will be scrolling a single movieclip.
2A. The movieclip will load content corresponding to the navigation categories, all which is organized into zipped files (using this to extract the contents of each section, example: about.zip for the about section of the site)
2B. The movieclip will load multiple zipped files one by one that correspond to the navigation, in order, making the site appear to be very tall.
**What we are in need of is understanding how to load multiple zipped files into a movie clip, in a specific order, and having them scroll between one another through the navigation. The separate navigation categories can be in movieclips instead of zipped files if that is easier.
View 1 Replies
Dec 5, 2004
cutting to the chase, Basically im loading a movie externally using this code...
Code:
on (release) {
if (S_Init == Number(S_Init)) {
loadMovieNum("s_menu.swf", _root.S_Init);
[Code].....
View 4 Replies
Dec 5, 2004
cutting to the chase, Basically im loading a movie externally using this code...
Code:
on (release) {
if (S_Init == Number(S_Init)) {
[code].....
View 4 Replies
Mar 8, 2009
I need to have the ability to go to a specific frame in a timeline based on what the web address is. I basically want to play an intro for my index page only and skip to frame 30 for all other pages. Example [URL]
View 1 Replies
Sep 1, 2010
I'm trying to get the following movieclip smallbutton to link to frame 5 on movieclip cont.The way the timeline is built is as so:content_mc > cont > (more mcs) > smallbuttonThis seems to be an issue from every answer I've tried so far since the movieclip "cont" is not being called in the main timeline; first there's content_mc and then comes cont.How would I go about getting the movieclip "smallbutton" to link to the 5th frame of movieclip "cont"?This is for AS 2.0So far I'm at:on (release) { _root.gotoAndPlay("cont"); _root.smallbutton.gotoAndPlay(5);
View 7 Replies
Oct 5, 2011
Im using Oracle, BlazeDS, Java and Flex. I have a list of objects displayed in a datagrid(Lets call them Main-objects. Each of these objects have a set of UserComment-objects associated with them(One-to-Many relation in the DB). These comments may come from two different "types" of users, distuingished with either a 1 or 0 in the UserComment-object's "userType" field. Each time the user selects a Main-object in the datagrid, the UserComment's related to this object is displayed in a separate datagrid below.Based on the introduction, i want to separate the UserComment's into two separate datagrids (one for each user-type), instead of the one i have now. So my question is: What is the best approach for performing this task? What is the best way of separating the UserComment's into two separate data grids based on the value of the "userType" field?
View 3 Replies
Jul 12, 2009
any way to target a specific instance name based on what a variable is equal to? would be ALOT better than having to write the function 36+ times..
View 19 Replies
Feb 9, 2010
I am trying to make a light comparison chart where the lights can be turned on inividually by the user and one can be compared to another depending on which of the 6 lights you want to view.So far i have managed to make this work with 5 lights over 33 layers and diffferent buttons and different handlers for each of the buttons on each layer but as soon as the 4 and 5 light come into play everything slows down struggles and sometimes gives up.Is there a simple way of doing this which i am unaware of.I am currently using the gotoandstop comand to go to a specific frame based on the button press.
View 8 Replies
Nov 19, 2006
I was thinking that it may be possible to create a primitive, yet usable actionscript based text to speech system for Flash movies (One that is platform independent).
Is it possible to right a series of actionscript commands that would play a collection of certain sound files based on what word or words the user has entered?
For example:
If the user types "Red Pen"
Can actionscript tear apart those two words and play sound files "Arr", "ee", "Dee", "Pee", "ee" and "EN"?
If it is possible, and if someone could help me out on it, then I'll start figuring out what phonetic sounds I'll need to record and program, and see if I can't build a simple text to speech program for flash movies.I have no immediate commercial application for it, and I don't plan on one.So if I can pull it off it'll be free to everyone, source code and all. Of course, it may be in my voice, but it shouldn't be hard to take what I plan to do and use it as a template for anyone else's voice recordings.
View 2 Replies
Aug 25, 2009
Is there any way to check if any other movieclip is hitting one specific movieclip (not two specific movieclips) something like --> if(movieClip1.hitTestObject(movieClipX)){
with movieClipX being any movieclip
View 3 Replies
Jun 22, 2011
So, for sending to individual streams we have to reference the connected netStream we want to send to in some way like this:
sendStream.peerStreams[0].send("MyFunction",param1,param2);
and I have to determine which peer I'm sending to by their ID such as "peerID1234"
I know that you can check the peerID of the stream by doing:
sendStream.peerStreams[0]["farID"]
how can I make my send stream function know to use the array index where the peerID is?
so basically it could be like:
sendStream.peerStreams[where peerStreams[]["farID"] == peerID].send("MyFunction",param1,param2);
View 1 Replies
Apr 12, 2011
In fact, I make flash CD presentation in Adobe Flash CS5 AS2 (with minimal use of ActionScript). I need to load flash image gallery that I already have created, in new presentation file. Gallery was created in Flash Slideshow maker and as products I have. Swf,. XML and folders with thumbnails and picture (no. Fla file). The concept of the presentation (as root is concerned) should look like in uploaded picture "izgled otvorenog cd-a". In each of the folder on cd presentation (as on picture) is a Flash presentation controlled by their xml file whose name I must not change.
Exe file "Prezentacija 2011" is a presentation (Flash Projector) that I try to make. In the same presentation I create frames and for each of the frames added action:
loadMovie ("02_Kapije/kapije.swf", "kapije_ucitavanje");
kapije_ucitavanje._x = 23; kapije_ucitavanje._y = 167; stop ();
(Of course, for each item varies loadMovie root and instance name).
The problem is that presentations can't find xml file, apparently because they do not have the appropriate root. When all the files of the one gallery set in the same folder with the "Presentation 2011.exe" file, everything works normally (however, as I said, I cannot change the name of Xml file and that disturb the concept of my CD presentation). How can I drive loaded swf file from the above script to use Xml file in its folder? Here is my root foldersand link for presentation files : [URL].
View 5 Replies
Mar 18, 2009
how do I load video into the movie area like in the pic? where I can click on a box on bottom and the video for that will load in movie area?
View 1 Replies
Feb 2, 2010
I'm having a some trouble with loading an SWF into my main SWF. I have a main SWF with 4 frames. I want to click two buttons that will then load two SWF's into Frame 2 and Frame 3. Below is the script I wrote for the buttons. The earlywork_btn needs to load RColeman_EarlyWork.swf into frame 2. This swf is a slide show. The currentwork_btn needs to load RColemna_CurrentWork.swf into frame 3.
HERE IS MY SCRIPTS FOR MY BUTTONS:
stop();
function onbiographybuttonClick(evt:MouseEvent):void {
gotoAndStop("1");
[code]....
And in Frame 2 I have this script to load RColeman_EarlyWork.swf. It works, however, once it loads then it is in my enitre main swf file, basically each time I click a button it is ontop of the content in the other frames. How do I make it just stay in Frame 2? Also, I can only load this one swf file, not the other one into FRAME 3.
HERE IS MY SCRIPT TO LOAD THE SWF FILES:
var ldr:Loader = new Loader();
var url:String = "RColeman_EarlyWork.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);
View 1 Replies
Sep 13, 2009
I have two flash files, say a.swf and b.swf.a.swf is the main swf file, embedded in an HTML page for a webpage. There is a preloader in a.swf too. In b.swf, when I click a specific button I need to load a.swf, but not from the preloader, from the content. To be precise, the content starts from Frame 24 of a.swf (obviously Preloader ends in Frame 23). I believe, the frame 24 has to be loaded in a.swf when I click the button in b.swf.
View 2 Replies
Feb 2, 2010
I'm having a some trouble with loading an SWF into my main SWF. I have found multiple ways of doing it, but I want to find the most appropriate way for what I'm doing.
Here's what I'm doing:
I have a main SWF with 4 frames. I want to click two buttons that will then load two SWF into frame 2 and frame 3. Below is the script I wrote for the buttons. The earlywork_btn needs to load RColeman_EarlyWork.swf into frame 2. This swf is a slide show. The currentwork_btn needs to load RColemna_CurrentWork.swf into frame 3.
I'm not sure which scripts to use to load the SWF's and how to arrange it in the ActionScript panel.
ActionScript Code:
//
stop();
function onbiographybuttonClick(evt:MouseEvent):void {
[Code]...
View 5 Replies
Mar 15, 2009
I have managed to load external swf's fine and also unload them when a new one is loaded, but now I need the swf's that are loaded to appear below (meaning on a lower layer effectively) than my navigation, which is in the main swf. I hope that makes sense.I can get that to happen by creating a movieClip on the stage on a layer beneath the one my navigation is on and loading the swf into that mc, but then I don't know how to clear the swf from that mc so another one can load there in it's place.Here is the code I have so far:
Code: Select all//Universal Button Function
function buttonClick(event:MouseEvent):void
{
/*removeChild(target_mc);
[code]....
View 5 Replies
Jan 26, 2006
The webpage I am working in is one move. I want to be able though to create an html file that will start the document from a certian frame (not from the beginning). How do i do this without breaking up the whole flash file.
View 3 Replies
Mar 8, 2009
I have menu.swf which loads an external SWF (longmenu.swf)longmenu.swf has a long background on stage, which scrolls according to what the user clicks. It works fine on it's own with tweenLite. But what i need to do is to have menu.swf controls to which part of the background it scrolls or appears at once an item on menu.swf is clicked.
View 1 Replies
Mar 27, 2002
I'm trying to load my movie into a specific location...I got the code to load it properly, and now I need to know how to load it to specific X and Y positions.
View 3 Replies
Nov 6, 2002
I've come accross loadMovieNum and loadMovie, I can use them to have the swf load up in to the top left hand corner but I can't seem to find out how to script it to the area I want it to load to.
View 3 Replies
Jul 31, 2007
im trying to load an external movie clip named gallery.swf (which is based on xml) to be loaded into my main movie...
it seems my external movie clip is replacing the main movie. i want it to be loaded inside it not in place of it.
here is the code of the gallery.swf:
[CODE]var imageArray = new Array();
imageXML = new XML();
imageXML.onLoad = function ()
[Code].....
View 8 Replies
Apr 17, 2004
I'm trying to load a different .gif file based upon the time of day. I figured what I wrote would work, but alas, I was wrong. Here's what I got:
Code:
files=["sunrise.gif", "morning.gif", "midday.gif",
"afternoon.gif", "twilight.gif", "night.gif"]
var currentHour:Number = myDate.getHours();
[Code]....
I know I can take out that first array, and I do believe I can take out the minutes and seconds, but I left the code as is, in case I screwed it all up. Oh and the pictures have no paths because I imported them into the actual .fla.
View 6 Replies
Mar 12, 2005
how to use actionscript to load 1 external swf into a mc for everyday throughout a year. I want to make 365 independent swf files that load in into a particular mc based on the current date. And it'll call it based on the users system clock. Can it be done?
View 2 Replies