Setproperty, syntax errors in MX2004 Pro

  • AHappyBunny
  • Born
  • Born
  • AHappyBunny
  • Posts: 2

Post 3+ Months Ago

Wellheres the problem i want to rotate a dial by a random factor on a click of different buttons, i can do this in MX but not mx 2004

See here

<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="550" height="400">
<param name="movie" value="http://www.boweevil.net/rotate.swf">
<param name="quality" value="high">
<embed src="http://www.boweevil.net/rotate.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400"></embed>
</object>

Using the code on the movie =

PHP Code: [ Select ]
onClipEvent (load) {
 
 
 
      _root.targx = 100;
 
}
 
onClipEvent (enterFrame) {
 
 
 
      cX = this._rotation;
 
 
 
      difx = cx-_root.targx;
 
 
 
      setProperty(this, _rotation, cx-(difx/6));
 
}
  1. onClipEvent (load) {
  2.  
  3.  
  4.  
  5.       _root.targx = 100;
  6.  
  7. }
  8.  
  9. onClipEvent (enterFrame) {
  10.  
  11.  
  12.  
  13.       cX = this._rotation;
  14.  
  15.  
  16.  
  17.       difx = cx-_root.targx;
  18.  
  19.  
  20.  
  21.       setProperty(this, _rotation, cx-(difx/6));
  22.  
  23. }



and on the button

PHP Code: [ Select ]
on (release) {
 
      _root.targx = random(200);
 
}
  1. on (release) {
  2.  
  3.       _root.targx = random(200);
  4.  
  5. }


But when saved as a MX2004 or started the same coding in 2004 it doesnt work? what am i doign wrong?

All help woudl be greatly appreciated.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • AHappyBunny
  • Born
  • Born
  • AHappyBunny
  • Posts: 2

Post 3+ Months Ago

To answer my own question its caps-sensative

So the error was here

"cX = this._rotation;

difx = cx-_root.targx;"

But now i know DONT MAKe tHE SAME MISTAKES!.

Stupid flash...
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

cool idea, and thanks for posting the solution! You never know what person may need your answer some day. Welcome to OZZU. :D

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 12 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.