HighDots Forums  

Flash/Dreamweaver problem

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Flash/Dreamweaver problem in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gazookiewang
 
Posts: n/a

Default Flash/Dreamweaver problem - 11-18-2004 , 02:12 AM






I am having a problem incorporating Flash into my web site. I created a Flash
file where the first frame contains code that picks a random number 0-7. It
then goes to a certain frame associated with each number, plays a small motion
tween, then stops. I tested this out in the Publish Preview (both HTML and
Flash) and it worked perfectly. So I published the file. I then opened the swf
file, and it worked perfectly. I opened the html file and it worked perfectly,
too. Thinking it was finished, I inserted it into a Dreamweaver file. I then
tested the page in Publish Preview (Internet Explorer). Again it worked
perfectly. I published the page and opened up the new htm file. Still worked
fine. Then I FTP'ed both the swf file and the htm file to my server space. I
opened up the page (which is now a part of my site) and the swf file loaded
like it was supposed. HOWEVER...it seemed to ignore the random number picking.
It just played straight through like a normal movie clip, playing the first
listed motion tween, then stopping. It plays the same one over and over and
NEVER switches. Of course it should be switching because of the randomness. I
have copied the code into this message so maybe someone can find something
wrong with it. Or maybe it's the Dreamweaver settings. I don't know. But it
seemed to work in both Flash and Dreamweaver, but not when I put it on my
server. Any ideas?????

this.onLoad = function() {
header = random(8);
if (header == 0) {
gotoAndPlay(79);
}
if (header == 1) {
gotoAndPlay(56);
}
if (header == 2) {
gotoAndPlay(33);
}
if (header == 3) {
gotoAndPlay(10);
}
if (header == 4) {
gotoAndPlay(102);
}
if (header == 5) {
gotoAndPlay(125);
}
if (header == 6) {
gotoAndPlay(148);
}
if (header == 7) {
gotoAndPlay(171);
}
};


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Flash/Dreamweaver problem - 11-18-2004 , 07:37 AM






Try to direct such posts to

news://forums.macromedia.com/macromedia.flash

or the Webforum at

http://webforums.macromedia.com/flash.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Gazookiewang" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I am having a problem incorporating Flash into my web site. I created a
Flash
file where the first frame contains code that picks a random number 0-7.
It
then goes to a certain frame associated with each number, plays a small
motion
tween, then stops. I tested this out in the Publish Preview (both HTML and
Flash) and it worked perfectly. So I published the file. I then opened the
swf
file, and it worked perfectly. I opened the html file and it worked
perfectly,
too. Thinking it was finished, I inserted it into a Dreamweaver file. I
then
tested the page in Publish Preview (Internet Explorer). Again it worked
perfectly. I published the page and opened up the new htm file. Still
worked
fine. Then I FTP'ed both the swf file and the htm file to my server space.
I
opened up the page (which is now a part of my site) and the swf file
loaded
like it was supposed. HOWEVER...it seemed to ignore the random number
picking.
It just played straight through like a normal movie clip, playing the
first
listed motion tween, then stopping. It plays the same one over and over
and
NEVER switches. Of course it should be switching because of the
randomness. I
have copied the code into this message so maybe someone can find something
wrong with it. Or maybe it's the Dreamweaver settings. I don't know. But
it
seemed to work in both Flash and Dreamweaver, but not when I put it on my
server. Any ideas?????

this.onLoad = function() {
header = random(8);
if (header == 0) {
gotoAndPlay(79);
}
if (header == 1) {
gotoAndPlay(56);
}
if (header == 2) {
gotoAndPlay(33);
}
if (header == 3) {
gotoAndPlay(10);
}
if (header == 4) {
gotoAndPlay(102);
}
if (header == 5) {
gotoAndPlay(125);
}
if (header == 6) {
gotoAndPlay(148);
}
if (header == 7) {
gotoAndPlay(171);
}
};




Reply With Quote
  #3  
Old   
James Shook
 
Posts: n/a

Default Re: Flash/Dreamweaver problem - 11-18-2004 , 08:07 AM



You would get a better response if you asked this in the Flash news group.

--
James M. Shook
http://www.jshook.com

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.