I am trying to hard code copying and pasting one track from another just to get the procedure down. So far, I can copy it, but not rename it or place it below the current track. There is a label on top of each track that says the name of the track. I will probably change this to an edit box so a person can change the name of the track. I may also want to color code the background of the track so a user can tell each track apart.
Here is the code:
on mousedown
put the loc of group "grpTrack" into CurLocTrack
copy group "grpTrack" to this card
paste
set the name of last group to group "grpTrack2"
set the label of group "grpTrack2" to "Track 2"
--set the loc of the last group to 683,CurLocTrack
move group "grpTrack2" from 683,80 to 683,162 without messages
end mousedown
What is wrong?
Also, how can I turn all of this into an array so that I can keep track of the tracks? Lastly, how can I keep track of WHERE the tracks are (683,82) - the 82 is the important number. All tracks will be starting at 683. All tracks are 80 in height, so adding 82 will give the track enough room. I know to add 82, but creating and updating the array is currently beyond me.
Thanks.
Mike
adding a track - look at the code please
LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Return to “Getting Started with LiveCode - Experienced Developers”
Jump to
- LiveCode Community
- ↳ Announcements
- ↳ Developer Services Marketplace
- ↳ User Groups and Events
- ↳ SoCal LiveCode Group
- ↳ Greater Toronto Area LiveCode Users Group
- ↳ Off-Topic
- ↳ Made With LiveCode
- Getting Started With LiveCode
- ↳ Getting Started with LiveCode - Complete Beginners
- ↳ Getting Started with LiveCode - Experienced Developers
- ↳ Converting to LiveCode
- Developing With LiveCode
- ↳ Talking LiveCode
- ↳ Databases
- ↳ Games
- ↳ Internet
- ↳ Multimedia
- ↳ Software Engineering
- ↳ Version Control
- ↳ Feature Proposals
- ↳ Bug Triage
- Extending LiveCode
- ↳ Using Plugins for Customizing the LiveCode IDE
- ↳ Using Externals
- ↳ Making IDE Plugins
- ↳ Building Externals
- ↳ LiveCode Builder
- Platform Specific
- ↳ Windows
- ↳ Mac OS
- ↳ Linux
- ↳ iOS Deployment
- ↳ Android Deployment
- ↳ CGIs and the Server
- ↳ HTML5
- ↳ Raspberry Pi
- Academic Endeavors
- ↳ Teaching with LiveCode
- ↳ Research and Post Secondary
- ↳ LiveCode University
- ↳ Educational Outreach
- Livecode Open Source Archived Forum- closed to posting
- ↳ Engine Contributors
- ↳ IDE Contributors
- ↳ Documentation and Tutorials
- ↳ Brainstorms
- ↳ Community Projects
- LiveCode Hosting