Help with some script
Hi,
A customer purchased a DotComBuilder Script a few years ago and never got it to work, he now wants to get it working and wants me to add a postcode function.
That I can do.
But whatever I use to search the database, results either come out with nothing or with all results:
<?
require_once("conn.php");
require_once("includes.php");
$query = array();
if(!empty($_GET[c]))
$query[] = "cars_listings.CategoryID = '$_GET[c]' ";
if(!empty($_GET[AgentID]))
$query[] = "cars_listings.AgentID = '$_GET[AgentID]' ";
if(!empty($_GET[search_country]))
$query[] = "cars_agents.country = '$_GET[search_country]' ";
if(!empty($_GET[search_state]))
$query[] = "cars_agents.state = '$_GET[search_state]' ";
if(!empty($_GET[search_city]))
$query[] = "cars_agents.city = '$_GET[search_city]' ";
if(!empty($_GET[postcode]))
$query[] = "cars_agents.postcode = '$_GET[postcode]' ";
if(!empty($_GET[min]))
$query[] = "cars_listings.price >= '$_GET[min]' ";
if(!empty($_GET[max]))
$query[] = "cars_listings.price <= '$_GET[max]' ";
if(!empty($_GET[year1]))
$query[] = "cars_listings.VehicleYear >= '$_GET[year1]' ";
if(!empty($_GET[year2]))
$query[] = "cars_listings.VehicleYear <= '$_GET[year2]' ";
if(!empty($_GET[before]))
$MyDate = strtotime("-$_GET[before]");
$query[] = "cars_listings.DateAdded >= '$MyDate' ";
if(!empty($_GET[cars]))
$query[] = "cars_listings.VehicleMake <= '$_GET[cars]' ";
if(!empty($query))
$MyQuery = implode(" and ", $query);
$MyQuery = " and ".$MyQuery;
////////// order by
$order = array();
if(!empty($_GET[orderby]))
$MyOrder = explode("|", $_GET[orderby]);
while(list(,$ov) = each($MyOrder))
if($ov == "DateAdded")
$order[] = " cars_listings.DateAdded desc ";
if($ov == "Price")
$order[] = " cars_listings.Price asc ";
if($ov == "address")
$order[] = " cars_agents.address asc ";
else
if(!empty($_GET[p]))
$order[] = " cars_listings.Price asc ";
if(!empty($_GET[r]))
$order[] = " cars_listings.mileage asc ";
if(!empty($_GET[vehicle]))
$order[] = " cars_vehicle.VehicleName ";
if(count($order) > '0')
$MyOrder = implode(", ", $order);
if(empty($MyOrder))
$MyOrder = " order by cars_agents.PriorityLevel desc, cars_listings.DateAdded desc";
else
$MyOrder = " order by cars_agents.PriorityLevel desc, $MyOrder, cars_listings.DateAdded desc";
if(!empty($_GET[Start]))
$Start = $_GET[Start];
else
$Start = '0';
$ByPage = '20';
$q1 = "select * from cars_listings, cars_agents, cars_priority, cars_vehicle where cars_listings.AgentID = cars_agents.AgentID and cars_agents.PriorityLevel = cars_priority.PriorityLevel and cars_agents.AccountStatus = 'active' and cars_listings.VehicleMake = cars_vehicle.VehicleID $MyQuery $MyOrder limit $Start, $ByPage ";
$qnav = "select * from cars_listings, cars_agents where cars_listings.AgentID = cars_agents.AgentID $MyQuery";
$r1 = mysql_query($q1) or die(mysql_error());
$lrows = mysql_num_rows($r1);
if($lrows > '0')
$ListingTable .= "<table align=center width=100% cellspacing=0>\n";
$ListingTable .= "<tr>\n<td width=75> </td>\n\t";
$ListingTable .= "<td align=center><a class=BlackLink href=\"search.php?c=$_GET[c]&AgentID=$_GET[AgentID]&search_city=$_GET[search_city]&search _state=$_GET[search_state]&postcode=$_GET[postcode]&search_country=$_GET[search_country]&m in=$_GET[min]&max=$_GET[max]&year1=$_GET[year1]&year2=$_GET[year2]&before=$_GET[before]&ve hicle=1\">vehicle</a></td>\n\t";
$ListingTable .= "<td align=center><a class=BlackLink href=\"search.php?c=$_GET[c]&AgentID=$_GET[AgentID]&search_city=$_GET[search_city]&search _state=$_GET[search_state]&postcode=$_GET[postcode]&search_country=$_GET[search_country]&m in=$_GET[min]&max=$_GET[max]&year1=$_GET[year1]&year2=$_GET[year2]&before=$_GET[before]&r= 1\">mileage</a></td>\n\t";
$ListingTable .= "<td align=center ><a class=BlackLink href=\"search.php?c=$_GET[c]&AgentID=$_GET[AgentID]&search_city=$_GET[search_city]&search _state=$_GET[search_state]&postcode=$_GET[postcode]&search_country=$_GET[search_country]&m in=$_GET[min]&max=$_GET[max]&year1=$_GET[year1]&year2=$_GET[year2]&before=$_GET[before]&p= 1\">price</a></td>\n";
$ListingTable .= "</tr>\n</table>\n\n";
$ListingTable .= "<table align=center width=100% border=0 bordercolor=#999999 rules=rows cellspacing=0>\n";
while($a1 = mysql_fetch_array($r1))
$ListingTable .= "<tr style=\"border-width:1; border-color:#83ff4c\" onMouseOver=\"this.style.background='#ddfdcf'; this.style.cursor='hand'\" onMouseOut=\"this.style.background='none'\" onClick=\"window.open('info.php?id=$a1[ListingID]', '_top')\">\n\t";
$ListingTable .= "<td height=60>";
$ListingTable .= "<table align=center width=\"100%\">\n";
$ListingTable .= "<caption align=center>";
if($a1[PriorityLevel] > '1')
$ListingTable .= "<span class=RedLink>$a1[PriorityName] listing</span></caption>\n";
$ListingTable .= "<tr>\n\t<td width=75>";
if(!empty($a1[image]))
$images = explode("|", $a1[image]);
$MyImage = $images[0];
$ListingTable .= "<img src=\"cars_images/$MyImage\" width=75 height=60 border=1 alt=$a1[VehicleName] $a1[VehicleModel]>";
else
$ListingTable .= "<img src=\"no_image.gif\" border=1>";
$ListingTable .= "</td>\n\t";
$MyMiles = number_format($a1[mileage], 0, "", ",");
$ListingTable .= "<td width=225 valign=top><b>$a1[VehicleName] $a1[VehicleModel]</b><br>Listing ID: $a1[ListingID]</td>\n\t";
$ListingTable .= "<td width=100 valign=top align=center>$MyMiles miles<br>$a1[VehicleYear] year</td>\n\t";
$MyPrice = number_format($a1[Price], 2, ".", ",");
$ListingTable .= "<td align=center width=100 valign=top><b>£$MyPrice</td>\n";
$ListingTable .= "</tr>\n";
$ShortDesc = substr($a1[DetailedDesc], 0, 200);
$ListingTable .= "<tr>\n\t<td colspan=4>$ShortDesc</td>\n</tr>\n";
$ListingTable .= "</table>\n\n</td>\n</tr>\n\n";
$ListingTable .= "</table>";
$rnav = mysql_query($qnav) or die(mysql_error());
$rows = mysql_num_rows($rnav);
if($rows > $ByPage)
$ListingTable .= "<br><table align=center width=400>";
$ListingTable .= "<td align=center><font face=verdana size=2> | ";
$pages = ceil($rows/$ByPage);
for($i = 0; $i <= ($pages); $i++)
$PageStart = $ByPage*$i;
$i2 = $i + 1;
if($PageStart == $Start)
$links[] = " <span class=RedLink>$i2</span>\n\t ";
elseif($PageStart < $rows)
$links[] = " <a class=BlackLink href=\"search.php?Start=$PageStart&c=$_GET[c]&AgentID=$_GET[AgentID]&search_city=$_GET[se arch_city]&search_state=$_GET[search_state]&postcode=$_GET[postcode]&search_country=$_GET[ search_country]&min=$_GET[min]&max=$_GET[max]&year1=$_GET[year1]&year2=$_GET[year2]&vehicl e=$_GET[vehicle]&p=$_GET[p]&r=$_GET[r]\">$i2</a>\n\t ";
$links2 = implode(" | ", $links);
$ListingTable .= $links2;
$ListingTable .= "| </td>";
$ListingTable .= "</table><br>\n";
else
$ListingTable = "<br><br><center>No results was found!</center>";
require_once("templates/HeaderTemplate.php");
require_once("templates/SearchTemplate.php");
require_once("templates/FooterTemplate.php");
?>
Where is the SQL telling the script to take the forms variables?
Here are some links to documentation on scripting.
The FormCalc, Scripting Basics and CalcScripts files have basic scripting information. The Scripting Reference is in-depth documenation.
http://help.adobe.com/en_US/livecycle/9.0/FormCalc.pdf
http://help.adobe.com/en_US/livecycle/9.0/LiveCycle_Designer_Scripting_Basics.pdf
http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
http://help.adobe.com/en_US/livecycle/9.0/lcdesigner_scripting_reference.pdf
Similar Messages
-
How to install adobe flash player through command line with some script
Hi Guys,
Do you know how to install adobe flash player through command line with some script?
Thanks,
GalinaWindows. I tried silent install with "install_flash_player.exe /install" but it works only with one file that I downloaded from adobe.com - "install_flashplayer10_mssd_aih.exe". But it is possible to download this last file only one time, every next time it redirects me to download install_flash_player.exe file.
-
Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs
Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
Thanks,
Hussein -
Hello, I am new to java and I need a bit of help with some code that I'm writing. here is the code:
import javax.swing.*;
public class Test{
public static void main(String[] args){
JOptionPane.showMessageDialog(null,"We will now build a block with *'s","Block",1);
String input=JOptionPane.showInputDialog(null,"Type a number: ","Number",3);
int number=Integer.parseInt(input);
int count=0; int count2=0;
for(count2=0; count2<number; count2++){
for(count=0; count<number; count++){
System.out.print("* ");
System.exit(0);
}Now, all I need is to build a block of *'s with the number that the user inputs. With the code that I wrote I get the correct number of *'s but not in the form of a block. They just print out in a straight line. I know this is a very simple task but could someone please help me out? What do I need to modify in my code so that the *'s print out arranged as a block like so:
**********Your code only uses the print method which prints without a carriage return/line feed. So you need to add a line of code to print a carriage return/line feed. Where? well that is your task to work out.
-
Problem with some script--Help???
I've been trying to learn some new things with flash and
actionscript out of a book, I was trucking along nicely then I hit
this rut--
I keep getting an error with my script, but I am 99.9% sure
that the script is the same as it is in the book.
here is the code:
//----------<LoadVars>---------//
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function (success){
if (success){
_level5.loadedInfo.htmlText = myLV.info;
} else {
_level5.loadedInfo.text = "There has been an error loading
the requested information .
Please contact the Webmaster and report your error.";
//---------------</LoadVars>-----------------\\
and this is the error message:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 20:
String literal was not properly terminated
_level5.loadedInfo.text = "There has been an error loading
the requested information .
**Error** Scene=Scene 1, layer=actions, frame=1:Line 21:
Syntax error.
Please contact the Webmaster and report your error.";
**Error** Scene=Scene 1, layer=actions, frame=1:Line 22:
Expected a field name after '.' operator.
Total ActionScript Errors: 3 Reported Errors: 3
any suggestions??
thanks,
hutchsweet, that fixed the error problem. Now i have to figure out
why my text won't load. The fun of learning!! I love running into
problems and spending an insane amount of time trying to trouble
shoot them, just to find the problem to be something so simple and
minute that it makes you hate your self,--but when it all works in
the end it feels so good.
thanks,
it is much appreciated.
hutch -
Would anyone be willing to help me with a script? I need to Find the first table using "ERTStyle1" table style, convert it to text, change the text style to "Tabfix" paragraph style, then convert it back into a table using the table style "ERTStyle2" convert the top row to a header. It needs to repeat this process until there are no tables left using the "ERTStyle1" table style.
I think I could almost do this myself using VBScript, but I am relatively new to scripting, and to be honest, I am hoping I can use this script to jump start my knowledge of VB in Indesign.So all of this is just to set the column widths to the sizes pre-defined in a paragraph style, i.e., always the same?
I feel like I almost could do that in VB!
But in Javascript, all it needs is sth in the ilk of
var myWidths = [ 10, 50, 100, 50, 12 ]; // in whatever units you fancy
var myTable = app.activeDocument.stories[0].tables[0]; // (just grabbing some table)
for (i=0; i<myTable.columns.length; i++)
myTable.columns[i].width = myWidths[i % myWidths.length];
.. and the most interesting thing here (written from top of my head) is the "myWidths" lookup: it doesn't matter how many columns there are in this table, 'cause the widths array wraps around. (But you won't need this because you know all of your widths in advance.) -
Help joining some scripts together (mail enabling accounts)
Hi All,
I'm currently working on a runbook in Orchestrator for onboarding users. I need to mail enable these users in exchange and place them into a database based on the first initial of their first name.
I have adapted this script to do the enabling - http://myitforum.com/myitforumwp/2014/09/29/create-exchange-2013-mailboxes-in-bulk-using-powershell/
And i found this that will do the database part - http://blogs.msdn.com/b/akashb/archive/2008/08/07/8841495.aspx
Now i just need some help with combining the two! If anyone can help me i would be most grateful.
HughMcAs I posted above; post back with specific questions.
Start by trying to merge the scripts. Use the learning materials lined at the top of this page. When you get stuck ask a question. You will learn to write a basic script and you will end up with a useful solution to your problem.
¯\_(ツ)_/¯ -
Help with two scripts - Mounting remote DMG and Checking which network I'm connected to
Hey guys, I need some help with two separate scripts:
1. The first script I'm trying to create to mount a DMG stored remotely on another Mac using an AppleScript or shell script. Using the following:
set cmd to "hdiutil mount 'afp://username:[email protected]/Lion/Users/username/Desktop/Test.sparseim age'"
do shell script cmd
results in the following error:
error "hdiutil: mount failed - not recognized" number 1
I'm not very experienced regarding AppleScript or using hdiutil, could somebody point out what's wrong with my script?
2. The second script I'm working on to try and essentially prevent the 'Could Not Find Server' Finder dialog when a network mount is unavailable. I guess what I'd like it to do is detect which network I'm connected to, and if I'm connected to the correct network, then mount the shares, otherwise just fail silently without any errors. From the searching I've done, using try statements should do this, but they do not, and I'm still presented with an error dialog after the server cannot be found.
Does anybody have any suggestions on this script? Also, I've seen some tips regarding detecting which wireless network the Mac is connected to, which could work, but what about when connected via Ethernet?
Thanks!Edit: I need to clarify on my first script request:
I need to mount the DMG on the remote Mac, not on the Mac I'm running the script from. -
Can anyone help with the scripting on this file?
Hi, I hope someone with a bigger brain can help me out here.
I've got an existing Flash CS3 file that makes up the result at http://www.infusion-set.com/flash/Elearning/Inset30/inset30_eguide.html.
The client has asked if I could add an extra tab at the top after 'Reconnecting' called 'Contact Us' with link to an extra page. All the design has been done in ActionScript 2 with references to XML files for the dynamic content because it's been done in other languages as well.
I've amended the existing XML file with the correct references for a new page and an accompanying .swf file to play in the animation area.
I've attempted a .fla version where I duplicated one of the existing tabs script, changed the XML references and changed the variables where necessary to 'con or 'Con' (representing Contact Us). Unfortunately it made the tab menu go completely off the page and was obviously wrong in some way.
Can anyone give me a clue as to what to change here on the original file as I'm a bit of a novice with ActionScripts, hence me asking.
For reference I've attached HTML files with the original file scripts and my incorrect version. The timeline is 103 frames with the scripts placed at frame 1 and 102
Thanks.
GarryThe buttons are all created using the same library object (but MC), except for the code you have in the revised file does not call on that for the con button.
You have it calling on something with a linkage name of "con", which a quick check tells me doesn't exist--so it is undefined in the code when you try to use it. I found this by using trace(newConBut._x); after its _x value was assigned, as I mentioned you should try. So the first thing you want to do is change the following line from...
var newConBut = _root.attachMovie("con", "conbut", _root.getNextHighestDepth());
To
var newConBut = _root.attachMovie("but", "conbut", _root.getNextHighestDepth());
so that it uses the but MC that serves that purpose in the library. Then you want to correct the _x assignment of the buttons to what I think you had earlier...
newConBut._x = 650-newConBut._width;
newRecBut._x = newConBut._x-newRecBut._width;
Here is a picture of what those changes do (note, without the XML file I had to finagle things just to work, so the biutton labels aren't what they will be)... -
Help with some small things on my (very) simple live-cd.
I've been thinking about trying my arch setup on another hardware (since I've had problems with the SLiM login manager, and I suspect that I wont have those problems on other hardware, don't ask me why...:/).
So the best way I've come up with is to create a live-cd of the system, although I must admit I'm doing it mostly for fun , and it seems simpler than I had thought.
For the moment I'm temporary changing the fstab and then use mkisofs to create a bootable dvd image (with isolinux) of my root fs, and then burn it. However, having the root partition on a read-only filesystems have some obvious disadvantages.
Since the system needs to create many temporary files, It isn't possible to start x from the cd (but the terminals does start), so I need a simple way to create a ramdisk and then let all changes to the root filesystem mounted on a dvd to be saved on the ramdisk instead.
this tutorial gives a good understanding of ramdisks, but I think I'll still need a way to save the changes in places like my home directory (which is already mounted) to be placed in the ramdisk.
So anyone got any experience of using ramdisks, or having directories mounted over several places (that's whats needed here, right?)?
thanks for all help!:)
Last edited by 1311219 (2007-05-25 15:20:25)1311219 wrote:
I've been thinking about trying my arch setup on another hardware (since I've had problems with the SLiM login manager, and I suspect that I wont have those problems on other hardware, don't ask me why...:/).
So the best way I've come up with is to create a live-cd of the system, although I must admit I'm doing it mostly for fun , and it seems simpler than I had thought.
For the moment I'm temporary changing the fstab and then use mkisofs to create a bootable dvd image (with isolinux) of my root fs, and then burn it. However, having the root partition on a read-only filesystems have some obvious disadvantages.
Since the system needs to create many temporary files, It isn't possible to start x from the cd (but the terminals does start), so I need a simple way to create a ramdisk and then let all changes to the root filesystem mounted on a dvd to be saved on the ramdisk instead.
this tutorial gives a good understanding of ramdisks, but I think I'll still need a way to save the changes in places like my home directory (which is already mounted) to be placed in the ramdisk.
So anyone got any experience of using ramdisks, or having directories mounted over several places (that's whats needed here, right?)?
thanks for all help!:)
There are some scripts that already accomplish this for you. Take a look at gradgrind's work at http://four.fsphost.com/gradgrind/dev3A/index.html. He uses unionfs to accomplish what you are trying to do. -
Help With dynamic scripting for Dervied Property
Hi,
I am trying to get the the list of child nodes and then loopthorugh those nodes to do some calculation in a derived propety using dynamic scripting. I tried with below script.
var childEnumerator = node.GetChildEnumerator();
while(childEnumerator.MoveNext())
var propValue = childEnumerator.GetCurrent().PropValue("Custom.Salary");
print(propValue);
While Evaluating this script I am getting below mentioned error. Any idea what i am missing here?
DRM-16008: There was an error calculating Script property Custom.TotalSalaryExp for EMP_Zone/Emp/PPD1: TypeError: 'GetChildEnumerator' is not a function
Please help me out. thanks fr your co-operation
Regards,
SudiptaTry this instead...
var childEnumerator = node.GetChildEnumerator();
childEnumerator.MoveNext();
while(childEnumerator.GetCurrent() != null)
var propValue = childEnumerator.GetCurrent().PropValue("Custom.Salary");
print(propValue);
childEnumerator.MoveNext(); -
I'm in the process of writing a script that will copy files to various computer on my nertork using the "SCP" command.
I've managed to sort most of it out (with help from this forum)but I'm stuck at copying files with spaces in the name here's what I've got so far:
set the_file to "/Users/me/Desktop/Disc Eraser.app"
set the_Name to "/MediaFiles/Disc Eraser.app"
do shell script ("scp -B -r -p " as Unicode text) & quoted form of the_file & (" [email protected]:" as Unicode text) & quoted form of the_Name
When I run the scipt it errors with this: "scp: ambiguous target"
if I change the "set the_Name to "/MediaFiles/Disc Eraser.app"" to set the_Name to "/MediaFiles/DiscEraser.app" with no Space between Disc & Eraser the script works.
How do I get the script to accept the space?
eMac 1.25GHz (Tiger) & G5 Xserve (Tiger) Mac OS X (10.4.3)With some help from the macosxhints forum, I've used this:
set the_file to quoted form of "/Users/username/Desktop/Disc Eraser.app"
set the_Name to "/MediaFiles/" & "\"\""
set the_cmd to ("scp -B -r -p " as Unicode text)
set the_user to " install"
set the_iP to "192.168.38.46:"
do shell script the_cmd & the_file & (" " & the_user & "@" & the_iP as Unicode text) & the_Name
I don't have to worry about the destination name as it uses the orignal name.
eMac 1.25GHz (Tiger) & G5 Xserve (Tiger) Mac OS X (10.4.3)
eMac 1.25GHz (Tiger) & G5 Xserve (Tiger) Mac OS X (10.4.3) -
Hi
We have a legacy reporting app (Crystal Distribution 8.5) that relies on DLLs to export data from it to other apps such as Excel.
In XP/2003 the DLLs are installed and accessed from the WINDOWS & System32 directory but due to changes that MS made in Vista/2008 and higher the DLLS need to be installed in the user's local profile for the app to work properly on Vista/2008+. Example:
C:\Users\user.name\WINDOWS\Crystal
This has been easy to manage for the few users on Win 7 workstations but we are now making the move to Server 2008R2 RDS. Therefore using a script to put these DLLs in the right place via Group Policy when a user logs on to an RDS server (there will be
multiple and they will be load balanced) seems the logical answer.
I am not however an expert on scripting by any means. I can just about manage a logon script to map a network drive. Could do with some help on:
> A logon script that runs once per server per user that I can deploy with a GPO
> The script needs to create a directory in their local user profile path (as previously mentioned) and copy a list of DLLs to it (or just copy the "Crystal" folder to the WINDOWS folder in their local profile).
Many thanksHi Flanjman,
If the servers are deployed on server 2008 R2+, you can try a powershell script, and the script below may be helpful for you, which can create a new directory and copy the local folder to the new created folder:
$newfolder = "C:\Users\user.name\WINDOWS\Crystal"
New-Item -Path $newfolder -ItemType directory #create new folder
copy-item -Path d:\test1 -Destination $newfolder -Force -Recurse #copy all the files in the folder
Then please save the script above as .ps1 file, and follow this article to deploy in GPO:
Start Me Up: Scripting a Logon with PowerShell
Please also note, if the powershell execution policy on all the servers haven't been set to allow to run a powershell script locally, you also need delopy the execution policy in GPO firstly:
Computer Configuration\ Administrative Templates\ Windows Components\ Windows Powershell" and configure the "Turn on script execution" setting, and choose "Allow local script and remote signed scripts"
If you have any feedback on our support, please click here.
Best Regards,
Anna
TechNet Community Support -
Hi guys,
I need some scripting help with a formula I am trying to create. Basically, the RWDerived property should replace the Spaces in the descrption of a node with an underscore "_". The description property is the system description property. Thanks.
-- AdiFrom the user guide:
"The ReplaceStr function, which requires parameters for the old and new pattern, can take
comma, space, tab, crlf, cr, lf, openparen, or closeparen, in square brackets ([]), in
addition to normal text strings."
It's much better to use "[space]" in your formula so that it won't break if someone edits it and changes the way whitespace is handled down the road. That checkbox is such an annoyance! -
Help with Action script 2.0 please
Hi,
I am new to actionscript and i could really do with some help
please. I am trying to load external movie clips into two different
containers depending on which button is clicked. Sometimes there
may be two conatiners attached to a buuton click, whilst other
buttons may only need to load one movie clip. Here is the action
script i have been using:
button1.onPress = function () {
_root.createEmptyMovieClip("container", 1);
_root.createEmptyMovieClip("container1", 2);
unloadMovie("container1");
loadMovie("scene2.swf", "container");
loadMovie("scene5.swf", "container1");
container._x = 50 ;
container._y = 110 ;
container1._x = 170 ;
container1._y = 5 ;
button2.onPress = function () {
loadMovie("scene6.swf", "container");
unloadMovie("container1");
container._x = 50 ;
container._y = 110 ;
This does load the movies, however i have to press button one
first before button two will work. Ideally i need to be able to
call any movieclip at any time. Can anyone tell me where i am going
wrong?quote:
Originally posted by:
NedWebs
Try moving these lines outside of the button function:
_root.createEmptyMovieClip("container", 1);
_root.createEmptyMovieClip("container1", 2);
You can use "this" instead of "_root"... that'll save any
problem if you ever move this within some other movie. Also, move
the x/y assignments just under those lines since they relate to
them directly.
Hey thankyou for your help, that works now. although if i
move the x and y assignments i would have to create another
container right? Thanks again for your help.
Maybe you are looking for
-
I recently got new furniture, so of course, I unhooked everything and moved it around, and now, for some reason, I can't see video on my NTSC monitor. I know everything is hooked up correctly because I can log and capture and see video on the monitor
-
itunes 12.1.1.4 not run cd rom on windows xp sp3. have removed all cd burning software.
-
Dashboard Prompts Not Working in OBIEE 10g
Hi People, I developed a report with two dimension column and a fact column. NBTY Level 1 NBTY Level 2 Spend Amount NBTY Level 1 and 2 are from dimension and Spend Amount is a fact column. Both are joined in star schema. The results are correct. So
-
Execute Process Task showing all the SSIS Config variables in SQL Job History
Hi, Am using an Execute Process task to execute my child package. And executing the Parent package from a SQL JOB. I am using the same config file for both Parent and Child packages. After the Job execution was Successful / Failure, in Job history it
-
Installing Adobe Reader on an offline computer
My home PC is not connected to the internet. Is it possible for me to install the Adobe Reader on that computer?