Link to home
Start Free TrialLog in
Avatar of godimugly
godimugly

asked on

Palindrome

I am trying to use the palindrome tag on one of my pages for an embeded swf file. Silmply want it to play the file forward and backwards. The last thing I tried was:

(Inside of the embed tag) .......... autoplay=true controller=false loop=plaindrome></embed>
<param name=loop value=palindrome>

I've tried these both inside and outside of quotations.

I am using Dreamweaver MX to creat this page
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

loop=plaindrome

that would be a typo.
Avatar of godimugly
godimugly

ASKER

yes thank you. I retyped it here. Didn't copy and paste
Can you c/p the code anyway?
Not sure it's going to help. Here is the code at this moment in time. I actually don't think this can be done with a script command, but anyways here it is.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>TITLE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT language=JavaScript>
var newwin;  
function launchwin(winurl,winname,winfeatures)  
{  
//This launches a new window  
newwin = window.open(winurl,winname,winfeatures);
newwin.focus();
}
</SCRIPT>
</head>

<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="285">
  <param name="movie" value="../terous%20BT%20Blk%20Keyed.swf">
  <param name="quality" value="high">
  <param name="loop" value="palindrome">
  <embed src="../terous%20BT%20Blk%20Keyed.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="285"></embed></object>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="285">
  <param name="movie" value="../terous%20TT%20Blk%20Keyed.swf">
  <param name="quality" value="high">
  <param name="quality" value="high">
  <param name="loop" value="palindrome">
  <embed src="../terous%20TT%20Blk%20Keyed.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="285" AUTOPLAY=TRUE CONTROLLER=FALSE loop="PALINDROME"></embed></object>
I'm not sure I can help you, as this really isn't a DW problem.  It's a Flash problem and I would consider reposting it there.
I'm not 100% but I think only Quicktime is able to use the palindrome loop parameter.  Flash most certaintly doesn't use it.  I
Actually, with a quick google: http://www.apple.com/quicktime/tutorials/embed2.html

Only QuickTime support the loop parameter of the embed tag.  Not Flash.
This is what I've been able to discover on my own so far. These are not tested however, so I don't know if they are functional. I was unsure as to whether I should have posted this problem in the DW or Flash section. I chose here because I believed there was an embed tag that could control this function. I don't care whether it's accomplished through DW or Flash as long as the end result is the same.

function moveBack(mc, amount){
      while(this._currentframe > 0) {
      mc.gotoAndStop(mc._currentframe - amount);
      return mc._currentframe;
      trace(mc._currentframe);
}

this.onEnterFrame = function() {
      //moveBack(_parent.slideContainer, 1);
      // change the second parameter to 10;
      moveBack(_parent.slideContainer, 10);
}

or
function moveBack(mc, amount){
      while(this._currentframe > 0) {
      mc.gotoAndStop(mc._currentframe - amount);
      return mc._currentframe;
      trace(mc._currentframe);
}

this.onEnterFrame = function() {
      moveBack(_parent.slideContainer, 1);
}
on (release) {
      if(_parent.slideContainer._currentframe > 1){
            var i = 10;
            while (i > 0){
                  i--;

_parent.slideContainer.gotoAndStop(_parent.slideContainer._currentframe
-
1);

                  trace(i);
            }
That's actionscript and will need to be put into the timeline with Flash.  
Yes I'm aware it's actionscript. Is there anyone out there who has done this and knows what the commands should be and if this is on the right track.
I think you should post a pointer question in the Flash TA and get someone from there to take a look at it.  They can answer questions without breaking a sweat that we are going to have a harder time doing.
Is there a way to change the categorization of the question (move it to that forum)?
Here's your solution.
In the first frame of the clip you want to reverse:
function moveForward(mc, amount) {
      while (this._currentframe>0) {
            mc.gotoAndStop(mc._currentframe+amount);
            return mc._currentframe;
            trace(mc._currentframe);
      }
}
onEnterFrame = function() {
      //moveBack(_parent.slideContainer, 1);
      // change the second parameter to 10;
      moveForward(this, 1);
};
stop();

in the last frame of the clip you want to reverse:
function moveBack(mc, amount) {

      while (this._currentframe>0) {
            mc.gotoAndStop(mc._currentframe-amount);
            return mc._currentframe;
            trace(mc._currentframe);
      }
}
onEnterFrame = function() {
      //moveBack(_parent.slideContainer, 1);
      // change the second parameter to 10;
      moveBack(this, 1);
};
stop();

Works here to move a clip back and forth across the screen.  
I appreciate the input. Being a neophyte to actionscripting, I'm not familiar with some of the operators you use. If I post the location of the files do you think you could help? Thanks.

http://www.alwaysrememberphotography.com/fla%20test.htm
First off your embedding a video clip inside flash, you can't reverse that.  You either need to covert it to quicktime to use the palindrome feature or re-loop it with some other program
So it has to be a mov file? What was the script you were giving me to be used for?
yes, it has to be mov to use the palindrome.  The script I posted would take a clip with x number of frames (for example 20) and when the clip reaches the last frame it starts playing backwards (20,19,18,etc...) the start over.  the fla you posted contains a viceo clip in a single frame.  
ok, really what u guys want to do in your flash would be to put this in your first frame

_global.movement=0;   // 0=forward    1=backward
_root.stop();
_root.onEnterFrame = function() {
  if (_global.movement==0) _root.nextFrame();
  if (_global.movement==1) _root.prevFrame();
}

then just adjust the
_global.movement=0;   // 0=forward    1=backward
line to suite ur needs, you can even make a button that says:
on (release) { _global.movement=1; }

also setting _global.movement to anything over 1 or under 0 effectivly pauses the movie
Ok Brett I added the changes but I'm pretty sure I didn't do it correctly. Mind taking a look?
ASKER CERTIFIED SOLUTION
Avatar of Brett19
Brett19

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
godimugly,

sorry for the late response, but I'm glad some other people are helping you out.  

You can't really change a question once posted, but what you can do is post a link to this question in the Flash TA as a 20pt question and that will get the Flash experts here to help you.  It looks like that may have happened.

Again, sorry for the delay and not being able to help you right away.
Ok Brett. You understand exactly what I want to do now. I made the changes again but for whatever reason it's not working. I'm not too savvy when it comes to flash so could you look at the adjusted fla file again

 http://www.alwaysrememberphotography.com/fla%20test.htm

and make the necessary changes to the file. If you can email them or post them where I can download it, it would be greatly appreciated. Thanks.

concise@prodigy.net
I am getting an error upon exporting the swf file after making the suggested changes. This is the error.

**Error** Scene=Scene 1, layer=as, frame=1:Line 4: Operator '=' must be followed by an operand
           if (_root._currentframe=<1)_global.movement=0;

**Error** Scene=Scene 1, layer=as, frame=1:Line 5: Operator '=' must be followed by an operand
           if (_root._currentframe=>_root._totalframes)_global.movement=1;

Not sure how to go about fixing it.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This appears to work. It's relatively choppy on the reverse playback however. Is there a way to workaround this?
I have applied the script provided to different fla files and the results are sporadic. When the file chooses to play in reverse it does so after the 2nd or 3rd loop and usually causes the swf to skip. I can only guess as to the cause of the problem but I'm relatively sure that it has something to do with the fact that I don't know what I'm doing. I've put the new files up so if someone could take a look it'd be greatly appreciated. Thanks.

http://www.alwaysrememberphotography.com/fla%20test.htm