The solution was for me to create an image that was 4000 px wide, which would be in the underneath loader, followed by having it move the exact width of each individual image, plus 10 px before the image in the above loader would be loaded.
I know crude, but simple.
Getting ready to post another question in regards to stopping the loop in the onEnterFrame.
User Profile
Collapse
-
Two loaders interchanging images
Hi guys,
As usual, I've found some code from the net, changed it around, added some things and it works, but not exactly the way that I'd like it to work. I want it to work like the app on mtv.com, where one image remains on the main stage, then another image eases in over the top of the previous image.
Basically, I have two loaders. When the timer ends, the bottom loader assumes the image that was on the stage and the... -
Actually, mySeFunc does return a function to the Flex application and populates the datagrid with the info within the param being passed:
Here is the myActionScriptF romJavascript function within the Flex app:Code:function mySeFunc(someArrayComing) { var flexApp = FABridge.fab.root(); flexApp.myActionScriptFromJavascript(someArrayComing); }
...Code:public function
Leave a comment:
-
I'm sorry if I mis-understood, but I believe you are asking what initiates the echo. If this is the case, then the answer would be an ExternalInterfa ce.call from the Flex application, which calls a javascript function sendRequestPost 2():
...Code:var phpscript2 = '../../two_arrays_into_one.php'; function createRequestObject() { var req; if(window.XMLHttpRequest) {Leave a comment:
-
Sorry about the missing code for $myTempVar, but that is used just to add a comma to the end of each record until the end is reached:
...Code:for($i=0;$i<$count;$i++) { if($i<$count-1) { $myTempVar .= $myTempArray[$i].", "; } else { $myTempVar .= $myTempArray[$i]; } }Leave a comment:
-
Yeah, I received a different error when escaping the ":" via illegal character error message.
The thing that really bothers me about all this, is that this application worked with no errors or issues before the server crashed a week and a half ago and if I cut & paste the data generated from the PHP file directly into the JS function, then it works.
I did discover something this afternoon as to where the...Leave a comment:
-
I tried adding the "(" and ")" and it does not seem to help.
For some reason, it seems to be having an issue with the ":" character after "javascript:myS eFunc([{SHOWS:" -- it does not matter what the first entry is because I have tried to manipulate the data to have other first entries and it would still hang on the ":" after the word SHOWS of the first entry.
The weird...Leave a comment:
-
From there the javascript file takes the echo:Code:echo "javascript:mySeFunc([".$myTempVar."]);";
Which calls the function to send the array to a datagrid within a Flex app:Code:window.onload = eval(response);
...Code:function mySeFunc(someArrayComing) { var flexApp = FABridge.fab.root(); flexApp.myActionScriptFromJavascript(someArrayComing);Leave a comment:
-
The error reads exactly:
Error: missing } in XML expression
Source file: http://www.somedomain. com/someJSFile.js line 97
javascript:mySe Func([{SHOWS:"some_sh ow",GENDER:"Mal e",...
The arrow appears after the colon following SHOWS.
It's like it is not reading the entire array as a string.
Thanks in advance...Leave a comment:
-
I tried your ideas of the single "'" character and removing the escape sequences, but the same error returns. The "{" has to be part of the string being sent back to the JavaScript file, so I didn't change the "{" part of it, as you suggested.
...Code:$myTempArray[$count] .= '{SHOWS:"'.htmlentities($shows_new2).'",GENDER:"'.htmlentities($gender_new2).'",AGE:"'.htmlentities($age_new2).'",FIRST_NAME:"'.htmlentities($user_first_name_new2).'",LAST_NAME:"'.htmlentities($user_last_name_new2).'",EMAIL_ADDRESS:"'.htmlentities($emailaddress_new2).'",PHONE_NUMBER:"'.htmlentities($phone_number_new2).'",CITY:"'.htmlentities($city_new2).'",STATE:"'.htmlentities($state_new2).'",ZIP:"'.htmlentities($zip_new2).'",PICTURE:"'.htmlentities($picture_new2).'"}';Leave a comment:
-
missing } returned to AJAX posted
Hi guys, it's me one more time today.
I have a PHP file echoing an array back to a javascript file.
Here's the Array being generated:
...Code:$myTempArray[$count] .= "{SHOWS:\"".htmlentities($shows_new2)."\",GENDER:\"".htmlentities($gender_new2)."\", AGE:\"".htmlentities($age_new2)."\",FIRST_NAME:\"".htmlentities($user_first_name_new2)."\",Last edited by acoder; Mar 12 '08, 02:54 PM. -
missing } returned to AJAX
Hi guys, it's me one more time today.
I have a PHP file echoing an array back to a javascript file.
Here's the Array being generated:
...Code:$myTempArray[$count] .= "{SHOWS:\"".htmlentities($shows_new2)."\",GENDER:\"".htmlentities($gender_new2)."\",AGE:\"".htmlentities($age_new2)."\",FIRST_NAME:\"".htmlentities($user_first_name_new2)."\",LAST_NAME:\"".htmlentities($user_last_name_new2)."\",EMAIL_ADDRESS:\"".htmlentities($emailaddress_new2)."\",PHONE_NUMBER:\"".htmlentities($phone_number_new2)."\",CITY:\"".htmlentities($city_new2)."\",STATE:\"".htmlentities($state_new2)."\",ZIP:\"".htmlentities($zip_new2)."\",PICTURE:\"".htmlentities($picture_new2)."\"}"; -
Here's what I came up with, if anyone is interested:
...Code:$myComboVar = array(); $myNewCounter=0; for($someVar=0;$someVar<count($myTempArray);$someVar++) { $myTempTempVar = $myTempArray[$myNewCounter]; $myTempTempTempVar = $myTempDirArray[$someVar]; $pattern ="/([a-zA-Z0-9])+".$myTempTempTempVar."([a-zA-Z0-9_-])+/"; if(preg_match($pattern, $myTempTempVar))Leave a comment:
-
Thanks, via the two cents of a buddy I've actually came across this way of comparing arrays, but the values within the arrays are not the same so I don't know how else to compare unlike arrays.
Here are the values of one index of the myTempArray:Code:$myComboVar = array_intersect($myTempArray, $myTempDirArray);
...Code:{SHOWS:"no_show_selected ", FIRST_NAME:"tarik", LAST_NAME:"monem",Leave a comment:
-
error with strpos
Hi, here I am again :-)
I'm trying to compare the contents of two arrays and if there's a match, then I would like to place the contents of that one index of the array into a "new" third array.
Here's the code:
...Code:$myComboVar = array(); for($someVar=0;$someVar<count($myTempArray);$someVar++) { for($myNewCounter=0;$myNewCounter<count($myTempArray);$myNewCounter++) -
Thanks for the feedback guys. I did echo the string and it was fine the way that it was (I tested the echoed string by copying & pasting it into phpmyadmin sql section) and I tried addslashes and htmlentities, but I don't know why I didn't think of stripslashes.
Anyways! This was the solution that I came up with in the mean time, was to split the string and bring it back together again in PHP.
Within Flex I broke...Leave a comment:
-
dynamic string sent to db receives MySQL error near '%'
Hi Everyone,
I need your help.
I'm probably missing something simple but here's the string that I'm trying to send to the db:
[code=mysql]
Select distinct (email_address) from some_table where age BETWEEN 18 AND 19 AND state like 'ca%'
[/code]
If I copy and paste this statement directly into the SQL textarea of phpmyadmin it returns the result set that I am looking for with... -
First of all, thank you for replying and you were correct, but that wasn't all that was wrong.
After I took your suggestion:
Not only did I add a double quote following the '</a>' but I also took out the double quotes after "href" and "target"...Code:myTempArray[i] = '{LINK:"<a href=' + attr1 + ' target=_blank>' + avar[i].childNodes[0].nodeValue + '</a>"}';Leave a comment:
-
passing Arrays to flex via AJAX, receiving illegal character error
Hi Everyone,
Still a newbie with FLEX, and I've passed arrays using AJAX to FLEX before, but I've never passed links to FLEX.
Basically, this is the OUTPUT, which I wanted, but I'm given an error of "illegal character," from the JavaScript console:
...Code:Error: illegal character Source Code: javascript:mySeFunc([{LINK: \"<a href=\"http://www.mydomain.com/something\" -
OK, so I've changed the flex code to load an .swf file which can load pictures, but I'm having a hard time loading pics after the initial 25 jpegs load.
I'm trying not to load all 6,000 images into the browser's...Code:<mx:VBox> <mx:SWFLoader id="Load" source="@Embed(source='readfromdir4.swf')" height="150" width="100%"/> </mx:VBox>
Leave a comment:
No activity results to display
Show More
Leave a comment: