Indigo Rose Software
  #1  
Old 09-15-2005
Adam's Avatar
Adam Adam is offline
Indigo Rose Staff Member
 
Join Date: May 2000
Location: Indigo Rose Software
Posts: 2,154
Lightbulb Example: Resize Runtime

Attached is a sample project that will allow your AutoPlay Media Studio 6.0 runtime to be resized dynamically at runtime. To apply this example to your project follow these steps:

1) Copy the contents of the "Global Functions" section of the sample project to the same location in your project.
2) On each page in your project you must add the following function calls to the appropriate events:

On Preload:
Resize_OnPreLoad();

On Close:
Resize_OnClose();

On Size:
Resize_OnSize(e_PageWidth,e_PageHeight);

3) You must enable the "Resizable" option under Project -> Settings.

Adam Kapilik
Attached Files
File Type: apz ResizeAJK.apz (220.5 KB, 2115 views)
Reply With Quote
  #2  
Old 09-25-2005
rhosk's Avatar
rhosk rhosk is offline
Indigo Rose Customer
 
Join Date: Aug 2003
Location: Maine, USA
Posts: 1,692
Adam, I'm surprised that you ddin't get any responses to this. It's a really sweet template, thanks!
__________________
Regards,

-Ron

Music | Video | Pictures
Reply With Quote
  #3  
Old 09-26-2005
Adam's Avatar
Adam Adam is offline
Indigo Rose Staff Member
 
Join Date: May 2000
Location: Indigo Rose Software
Posts: 2,154
Thanks Ron. must appreciated

Adam Kapilik
Reply With Quote
  #4  
Old 10-10-2005
pjborg's Avatar
pjborg pjborg is offline
Forum Member
 
Join Date: Feb 2001
Location: Washington State
Posts: 120
This is awesome! It works splendidly! Thank you!
Reply With Quote
  #5  
Old 10-11-2005
Byte Byte is offline
Forum Member
 
Join Date: Jun 2005
Location: Germany
Posts: 74
hi adam,
i apply your example to my project, and get the following errors:

on starting the application

"On Preload, Line 134: Argument 1 must be of type table."
which ist this line
for i = 1, Table.Count(Objects) do

if i klick ok, the application starts
if i jump to the next page i get the error:

"On Preload, Line 239: attempt to index global 'tblProps' (a nil value)"
which is this line
if tblProps.ObType == OBJECT_BUTTON then

after klicking on ok it jumps to this page but is not displaying anything.

by jumping to the next page i get the error:

"On Close, Line 65: attempt to index global 'tblPos' (a nil value)"
which is this line
if tblPos.ObType == OBJECT_BUTTON then

and again the error:
"On Preload, Line 239: attempt to index global 'tblProps' (a nil value)"

an so on

any suggestions on that problem?

byte
Reply With Quote
  #6  
Old 10-11-2005
rhosk's Avatar
rhosk rhosk is offline
Indigo Rose Customer
 
Join Date: Aug 2003
Location: Maine, USA
Posts: 1,692
Check your "Page Actions" for exact spelling/case
__________________
Regards,

-Ron

Music | Video | Pictures
Reply With Quote
  #7  
Old 10-11-2005
Byte Byte is offline
Forum Member
 
Join Date: Jun 2005
Location: Germany
Posts: 74
i copyed everything out of adam's example. add the functions on each page and checked it again. it's all there, but i still get these errors

byte
Reply With Quote
  #8  
Old 10-11-2005
rhosk's Avatar
rhosk rhosk is offline
Indigo Rose Customer
 
Join Date: Aug 2003
Location: Maine, USA
Posts: 1,692
Can you post the project?
__________________
Regards,

-Ron

Music | Video | Pictures
Reply With Quote
  #9  
Old 10-11-2005
Byte Byte is offline
Forum Member
 
Join Date: Jun 2005
Location: Germany
Posts: 74
i don't think so, the project is over 5 mb big.

but never mind, i just don't use the resize in my project.

thanks alot anyway for help

byte
Reply With Quote
  #10  
Old 10-11-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
FWIW the project works perfectly on my end too.
Reply With Quote
  #11  
Old 10-11-2005
rhosk's Avatar
rhosk rhosk is offline
Indigo Rose Customer
 
Join Date: Aug 2003
Location: Maine, USA
Posts: 1,692
Yeah, it works flawlessly for me too and I have many objects on the page(s). byte, I had your symptoms by simply misspelling a function call. Never give up the ship!
__________________
Regards,

-Ron

Music | Video | Pictures
Reply With Quote
  #12  
Old 10-12-2005
pjborg's Avatar
pjborg pjborg is offline
Forum Member
 
Join Date: Feb 2001
Location: Washington State
Posts: 120
Hey, Byte,
There is some script in "Project > Global Functions..." that makes the whole thing work. Did you copy that part to your project?
Reply With Quote
  #13  
Old 10-12-2005
pjborg's Avatar
pjborg pjborg is offline
Forum Member
 
Join Date: Feb 2001
Location: Washington State
Posts: 120
By the way, just want to say thanks again for this example: it really opened my eyes to the possibilities of global functions. I'm still learning all this scripting, and I was thinking I'd have to go to each object and put this resize stuff on each one individually. From now on I'm going to always ask: How can I do this globally (read: quickly and easily)? Thanks, Adam, for the big bump on the head!
Reply With Quote
  #14  
Old 10-12-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Yes, Global Functions are definitely the way to go. Modular code rules. It's the key to designing projects which can be easily modified/upgraded. I put almost all of my code in the Global Functions area these days... Very easy to work with too, custom functions are incredibly simple to work with yet super powerful.
Reply With Quote
  #15  
Old 10-12-2005
Byte Byte is offline
Forum Member
 
Join Date: Jun 2005
Location: Germany
Posts: 74
hi pjborg,

yes i did copy the whole part to my Project > Global Functions. that's exactly where i am getting my errors from. when it calls the

On Preload:
Resize_OnPreLoad();

the error "On Preload, Line 134: Argument 1 must be of type table." is line 134 in Global Functions.

after i finish some other stuff in my project, i will go through these global functions again.

byte
Reply With Quote
Reply

Tags
resize, window

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
On Resize min-max App runtime Height Tweak Eagle AutoPlay Media Studio 6.0 0 04-09-2006 12:07 AM
INFO: Microsoft Data Access Components 2.8 Runtime Notes Desmond Setup Factory 6.0 Knowledge Base 0 11-28-2003 09:20 AM
INFO: Visual C++ 6.0 (SP4) Runtime Support Module Support Setup Factory 6.0 Knowledge Base 0 10-30-2002 01:53 PM
INFO: DCOM 95 1.3 Runtime Support Module Support Setup Factory 6.0 Knowledge Base 0 10-30-2002 01:38 PM
INFO: MDAC 2.7 Runtime Support Module Support Setup Factory 6.0 Knowledge Base 0 10-17-2002 04:55 PM


All times are GMT -6. The time now is 03:44 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software