ActionScript 1/2 :: Load Captions From Array To Dynamic Text When Thumb Is Clicked
Aug 4, 2009
i have this code below that i made using a tutorial....it loads vars from txt file splits it then puts it into an array....once in an array it the brings the pics in from the array to create thumbnails and a larger image. my problem is i have captions to go with it and when i try to load the captions nothing happens or can be seen to be happening. i dont know where i am going wrong as i have no output or compiled errors
[Code]...
View 14 Replies
Similar Posts:
Aug 6, 2009
how to create a image gallery that uses arrays from a text file rather than xml (this is because the project I have now generates alot of html coding and stores it within a DB, it doesn't have any set html pages so using flash and xml is out of the question as it needs to be relative to the html page).
I have got as far as including my own way to get captions to be displayed as well....but here comes the problem, no matter what loop i have tried the captions seem to stay on the 1st caption and not change as the different thumbnails are clicked..
here is my code
Code:
var locVar = new Array();
locVar = imgLoc.split(",");
var tmbVar = new Array();
[Code].....
View 2 Replies
Apr 21, 2007
I am trying to modify the hover caption tutorial from here at Kirupa to load the text in the caption from an external text file. Could anyone give me a hand trying to figure this out?I tried the simple way of loading external text but because the text is loaded in a MovieClip this does not work. Here is my code for the hover menu that currently loads the text dynamically through ActionScript:
MovieClip.prototype.resize = function() {
var w = box.caption.textWidth+0
var h = box.caption.textHeight+0;
[code]......
View 3 Replies
Jan 7, 2009
I have my main stage, and into this main stage I am embedding another .swf file (multiple instances on a map). I would like to be able to load dynamic text from an array (addressA) on the main stage into the embedded .swf - can this be done?
Here is what I have tried, and failed with:
1) Creating a dynamic text box on the embedded .swf, giving it an instance name of markeraddy_txt, and writing AS in that .swf for markeraddy_txt.text = addressA;
2) Creating a dynamic text box on the embedded .swf, giving it an instance name of markeraddy_txt, creating a variable on the main stage of var embed = {url:'embed.swf'};, and writing AS in the main stage for embed.markeraddy_txt.text = addressA.
3) Creating a dynamic text box on the embedded .swf, giving it an instance name of markeraddy_txt, and writing AS in that .swf for markeraddy_txt.text = addressA[i];
Code:
addressA = [];
function parseXML(){ addressA.push(this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue);
[Code]....
View 2 Replies
Jun 18, 2008
i basically have a gallery with thumbs loaded in via xml. and then a currentThumb.onRollover function depending on which thumb was clicked. Now this is all within the forloop function on frame1. what if I want the actions to occur on frame 2 of the main timeline after the coinciding thumb has been clicked. How can I determine which thumb was clicked? I tried using a _global.id = i; but that doesnt store the correct value from the loop.
View 8 Replies
Sep 15, 2011
I've had this problem even in AS2 - what is going on? Why does text in a dynamic text box jump up a line when you click on that text box?
Is there no way to have selectable dynamic text without the text jumping around when clicked?
View 0 Replies
Dec 12, 2008
Using Flash CS3, v9, AS 3. I have got a Flash movie that I have set up to have captions display over it.I am using the included FLVPlayback component for the movie, and the included FLVPlaybackCaptioning component to set up the captions. My movie uses the included
[Code]...
View 1 Replies
Nov 24, 2009
Using a bunch of the tutorials on this great site, I've been teaching myself AS, and inparticular the XML parse, etc. with the loop commands to load an ideterminate number of images, etc. attributed in an XML file.I've got the attached code to work before - and it works well here too, loading all the thumbnails in their correct location, and as per the XML file. BUT now it's part of this page, the 'current_thumb' seems stuck on the last thumbnail, and a rollOver of any thumbnail will cause only the last one to action. In addition, when I put the trace command in on the onRollOut function (trace(current_thumb_mc) I get "_level0.menu_mc.item3_mc" no matter which of the four tumbnails I rollOver.
//Initial P Value
p = 0;
//Project Information
//Assigning Information[code]..........
View 1 Replies
May 1, 2009
The desired affect is simple: I have a single button... with each click I want it to load text into a dynamic text field and load a corresponding picture or movieclip.There are only three unique text/image combinations- after its displayed the third, with the next click I want it to just start over. All the text functions perfectly with each click.
The problem is:I use "createEmptyMovieClip" then use the resulting clip as a loader clip.. With the first click I want a movieclip from the library to load, so I use the "attachMovie" method- it displays the first library fine.With the next click I want to load an external swf- so I call the "loadMovie" method of the loaderclip... The external swf loads just fine replacing the first library clip.The third clip is where I have problems... now I want to load another library item into the loaderclip... so I tried using the attachMovie method again but the external swf remains static... then with the next click, I discover the first library item no longer loads and the external swf remains still playing- it's like once it's been loaded into the loaderclip it cant be moved...
So I tried adding the "unloadMovie" method in the code for the third click.. it successfully removed the swf... but the next line of code immediately after the unload statement, doesn't work. The line calls the attachMovie method for the loaderclip... but the library item doesnt load... Oddly enough, with the next click, the first library item now does load as if everything's fine... It seems like you cant use the unloadMovie and attachMovie on the same executing code? if that makes any sense... the basic idea was that if I couldnt get the attachmovie method to replace the loaded external swf, then I would use the unload method to remove it, then have code immediately after, to then execute the attachMovie method... but it still doesnt load the library clip. and I know it's not a type-o, because when I comment out the loadMovie and unloadMovie statements, it loads both the library items perfectly ? The code is below
var increment:Number = 1;
var verbiage1:String = "Hello World1";
var verbiage2:String = "Hello World2";[code].............
View 2 Replies
Mar 12, 2011
Im trying to load up images as well as text when an item is clicked on the 3D carousel. How do i go about doing this?
View 1 Replies
Aug 11, 2009
I'm having a hard time figuring out how to do something with xml in flash and don't even know where to begin.I'm building a flash piece for the header of a website that will contain six images and six captions. I plan on integrating the xml file with a cms so that the user can simply upload images and type in captions and the xml file will dynamically populate the swf.I know how to execute the back-end development with the cms and xml file, but I'm not quite sure how to tie the pieces I need from the xml to the flash file.
View 2 Replies
Feb 18, 2004
Ok basically i wana make a list box and when u click somethign in the list box it shows a thumbnailed image and a caption under it. i found this script which i think is the script im lookin for
var loadText = new LoadVars();
loadText.load("infolist.txt");
loadText.onLoad = function(success) {
[Code]....
View 10 Replies
Aug 11, 2004
i have a movie that has captions on different frames and that works but when i load a movie that also has captions for areas it does not work.
this is the caption code that is loaded in the main movie first frame.
/*tooltip metod for MovieClip object
parameters definition:
m= the message for tooltip.
[Code].....
then i have a invisible movie clip named Laurel that when you mouse over it should show up.
View 1 Replies
Nov 21, 2007
I have a script that's creating 2 empty movie clips and then adding thumb nails into the second one. then finaly drawing a shape and adding a dynamic mask on top
i.e. _level0.emptyClip1.emptyClip2 -->thumb1thumb2thumb3etc..the problem is, I want to add blur when im scrolling to emptyClip1 or even emptyClip2, but alas not luck. The weird things is, as Im trying to figure this out, I found that I could add blur to the thumbs themselves but not to their parent clip. I've been trying to figure this on my own for a week, with no avail.
View 1 Replies
Jul 19, 2006
I have completed the xml thumbnail gallery and it works standalone. I want to load it into another swf which is part of my main movie. The only problem is that when i do this the XML doesnt seem to load. If anyone could shed some light on this, that would be great. U can dl the FLA's below. Completed Gal here. Loaded into another clip here.
View 2 Replies
Oct 31, 2010
I'm developing an application in Flex 3.5 for video tutorials, which uses a lot of Captivate 4 (AS3) videos (>200). In the front end, the user can navigate thorough the videos in a menu structure. In the administration part, the admins can upload more videos and organize them into the menu structure. Since we have more than 200 Captivate videos, we wanted to build in a search functionality into the fronted, which would be based on the text contents of the Captivate videos. The idea is: every time the admin uploads a new Captivate video into the system, an index will be created based on the contents of the video.
My question: how can I extract the text captions of a Captivate video using Flex or rather ActionScrip 3? (I know, there is an Export/Import function of Captivate, but I would like to access those texts dynamically from Flex.)
View 1 Replies
Aug 4, 2009
I have built a website that pulls languages from multiple XML sources.I have been able to do Russian, Spanish, French, English and Italian, now I am stuck on Japanese.[code]...
View 0 Replies
Jan 22, 2012
I'm new to Flex. Let's say we have a web application that needs to download several series of data (several thousand numbers) used by one screen.When the user leaves that screen and later returns to it (in the same session; that is, the user hasn't logged out then logged back in), should the application fetch the original downloaded data from cache or simply download it again? What are pros and cons of each and are there any general rules of thumb to follow when it comes to re-downloading data (e.g. again) versus simply getting it from cache? The goal would be to minimize user's wait time as long as there's no drawback.
View 1 Replies
Feb 9, 2010
I have a flash file with about 32 empy MovieClips on the stage.Basically what I need to do is take an array of images and load them into these empty MovieClips. Hope this makes sense so far.This array will be dynamic and will come from a PHP file.The problem is I'm not sure how to do this? I don't know to take an array in flash and allocate the images to individual MovieClips.
View 1 Replies
Dec 9, 2003
I am trying to build a flash slideshow that uses XML to call up images and text captions. I 've found a good example of what I am looking for on macromedia's website.found here: http:[url]...
I would like to add the ability to fade between images and have a button that creates a larger jpg version in a popup window for whatever image is being displayed as current in the slideshow.Would I need 2 XML files for this or can I just use one? I prefer one. Sorry I am quite new to XML, this is my first foray into it.I can build this thing w/o XML, but it seems to be so much easier if I did it with XML.
View 7 Replies
May 11, 2003
Is there any way to make line breaks when you load text into a dynamic text box, other than using html? And if not, could someone give me an example of how to do it using html?
View 12 Replies
Oct 8, 2011
So I'm loading text from an external file I've uploaded onto the internet. It loads absolutely fine when I test the movie from my computer, but when I upload it and embed it onto an html page, all of the dynamic text refuses to load. Can someone enlighten me as to what's going on? Or at least tell me how to fix it? XD;
[Code]...
View 9 Replies
Jan 13, 2010
I'm using Flash 8 and I'm trying to load new text into a dynamic text box already populated by a xml file.
I have a home page with 5 different buttons on the top menu.
1. Home
2. News
3. Tips
and a few more.
Upon my home page loading, I have a dynamic text box with the welcome text which is populated by my xml file, here is my code for AS2:
function loadXML(loaded) {
if (loaded) {
_root.home = this.firstChild.childNodes[0].childNodes[0];
_root.tips = this.firstChild.childNodes[1].childNodes[0];
[Code].....
What I want to do is load the news and tips text into the same dynamic text box on the home page when the news or tips button is clicked, so I don't have to load a whole new swf for each category thus making the site faster.
What code would I have to use to clear the text from the xml file and how would I load my new text upon clicking the button?
View 0 Replies
Jun 1, 2010
I cant load and external text file into my dynamic text box...when i trace the loaded var it can be found, but when it's loaded inside the text box, the value that appears is really strange.i tried to load the vars into the MC and on a level, the result is the same, it can be traced but does not appear correctly on the textbox..the code i used is here..i made a text box with about_us instance name, loaded the variables and tried to load my text inside it by setting the text property of the textbox but as u will see...
loadVariables("about.txt", "this");
about_us.text = about;
View 3 Replies
Mar 29, 2004
am setting up a webpage with Flash MX. On the homepage I have a dynamic text box with links to the left (currently the links are just typed words). We want it to setup so that when a user clicks a link (such as "HOME") it will access text from a .txt file and load it into the dynamic text box. We want all of the links ("HOME", "PERSONNEL", "RECRUITS", "CONTACT US") to load their text from a seperate .txt file into that same dynamic text box.
[Code]...
View 4 Replies
Jan 18, 2005
When a user enters the website, it will pull text from some location (possibly an XML file) and load it into a text field. The trick is that I want it to randomly load a different chunk of text in each time the user opens the site. There are about 25 different small pieces of text I want to randomly load.
I'm thinking of using XML to store the 25 different text sentences, but am open to other ideas.
View 2 Replies
Oct 17, 2006
I am trying to have a dynamic text field that will load English text. using
Code:
loadVariables("content/english/text.txt.", this);
I want to have a button that on user click it would change the loaded text to spanish lets say or german.
View 4 Replies
Oct 18, 2007
I need text to be displayed with some movie clips or smileys with it in dynamic text box. Like the below but when i tried to do this i am getting some thing like this it is registering with left or right only. how to rectify it? I am using html output for attaching the clip with text for output
View 4 Replies
Mar 23, 2010
I put my mc's in an array.I have another array with strings.when the mc is clicked I want to get its position in the mc array and return the string from the same position in the string array.How do I do that?
PHP Code:
var numBtnArray:Array = new Array;
function addNumButtonsToStage():void{
[code].....
View 4 Replies
Aug 7, 2006
I have several dynamic text fields and I am trying to mask them but whenever they are masked the text does not load. The txt fields works fine and load fine until they are masked. Anybody know what causes this and how to fix it?
View 2 Replies