Adobe Dreamweaver Forums



Last 10 THreads :         Pop up window using AS3 (Last Post : retsnomrev - Replies : 1 - Views : 2 )           »          CS4 - annoying help system (Last Post : Rothrock - Replies : 9 - Views : 10 )           »          My bullets dont work in my game >.< (Last Post : kglad - Replies : 1 - Views : 4 )           »          flash movie plays prematurely (Last Post : kglad - Replies : 6 - Views : 7 )           »          Image Fade Out/Load new Image/Fade In (Last Post : EWN-CMI - Replies : 0 - Views : 1 )           »          Recommend Reading? (Last Post : anpuofeck - Replies : 5 - Views : 7 )           »          static sound (Last Post : kglad - Replies : 15 - Views : 16 )           »          Detect multiple areas of transparency in an image? (Last Post : Rothrock - Replies : 8 - Views : 9 )           »          Add a full screen button to a video. (Last Post : kglad - Replies : 5 - Views : 11 )           »          Problems when uploading my website (Last Post : speculumcm - Replies : 4 - Views : 5 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Director > Lingo
 
Tags:



Reply
  #1 (permalink)  
Old 11-12-2008, 07:03 PM
SuperDMon
 
Posts: n/a
Diggs:
Default Urgent! Lingo script to display dynamic slides notworking in Projector

URGENT Issue!!

I developed a lingo script that uses fileIO to count the number of BMP files
in a directory and then lingo creates dynamic cast members and then i create a
newMember(#bitmap) and use importFileInto to load the BMP images dynamically
into the cast. This all works great inside director! However, when I publish to
a projector it does not load or display the slides for some reason. I've also
made sure to include every extra under the sun with the projector, but still it
does not work. I'm including the code I'm running below. I'm at project
deadline and thought everything was running smoothly. Any/All ideas are
welcome!!

Thanks!
Charles

--------------------------------------------------------------------------------
--


on getSlideCount
slides=new (xtra"fileio")
slideEnd = False
slideCount=1

repeat while slideEnd = False
slidePath = ""&the moviePath&"slides\"&"Slide"&slideCount&".BMP"
slides.openFile(""&slidePath&"",0)
if slides.status() <> 0 then
slideEnd = True
slides.closeFile()
else
slideCount = slideCount + 1
slides.closeFile()
end if
end repeat
slideCount = slideCount - 1
put "received:"&slideCount
end getSlideCount

on loadSlides
repeat with x = 1 to slideCount
imagePath = the moviePath&"slides\Slide"&x&".BMP"
_movie.newMember(#bitmap).importFileInto(imagePath )
end repeat
end loadSlides

on showSlide
memberName = "Slide"&slideCurrent
channel("slideChannel").makeScriptedSprite(member( memberName), point(400,
300))
end showSlide

on unloadSlides
channel("slideChannel").removeScriptedSprite()
repeat with x = 1 to slideCount
memberName = "Slide"&x
member(memberName).erase()
end repeat
end unloadSlides



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-12-2008, 07:25 PM
Sean Wilson
 
Posts: n/a
Diggs:
Default Re: Urgent! Lingo script to display dynamic slides not workingin Projector

Your getSlideCount() handler seems to be using FileIO to open files so
that you can check their status (presumably to see whether they exist or
not). It would be much easier to use an xtra that implements a "file
exists" method (like Buddy API or FileXtra4).

Can you explain at what point it fails? Does it correctly "load" your
slides but fail at the point of display? Scattering some alert
statements through your code, or opening a runtime message window with
'_player.debugPlaybackEnabled = 1' will help with determining where it
falls over
Reply With Quote
  #3 (permalink)  
Old 11-13-2008, 12:03 AM
wherold
 
Posts: n/a
Diggs:
Default Re: Urgent! Lingo script to display dynamic slides notworking in Projector

maybe you did not include all Xtras needed for importing.

Wolfgang
Reply With Quote


  #4 (permalink)  
Old 11-13-2008, 12:55 PM
SuperDMon
 
Posts: n/a
Diggs:
Default Re: Urgent! Lingo script to display dynamic slides notworking in Projector

Believe it or not I tracked down the issue. There seems to be some sort of
problem with some commands from another Xtra I was using. I have the
Resolution Xtra running that allows you to force screen resolution among other
things. I commented out the lines

-- disable_task_switching(xResolution)
-- hide_taskbar(xResolution)
-- hide_desktop(xResolution,0,0,0

After commenting out those lines, my images loaded just fine. Very odd issue,
and I've informed the author of the resolution xtra about this problem.

Charles


Reply With Quote
  #5 (permalink)  
Old 11-17-2008, 03:24 PM
matthewmaday
 
Posts: n/a
Diggs:
Default Re: Urgent! Lingo script to display dynamic slides notworking in Projector

Maybe I am missing something but why not just set the fileName of a single cast
member, or two if you want a preloader? If you have Buddy API, you can simply
get all of the .bmp files in a directory without loading them as well. And on
that note... if you don't have BuddyAPI, I'd get it before it too disappears.


Reply With Quote
  #6 (permalink)  
Old 11-18-2008, 12:44 PM
SuperDMon
 
Posts: n/a
Diggs:
Default Re: Urgent! Lingo script to display dynamic slides notworking in Projector

I'm sure there are many ways to skin a cat, but I still can not rule out that
there is some sort of compatibility issue with the Resolution Xtra. I'll take
a look at the BuddyAPI Xtra. My guess is that either using the FileIO is
failing or the following line:
_movie.newMember(#bitmap).importFileInto(imagePath )

If it is FileIO failing then using BuddyAPI to get the list of bmp files might
work.

[q]Originally posted by: matthewmaday
Maybe I am missing something but why not just set the fileName of a single
cast member, or two if you want a preloader? If you have Buddy API, you can
simply get all of the .bmp files in a directory without loading them as well.
And on that note... if you don't have BuddyAPI, I'd get it before it too
disappears.
[/q]



Reply With Quote


  #7 (permalink)  
Old 11-27-2008, 12:05 AM
BigDaddy
 
Posts: n/a
Diggs:
Default Re: Urgent! Lingo script to display dynamic slides notworking in Projector

Hi

I've been working with BuddyApi to find image files on the hard drive. It
works well. However, it is very painful waiting for a thumbnail of the image to
display in my movie. I have tried importFileInto and sprite(?).member.fileName.
Is there any way to get a faster response?

Thank You,
BigDaddy

Reply With Quote
  #8 (permalink)  
Old 11-27-2008, 12:14 AM
matthewmaday
 
Posts: n/a
Diggs:
Default Re: Urgent! Lingo script to display dynamic slides notworking in Projector

I would simply set the filename of a member to the image.

member("nameofthemember","castlib).fileName = "C:\Vendor\nameofthefile.jpg"

it should only take a fraction of a section for the external image to load
into the cast.

You can then display it at any size. This is the fast/easy way.

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
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:58 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk