问题标签 [corona-storyboard]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
1237 浏览

lua - 移动到 Corona/LUA 中的下一个场景

我已经有一段时间了,我尝试的任何方法都不起作用。我正在努力做到这一点,所以当您按下 时playButton,场景将变为场景 2。

这是代码:

我得到的错误是:

Corona Runtime Error: ?:0? attempt to index a nil value stack traceback: ... Do you want to relaunch the project?

图像

有人有什么想法吗?

0 投票
1 回答
989 浏览

lua - 从 system.DocumentsDirectory 加载图像时 Corona SDK 出现错误

我正在尝试从 system.DocumentsDirectory 加载图像,但我收到此错误消息。

我正在使用此代码创建图像并再次显示它,但我收到错误消息,指出图像不存在。

有什么帮助吗?

0 投票
2 回答
852 浏览

lua - 在表格行中添加文本字段 - Corona SDK

在我的电晕项目中,我想在表格行中显示文本字段。这里的代码,它只显示一个文本字段,我想在数据可用行中显示文本字段。

上面的代码只显示一个文本字段。请帮助解决这个问题

0 投票
5 回答
1200 浏览

coronasdk - 如何在电晕sdk上调整pickerwheel的大小

我已经在尺寸设备上制作了一个pickerwheel,320x480但现在我将我的配置更改为640x960.

我的拨轮太小了,需要放大吗?

有没有办法调整它的大小?

0 投票
2 回答
2583 浏览

lua - Corona sdk: Scene structure

I searched hours long and still didn't understand.
Here is my problem, I made a tiny game it's working, but now I need a menu, highscores screen and so on. It's meaning that my game is completly made without using storyboards/scenes functions.

This is my structure:

Introduction
In there I put everything that needs to be started at first such as the physics function.

Variables
In there I have all my variables such as:

Functions
I put in there all my functions such as:


Event listeners
In there I have every event listener such as:


So this is all what I have, what I found in my researches is that I need some functions to create my scene, enter my scene, exit my scene and destroy my scene. The problem is I don't know where to put these scenes and where to put the rest of my code. Basically what I need is:

  • A menu with a play button and a highscore button.
  • when tapping on my play button, it's jumping to my game scene (it's always the same game, it doesn't contain any level or so), if loosing then jumping to another scene that looks like, restart or go to menu.
  • when tapping on the highscore button it'll show the best scores.

And what if create objects in my functions? Is it going to disturb the scene? And what about score, I need it when switching scenes for the highscore and so on, is there a way to don't make the score not only local but public?

I hope I'm clear enough and that you will understand what I need! :) As structure example, there is the game called "doodle jump", and my game structure should look a bit the same.

0 投票
1 回答
468 浏览

lua - 无法在本地函数中将图像添加到屏幕组 [LUA, CORONA SDK STORYBOARD]

当我使用 screenGroup:insert(img) 我得到“尝试索引全局'screenGroup'(一个零值)”。
如何将 onTouch 函数中创建的 img 对象添加到 screenGroup 以确保在更改场景时将其删除?

0 投票
1 回答
475 浏览

lua - 另一个类的方法调用 Lua

当我尝试从另一个类调用其他类的方法时,它会显示错误消息,

这是我的代码,loginpage1.lua

loginpage2.lua

我的代码有什么问题,请帮我解决这个问题

0 投票
1 回答
194 浏览

lua - Corona SDK 级别:无法将我的级别集成到 Storyboard - 断言失败错误

我希望有人可以帮助我,因为过去几天这个问题一直让我发疯。所以我刚开始使用电晕 - 制作了一些教程,并且真的很开心发现了各种可能性。问题:我想将一个简单的游戏集成到故事板中。我无法找到正确的组合并且总是弹出这个错误。

这可能是一个菜鸟的错误,但我已经被困了几天,肯定需要一些帮助。我已经浏览了大部分我找不到的教程和文档。所以任何帮助都会非常受欢迎:)所以这是我的 1 级


0 投票
1 回答
296 浏览

lua - 单击时选择所有行

这里我用于在表格行中显示刻度线的代码,在每一行上单击刻度线显示,然后单击它的隐藏。我添加了一个按钮来选择使所有刻度线可见(全选),它不起作用。

关于rowtouch方法

选择所有方法

行渲染调用代码

请帮助我如何在使用SelectedAllEventListener时使所有刻度可见?

0 投票
2 回答
518 浏览

lua - 使用 corona sdk 单击 native.textfield 时自动调整屏幕

我正在为我的项目使用corona sdk,并且我的页面中有一个本机文本字段。当我单击本机文本字段时,键盘出现并且键盘阻止了文本字段。除了SCROLLVIEW 之外还有什么可以使用的方法吗?我希望它可以像发短信时一样,屏幕自动调整,这样文本字段就不会被阻塞。提前谢谢你们!

这是我在文本字段中的代码: