Change Camera Auto Orientation with Script
Hello,
I'm trying to figure out how to change the auto-orient setting for a camera in my script. From page 41 of the AE scripting guide it looks like I should be able to affect auto orient with
" app.project.item(index).layer(index).autoOrient " this allows me to pull up a numeric value for auto orient, however, I'm not really sure how I could go about setting this to a false, I've tried assigning it to false directly but that doesn't seem to work. The guide says to use "AutoOrientType.NO_AUTO_ORIENT " But this if I try something like this I'm just getting undefined returned:
var myProj = app.project
var myComp = myProj.activeItem
var targetLayer = myComp.selectedLayers[0]
targetLayer.autoOrient.AutoOrientType.NO_AUTO_ORIENT
Can anyone point me in the right direction, what am I doing wrong here?
Thanks!
Try changing your last line to this:
targetLayer.autoOrient = AutoOrientType.NO_AUTO_ORIENT;
Dan
Similar Messages
-
StageOrientation without device auto-orientation
There are lots of docs and posts online about being able to use StageOrientation without a device orientation itself having to change (disabling auto-orientation). I have tried autoOrients set to false and the alternative event.preventDefault ... but nothing works. Adobe Flash always changes the device orientation when I get StageOrientation.
Is there a sample I can download? I have tried every publishing and Actionscript 3 setting/combination and it just isn't working. Auto orientation seems to be the only way to use StageOrientation.
I am using latest Adobe Flash CC 2014 and can get the app to either auto orientate and show me the StageOrientation value, or lock the orientation and get not StageOrientation value. I tried this on a few ios devices and cannot get this working right. Please help.The docs say "In some cases you may want to disable auto-orientation to ... handle resizing the stage and rotating objects yourself. You can accomplish this with ... autoOrients property and set it to false. While you will still receive the ORIENTATION_CHANGE and ORIENTATION_CHANGING events when the actual device orientation changes, the stage will not update to try and match that orientation."
This does not work in practice however (keeping in mind I have used various combinations of true and false autoOrients and preventDefault - nothing works as described, until setting autoOrients to true, but then the orientation changes, even when I use preventDefault as described in the docs!?):
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.autoOrients = false;
main.appOrientation.text = 'Loading...';
// we can control which orientations we want to allow with the following code
stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, onOrientationChanging );
function onOrientationChanging( event:StageOrientationEvent ):void {
main.appOrientation.text = StageOrientation;
// If the stage is about to move to an orientation we don't support, let's prevent it
// from changing to that stage orientation.
if(event.afterOrientation == StageOrientation.ROTATED_LEFT || event.afterOrientation == StageOrientation.ROTATED_RIGHT){
//main.appOrientation.text = 'Change';
event.preventDefault(); -
I bought this MAC from a family member. Did everything need to change items to my apple id. Today I did the update for IOS Yosemite now the app store is auto filling with someone else id?? But they seem to be my apps??
If you didn’t erase the drive and install using you AppleID, then the OS and the purchased apps are still registered to the other AppleID. You cannot change that by logging into iCloud. Apps are forever tied to the AppleID used to purchase/download them.
You have to erase the drive and download/install the Apps using your AppleID. -
Change stage dimensions with script
Is there a way to change the stage dimesions with a script
please? Relates to another post below which I can't figure
out.stage width & height properties are read only, you cant
change the stage size by using actionscript.
if you are displaying an swf object on a webpage, you may
consider to change the swf object width & height parameters
using javascript, & make sure your scaleMode is showAll.
good luck -
Drop target size/orientation with skinned List changed from 4.0 to 4.5
I have a project that we recently moved from Flex/Flash Builder 4 to 4.5. We have a skinned list with a horizontal orientation with the items in the list skinned with a button skin. The user is allowed to drag buttons from a list of available items into another list of items they want. When compiled in 4 with the 4.1 SDK, the drop area was the entire list area on the screen (it will hold about 5 of the buttons). In 4.5, the drop area is only the width of 1 button, and appears to go down vertically instead of to the right horizontally. If I extend the size of the list vertically, I can drop in any vertical position below the 'first' position, but cannot go to the right of the first position to drop.
It appears that whatever is computing the drop target area for the list is not honoring the layout of the list - it appears to always set up the drop area vertically.
Again, all of this worked as expected in 4.1, it is only after compiling in 4.5 that this started.
In addition, I had to add a call to event.stopImmediatePropagation() in the drop event handler, or else the item was added to the 'I want this' list 2x - I'm guessing 1x in my handler, and 1 additional time in a new 'automatic' drop handler for spark lists.
Any idea how to fix the drop area? It is very annoying for the users.
MarkNever mind, found the problem.
In our application, we also added a new menu and navigation bar. The navigation bar has a 'history' panel that when you click on it, it 'swings down' and the user can click prior navigation points to return to. This history panel, even though hidden with 'visible = false', was still blocking the drop area. We had to set the history panel 'enabled = false' as well as 'visible = false' when it is not on the screen. Once this was changed, it quit blocking the drop area. I found it when testing a different drag target that also fell under the 'history panel' area. -
How to change Camera settings while NetStream is published with H264 codec
Hi,
when I'm using H264 codec I can't modify my cam.setMode(w,h, fps) because my stream hangs (second call to cam.setMode() uhangs video. When I'm using Sorenson codec that same code works fine.
So my question is how can I change Camera settings when I'm publishing images from this camera with NetStream encoded with H264. I'm using Flash Player 11,3,300,270 Windows 7 64 bit ActiveX.
Swf compiled to target Flash Player 11.3, swf-version=16.
RegardsTry to unpublish/pause publishing just before setting the things on camera and resume/publish again after the settings are applied.
C -
Auto orientation does not with Maps app
iPhone 3GS with iOS 4 does not auto-orient to landscape in Maps display. Auto-orientation still works with other apps. Orientation is not locked.
Any idea what's happening?Your statement is correct. Was there a question?
-
Change Page orientation in script..?
Hi All,
i need to change change page orientation from portrait to lanscape.In the Basic settings the prientation is in disable mode even the form is in change mode...How should i change the page orientation...
Please help me to resolve this...,
Ravi
Edited by: Ravi Reddy on Aug 13, 2009 12:00 PMHi Ravi,
I could see that orientation in change mode, I suggest to show that to ur basis guy for change authorizations.
May be you are displying the form in different langauge (non-original langauage)
Sripal -
Problem with auto start-stop script
Hi to All,
Logged as root. I have create in /etc/rc.d/init.d this file and saved as dbora (Oracle Linux 5.4):
+#!/bin/sh+
+# chkconfig: 345 99 10+
+# description: Oracle auto start-stop script.+
+#+
+# Set ORA_HOME to be equivalent to the $ORACLE_HOME+
+# from which you wish to execute dbstart and dbshut;+
+#+
+# Set ORA_OWNER to the user id of the owner of the+
+# Oracle database in ORA_HOME.+
ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
+if [ ! -f $ORA_HOME/bin/dbstart ]+
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
+'start')+
+# Start the Oracle databases:+
+# The following command assumes that the oracle login+
+# will not prompt the user for any values+
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
touch /var/lock/subsys/dbora
+;;+
+'stop')+
+# Stop the Oracle databases:+
+# The following command assumes that the oracle login+
+# will not prompt the user for any values+
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
rm -f /var/lock/subsys/dbora
+;;+
esac
After creation I have execute:
*#chmod 750 /etc/rc.d/init.d/dbora*
*#chkconfig --add /etc/rc.d/init.d/dbora*
The last command return this message:
+"service dbora does not support chkconfig"+.
Can You help me? Have You an idea ?
Thank You and best regards
Gaetanosb92075 wrote:
Oracle RDBMS needs to be started by process running at OS level as owner of Oracle software; typically OS user "oracle" & not as ROOT!Ok,
But I have founded this script at [http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php].
The article report:
Article
When using RAC or ASM under Oracle 10g Release 2 or above, the Oracle Clusterware automatically starts and stops the Oracle database instances, so the following procedures are not necessary. For all other cases, you can use the methods described below.I must suppose, that the author has written an incorrect article?
Best Regards
Gaetano -
How can i change brush type with script?
I can already set the width, size of it, but i cant find out how to change the type. Even script listener dont produce the needed code for it.
Never mind. I managed to do it, script listener did produce the code, i just didnt find it at first. I meant brush style by type.
-
How to change the default orientation?
Hello,
I'm new to Adobe Flash Builder and I am currently making a mobile application for a school project. I was wondering how you change the default app orientation to landscape. I've tried going into my app.xml and change the aspect ratio to landscape with no luck, and it is very hard to find any answers on the internet. I would greatly appreciate your help.
HomeView.mxml Code:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
actionBarVisible="false" tabBarVisible="false" title="HomeView">
<fx:Declarations>
</fx:Declarations>
<s:Image left="0" right="0" top="0" bottom="0" scaleMode="zoom" smooth="true"
smoothingQuality="high" source="@Embed('file:///C:/Users/Owner/Downloads/48127-solarsystem-teaser.jpg')"/>
<s:Button x="-5" y="0" width="410" height="1504"
skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Sun)"/>
<s:Button x="444" y="852" width="80" height="80"
skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Mercury)"/>
<s:Button x="628" y="742" width="120" height="124"
skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Venus)"/>
<s:Button x="836" y="632" width="127" height="117"
skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Earth)"/>
<s:Button x="994" y="506" width="99" height="96"
skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Mars)"/>
<s:Button x="1255" y="464" width="298" height="279"
skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Jupiter)"/>
<s:Button x="1626" y="302" width="274" height="270"
skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Saturn)"/>
<s:Button x="1965" y="196" width="175" height="174"
skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Uranus)"/>
<s:Button x="2201" y="66" width="175" height="174"
skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Neptune)"/>
</s:View>
App.xml code:
<!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape").
Optional. Mobile only. Default is the natural orientation of the device -->
<!-- <aspectRatio>landscape</aspectRatio> -->
<!-- Whether the app will begin auto-orienting on launch. Optional. Mobile
only. Default false -->
<!-- <autoOrients>false</autoOrients> -->
I need to make it so that the app is permanently in landscape.
Thanks again.
8th grade student<!-- <aspectRatio>landscape</aspectRatio> -->
<!-- <autoOrients>false</autoOrients> -->
In XML, everything within <!-- and --> is a comment. You need to remove the <!-- and -->:
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients> -
How can i send an auto reply with form content to sender?
Hai!
I'm new to website building, but i already came a long way
i made a form and i like to send a auto reply with the form content (if that isnt too difficult) to the person who filled it in.
The form i made is in PHP (coding i copied partly from someone from the internet .)
You can see the from at: http://vinddit.nl/vindditnu%20php%20version.php
My PHP coding so far
<?php
// Set email variables
$email_to = '[email protected]';
$email_subject = 'Aanvraag - VINDDIT NU!';
// Set required fields
$required_fields = array('Voornaam','email','Achternaam','Plaats');
// set error messages
$error_messages = array(
'Voornaam' => 'Vul hier uw voornaam in a.u.b.',
'email' => 'Vul hier een geldig email adres in a.u.b.',
'Achternaam' => 'Vul hier uw achternaam in a.u.b.',
'Plaats' => 'Vul hier uw woonplaats in a.u.b.'
// Set form status
$form_complete = FALSE;
// configure validation array
$validation = array();
// check form submittal
if(!empty($_POST)) {
// Sanitise POST array
foreach($_POST as $key => $value) $_POST[$key] = remove_email_injection(trim($value));
// Loop into required fields and make sure they match our needs
foreach($required_fields as $field) {
// the field has been submitted?
if(!array_key_exists($field, $_POST)) array_push($validation, $field);
// check there is information in the field?
if($_POST[$field] == '') array_push($validation, $field);
// validate the email address supplied
if($field == 'email') if(!validate_email_address($_POST[$field])) array_push($validation, $field);
// basic validation result
if(count($validation) == 0) {
// Prepare our content string
$email_content = 'New Website Comment: ' . "\n\n";
// simple email content
foreach($_POST as $key => $value) {
if($key != 'submit') $email_content .= $key . ': ' . $value . "\n";
// if validation passed ok then send the email
mail($email_to, $email_subject, $email_content);
// Update form switch
$form_complete = TRUE;
function validate_email_address($email = FALSE) {
return (preg_match('/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i', $email))? TRUE : FALSE;
function remove_email_injection($field = FALSE) {
return (str_ireplace(array("\r", "\n", "%0a", "%0d", "Content-Type:", "bcc:","to:","cc:"), '', $field));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Aanvraag formulier</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.0/mootools-yui-compressed.js"></script>
<script type="text/javascript" src="validation/validation.js"></script>
<script type="text/javascript">
var nameError = '<?php echo $error_messages['fullname']; ?>';
var emailError = '<?php echo $error_messages['email']; ?>';
var commentError = '<?php echo $error_messages['comment']; ?>';
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
</script>
<style type="text/css">
</style>
</head>
<body onload="MM_preloadImages('icons/x.png')">
<p> </p>
<p>
<?php if($form_complete === FALSE): ?>
</p>
<form action="vindditnu php version.php" method="post" enctype="application/x-www-form-urlencoded" name="Form" id="commentsform">
<h1><img src="icons/vinddit3.gif" width="220" height="80" alt="logo" /></h1>
<h1>Wat zoekt u?:</h1>
<table width="690" border="0">
<tr>
<td>In welke categorie zoekt u?*</td>
<td colspan="3"><select name="Ophalen_verzenden" id="Ophalen_verzenden">
<option selected="selected">Meubels </option>
<option>Witgoed </option>
<option>Woon accesoires </option>
<option>Kleding </option>
<option>Schoenen </option>
<option>Mode accesoires </option>
<option>Speelgoed </option>
<option>Boeken, tijdschriften, papierwaren </option>
<option>Overig </option>
</select></td>
</tr>
<tr>
<td>Kleur:* </td>
<td colspan="3"><select name="kleuren" id="kleuren">
<option>Blauw</option>
<option>Rood</option>
<option>WIt</option>
<option>Zwart</option>
<option>Beige</option>
<option>Bruin</option>
<option>Geel</option>
<option>Oranje</option>
<option>Rood</option>
<option>Metallic (Bijv. Zilver/Goud/Brons/Koper</option>
<option>Meerkleurig</option>
<option selected="selected">Overig/ N.v.t</option>
</select></td>
</tr>
<tr>
<td>Merk: </td>
<td colspan="3"><input name="Merk" type="text" id="Merk5" value="<?php echo isset($_POST['Merk'])? $_POST['Merk'] : ''; ?>" />
<?php if(in_array('Merk', $validation)): ?>
<span class="error"><?php echo $error_messages['Merk']; ?></span>
<?php endif; ?></td>
</tr>
<tr>
<td>Type/Model:</td>
<td colspan="3"><input type="text" name="type" id="type" value="<?php echo isset($_POST['type'])? $_POST['type'] : ''; ?>" />
<?php if(in_array('type', $validation)): ?>
<span class="error"><?php echo $error_messages['type']; ?></span>
<?php endif; ?></td>
</tr>
<tr>
<td>Materiaal: </td>
<td colspan="3"><input name="Materiaal" type="text" id="Materiaal" value="<?php echo isset($_POST['Materiaal'])? $_POST['Materiaal'] : ''; ?>" />
<?php if(in_array('Materiaal', $validation)): ?>
<span class="error"><?php echo $error_messages['Materiaal']; ?></span>
<?php endif; ?></td>
</tr>
<tr>
<td>Maat: </td>
<td colspan="3"><input type="text" name="Maat" id="Maat" value="<?php echo isset($_POST['Maat'])? $_POST['Maat'] : ''; ?>" />
<?php if(in_array('Maat', $validation)): ?>
<span class="error"><?php echo $error_messages['Maat']; ?></span>
<?php endif; ?></td>
</tr>
<tr>
<td>Conditie*:</td>
<td colspan="3"><select name="conditie" id="conditie" >
<option>Zo goed als nieuw</option>
<option>Nieuw</option>
<option>Bebruikt</option>
<option selected="selected">Geen voorkeur </option>
</select></td>
</tr>
<tr>
<td>Ophalen/Verzenden:*</td>
<td colspan="3"><select name="ophalen" id="ophalen">
<option>Ophalen</option>
<option>Verzenden</option>
<option>N.v.t</option>
<option>Geen voorkeur </option>
</select></td>
</tr>
<tr>
<td>Prijs Min:</td>
<td><input name="prijsmin" type="text" id="prijsmin" size="10" value="<?php echo isset($_POST['prijsmin'])? $_POST['prijsmin'] : ''; ?>" />
<?php if(in_array('prijsmin', $validation)): ?>
<span class="error"><?php echo $error_messages['prijsmin']; ?></span>
<?php endif; ?></td>
<td>Prijs Max:</td>
<td><input name="Prijs" type="text" id="Prijs" size="10" value="<?php echo isset($_POST['Prijs'])? $_POST['Prijs'] : ''; ?>" />
<?php if(in_array('Prijs', $validation)): ?>
<span class="error"><?php echo $error_messages['Prijs']; ?></span>
<?php endif; ?></td>
</tr>
</table>
<h1>Opmerkingen:</h1>
<table width="690" border="0">
<tr>
<td height="25">Opmerkingen:</td>
<td rowspan="2"><textarea name="Opmerkingen" cols="67" rows="10" id="Opmerkingen"><?php echo isset($_POST['Opmerkingen'])? $_POST['Opmerkingen'] : ''; ?></textarea>
<?php if(in_array('Opmerkingen', $validation)): ?>
<span class="error"><?php echo $error_messages['Opmerkingen']; ?></span>
<?php endif; ?></td>
</tr>
<tr>
<td height="78"> </td>
</tr>
</table>
<h1>Uw Gegevens:</h1>
<table width="690" border="0">
<tr>
<td>Voornaam/Voorletters*:</td>
<td><input type="text" name="Voornaam" id="Voornaam" class='invul' value="<?php echo isset($_POST['Voornaam'])? $_POST['Voornaam'] : ''; ?>" />
<?php if(in_array('Voornaam', $validation)): ?>
<span class="error"><?php echo $error_messages['Voornaam']; ?></span>
<?php endif; ?></td>
<td>Achternaam:* </td>
<td><input type="text" name="Achternaam" id="Achternaam" class='invul' value="<?php echo isset($_POST['Achternaam'])? $_POST['Achternaam'] : ''; ?>" />
<?php if(in_array('Achternaam', $validation)): ?>
<span class="error"><?php echo $error_messages['Achternaam']; ?></span>
<?php endif; ?></td>
</tr>
<tr>
<td>Straatnaam:</td>
<td><input type="text" name="Straat" id="Straat" class='invul' value="<?php echo isset($_POST['Straat'])? $_POST['Straat'] : ''; ?>" />
<?php if(in_array('Straat', $validation)): ?>
<span class="error"><?php echo $error_messages['Straat']; ?></span>
<?php endif; ?></td>
<td>Huisnummer:</td>
<td><input name="Huisnummer" type="text" id="Huisnummer" class='invul' size="10" value="<?php echo isset($_POST['Huisnummer'])? $_POST['Huisnummer'] : ''; ?>" />
<?php if(in_array('Huisnummer', $validation)): ?>
<span class="error"><?php echo $error_messages['Huisnummer']; ?></span>
<?php endif; ?></td>
</tr>
<tr>
<td>Postcode:</td>
<td><input type="text" name="Postcode" id="Postcode" class='invul' value="<?php echo isset($_POST['Postcode'])? $_POST['Postcode'] : ''; ?>" />
<?php if(in_array('Postcode', $validation)): ?>
<span class="error"><?php echo $error_messages['Postcode']; ?></span>
<?php endif; ?></td>
<td>Plaats:* </td>
<td><input type="text" name="Plaats" id="Plaats" class='invul' value="<?php echo isset($_POST['Plaats'])? $_POST['Plaats'] : ''; ?>" />
<?php if(in_array('Plaats', $validation)): ?>
<span class="error"><?php echo $error_messages['Plaats']; ?></span>
<?php endif; ?></td>
</tr>
<tr>
<td>Email Adres:*</td>
<td colspan="3"><input type="text" name="email" id="email" class='invul' value="<?php echo isset($_POST['email'])? $_POST['email'] : ''; ?>" />
<?php if(in_array('email', $validation)): ?>
<span class="error"><?php echo $error_messages['email']; ?></span>
<?php endif; ?></td>
</tr>
<tr>
<td>Telefoonnummer:</td>
<td colspan="3"><input name="Telefoon" type="text" id="Telefoon" class='invul' value="<?php echo isset($_POST['Telefoon'])? $_POST['Telefoon'] : ''; ?>" />
<?php if(in_array('Telefoon', $validation)): ?>
<span class="error"><?php echo $error_messages['Telefoon']; ?></span>
<?php endif; ?></td>
</tr>
</table>
<p>
<label for="Straat"></label>
<label for="Huisnummer"><br />
</label>
<input type="submit" name="Submit" id="Submit" value="Verstuur" />
<input type="reset" name="Reset" id="Reset" value="Wissen" />
</p>
</form>
<?php else: ?>
<div class="bedankt">
<p>Bedankt voor uw aanvraag!</p>
<p>Wij zullen uw aanvraag zo spoedig mogelijk behandelen. Meestal duurt dit 2 a 3 werkdagen.</p>
<p><img src="icons/vinddit3.gif" width="220" height="80" alt="logo" /></p>
</div>
<p>
<script type='text/javascript'>
setTimeout("ourRedirect()", 5000)
function ourRedirect() {
</script>
<?php endif; ?>
</body>
</html>
and .JS
window.addEvent('domready', function() {
// Get the form
var form = $('comments_form');
// if the form is found...
if (form) {
// obtain error fields
var name = $('fullname');
var email = $('email');
var comment = $('comment');
// Set the default status
var isValid = true;
// input error function for the error messages
var addError = function (field, msg) {
field.addClass('error'); // Add error class to field
var error = field.getParent().getElement('span') || new Element('span', {'class': 'error'}); // add error message if not already placed
error.set('text', msg); // error text msg
error.inject(field, 'after'); // Insert error message after field
// detach error function used to delete any error messages and remove the error class
var removeError = function (field) {
field.removeClass('error'); // Remove error class from form fields
var error = field.getParent().getElement('span'); // find any existing error messages
// destroy if error message
if (error) {
error.destroy();
// insert submit form event
form.addEvent('submit', function (e) {
// Test name length
if (name.get('value').length === 0) {
isValid = false;
addError(name, nameError);
} else {
isValid = true;
removeError(name);
// check email length
if (email.get('value').length === 0) {
isValid = false;
addError(email, emailError);
// check email validity
} else if (!email.get('value').test(/^([a-zA-Z0-9\+_\-]+)(\.[a-zA-Z0-9\+_\-]+)*@([a-zA-Z0-9\-]+\.)+ [a-zA-Z]{2,6}$/)) {
isValid = false;
addError(email, emailError);
} else {
isValid = true;
removeError(email);
// check comment length
if (comment.get('value').length === 0) {
isValid = false;
addError(comment, commentError);
} else {
isValid = true;
removeError(comment);
// If form invalid then stop event happening
if (!isValid) {
e.stop();lisavs12686 wrote:
Whould it also be possible to send the sender the submited data (looking like the filled in form or so)?
not really nessecary but whould be a nice jextra
You can but you would need to send it as an html email which is much more complicated.
What you would do is build a page/table construction like below. You would need to use the php variables to echo out the information in the <td></td> cells (example below).
$reply = $_POST['email'];
$from = '[email protected]';
$replysubject = "Auto-Reply: Website Name";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: $from\r\nReply-to: $reply";
$replymessage = '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Comments from Website</title>
</head>
<body>
<table>
<tr>
<td bgcolor="#ffffff" style="font-family: verdana, arial, helvetica, sans-serif; font-size: 13px; padding: 10px 15px;">Name: </strong>'.$name.'
</td>
</tr>
</table>
</body>
</html>';
mail($reply, $replysubject, $replymessage, $headers); -
Trouble changing Camera RAW settings in Javascript (worked in CS5, but not CS6)
I just upgraded to Master Collection CS6 from Production Premium CS5, and CameraRAWOpenOptions settings in scripts that I had working in Photoshop CS5 (64-bit) using Extendscript CS5 are no longer working with Photoshop CS6. I get no error messages, but the settings I specify in the scripts (for example, CameraRAWOpenOptions.exposure=2.00) do not take effect when the image is opened. Other Photoshop properties and actions within my script are working correctly.
Note that this is an issue in Photoshop CS6. I can use Extendscript CS5 or CS6, and the result is the same.
Here is the way I am changing the settings in my script:
var RawOptions = new CameraRAWOpenOptions;
//RawOptions.settings=CameraRAWSettingsType.CUSTOM;
//RawOptions.settings=CameraRAWSettingsType.SELECTEDIMAGE;
RawOptions.settings=CameraRAWSettingsType.CAMERA;
RawOptions.exposure=+2.00;
RawOptions.vignettingAmount = 0;
RawOptions.vignettingMidpoint = 0;
RawOptions.contrast = 50;
RawOptions.saturation = 0;
RawOptions.shadows = 0;
RawOptions.luminanceSmoothing = 0;
var JPGopts = new JPEGSaveOptions;
JPGopts.quality = JPEGquality;
//Perform the loop through the files
app.open(testListing[0], RawOptions, false);
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
for (var nfile = nstart; nfile < nstop; nfile++)
app.open(testListing[nfile], RawOptions, false);
FnameSave = new File(SavePath+"/"+testListing[nfile].name);
app.activeDocument.saveAs(FnameSave, JPGopts, false, Extension.UPPERCASE);
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);I found a few of them actually work.
CameraRAWOpenOptions.tint=0; // works (-150 to 150)
CameraRAWOpenOptions.temperature=5500; // works (2000 to 50000)
CameraRAWOpenOptions.luminanceSmoothing = 0; // works 0 to 100
CameraRAWOpenOptions.saturation=50; // works =100 to 100
CameraRAWOpenOptions.vignettingAmount=0; //works -100 to 100
CameraRAWOpenOptions.vignettingMidpoint=0; //works -100 to 100
These ones do not work:
CameraRAWOpenOptions.brightness=0; // does not work (0 to 150)
CameraRAWOpenOptions.contrast=0; // does not work (-50 to 100)
CameraRAWOpenOptions.exposure = 0; // does not work (-4.0 to +4.0)
CameraRAWOpenOptions.shadows=0; // (0 to 100) does not work
CameraRAWOpenOptions.whiteBalance=WhiteBalanceType.SHADE; // does not work
I noticed that, doing File-->File Info--> "Advanced" tab-->expand "Camera Raw Properties" that the ones that do not work have mostly either been removed (brightness) or had "2012" added to their names in the XMP in the conversion from CS5 to CS6.
It appears the mapping from Javascript objects/properties to how Photoshop knows them is broken with the new version. Is there any way to fix this?
Is there an alternate way to do this by going through XMP?
Unfortunately, I'm wanting to use "exposure", which is one of the ones that is broken. My main script sets a custom exposure for each image (trying to smooth out EV jumps between successive images in a sunset time lapse). -
Photo orientation with AppleTV
Hello all
I have been having some problems with photo orientation in AppleTV screen saver and in viewing the iPhoto library on AppleTV. I did all the usual things, restarted the Apple TV, restarted computer, etc. What was really strange was the photos I had changed rotation in iPhoto were all good. It was AppleTV which wasn't seeing them as 'corrected' images. What AppleTV was doing, was seeing the original photos, rather than the edited versions (the correctly oriented photos).
What I had to do was go to the original source of the photo. So I had to click on the photo, then go to File, see original file. The original file was still in the incorrect position. Once I opened this in preview and corrected it, it seemed to work. Will keep you posted. What is also interesting to note is that AppleTV was having problems with the original picture files of photos taken with a camera, rather than with the iPhone. There seems to be a bug here about how the AppleTV sees original and corrected files when the photos are taken with a digital camera.
Keen to know what others have found.
Happy AppleTV travels everyone.Updating the information regarding photo orientation with AppleTV screen saver.
Clear instructions: Click on photo in iPhoto, then go to File, choose 'Reveal in Finder', select 'Original File'. A window opens up where the original photo file is held. Open the photo in Preview. Rotate photo as needed. Close and save. You are done. Restart your AppleTV and turn your photos on and off to share in iTunes. Ta Da, it all works and it's very easy.
Hope this is helpful. -
Auto slideshow with progressive image load
Hello everyone,
Does anyone know of a good autoplay slideshow script that
starts with the
first image on page load and then downloads the additional
images when
called? In other words, if there are 20 images in the
slideshow, it doesn't
load all 20 images before displaying the first.
I have just a couple of specific requirements.
I don't need any controls (pause, forward, etc) on it.
Most of the javascript slideshows I've looked at in Google or
have in my
snippet list have the image name hardcoded in the script.
Image1.jpg, image2.jpg, etc, which won't work.
I'll be feeding the images dynamically depending on the
category the user
chooses and the image names are variable.
I'm currently using javascript that automatically shows and
hides divs with
the same class name by changing the display style from none
to block and
back to none as it loops through them.
This works well as I can dynamically write as many divs as
needed by looping
through all the items in a category.
But alas, this one still doesn't start to run until all the
images are
downloaded.
You can see it here:
http://www.onelongfellowsquare.com/
There's actually 3 "slideshows", stacked one on top of the
next, using this
in the "Featured" section.
Thank you for any help or ideas.
Take care,
TimThanks, Jeff.
That's the functionality I was looking for.
I just need to figure out the best way to dynamically fill
the array with
image names from a database.
Take care,
Tim
"Jeff" <[email protected]> wrote in message
news:[email protected]...
> <head>
> <script language="JavaScript1.1">
> <!--
> var slidespeed=3000
> var slideimages=new
>
Array("image1.JPG","image2.JPG","image3.jpg","image4.jpg","image5.jpg","image6.jpg")
>
> var slidelinks=new Array("")
>
> var newwindow=0
>
> var imageholder=new Array()
> var ie=document.all
> for (i=0;i<slideimages.length;i++){
> imageholder
=new Image()
> imageholder.src=slideimages
> }
>
> function gotoshow(){
> if (newwindow)
> window.open(slidelinks[whichlink])
> else
> window.location=slidelinks[whichlink]
> }
> //-->
> </script>
> </head>
>
> <body>
> <a href="javascript:gotoshow()"><img
src="image1.JPG" alt="" name="slide"
> width="400" height="271" border=0
style="filter:blendTrans(duration=3)">
>
> <script language="JavaScript1.1">
> <!--
> var whichlink=0
> var whichimage=0
> var blenddelay=(ie)?
document.images.slide.filters[0].duration*1000 : 0
> function slideit(){
> if (!document.images) return
> if (ie) document.images.slide.filters[0].apply()
> document.images.slide.src=imageholder[whichimage].src
> if (ie) document.images.slide.filters[0].play()
> whichlink=whichimage
> whichimage=(whichimage<slideimages.length-1)?
whichimage+1 : 0
> setTimeout("slideit()",slidespeed+blenddelay)
> }
> slideit()
> //-->
> </script>
> </body>
>
> Jeff
>
>
>
> ----- Original Message -----
> From: "TC2112" <[email protected]>
> Newsgroups: macromedia.dreamweaver
> Sent: Saturday, January 31, 2009 7:04 PM
> Subject: Auto slideshow with progressive image load
>
>
>> Hello everyone,
>>
>> Does anyone know of a good autoplay slideshow script
that starts with the
>> first image on page load and then downloads the
additional images when
>> called? In other words, if there are 20 images in
the slideshow, it
>> doesn't load all 20 images before displaying the
first.
>>
>> I have just a couple of specific requirements.
>> I don't need any controls (pause, forward, etc) on
it.
>> Most of the javascript slideshows I've looked at in
Google or have in my
>> snippet list have the image name hardcoded in the
script.
>> Image1.jpg, image2.jpg, etc, which won't work.
>> I'll be feeding the images dynamically depending on
the category the user
>> chooses and the image names are variable.
>>
>>
>> I'm currently using javascript that automatically
shows and hides divs
>> with the same class name by changing the display
style from none to block
>> and back to none as it loops through them.
>> This works well as I can dynamically write as many
divs as needed by
>> looping through all the items in a category.
>> But alas, this one still doesn't start to run until
all the images are
>> downloaded.
>> You can see it here:
>>
http://www.onelongfellowsquare.com/
>> There's actually 3 "slideshows", stacked one on top
of the next, using
>> this in the "Featured" section.
>>
>> Thank you for any help or ideas.
>>
>>
>> Take care,
>>
>> Tim
>>
>>
>
> "TC2112" <[email protected]> wrote in message
> news:[email protected]...
>> Hello everyone,
>>
>> Does anyone know of a good autoplay slideshow script
that starts with the
>> first image on page load and then downloads the
additional images when
>> called? In other words, if there are 20 images in
the slideshow, it
>> doesn't load all 20 images before displaying the
first.
>>
>> I have just a couple of specific requirements.
>> I don't need any controls (pause, forward, etc) on
it.
>> Most of the javascript slideshows I've looked at in
Google or have in my
>> snippet list have the image name hardcoded in the
script.
>> Image1.jpg, image2.jpg, etc, which won't work.
>> I'll be feeding the images dynamically depending on
the category the user
>> chooses and the image names are variable.
>>
>>
>> I'm currently using javascript that automatically
shows and hides divs
>> with the same class name by changing the display
style from none to block
>> and back to none as it loops through them.
>> This works well as I can dynamically write as many
divs as needed by
>> looping through all the items in a category.
>> But alas, this one still doesn't start to run until
all the images are
>> downloaded.
>> You can see it here:
>>
http://www.onelongfellowsquare.com/
>> There's actually 3 "slideshows", stacked one on top
of the next, using
>> this in the "Featured" section.
>>
>> Thank you for any help or ideas.
>>
>>
>> Take care,
>>
>> Tim
>>
>>
>
>
Maybe you are looking for
-
the help pagers just bring me around in circles. the ipod doesn't show up in system devices under the busses. i've tried just about everything. Im using windows xp at home and though maybe it was because of that. so went to a relatives and used a
-
Recently the display on my Ipod mini has been frezing on one song, the ipod contiues playing other songs but the display only shows the one it was on. IT also sometimes doesn't come on when i turn on the ipod and yet will play the songs. It fixes it
-
Ipad screen touch noy responding after several reset
what could be the possible reason why ipad screen would not responde to touch?
-
How to find the Model size in Semantics
Hi All, Please can you tell me how to find the model size in Semantics. Thanks, Indu
-
Preventing duplicates from camera to organizer
How can I set Organizer not to import duplicates from my camera/card reader in PSE7?