ActionScript 3.0 :: Multiple External Text Calls For Image Descriptions?
Oct 21, 2010
I have a gallery page that has a UILoader Two buttons (back/next) and a Dynamic Text box.
When UILoader pulls in the new image i want to populate the text box with the description of that image. I have got the code working to pull the external text in the first time you go to the page but cannot figure out what to do to make it call the function and pass the right argument every time you click the next or back button.
Attached is my code.
var imageNumber = 1;
var textNumber = 1;
var loader:URLLoader = new URLLoader(new URLRequest("images/description"+textNumber+".txt"));
[Code].....
View 1 Replies
Similar Posts:
Oct 18, 2010
URL]
What I would like to do is add a paragraph of text describing each photo in a different text field. Im not really sure how I would do this. I assume I would add another txt field in flash and set it to dynamic. I would then give it an instance name. Im not sure how I would implement it into the xml or AS though. I know its quite simple but ive been trying for awhile now.
ActionScript Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
[Code].....
View 2 Replies
Nov 12, 2009
I have completed the Carousel part 3 tutorial and everything is working perfectly. However, I want to add a link to an external url in each of the detailed descriptions. How would I add this to the xml file?
View 2 Replies
Dec 27, 2010
In one of our project we are using flex for front end, blazeds/java in the backend. Its an existing code where services are prewritten. I have to make calls to 3 services in the backend (basically 3 remote objects) and get their result and store the result in an object and show the data of this object in a view.
Now in front end we are using Flex and Parsley Framework. I was thinking of the following approaches.
1) Making commands for each service call and storing the result in a shared object (model) and then displaying this model in the view. In this approach the problem is some services are needed in some other web pages, but they donot need the same model. How should i handle this scenario ? Should i make a asynchronous remote call and fetch the result and then again dispatch and event with the event object storing the result.
2) Making a service call , wait for the result then make another call and wait for the result and then make other call, not sure if this is the right way ?
View 2 Replies
Oct 7, 2009
Are there any known issues (and workarounds) involving multiple calls toExternalInterface.call in ActionScript 2.0?I have 3 functions, each of which calls an external JavaScript function. These 3 functions run nearly back-to-back-to-back. The first time I load the page containing my Flash movie in a browser, I see the effects of all 3 JavaScript functions, as expected. However, once I begin reloading the page a few times, I begin to randomly see the effects of only 1, 2, or 3 of the JavaScript functions. Clearing the browser cache seems to "reset" this cycle, guaranteeing all 3 calls to work again successfully.
View 1 Replies
Apr 3, 2006
Code:
interface I
{
...
}
[code]....
Thats the schematic of my the specific area of my program thats causing me trouble. In output i get "C Called" only. I'm guessing that on the return of the super() call to A() then it jumps back to C(), but id expect that the call stack could handle multiple super calls.
View 4 Replies
Aug 21, 2003
I have some code that calls multiple functions for a single movie clip during a single event. For example:
portfolioButton.onPress = function()
{
redClip.easeX(180, speed);
redClip.easeHeight(194, speed);
}
The problem is only the first function call works (redClip.easeX(180, speed)). Is there a way for both function calls to execute?
View 6 Replies
Jun 26, 2010
Is there any way to load an external image and add it to more than one movie clip?
View 3 Replies
Sep 7, 2010
I'm on Flash Builder 4.5 and I'm using remote object with amfphp and when I call two method (method1 and method2) at the same time the response of method2 always arrives after method1's response even though method2 is much more faster to return the result.re's the scenario:I set a remote object which refers to a remote php class "Newletter" which contains the sendNewsletter and getProgress methods.Here's the code:-sendNewsletter() reads the email archive and send the newsletter. After each email has sent it writes a log into the database.-getProgress() reads the log wrote by sendNewsletter, counts how many email have been sent, compares it with the total number of the email that have to be sent and return the progress percentageFrom the flex interface the users select a Newsletter to be sent and click on a "send" button which calls a function that calls the sendNewsletter() and then instantiate a loop of calls to getProgress (as you can see when getProgress returns something it calls the setProgress which updates a progress bar and calls getProgress again until the progress percentage reach 100%.
So right after I call sendNewsletter() I call getProgress() on the same remoteClass().sendNewsletter() can take several minutes to complete (in my tests for sending 4 email it takes about 4 seconds so I think that sending thousands of email will take much more!!) and the trouble I'm encountering here is that getProgress() result arrives only after sendNewsletter() concludes its execution while what I would like to achieve is:
View 6 Replies
Aug 28, 2010
I'm developing a Flex application and am having some trouble working with asynchronous calls. This is what I would like to be able do:
[Bindable] var fooTypes : ArrayCollection();
for each (var fooType : FooType in getFooTypes()) {
fooType.fooCount = getFooCountForType(fooType);[code]....
The issue I'm running into is that both getFooTypes and getFooCountForType are asynchronous calls to a web service. I understand how to populate fooTypes by setting a Responder and using ResultEvent, but how can I call another service using the result?
View 1 Replies
Jan 22, 2011
I have a web service written in ColdFusion. In this web service, there are two functions; one is to return all the questions in a quiz and the other one is to return all the answer selections to the questions in a quiz.
[Bindable]
private var questionArray:ArrayCollection;
private var cfquiz:RemoteObject;
[code]....
I have the codes above. loadQuestions is called at creationComplete to retrieve the questions. Things are working fine. What I want to do is to call another function within the same web service, returnAnswers, to return the answer options for a question. Since I have cfquiz associated to the web service already, I was using cfquiz to call returnAnswers. However, there is an event listener associated to cfquiz already, resultHandler is being called when returnAnswers comes back with the results.is it possible to check which function returns the results within resultHandler? If so, how? And second, what is the best way to handle calls to multiple functions within the same web service?
View 3 Replies
Mar 17, 2011
I am trying to make sprite sheets for rotation of DisplayObjects, and it seems that the gotoAndStop() calls are not working.Here's an example of what's going on:
function createRotationalSpriteSheet ( displayObject : DisplayObject )
{
findMaxTileDimensions( displayObject );
[code].....
View 3 Replies
Feb 23, 2012
I'm trying to call AMFPHP two times on a single ActionScript method and what happen is that only the first call succeed. The second one doesn't return an error, doesn't alertsanything, it is more likely that it doesn't even happens and I'm not sure why.Here is an example:
public function editSomething():void{
if(dgChild.selectedIndex == -1){
Alert.show("You need to select a register in order to edit it.");
[code].....
View 1 Replies
Nov 23, 2010
I am trying to create an interactive 3D canvas, e.g. it loads up the person image and loads it into several - pre warped- movieclips... trouble is when I run this:
ActionScript Code:
function imageLoaded2(e:Event):void
{
canvas_wrap_mc.canvasF_mc.addChild(imageLoader2);
[Code]....
It only executes the last one instead of them all, when I remove the last one (canvas_white_mc)... it goes to the next last one canvas_black_mc...
I'm obviously doing something wrong, and everything about addChild and loading external images for me is a bit loose weave!
View 4 Replies
Feb 19, 2010
I'm currently using AMFPHP 1.9 to make a simple flash game which uses a game server.Sometimes, I get this error (BadVersion) when there are simultaneous calls to the server.I've searched the web for some of the answers to this problem, and it seems they were answered back in 2004.Is there an updated version of how to solve this problem?I tried to change the globals.php parameters to use absolute path, like performing the below:
//$servicesPath = "services/";
//change to
$servicesPath = "/httpdocs/Flash/AMFPHP/services/";
[code].....
View 1 Replies
Jan 31, 2011
We have a flash game embedded in a web page (using SWFObject v2.2) and there are some links on the page that call into the flash in the following manner:
window.document["flashObjectId"].flashMethod();
This has worked great on all browsers we have tried including IE7 and 8, however on IE9 it generates the following error: "SCRIPT438: Object doesn't support this property or method".
It does work in compatibility mode so I tried adding a meta tag to tell IE9 to use compatibility mode by default, however that didn't work because our game runs in an IFrame within Facebook.
I have tried referencing the flash object every way I could think of in the Javascript but I always get that same error message in IE9.
View 3 Replies
Aug 17, 2011
I'm making a site that my clients will be able to log into, in order to check their status with my company.
Basically, I have the following dynamic text fields (instance names);
ActionScript Code:
/*
mayPay
junePay
julyPay
[Code]....
I will have .txt files uploaded to my server which I will be able to edit on the fly. I am just having trouble setting it up.
I can find a way where I am able to load one external text file into a dynamic text field, but not multiple..
View 1 Replies
Jul 29, 2010
I am trying to take data from a single xml file and put the data into many text fields. I can get the first child to display but I get the following error for the rest of the children:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at cell_membrane_1_fla::MainTimeline/xmlLoaded()
at flash.events::EventDispatcher/dispatchEventFunction()
[code]....
View 1 Replies
May 20, 2004
So I have this button that when I click on it I want it to load two different text files into two different text boxes. This code works just fine for loading 1 file into one box,but not when I try to do the other thing. Whats wrong with it?
Code:
on (release) {
loadText = new loadVars();
[code].....
View 3 Replies
Sep 5, 2009
I have been trying to get this working right for days and it is driving me crazy. It should be very easy, so I'm not sure what I'm missing.
I'm loading in an external text file, which is fine, but the problem is with how it is displaying.
It should look like the attached word file. But when I paste it in a text file it gets messed up. A sample of that is attached as well. I have tried making it look the same in the notepad file, but that doesn't come out right in the flash.
I have tried everything, importing as html, using xml files, copying the text into different programs and then into the text file.
View 3 Replies
Apr 1, 2010
I have to modify an existing flash 8 movie (not created by me) which uses as2, and is composed of multiple movieclips. One such movieclip holds a textbox (static) which however needs to be updated frequently to show latest news, and because of this now I have to make this movieclip's textbox to read texts from an external file instead, a text file to be precise. How to proceed with this in Flash 8 AS2, whether I need to create a new layer for the as code or add it directly to the movieclip's layer, and also the as 2 code itself, as I tried the following but it is returning an error that cannot load the text file, I also change the textbox from static to dynamic and gave it an instance name Text1 (I once tried something like this in flash cs4 and it worked fine, but in flash 8 its not working.
Code:
var timeStamp:String = "&timeStamp=" + new Date().getTime();
var noCacheUrl:String = "?noCache=" + Math.random() + timeStamp;
var myLVars = new LoadVars();
myLVars.onLoad = function(success) {
if (success){
_root.mcNews.Text1.text = this.VarEn;
}}
myLVars.load("News_En.txt"+noCacheUrl);
View 4 Replies
Apr 17, 2011
I am unable to produce the kind of synchronization effects I would like to in ActionScript. The issue is that I need to make several external calls to get various pieces of outside information in response to a user request, and the way items will be laid out on the page is dependent on what each of these external calls returns. So, I don't care that all of these calls return asynchronously. However, is there any way to force some amount of synchronization on ActionScript, so that at least calling the method for doing the final layout and placement of items on the page is dependent on all of my calls finishing?
View 1 Replies
May 7, 2010
Site loads two flash files at the same time with multiple dynamic text fields that load .html files with external css style sheets. The site works almost perfectly when viewed offline, but when you upload it the text boxes sometimes load and sometimes do not. I'm a graphic designer so I really don't know actionscript 3.0 (or any version) very well... so I'm attaching the footer .fla file which by itself suffers from the same problem, and the other files are too big to upload so here is the link to the other .fla file used on the homepage
View 3 Replies
Aug 13, 2009
OK, I've worked on this for days, I would like to make the box drag-able, however I loose my text when I add the drag function. It has something to do with the cliphandler and a conflict.Everytime I add the following code it kills my text and or image.
Code:
dragger.onPress = function() {
startDrag(_root.about);
[code].....
View 1 Replies
Jul 16, 2009
I have been trying to display this background image before the actual text displays.[code]...
View 0 Replies
Aug 29, 2011
I would like to display an items description when you "roll over" the item with the mouse (you know how a little box pops up under the mouse icon). Is there a way to do this?
View 1 Replies
Feb 20, 2012
Is there a way to send text messages through flash or air as well as make calls?
View 9 Replies
May 9, 2007
I need to dynamically load image and text (title + description) from external XML file in Flash 8 and show image in the left and all text in the right(title top then description) and scroll all the content(image + text). More than one image and text will be there.Pls send solution + fla & xml.
View 2 Replies
Dec 22, 2003
I was trying to use the photo gallery tutorial from this site the code was done by sbeener I wanted to use the same concept for adding external text for each image. So far I have only been able to figure out how to load the text but I have not figured out how to be able to change the text to correspond to the image.
[Code]....
View 6 Replies
Feb 20, 2005
I am trying to load text and image through a external .txt-file using the asfunction. So far I have managed to load the text but not the image.(The image is baseline so it should work).
View 1 Replies